I'm running into a linker issue when moving code that builds on RHEL 6 to Fedora or RHEL 7. Here's a simple reproducer:
Download simple.c from https://github.com/markkilgard/glut/blob/master/progs/examples/simple.c and then run:g++ simple.c -lglut -o simple
On RHEL 7, I get this error:
~> g++ simple.c -lglut -o simple
/usr/bin/ld: /tmp/ccPIpRiP.o: undefined reference to symbol 'glOrtho'
/usr/bin/ld: note: 'glOrtho' is defined in DSO /lib64/libGL.so.1 so try adding it to the linker command line
/lib64/libGL.so.1: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
~> g++ simple.c -lglut -o simple
/usr/bin/ld: /tmp/ccPIpRiP.o: undefined reference to symbol 'glOrtho'
/usr/bin/ld: note: 'glOrtho' is defined in DSO /lib64/libGL.so.1 so try adding it to the linker command line
/lib64/libGL.so.1: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
On Fedora 22, I get this error (which is basically the same):
~> g++ simple.c -lglut -o simple
/usr/bin/ld: /tmp/ccqKG2Fe.o: undefined reference to symbol 'glVertex2i'
/usr/lib64/nvidia/libGL.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
~> g++ simple.c -lglut -o simple
/usr/bin/ld: /tmp/ccqKG2Fe.o: undefined reference to symbol 'glVertex2i'
/usr/lib64/nvidia/libGL.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
-- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx http://lists.fedoraproject.org/admin/lists/devel@xxxxxxxxxxxxxxxxxxxxxxx