I am trying already couple of days now to compile a code (written partly in fortran and partly in c) but I keep getting this error:
/usr/lib64/gcc/x86_64-suse-linux/4.8/…/…/…/…/x86_64-suse-linux/bin/ld: dynamic STT_GNU_IFUNC symbol strcmp' with pointer equality in /usr/lib64/libc.a(strcmp.o)’ can not be used when making an executable; recompile with -fPIE and relink with -pie
collect2: error: ld returned 1 exit status
I have opensuse 13.1 installed. Any help is welcome. I am not a programmer, I just use research codes written in fortran for my research in computational solid mechanics.
Why you are explicitly using static libraries? You should use “-lpthread -lm” and let compiler pick either static or dynamic version depending on other flags. -lc is normally redundant and assumed as default (unless you explicitly tell compiler to not use standard libraries).
When I write in the makefile -lpthread -lm -lc (or just ignore -lc) I get a lot of “undefined reference to” and also an error at the end. Problem seems to be even bigger then.
Not easy to detect for a new forums user here, but very important are the CODE tags. You get them by clicking on the # button in the tool bar of the post editor. You then copy/paste computer text from your terminal window in between the tags. This will make computer text in a post much better readable.
When possible we prefer to copy from the terminal window the prompt, the command, the output and the next prompt. Then you do not have to explain very much about what you did, where you did it and what you got because it is all there.