Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] hwloc trunk nightly 1.3a1r3511 fails to build on CentOS 5.6 & RHEL 5.6
From: Christopher Samuel (samuel_at_[hidden])
Date: 2011-06-13 09:00:55


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 13/06/11 22:45, Jeff Squyres wrote:

> Ah, that might explain it, then.

Yeah.. :-(

> I guess this means we need to add a few configure tests
> to figure out the dependencies of libpci (if any). Yuck.

Indeed.

> Do we have any idea what function in libpci is calling the resolver functionality?

Complete guesswork from nm -l /usr/lib64/libpci.a, this
is the object module where __res_query() is referenced:

names-net.o:
0000000000000000 r .LC0
000000000000000b r .LC1
0000000000000072 r .LC10
0000000000000000 r .LC11
0000000000000087 r .LC12
0000000000000030 r .LC13
0000000000000010 r .LC2
000000000000001a r .LC3
000000000000002e r .LC4
000000000000003a r .LC5
0000000000000041 r .LC6
000000000000004d r .LC7
000000000000005e r .LC8
0000000000000064 r .LC9
                 U _GLOBAL_OFFSET_TABLE_
                 U __h_errno_location
                 U __memcpy_chk
                 U __res_init
                 U __res_query
                 U __sprintf_chk
                 U __stack_chk_fail
                 U __strdup
0000000000000000 t dns_skip_name
                 U pci_get_param
0000000000000060 T pci_id_net_lookup
0000000000000000 b resolver_inited.6042

Now that defines pci_id_net_lookup, and that appears
to be referenced here:

names.o:
0000000000000000 r .LC0
0000000000000003 r .LC1
0000000000000028 r .LC10
000000000000004f r .LC11
0000000000000054 r .LC12
000000000000005b r .LC13
0000000000000062 r .LC14
000000000000006c r .LC15
000000000000007b r .LC16
0000000000000081 r .LC17
0000000000000086 r .LC18
000000000000008c r .LC19
000000000000000e r .LC2
0000000000000092 r .LC20
0000000000000098 r .LC21
000000000000009e r .LC22
00000000000000a6 r .LC23
00000000000000b1 r .LC24
000000000000001a r .LC3
0000000000000029 r .LC4
000000000000002f r .LC5
0000000000000039 r .LC6
0000000000000000 r .LC7
0000000000000046 r .LC8
000000000000004e r .LC9
                 U _GLOBAL_OFFSET_TABLE_
                 U __snprintf_chk
                 U __sprintf_chk
                 U __stack_chk_fail
0000000000000160 t format_name
0000000000000000 t format_name_pair
0000000000000250 t id_lookup
0000000000000380 t id_lookup_subsys
                 U pci_id_cache_dirty
                 U pci_id_cache_load
                 U pci_id_insert
                 U pci_id_lookup
                 U pci_id_net_lookup
                 U pci_load_name_list
0000000000000460 T pci_lookup_name
                 U pci_mfree
                 U snprintf

That defines pci_lookup_name() and that is called from
hwloc here:

$ grep -R pci_lookup_name .
./src/topology-libpci.c:/* starting from pciutils 2.2, pci_lookup_name() takes a variable number
./src/topology-libpci.c: resname = pci_lookup_name(pciaccess, name, sizeof(name),
./src/topology-libpci.c: resname = pci_lookup_name(pciaccess, name, sizeof(name),
./src/topology-libpci.c: resname = pci_lookup_name(pciaccess, name, sizeof(name),

So my guess it's the fact that we only have a static
library that's causing the linker to pull in all the
symbols, whether needed or not. :-(

cheers!
Chris
- --
    Christopher Samuel - Senior Systems Administrator
 VLSCI - Victorian Life Sciences Computation Initiative
 Email: samuel_at_[hidden] Phone: +61 (0)3 903 55545
         http://www.vlsci.unimelb.edu.au/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk32CgcACgkQO2KABBYQAh+0/wCgkb10IWRnNxh5BicSrv6HC0U/
TIQAn2hmylDYzNx7Z8+oeR//zPtLRP3k
=vhQT
-----END PGP SIGNATURE-----