<div><div><div><font class="Apple-style-span" face="'courier new', monospace">$ gcc --version | head -1</font></div><div><font class="Apple-style-span" face="'courier new', monospace">gcc (GCC) 4.6.2</font></div>
</div><div><font class="Apple-style-span" face="'courier new', monospace">$ uname -a</font></div><div><div><font class="Apple-style-span" face="'courier new', monospace">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</font></div>
</div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace">$ export MPICH2LIB_CFLAGS="$CFLAGS"; unset CFLAGS</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">$ export MPICH2LIB_CXXFLAGS="$CXXFLAGS"; unset CXXFLAGS</font></div><div><font class="Apple-style-span" face="'courier new', monospace">$ export MPICH2LIB_FFLAGS="$FFLAGS"; unset FFLAGS</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">$ export MPICH2LIB_F90FLAGS="$F90FLAGS"; unset F90FLAGS</font></div><div><font class="Apple-style-span" face="'courier new', monospace">$ export MPICH2LIB_LDFLAGS="$LDFLAGS"; unset LDFLAGS</font></div>
</div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">(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.)</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace">$ ../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</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">[...]</font></div><div><font class="Apple-style-span" face="'courier new', monospace">$ make</font></div><div><font class="Apple-style-span" face="'courier new', monospace">[...]</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">/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':</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">topology-libpci.c:(.text+0xe1f): undefined reference to `pci_alloc'</font></div><div><font class="Apple-style-span" face="'courier new', monospace">topology-libpci.c:(.text+0xe4d): undefined reference to `pci_init'</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">topology-libpci.c:(.text+0xe57): undefined reference to `pci_scan_bus'</font></div><div><font class="Apple-style-span" face="'courier new', monospace">topology-libpci.c:(.text+0xf28): undefined reference to `pci_lookup_name'</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">topology-libpci.c:(.text+0xf67): undefined reference to `pci_lookup_name'</font></div><div><font class="Apple-style-span" face="'courier new', monospace">topology-libpci.c:(.text+0xfa6): undefined reference to `pci_lookup_name'</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">topology-libpci.c:(.text+0xfe7): undefined reference to `pci_read_block'</font></div><div><font class="Apple-style-span" face="'courier new', monospace">topology-libpci.c:(.text+0x10fe): undefined reference to `pci_find_cap'</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">topology-libpci.c:(.text+0x1146): undefined reference to `pci_cleanup'</font></div><div><font class="Apple-style-span" face="'courier new', monospace">topology-libpci.c:(.text+0x1638): undefined reference to `pci_cleanup'</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">collect2: ld returned 1 exit status</font></div><div><font class="Apple-style-span" face="'courier new', monospace">make[3]: *** [hydra_persist] Error 1</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">make[3]: Leaving directory `/home/jed/src/arch/mpich2/src/mpich2-1.5a1/build/src/pm/hydra'</font></div><div><font class="Apple-style-span" face="'courier new', monospace">make[2]: *** [all-recursive] Error 1</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">make[2]: Leaving directory `/home/jed/src/arch/mpich2/src/mpich2-1.5a1/build/src/pm/hydra'</font></div><div><font class="Apple-style-span" face="'courier new', monospace">make[1]: *** [all-recursive] Error 1</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">make[1]: Leaving directory `/home/jed/src/arch/mpich2/src/mpich2-1.5a1/build'</font></div><div><font class="Apple-style-span" face="'courier new', monospace">make: *** [all] Error 2</font></div>