[mpich-discuss] mpich2-1.5a1 fails to link libpci when using libhwloc_embedded

Jed Brown jedbrown at mcs.anl.gov
Mon Nov 21 21:23:54 CST 2011


$ gcc --version | head -1
gcc (GCC) 4.6.2
$ uname -a
Linux batura 3.1.1-1-ARCH #1 SMP PREEMPT Fri Nov 11 22:28:29 CET 2011
x86_64 Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz GenuineIntel GNU/Linux

$ export MPICH2LIB_CFLAGS="$CFLAGS";      unset CFLAGS
$ export MPICH2LIB_CXXFLAGS="$CXXFLAGS";  unset CXXFLAGS
$ export MPICH2LIB_FFLAGS="$FFLAGS";      unset FFLAGS
$ export MPICH2LIB_F90FLAGS="$F90FLAGS";  unset F90FLAGS
$ export MPICH2LIB_LDFLAGS="$LDFLAGS";    unset LDFLAGS

(Evidently MPICH2 adds -O2 *after* these flags that I'm setting. My
original CFLAGS in this case wase "-O1 -march=native -pipe", so adding -O2
afterward is not very nice.)

$ ../configure --prefix=/opt/mpich2 --enable-shared --enable-sharedlibs=gcc
--enable-error-checking=runtime --enable-error-messages=all
--enable-timer-type=clock_gettime --disable-rpath --with-python=python2
[...]
$ make
[...]
/home/jed/src/arch/mpich2/src/mpich2-1.5a1/build/src/pm/hydra/tools/topo/hwloc/hwloc/src/.libs/libhwloc_embedded.a(topology-libpci.o):
In function `hwloc_look_libpci':
topology-libpci.c:(.text+0xe1f): undefined reference to `pci_alloc'
topology-libpci.c:(.text+0xe4d): undefined reference to `pci_init'
topology-libpci.c:(.text+0xe57): undefined reference to `pci_scan_bus'
topology-libpci.c:(.text+0xf28): undefined reference to `pci_lookup_name'
topology-libpci.c:(.text+0xf67): undefined reference to `pci_lookup_name'
topology-libpci.c:(.text+0xfa6): undefined reference to `pci_lookup_name'
topology-libpci.c:(.text+0xfe7): undefined reference to `pci_read_block'
topology-libpci.c:(.text+0x10fe): undefined reference to `pci_find_cap'
topology-libpci.c:(.text+0x1146): undefined reference to `pci_cleanup'
topology-libpci.c:(.text+0x1638): undefined reference to `pci_cleanup'
collect2: ld returned 1 exit status
make[3]: *** [hydra_persist] Error 1
make[3]: Leaving directory
`/home/jed/src/arch/mpich2/src/mpich2-1.5a1/build/src/pm/hydra'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/home/jed/src/arch/mpich2/src/mpich2-1.5a1/build/src/pm/hydra'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/jed/src/arch/mpich2/src/mpich2-1.5a1/build'
make: *** [all] Error 2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20111121/e51f773a/attachment-0001.htm>


More information about the mpich-discuss mailing list