Ian Lance Taylor-3 wrote: > > geezers <fastsnip-gcc@xxxxxxxxx> writes: > >> Ian Lance Taylor-3 wrote: >>> >>> geezers <fastsnip-gcc@xxxxxxxxx> writes: >>> >>>> Curious that the makefile worked for the previous years (at least 10) >>>> with >>>> no problem. Maybe the latest 'make' is more strict regarding >>>> interpreting >>>> the rules ?? >>> >>> It doesn't have anything to do with make. Something changed in your >>> libc. >>> >>> Ian >>> >> Then I do not understand. If I run the makefile as: >> >> $(CC) -o $@ $(OBJS) -ldl -rdynamic >> >> I get the error messages that the external references for dlopen, >> dlclose, >> etc cannot be satisfied. >> >> If I change the makefile line to read: >> >> $(CC) -o $@ -rdynamic $(OBJS) -ldl >> >> the error messages do not appear and the executable is linked and runs >> properly. >> >> Now it is possible it is in the libc and changing the makefile line makes >> the linker work with the new libc. >> >> Is there a means of testing this and determining what changed in libc if >> that is the root cause of the problem. > > > You are saying that just moving the -rdynamic line changes the > behaviour? That seems very strange. The first step would be to take > make out of the equation and just run the commands directly from the > command line. If you can repeat the problem that way, add the -v option > and look at the way the linker is being invoked. Send the linker > commands back to this mailing list so that we can see why the different > linker command is causing the error. > > Ian > > Sorry my mistake: The original makefile read: $(CC) -o $@ -ldl -rdynamic $(OBJS) and that was changed to read: $(CC) -o $@ -rdynamic $(OBJS) -ldl if I run the makefile as: $(CC) -v -o $@ -ldl -rdynamic $(OBJS) I get: linking gcc -v -o qtgrep.bin -ldl -rdynamic buffer.o displayu.o findfile.o getopt.o grepdfa.o date.o re_compile.o re_exec.o re_read.o re_write.o kw_compile.o kw_exec.o kw_read.o kw_write.o scan.o set_expr.o read_pat_file.o free_pat.o write_pat_file.o memory_fun.o Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/ LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-v' '-o' 'qtgrep.bin' '-rdynamic' '-mtune=generic' '-march=x86-64' /usr/lib/gcc/x86_64-linux-gnu/4.6/collect2 --sysroot=/ --build-id --no-add-needed --as-needed --eh-frame-hdr -m elf_x86_64 --hash-style=gnu -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o qtgrep.bin /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.6/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -ldl buffer.o displayu.o findfile.o getopt.o grepdfa.o date.o re_compile.o re_exec.o re_read.o re_write.o kw_compile.o kw_exec.o kw_read.o kw_write.o scan.o set_expr.o read_pat_file.o free_pat.o write_pat_file.o memory_fun.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/4.6/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crtn.o set_expr.o: In function `QTGrep_load_compiled_searches': /home/terry/Source/QTGrep_Multiple/set_expr.c:2036: undefined reference to `dlclose' /home/terry/Source/QTGrep_Multiple/set_expr.c:2042: undefined reference to `dlerror' /home/terry/Source/QTGrep_Multiple/set_expr.c:2045: undefined reference to `dlopen' /home/terry/Source/QTGrep_Multiple/set_expr.c:2047: undefined reference to `dlerror' /home/terry/Source/QTGrep_Multiple/set_expr.c:2052: undefined reference to `dlsym' /home/terry/Source/QTGrep_Multiple/set_expr.c:2053: undefined reference to `dlerror' /home/terry/Source/QTGrep_Multiple/set_expr.c:2067: undefined reference to `dlerror' collect2: ld returned 1 exit status make: *** [qtgrep.bin] Error 1 If I run as: $(CC) -o $@ -rdynamic $(OBJS) -ldl I get: make linking gcc -v -o qtgrep.bin -rdynamic buffer.o displayu.o findfile.o getopt.o grepdfa.o date.o re_compile.o re_exec.o re_read.o re_write.o kw_compile.o kw_exec.o kw_read.o kw_write.o scan.o set_expr.o read_pat_file.o free_pat.o write_pat_file.o memory_fun.o -ldl Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/ LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.6/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-v' '-o' 'qtgrep.bin' '-rdynamic' '-mtune=generic' '-march=x86-64' /usr/lib/gcc/x86_64-linux-gnu/4.6/collect2 --sysroot=/ --build-id --no-add-needed --as-needed --eh-frame-hdr -m elf_x86_64 --hash-style=gnu -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o qtgrep.bin /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.6/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. buffer.o displayu.o findfile.o getopt.o grepdfa.o date.o re_compile.o re_exec.o re_read.o re_write.o kw_compile.o kw_exec.o kw_read.o kw_write.o scan.o set_expr.o read_pat_file.o free_pat.o write_pat_file.o memory_fun.o -ldl -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/4.6/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crtn.o In looking through the 2 outputs quickly, I'm not too sure what I'm seeing. But then I don't really know what specifically to look for. -- View this message in context: http://old.nabble.com/missing-libraries-under-Kubuntu-12.04%2C-64-bit-tp33950674p33959724.html Sent from the gcc - Help mailing list archive at Nabble.com.