Posted to tcl by venks at Mon Feb 22 06:55:06 GMT 2010view raw

  1. Link fails default. Fails again with gcc (duh!). Passes with g++.
  2. Why?
  3.  
  4. venkat@everest:../tcl/unix:34> make
  5. Warning: tclStubInit.c may be out of date.
  6. Developers may want to run "make genstubs" to regenerate.
  7. This warning can be safely ignored, do not report as a bug!
  8. ..
  9. rm -f libtcl8.6.so
  10. gcc -shared -o libtcl8.6.so regcomp.o ... -ldl -lsocket -lnsl -lm -Wl,-R,/usr/local/tcl/8.6-head/lib
  11. gcc -DNDEBUG -O2 -pipe tclAppInit.o -L/export/home/venkat/tcl/unix -ltcl8.6 -ldl -lsocket -lnsl -lm \
  12. -Wl,-R,/usr/local/tcl/8.6-head/lib -o tclsh
  13. Undefined first referenced
  14. symbol in file
  15. __register_frame_info /export/home/local/bin/../lib/gcc/sparc-sun-solaris2.5.1/3.4.2/crtbegin.o (symbol belongs to implicit dependency /export/home/local/bin/../lib/gcc/sparc-sun-solaris2.5.1/3.4.2/../../../libgcc_s.so.1)
  16. __deregister_frame_info /export/home/local/bin/../lib/gcc/sparc-sun-solaris2.5.1/3.4.2/crtbegin.o (symbol belongs to implicit dependency /export/home/local/bin/../lib/gcc/sparc-sun-solaris2.5.1/3.4.2/../../../libgcc_s.so.1)
  17. ld: fatal: Symbol referencing errors. No output written to tclsh
  18. collect2: ld returned 1 exit status
  19. make: *** [tclsh] Error 1
  20. venkat@everest:../tcl/unix:35> gcc -DNDEBUG -O2 -pipe tclAppInit.o -L/export/home/venkat/tcl/unix -ltcl8.6 -ldl -lsocket -lnsl -lm -Wl,-R,/usr/local/tcl/8.6-head/lib -lc -o tclsh
  21. Undefined first referenced
  22. symbol in file
  23. __register_frame_info /export/home/local/bin/../lib/gcc/sparc-sun-solaris2.5.1/3.4.2/crtbegin.o (symbol belongs to implicit dependency /export/home/local/bin/../lib/gcc/sparc-sun-solaris2.5.1/3.4.2/../../../libgcc_s.so.1)
  24. __deregister_frame_info /export/home/local/bin/../lib/gcc/sparc-sun-solaris2.5.1/3.4.2/crtbegin.o (symbol belongs to implicit dependency /export/home/local/bin/../lib/gcc/sparc-sun-solaris2.5.1/3.4.2/../../../libgcc_s.so.1)
  25. ld: fatal: Symbol referencing errors. No output written to tclsh
  26. collect2: ld returned 1 exit status
  27. venkat@everest:../tcl/unix:36> g++ -DNDEBUG -O2 -pipe tclAppInit.o -L/export/home/venkat/tcl/unix -ltcl8.6 -ldl -lsocket -lnsl -lm -Wl,-R,/usr/local/tcl/8.6-head/lib -lc -o tclsh
  28. venkat@everest:../tcl/unix:37>
  29.