This is a discussion on Re: [Samba] [ANNOUNCE] Samba 3.2.2 Available for Download within the Samba forums, part of the Networking and Network Related category; James Kosin wrote: > Tim, > You still may have to move the libraries to their normal spot or make ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
James Kosin wrote:
> Tim, > You still may have to move the libraries to their normal spot or make an entry in /etc/ld.so.conf to point to the directory where the libraries are kept for samba. > > James > On Solaris, one uses the crle command to achieve the same result. Aside from that, I believe that the general practice for packages that include their own libraries is to hard-code the libpath into any applicable binaries using '-rpath $prefix/lib' in the linking step (or '-R $prefix/lib' with Solaris ld). If you install samba into its own area (say /usr/local/samba) and the libraries are installed in a non-system location (perhaps /usr/local/samba/lib), messing with the runtime linker config to make samba work should NOT be required. -Brian -- --------------------------------------------------- Brian H. Nelson Youngstown State University System Administrator Media and Academic Computing bnelson[at]cis.ysu.edu --------------------------------------------------- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|||
|
On Fri, 22 Aug 2008, Brian H. Nelson wrote:
> James Kosin wrote: >> Tim, >> You still may have to move the libraries to their normal spot or make an >> entry in /etc/ld.so.conf to point to the directory where the libraries are >> kept for samba. >> >> James >> > > On Solaris, one uses the crle command to achieve the same result. > > Aside from that, I believe that the general practice for packages that > include their own libraries is to hard-code the libpath into any applicable > binaries using '-rpath $prefix/lib' in the linking step (or '-R $prefix/lib' > with Solaris ld). > > If you install samba into its own area (say /usr/local/samba) and the > libraries are installed in a non-system location (perhaps > /usr/local/samba/lib), messing with the runtime linker config to make samba > work should NOT be required. Exactly! I had the same problem, I believe with 3.0.31. I think I solved it by editing the Makefile (after configuring samba) to add '-R $prefix/lib' as described above. On Solaris, the configure step _should_ generate a Makefile with the -R (or -rpath) option above, but it does not. -- DE -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|||
|
James Kosin wrote: > Maybe, we should have an option. Packagers don't really want or need to > modify their 'ld' settings with the '-R' option. Or really install in > the same path as the destination system for packaging. The odd thing is that the 3.0.x series works correctly, with no diddling of configure options or the makefile. -- Tim Evans, TKEvans.com, Inc. | 5 Chestnut Court UNIX System Admin Consulting | Owings Mills, MD 21117 http://www.tkevans.com/ | 443-394-3864 http://www.come-here.com/News/ | tkevans@tkevans.com -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|||
|
James Kosin wrote: > Maybe, we should have an option. Packagers don't really want or need to > modify their 'ld' settings with the '-R' option. Or really install in > the same path as the destination system for packaging. The odd thing is that the pre-3.2 series works correctly, with no diddling of configure options or the makefile. -- Tim Evans, TKEvans.com, Inc. | 5 Chestnut Court UNIX System Admin Consulting | Owings Mills, MD 21117 http://www.tkevans.com/ | 443-394-3864 http://www.come-here.com/News/ | tkevans@tkevans.com -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|||
|
On Fri, 22 Aug 2008, James Kosin wrote:
> -----Original Message----- > From: Daniel Eischen [mailto:eischen@vigrid.com] > Sent: Friday, August 22, 2008 11:44 AM > To: Brian H. Nelson > Cc: James Kosin; samba@lists.samba.org > Subject: Re: [Samba] [ANNOUNCE] Samba 3.2.2 Available for Download > >> On Fri, 22 Aug 2008, Brian H. Nelson wrote: >> >>> James Kosin wrote: >>>> Tim, >>>> You still may have to move the libraries to their normal spot or > make an >>>> entry in /etc/ld.so.conf to point to the directory where the > libraries are >>>> kept for samba. >>>> >>>> James >>>> >>> >>> On Solaris, one uses the crle command to achieve the same result. >>> >>> Aside from that, I believe that the general practice for packages > that >>> include their own libraries is to hard-code the libpath into any > applicable >>> binaries using '-rpath $prefix/lib' in the linking step (or '-R > $prefix/lib' >>> with Solaris ld). >>> >>> If you install samba into its own area (say /usr/local/samba) and the > >>> libraries are installed in a non-system location (perhaps >>> /usr/local/samba/lib), messing with the runtime linker config to make > samba >>> work should NOT be required. >> >> Exactly! I had the same problem, I believe with 3.0.31. I >> think I solved it by editing the Makefile (after configuring >> samba) to add '-R $prefix/lib' as described above. >> >> On Solaris, the configure step _should_ generate a Makefile >> with the -R (or -rpath) option above, but it does not. >> >> -- >> DE > > Maybe, we should have an option. Packagers don't really want or need to > modify their 'ld' settings with the '-R' option. Or really install in > the same path as the destination system for packaging. > > Is the ld -R option only temporary; or does this add an entry in the > ld.so.cache for future reference? Sorry, I'm a bit ignorant and have > been out of touch. It only affects the binaries produced when using the option. Packages/binaries can be built by any user, -R doesn't require root privileges. > The bigger issue may be having the libraries actually being installed in > a shared area known by ld on the destination system, as oppose to HARD > CODING or RE-CONFIGURING ld to accept a new location.... hmmm.... > > The '-rpath' option would cause issues if a third party developed tools > that linked to libnetapi.so in the normal way of using '-lnetapi'... > causing confusion when porting to another platform where the libraries > may/could be located elsewhere. > The -R option looks harmless enough; but, packagers (RPM, etc) might > take notice of ld not operating correctly after building a package for > release. Using -rpath/-R is the norm for Solaris packages. Samba already is built with knowledge of where it is installed and where its lib, data, var, etc directories reside. What is _not_ the norm, is having to set LD_LIBRARY_PATH in order for your applications to work. Take a look at all the packages at sunfreeware.com - they are all built for /usr/local and, at least from hundred or so packages I've installed from there, none require LD_LIBRARY_PATH to work when their libraries are in /usr/local/lib. -- DE -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|||
|
On Solaris I think the best option for packages which have a directory
structure like: package/bin package/lib is to link the executables with: -R$ORIGIN/../lib (In a Makefile use: LDFLAGS = -R\$$ORIGIN/../lib) This means the package can installed anywhere and still pick up the correct libraries. Using LD_LIBRARY_PATH or crle is bad practice. On Linux you can get similar results by linking with: -Wl,-zorigin,-rpath,$ORIGIN/../lib (In a Makefile use: LDFLAGS = -Wl,-zorigin,-rpath,\$$ORIGIN/../lib) The use of $ORIGIN is an unfortunate design choice because of $ having a special meaning in shells and make. In can be hard or impossible to work out the correct level of quoting required with configure scripts so it is often easiest just to edit the Makefiles after they have been generated by the configure script. libtool is a real pain: I have not yet worked out how to get libtool to use $ORIGIN in the RUNPATH. Nick James Kosin wrote: > -----Original Message----- > From: Daniel Eischen [mailto:eischen@vigrid.com] > Sent: Friday, August 22, 2008 3:34 PM > To: James Kosin > Cc: Brian H. Nelson; samba@lists.samba.org > Subject: RE: [Samba] [ANNOUNCE] Samba 3.2.2 Available for Download > >> Using -rpath/-R is the norm for Solaris packages. Samba >> already is built with knowledge of where it is installed >> and where its lib, data, var, etc directories reside. >> >> What is _not_ the norm, is having to set LD_LIBRARY_PATH in >> order for your applications to work. Take a look at all >> the packages at sunfreeware.com - they are all built for >> /usr/local and, at least from hundred or so packages I've >> installed from there, none require LD_LIBRARY_PATH to work >> when their libraries are in /usr/local/lib. >> >> -- >> DE > > Actually, I'll have to check to see if Michael back-ported the configure > option to specify the destination directory for the libraries. The > default seems to be in the %prefix/lib/samba directory with many > packages moving them to the %prefix/lib directory and keeping the rest > in the %prefix/lib/samba structure. > > James K. > -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|||
|
Hi folks!
Nicholas Brealey wrote: > On Solaris I think the best option for packages which have a directory > structure like: > > package/bin > package/lib > > is to link the executables with: > -R$ORIGIN/../lib > > (In a Makefile use: LDFLAGS = -R\$$ORIGIN/../lib) > > This means the package can installed anywhere and still pick up the > correct libraries. > > Using LD_LIBRARY_PATH or crle is bad practice. Well, we had the discussion of whether to use rpath or LD_LIBRARY_PATH (or ld.so.conf) already on this and/or the samba-technical mailing list. (I should look up that thread...) > James Kosin wrote: > >-----Original Message----- > >From: Daniel Eischen [mailto:eischen@vigrid.com] > > > >>Using -rpath/-R is the norm for Solaris packages. Samba > >>already is built with knowledge of where it is installed > >>and where its lib, data, var, etc directories reside. > >> > >>What is _not_ the norm, is having to set LD_LIBRARY_PATH in > >>order for your applications to work. Take a look at all > >>the packages at sunfreeware.com - they are all built for > >>/usr/local and, at least from hundred or so packages I've > >>installed from there, none require LD_LIBRARY_PATH to work > >>when their libraries are in /usr/local/lib. Well on the other hand, in Linux distributions, it is considered bad practise to link using an RPATH. You either put your libs into /usr/lib or /usr/local/lib or else use a ld.so.conf file. So there are advocates for and more significantly against each of rpath and LD_LIBRARY_PATH. I decided not to compile with an RPATH because at that time most people argued that this is a bad thing. 1. easiest solution: put libs into folder searched by dynamic linker (e.g. /usr/lib) 2. next solution: use LD_LIBRARY_PATH when installing to /some/package/dir (or use an ld.so.conf file when available) 3. modify LDFLAGS to use an rpath. I had the plan to provide the option of linking with an rpath as a configure option. But it is not so easy to get it right for all supported platforms (Nicholas only mentioned solaris and Linux...). And I did not have the time yet to complete this in an upstream compliant manner. Patches welcome!! > James Kosin wrote: > >Actually, I'll have to check to see if Michael back-ported the configure > >option to specify the destination directory for the libraries. The > >default seems to be in the %prefix/lib/samba directory with many > >packages moving them to the %prefix/lib directory and keeping the rest > >in the %prefix/lib/samba structure. * creation and installation of shared libs as filename = SONAME and symlink .so --> .so.VERSION is fixed in samba 3.2.2. (Bug #5592) * splitting of libdir into libdir (for the libs) and modulesdir (for shared modules and such) is done in v3-devel / v3-3-test. This probably won't go into 3.2.X since it is a new feature and not really a bug. This will be 3.3.0 (planned for Dec 15, 2008). Thanks for your thougths and comments. This is much appreciated. Cheers - Michael -- Michael Adam <ma@sernet.de> <obnox@samba.org> SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen phone: +49-551-370000-0, fax: +49-551-370000-9 AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen http://www.SerNet.DE, mailto: Info @ SerNet.DE -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: comment iD8DBQFItU/eyU9JOBhPkDQRAgxHAJ4oYXkPwoKQzWJATEJs0M08NNCZdwCfU 5K+ 2fVfnL1Pk+F5dAdp9lioEQc= =7rFR -----END PGP SIGNATURE----- |
|
|||
|
Michael Adam wrote:
> Hi folks! > > Nicholas Brealey wrote: > > James Kosin wrote: > > >-----Original Message----- > > >From: Daniel Eischen [mailto:eischen@vigrid.com] > > > > > >>Using -rpath/-R is the norm for Solaris packages. Samba > > >>already is built with knowledge of where it is installed > > >>and where its lib, data, var, etc directories reside. > > >> > > >>What is _not_ the norm, is having to set LD_LIBRARY_PATH in > > >>order for your applications to work. Take a look at all > > >>the packages at sunfreeware.com - they are all built for > > >>/usr/local and, at least from hundred or so packages I've > > >>installed from there, none require LD_LIBRARY_PATH to work > > >>when their libraries are in /usr/local/lib. > > I had the plan to provide the option of linking with an > rpath as a configure option. But it is not so easy to get > it right for all supported platforms (Nicholas only mentioned > solaris and Linux...). And I did not have the time yet to > complete this in an upstream compliant manner. > > Patches welcome!! To be more concrete: I suggest adding a configure option "--enable-rpath" that adds the appropriate LDFLAGS when appropriate for the build system (e.g. solaris and linux for a start) and gives notice when the system is unsupported (for rpath). See http://gitweb.samba.org/?p=samba.git...8257b27d984c47 and http://gitweb.samba.org/?p=samba.git...be04201f55b7f3 for what has already been in the sources and has been removed. By the way: It is not strictly necessary to modify the sources to create binaries linked with an rpath: By setting an appropriate "LDFLAGS" environment variable containing an RPATH option before calling configure, you can use an RPATH option for your install without modifying the sources, since the configure script picks up any externally set LDFLAGS and CFLAGS settings! ... :-) Cheers - Michael -- Michael Adam <ma@sernet.de> <obnox@samba.org> SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen phone: +49-551-370000-0, fax: +49-551-370000-9 AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen http://www.SerNet.DE, mailto: Info @ SerNet.DE -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: comment iD8DBQFItVVxyU9JOBhPkDQRAjFlAKCf3ILyLPLi1fCJv6p354 pNTBMbZgCbBfWy EM1EgNVV4n9nZNwUFTqtvjI= =Nn/t -----END PGP SIGNATURE----- |
|
|||
|
Michael Adam wrote:
> To be more concrete: > > I suggest adding a configure option "--enable-rpath" > that adds the appropriate LDFLAGS when appropriate for the > build system (e.g. solaris and linux for a start) and > gives notice when the system is unsupported (for rpath). > > See > > http://gitweb.samba.org/?p=samba.git...8257b27d984c47 > > and > > http://gitweb.samba.org/?p=samba.git...be04201f55b7f3 > > for what has already been in the sources and has been removed. > > From link #2: > What is more, rpath also has some bad effects (when > updating libraries, e.g.), so it should not be set unconditionally. Could you elaborate on why/when setting rpath would cause problems? I'm having trouble coming up with an example. Thanks, -Brian -- --------------------------------------------------- Brian H. Nelson Youngstown State University System Administrator Media and Academic Computing bnelson[at]cis.ysu.edu --------------------------------------------------- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|||
|
On Wed, 27 Aug 2008, Michael Adam wrote:
> Michael Adam wrote: >> Hi folks! >> >> Nicholas Brealey wrote: >>> James Kosin wrote: >>>> -----Original Message----- >>>> From: Daniel Eischen [mailto:eischen@vigrid.com] >>>> >>>>> Using -rpath/-R is the norm for Solaris packages. Samba >>>>> already is built with knowledge of where it is installed >>>>> and where its lib, data, var, etc directories reside. >>>>> >>>>> What is _not_ the norm, is having to set LD_LIBRARY_PATH in >>>>> order for your applications to work. Take a look at all >>>>> the packages at sunfreeware.com - they are all built for >>>>> /usr/local and, at least from hundred or so packages I've >>>>> installed from there, none require LD_LIBRARY_PATH to work >>>>> when their libraries are in /usr/local/lib. >> >> I had the plan to provide the option of linking with an >> rpath as a configure option. But it is not so easy to get >> it right for all supported platforms (Nicholas only mentioned >> solaris and Linux...). And I did not have the time yet to >> complete this in an upstream compliant manner. >> >> Patches welcome!! > > To be more concrete: > > I suggest adding a configure option "--enable-rpath" > that adds the appropriate LDFLAGS when appropriate for the > build system (e.g. solaris and linux for a start) and > gives notice when the system is unsupported (for rpath). Yes, it if is not on be default, then having a knob to enable it is the next best thing. > See > > http://gitweb.samba.org/?p=samba.git...8257b27d984c47 > > and > > http://gitweb.samba.org/?p=samba.git...be04201f55b7f3 > > for what has already been in the sources and has been removed. > > By the way: It is not strictly necessary to modify the sources to > create binaries linked with an rpath: By setting an appropriate > "LDFLAGS" environment variable containing an RPATH option before > calling configure, you can use an RPATH option for your install > without modifying the sources, since the configure script picks > up any externally set LDFLAGS and CFLAGS settings! ... :-) That is nice to know too. -- DE -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |