From: Reed H. <re...@ze...> - 2003-11-08 22:27:59
|
Hi all, I am trying to get OpenVRML 0.14.2 to compile on Mac OSX (With GCC 3.3 -- "August 2003" Apple dev tools) , and have run into some problems. If anyone has any ideas, that would be very helpful. Well the first few are easy: (1) Headers are installed in PREFIX/include/openvrml/openvrml instead of just PREFIX/include/openvrml: just need to change libopenvrml/openvrml/Makefile.am: openvrml_includedir = $(pkgincludedir) rather than openvrml_includedir = $(pkgincludedir)/openvrml since pkgincludedir is already set to "$(includedir)/openvrml" (2) To get it compiling I made two changes to the source code: in lookat/ViewerGlut.cpp and lookat/lookat.cpp, change this: # if HAVE_APPLE_OPENGL_FRAMEWORK # include <OpenGL/glut.h> to this: # if HAVE_APPLE_OPENGL_FRAMEWORK # include <GLUT/glut.h> And I added -lobjc to lookat's libs. I used the following configure script options: --with-apple-opengl-framework --without-x --disable-script-node-javascript --disable-text-node (I haven't tried installing spidermonkey yet, and for some reason freetype2 in fink doesn't work with openvrml-- there is a mysterious undefined symbol from freetype that causes errors). OK, here is the hard one: When I tried to run lookat, however, and also when I tried to run my own program linked with openvrml, I got a bunch of dynamic linker errors: dyld: lookat Undefined symbols: __ZNSs4_Rep11_S_terminalE __ZSt4cerr __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_ __ZTVN10__cxxabiv117__class_type_infoE __ZTVN10__cxxabiv120__si_class_type_infoE ___cxa_pure_virtual ___gxx_personality_v0 __ZNKSt11logic_error4whatEv __ZNKSt13runtime_error4whatEv __ZNSs4_Rep11_S_terminalE __ZNSsD1Ev __ZNSt9bad_allocD1Ev __ZSt3cin __ZSt4cerr __ZSt4cout __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_ __ZTVN10__cxxabiv117__class_type_infoE __ZTVN10__cxxabiv120__si_class_type_infoE __ZTVN10__cxxabiv121__vmi_class_type_infoE __ZTVSt9bad_alloc __ZTVSt9exception ___cxa_pure_virtual ___gxx_personality_v0 Trace/BPT trap So I reconfigured with LIBS="-lobjc -lstdc++", but I still got the errors. I am 99.9% certain that all of my libraries used by OpenVRML were built with GCC 3.3. Here are the link make commands. I don't know what it means by "having a real file for library -lstdc++". /usr/lib/libstdc++.a is a symlink to a real file. Maybe it doesn't like that it's a symlink? Well, I saved the old symlink and copied the real file into /usr/lib. Still got the same warning... I have rebuilt other programs that use most of the same libraries that OpenVRML does (libdl, libpng, libjpeg, libz, etc) and they work fine. The one thing I am not sure about that might be affecting this is the fact that libtool always adds "-dynamiclib -flat_namespace -undefined suppress" when building libraries on the Mac for obscure Darwin/Mach reasons, and maybe some other flag somewhere "conflicts" with the resulting output? I don't know. Does openvrml use any unusual C or Link flags that I might not be familiar with? Also, what is the function of the ".lax" files libtool is producing (they seem to actually be directories containing ".la" files)? I've never seen that before. /bin/sh ../../../libtool --mode=link g++ -I/sw/include -I/usr/local/include -L/sw/lib -L/usr/local/lib -o libopenvrml.la -rpath /usr/local/lib -version-info 4:0:0 -ljpeg -lpng -lz -lm -lz basetypes.lo doc.lo img.lo system.lo field.lo field_value_ptr.lo scope.lo scope_ptr.lo node.lo node_ptr.lo node_type_ptr.lo node_class_ptr.lo bounding_volume.lo script.lo ScriptJDK.lo browser.lo viewer.lo rendering_context.lo frustum.lo vrml97node.lo ../../../lib/antlr/src/libantlr.la -lobjc -lstdc++ rm -fr .libs/libopenvrml.la .libs/libopenvrml.* .libs/libopenvrml.* *** Warning: linker path does not have real file for library -lstdc++. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have *** because I did check the linker path looking for a file starting *** with libstdc++ and none of the candidates passed a file format test *** using a file magic. Last file checked: /usr/lib/gcc/darwin/default/libstdc++.a *** The inter-library dependencies that have been dropped here will be *** automatically added whenever a program is linked with this library *** or is declared to -dlopen it. gcc -r -keep_private_externs -nostdlib -o .libs/libopenvrml.4.0.0.dylib-master.o basetypes.lo doc.lo img.lo system.lo field.lo field_value_ptr.lo scope.lo scope_ptr.lo node.lo node_ptr.lo node_type_ptr.lo node_class_ptr.lo bounding_volume.lo script.lo ScriptJDK.lo browser.lo viewer.lo rendering_context.lo frustum.lo vrml97node.lo -all_load ../../../lib/antlr/src/.libs/libantlr.al && gcc -dynamiclib -flat_namespace -undefined suppress -o .libs/libopenvrml.4.0.0.dylib .libs/libopenvrml.4.0.0.dylib-master.o -L/sw/lib -L/usr/local/lib -ljpeg -lpng -lm -lz -lobjc -lc -install_name /usr/local/lib/libopenvrml.4.dylib -compatibility_version 5 -current_version 5.0 ld: warning -dylib_install_name /usr/local/lib/libopenvrml.4.dylib not found in segment address table LD_SEG_ADDR_TABLE /sw/var/lib/fink/prebound/seg_addr_table ld: warning -undefined suppress disables -prebind (cd .libs && rm -f libopenvrml.4.dylib && ln -s libopenvrml.4.0.0.dylib libopenvrml.4.dylib) (cd .libs && rm -f libopenvrml.dylib && ln -s libopenvrml.4.0.0.dylib libopenvrml.dylib) rm -fr .libs/libopenvrml.lax mkdir .libs/libopenvrml.lax rm -fr .libs/libopenvrml.lax/libantlr.al mkdir .libs/libopenvrml.lax/libantlr.al (cd .libs/libopenvrml.lax/libantlr.al && ar x /Users/reed/code/openvrml-0.14.2/src/libopenvrml/openvrml/../../../lib/ antlr/src/.libs/libantlr.al) ar cru .libs/libopenvrml.a basetypes.o doc.o img.o system.o field.o field_value_ptr.o scope.o scope_ptr.o node.o node_ptr.o node_type_ptr.o node_class_ptr.o bounding_volume.o script.o ScriptJDK.o browser.o viewer.o rendering_context.o frustum.o vrml97node.o .libs/libopenvrml.lax/libantlr.al/ASTFactory.lo .libs/libopenvrml.lax/libantlr.al/ASTNULLType.lo .libs/libopenvrml.lax/libantlr.al/ASTRefCount.lo .libs/libopenvrml.lax/libantlr.al/BaseAST.lo .libs/libopenvrml.lax/libantlr.al/BitSet.lo .libs/libopenvrml.lax/libantlr.al/CharBuffer.lo .libs/libopenvrml.lax/libantlr.al/CharScanner.lo .libs/libopenvrml.lax/libantlr.al/CommonAST.lo .libs/libopenvrml.lax/libantlr.al/CommonASTWithHiddenTokens.lo .libs/libopenvrml.lax/libantlr.al/CommonHiddenStreamToken.lo .libs/libopenvrml.lax/libantlr.al/CommonToken.lo .libs/libopenvrml.lax/libantlr.al/InputBuffer.lo .libs/libopenvrml.lax/libantlr.al/LLkParser.lo .libs/libopenvrml.lax/libantlr.al/MismatchedCharException.lo .libs/libopenvrml.lax/libantlr.al/MismatchedTokenException.lo .libs/libopenvrml.lax/libantlr.al/NoViableAltException.lo .libs/libopenvrml.lax/libantlr.al/NoViableAltForCharException.lo .libs/libopenvrml.lax/libantlr.al/Parser.lo .libs/libopenvrml.lax/libantlr.al/RecognitionException.lo .libs/libopenvrml.lax/libantlr.al/String.lo .libs/libopenvrml.lax/libantlr.al/Token.lo .libs/libopenvrml.lax/libantlr.al/TokenBuffer.lo .libs/libopenvrml.lax/libantlr.al/TokenStreamBasicFilter.lo .libs/libopenvrml.lax/libantlr.al/TokenStreamHiddenTokenFilter.lo .libs/libopenvrml.lax/libantlr.al/TokenStreamSelector.lo .libs/libopenvrml.lax/libantlr.al/TreeParser.lo ranlib .libs/libopenvrml.a ranlib: file: .libs/libopenvrml.a(ScriptJDK.o) has no symbols rm -fr .libs/libopenvrml.lax creating libopenvrml.la (cd .libs && rm -f libopenvrml.la && ln -s ../libopenvrml.la libopenvrml.la) |