I am getting the following error message when trying to compile libpciaccess 0.13.4 with PGI 15.10:
Making all in scanpci
make[2]: Entering directory `/scratch/ajstewart/libpciaccess-0.13.4/scanpci'
CC scanpci.o
CCLD scanpci
../src/.libs/libpciaccess.so: undefined reference to `inw'
../src/.libs/libpciaccess.so: undefined reference to `outw'
../src/.libs/libpciaccess.so: undefined reference to `inb'
../src/.libs/libpciaccess.so: undefined reference to `outb'
../src/.libs/libpciaccess.so: undefined reference to `inl'
../src/.libs/libpciaccess.so: undefined reference to `outl'
make[2]: *** [scanpci] Error 2
make[2]: Leaving directory `/scratch/ajstewart/libpciaccess-0.13.4/scanpci'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/scratch/ajstewart/libpciaccess-0.13.4'
make: *** [all] Error 2
So far I have had no trouble installing libpciaccess with GCC or Intel compilers. I submitted a bug report with libpciaccess but they believe the problem is that PGI is not compatible with my system headers. We are running CentOS 6. Any idea how I can get libpciaccess to compile with PGI?
Sorry, didn’t notice your reply until now. I went in and changed my email preferences to email me when a response has been added, so it won’t happen again.
$ gcc --version
gcc (GCC) 5.3.0
$ uname -a
Linux blogin4 2.6.32-573.18.1.el6.x86_64 #1 SMP Tue Feb 9 22:46:17 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Let me know if there is anything else you need from me. I have confirmed that this bug is still present in the latest PGI 16.3-0 compilers.
I just tried again with PGI 16.5-0 and GCC 4.4.7 but I’m still seeing the same problem. I am using libtool, m4, and libsigsegv that I build by hand with the same compilers. Could there be a problem with one of those installations? I just checked and none of them are missing symbols. It’s just libpciaccess.so:
Thanks Dave, that does indeed get me past the problem I originally reported. Unfortunately, it also uncovers a new problem.
pgcc-Error-Unknown switch: -fno-strict-aliasing
It looks like libpciaccess’s configure script is incorrectly detecting the PGI compilers as GCC. This obviously isn’t PGI’s fault, so I think it’s safe to close this issue. I’ll work with the libpciaccess developers to solve this latest bug.
Actually, looking at the configure script, it looks like it checks whether or not GNUC has been defined. If so, it detects it as GCC and uses GCC compiler flags. I think the fix you gave me actually causes this new problem.
I messed up on this problem. Someone reported
-D__GNUC__=3 would fix things, and I believed it and reported it and closed
the problem. When I went to verify (which I will do in the future every time),
it fixed nothing. Problem is still open.