Re: [PATCHES] Linking on AIX (Was: Fix linking of OpenLDAP libraries )

Поиск
Список
Период
Сортировка
Искать

Re: [PATCHES] Linking on AIX (Was: Fix linking of OpenLDAP libraries )

От:
"Rocco Altier" <RoccoA@Routescape.com>
Дата:
Вложения:
With the patch attached this time...

	-rocco

> -----Original Message-----
> From: Rocco Altier 
> Sent: Friday, September 15, 2006 2:04 PM
> To: Rocco Altier; 'Tom Lane'; 'Albe Laurenz'
> Cc: 'pgsql-hackers@postgresql.org'
> Subject: RE: [PATCHES] [HACKERS] Linking on AIX (Was: Fix 
> linking of OpenLDAP libraries ) 
> 
> 
> > > From: Tom Lane [mailto:tgl@sss.pgh.pa.us] 
> > > Mmm ... what of "make check"'s temporary installation?  We need
> > > to have the executables search in the temporary install's libdir,
> > > *before* looking in the configured --libdir (which could easily
> > > contain an incompatible back-version libpq ...)
> > > 
> > > pg_regress normally tries to handle this by setting 
> LD_LIBRARY_PATH
> > > ... does AIX use that or a similar symbol?
> > > 
> > The "make check" was successful in my previous testing of the last
> > patch, so it appears that AIX was paying attention to 
> LD_LIBRARY_PATH.
> > 
> > I am testing the new version of the patch now, so will report back
> > shortly.
> > 
> From testing the new patch, it did not work for the 
> regression tests in the buildfarm.
> Not sure why it did work before.
> 
> Anyhow, I have updated the patch to set LIBPATH (AIX's 
> version of LD_LIBRARY_PATH), in pg_regress and ecpg's pg_regress.
> 
> I have tested this with default config options 
> (enable-shared, enable-rpath).  I am starting to test the 
> other methods as well, but wanted to get this out first.
> 
> 	-rocco
> 

Re: [PATCHES] Linking on AIX (Was: Fix linking of

От:
Bruce Momjian <bruce@momjian.us>
Дата:

I would like to see some comments about AIX linking so we don't need to
relearn this in 1-2 years.

---------------------------------------------------------------------------

Rocco Altier wrote:
> With the patch attached this time...
> 
> 	-rocco
> 
> > -----Original Message-----
> > From: Rocco Altier 
> > Sent: Friday, September 15, 2006 2:04 PM
> > To: Rocco Altier; 'Tom Lane'; 'Albe Laurenz'
> > Cc: 'pgsql-hackers@postgresql.org'
> > Subject: RE: [PATCHES] [HACKERS] Linking on AIX (Was: Fix 
> > linking of OpenLDAP libraries ) 
> > 
> > 
> > > > From: Tom Lane [mailto:tgl@sss.pgh.pa.us] 
> > > > Mmm ... what of "make check"'s temporary installation?  We need
> > > > to have the executables search in the temporary install's libdir,
> > > > *before* looking in the configured --libdir (which could easily
> > > > contain an incompatible back-version libpq ...)
> > > > 
> > > > pg_regress normally tries to handle this by setting 
> > LD_LIBRARY_PATH
> > > > ... does AIX use that or a similar symbol?
> > > > 
> > > The "make check" was successful in my previous testing of the last
> > > patch, so it appears that AIX was paying attention to 
> > LD_LIBRARY_PATH.
> > > 
> > > I am testing the new version of the patch now, so will report back
> > > shortly.
> > > 
> > From testing the new patch, it did not work for the 
> > regression tests in the buildfarm.
> > Not sure why it did work before.
> > 
> > Anyhow, I have updated the patch to set LIBPATH (AIX's 
> > version of LD_LIBRARY_PATH), in pg_regress and ecpg's pg_regress.
> > 
> > I have tested this with default config options 
> > (enable-shared, enable-rpath).  I am starting to test the 
> > other methods as well, but wanted to get this out first.
> > 
> > 	-rocco
> > 

Content-Description: aix.link.regression.patch

[ Attachment, skipping... ]

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

--  Bruce Momjian   bruce@momjian.us EnterpriseDB    http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +

Re: [PATCHES] Linking on AIX (Was: Fix linking of OpenLDAP libraries )

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Rocco Altier"  writes:
> With the patch attached this time...

The proposed patch to Makefile.shlib makes me gag :-( ... lying to make
about what's the purpose of a rule is seldom a good idea.  Please try
as attached instead.  Also, I am *really* dubious about the change to
ecpg/test/Makefile.regress --- if that's necessary then this whole
exercise is wrong.

			regards, tom lane

*** src/Makefile.shlib.orig	Thu Apr 27 22:53:20 2006
--- src/Makefile.shlib	Fri Sep 15 18:11:30 2006
***************
*** 96,103 ****
  soname = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
  
  ifeq ($(PORTNAME), aix)
!   shlib			= lib$(NAME)$(DLSUFFIX)
! #   SHLIB_LINK		+= -lc
  endif
  
  ifeq ($(PORTNAME), darwin)
--- 96,103 ----
  soname = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
  
  ifeq ($(PORTNAME), aix)
!   shlib			= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
!   haslibarule   = yes
  endif
  
  ifeq ($(PORTNAME), darwin)
***************
*** 295,303 ****
  else # PORTNAME == aix
  
  # AIX case
! $(shlib): lib$(NAME).a
  	$(MKLDEXPORT) lib$(NAME).a > lib$(NAME)$(EXPSUFF)
! 	$(COMPILER) $(LDFLAGS_NO_L) $(LDFLAGS_SL) -o $@ $< -Wl,-bE:lib$(NAME)$(EXPSUFF) $(SHLIB_LINK)
  	
  endif # PORTNAME == aix
  
--- 295,307 ----
  else # PORTNAME == aix
  
  # AIX case
! $(shlib) lib$(NAME).a: $(OBJS)
! 	$(LINK.static) lib$(NAME).a $^
! 	$(RANLIB) lib$(NAME).a
  	$(MKLDEXPORT) lib$(NAME).a > lib$(NAME)$(EXPSUFF)
! 	$(COMPILER) $(LDFLAGS_NO_L) $(LDFLAGS_SL) -o $(shlib) lib$(NAME).a -Wl,-bE:lib$(NAME)$(EXPSUFF) $(SHLIB_LINK)
! 	rm -f lib$(NAME).a
! 	$(AR) $(AROPT) lib$(NAME).a $(shlib)
  	
  endif # PORTNAME == aix
  
***************
*** 350,355 ****
--- 354,360 ----
  
  ifeq ($(enable_shared), yes)
  install-lib-shared: $(shlib)
+ ifneq ($(PORTNAME), aix)		# we don't install $(shlib) on AIX
  	$(INSTALL_SHLIB) $< '$(DESTDIR)$(libdir)/$(shlib)'
  ifneq ($(PORTNAME), cygwin)
  ifneq ($(PORTNAME), win32)
***************
*** 365,370 ****
--- 370,376 ----
  endif
  endif # not win32
  endif # not cygwin
+ endif # not aix
  endif # enable_shared
  
  
FAQ