[lfs-dev] LFS SVN and Systemd Report

Ken Moffat zarniwhoop at ntlworld.com
Wed May 30 17:13:16 PDT 2012


On Wed, May 30, 2012 at 06:50:07PM -0500, Bruce Dubbs wrote:
> Ken Moffat wrote:
> > On Wed, May 30, 2012 at 04:55:40PM -0500, Bruce Dubbs wrote:
> 
> >> I'll try to create a dynamic udev library in my script.
> 
> OK, I was successful.  It was a bit tricky. First, the order of what is 
> on the command line to link is significant.
> 
> Second, many of the programs are compiled with -fvisibility=hidden. 
> that isn't good for shared libraries because I got a lot of undefined 
> references.  I just turned that off.
> 
> Now, the question is what to install and where to install it.
> 
> The standard seems to be:
> 
> /lib/libudev.so.0.13.1

libudev.so.1.0.0 for 183

> /lib/libudev.so.0   -> libudev.so.0.13.1
> /usr/lib/libudev.so -> ../../lib/libudev.so.0.13.1
> /usr/include/libudev.h
> /usr/lib/libudev.la
> /usr/lib/pkgconfig/libudev.pc
> 
> The first four are easy.
> 
> The pc file isn't too bad:
> 
> prefix=/usr
> exec_prefix=/usr
> libdir=/usr/lib
> includedir=/usr/include
> 
> Name: libudev
> Description: Library to access udev device information
> Version: 182
 and 183

> Libs: -L${libdir} -ludev -lrt
> Libs.private:
> Cflags: -I${includedir}
> -------------
> 
> The libdir looks OK, because I think it's looking for libudev.so.  I'm 
> not sure what prefix and exec_prefix mean in this context.
> 

 On my 182 they are both /usr like in yours, and that seems to work
fine.

> The .la file is:
> 
> # libudev.la - a libtool library file
> # Generated by libtool (GNU libtool) 2.4.2
> #
> # Please DO NOT delete this file!
> # It is necessary for linking the library.
> 
> # The name that we can dlopen(3).
> dlname='libudev.so.0'
> 
> # Names of this library.
> library_names='libudev.so.0.13.1 libudev.so.0 libudev.so'
> 
 again,  those are 182
> # The name of the static archive.
> old_library=''
> 
> # Linker flags that can not go in dependency_libs.
> inherited_linker_flags=''
> 
> # Libraries that this one depends upon.
> dependency_libs=' -lrt'
> 
> # Names of additional weak libraries provided by this library
> weak_library_names=''
> 
> # Version information for libudev.
> current=13
> age=13
> revision=1
so are these
> 
> # Is this an already installed library?
> installed=yes
> 
> # Should we warn about portability when linking against -modules?
> shouldnotlink=no
> 
> # Files to dlopen/dlpreopen
> dlopen=''
> dlpreopen=''
> 
> # Directory that this library needs to be installed in:
> libdir='/usr/lib'
> 
> ---------
 I'll attach libudev.la from a successful 183 DESTDIR install
install so you can confirm the differences.

 Mine went into /usr/lib.  Are any of your programs, such as
cdrom_id, linking to this ?  If so, it probably needs to be in /lib.
> 
> Actually, in this case the file is NOT generated by libtool, but it 
> looks OK.  I think the libdir is the same as the pc file in that it is 
> looking for libudev.so.0.
> 
> I'll add these to the install.sh script.  I'll send a message, probably 
> in a couple of hours about the new patch being available on 
> www.linuxfromscratch.org.
> 
>    -- Bruce

 Anyone know if *anything* uses /usr/share/pkgconfig/udev.pc ?

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce
-------------- next part --------------
# libudev.la - a libtool library file
# Generated by libtool (GNU libtool) 2.4.2
#
# Please DO NOT delete this file!
# It is necessary for linking the library.

# The name that we can dlopen(3).
dlname='libudev.so.1'

# Names of this library.
library_names='libudev.so.1.0.0 libudev.so.1 libudev.so'

# The name of the static archive.
old_library='libudev.a'

# Linker flags that can not go in dependency_libs.
inherited_linker_flags=''

# Libraries that this one depends upon.
dependency_libs=' -ldl -lrt'

# Names of additional weak libraries provided by this library
weak_library_names=''

# Version information for libudev.
current=1
age=0
revision=0

# Is this an already installed library?
installed=yes

# Should we warn about portability when linking against -modules?
shouldnotlink=no

# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='/usr/lib'


More information about the lfs-dev mailing list