I have run into a couple of linking problems trying to test/use -fopenmp and libgomp and I was hoping for some help on where to look and how to fix these problems.
Test failures: I get a lot of test failures with: | FAIL: libgomp.c/appendix-a/a.15.1.c (test for excess errors) | Excess errors: | ld: (Warning) Symbol "__udivsi3" is not exported but is imported by a shared library | ld: (Warning) Symbol "__divsi3" is not exported but is imported by a shared library | 2 warnings. __udivsi3 and __divsi3 are of course the integer divide routines that are in libgcc. I can make the test pass by running it with -shared-libgcc, but I am not sure if I should just be trying to add -shared-libgcc when I run libgomp tests or if -shared-libgcc needs to be used when building libgomp itself. Nor am I sure how to do either. The other thing I found was that when I tried to compile a program with -fopenmp outside of the test harness it fails. | $ gcc -fopenmp loop-3.c -o x < | ld: Can't find library or mismatched ABI for -lgomp | Fatal error. When I add -v I see: | collect2 -z +Accept TypeMismatch -u main -o x -lgomp -L/proj/opensrc/nightly/gcc-ia64-hp-hpux11.23-trunk/lib/gcc/ia64-hp-hpux11.23/4.2.0 -L/usr/ccs/lib -L/proj/opensrc/nightly/gcc-ia64-hp-hpux11.23-trunk/lib/gcc/ia64-hp-hpux11.23/4.2.0/../../.. /var/tmp//ccGr80UQ.o -lgcc -lgcc_eh -lunwind -lpthread -lc -lgcc -lgcc_eh -lunwind Notice that the -lgomp comes in front of the -L flags. With the HP linker this means that those directories will not be searched for libgomp. If I move the -lgomp to after the -L options then I find libgomp. When I do move -lgomp later in the link though I get the messages about __divsi3 and __udivsi3, so I think that means that I need to have libgomp built with the -lgcc_s option. Any Help/Advice? Steve Ellcey [EMAIL PROTECTED]