anaxamander
05-11-2005, 05:58 AM
Most gtk2 programs now fail to compile under 10.3 and 10.4 with darwinports - somebody must have screwed up. You are not alone.
Your compile of zterm is calling for symbols from libgobject and libgdk, and they aren't being included in the linker flags. I don't have libzvt installed, so this may need refinement. Your errors were:
ld: zterm.o illegal reference to symbol: _g_signal_connect_data defined in indirectly referenced dynamic library /opt/local/lib/libgobject-2.0.0.dylib
ld: zterm.o illegal reference to symbol: _gdk_window_get_pointer defined in indirectly referenced dynamic library /opt/local/lib/libgdk-x11-2.0.0.dylib
You can add:
LDFLAGS="-L/opt/local/lib -lgmodule-2.0 -lglib-2.0 -lintl -liconv -lc -lgtk-x11-2.0 -lart_lgpl_2 -lm -lgobject-2.0 -lgdk-x11-2.0"
to the configure.env line in the libzvt portfile. So the configure.env line would look like:
configure.env CPPFLAGS="-L${prefix}/lib -I${prefix}/include" LDFLAGS="-L/opt/local/lib -lgmodule-2.0 -lglib-2.0 -lintl -liconv -lc -lgtk-x11-2.0 -lart_lgpl_2 -lm -lgobject-2.0 -lgdk-x11-2.0"
That might not include all the libraries needed - you may need to add more as other things compile. You get the name of the library from looking that the library name (say libgobject-2.0.0.dylib) and changing the lib in front to "-l" and stripping off ".dylib" and some of the numbers. Which numbers depends. Look in your /opt/local/lib folder to see what you have there. You want to be a little more generic because when it come time to upgrade a few months down the line, you don't want to be linked against an ultra-specific version of the library.
Note: I'm a bit more brutish in fixing these problems, because I forget, but you may have a good number of portfiles to change. Integrating these LDFLAGS with portfiles that have existing LDFLAGS can get annoying. It might be best to set up a localports folder, edit /opt/local/etc/ports/sources.conf and adding your localports folder before the standard dports folder as described in the README file; then copy the py-gtk folder/portfile to your localports folder and issue a portindex command. I see they already have you on the "buried folder plan". Because why? It builds better 10 folders down? Apparently not... Thats like 93 characters in a folder name that they created themselves! Gee, I think their high colonic treatments are washing out some gray matter along the way. A touch too deep & thorough, I do opine.
Your compile of zterm is calling for symbols from libgobject and libgdk, and they aren't being included in the linker flags. I don't have libzvt installed, so this may need refinement. Your errors were:
ld: zterm.o illegal reference to symbol: _g_signal_connect_data defined in indirectly referenced dynamic library /opt/local/lib/libgobject-2.0.0.dylib
ld: zterm.o illegal reference to symbol: _gdk_window_get_pointer defined in indirectly referenced dynamic library /opt/local/lib/libgdk-x11-2.0.0.dylib
You can add:
LDFLAGS="-L/opt/local/lib -lgmodule-2.0 -lglib-2.0 -lintl -liconv -lc -lgtk-x11-2.0 -lart_lgpl_2 -lm -lgobject-2.0 -lgdk-x11-2.0"
to the configure.env line in the libzvt portfile. So the configure.env line would look like:
configure.env CPPFLAGS="-L${prefix}/lib -I${prefix}/include" LDFLAGS="-L/opt/local/lib -lgmodule-2.0 -lglib-2.0 -lintl -liconv -lc -lgtk-x11-2.0 -lart_lgpl_2 -lm -lgobject-2.0 -lgdk-x11-2.0"
That might not include all the libraries needed - you may need to add more as other things compile. You get the name of the library from looking that the library name (say libgobject-2.0.0.dylib) and changing the lib in front to "-l" and stripping off ".dylib" and some of the numbers. Which numbers depends. Look in your /opt/local/lib folder to see what you have there. You want to be a little more generic because when it come time to upgrade a few months down the line, you don't want to be linked against an ultra-specific version of the library.
Note: I'm a bit more brutish in fixing these problems, because I forget, but you may have a good number of portfiles to change. Integrating these LDFLAGS with portfiles that have existing LDFLAGS can get annoying. It might be best to set up a localports folder, edit /opt/local/etc/ports/sources.conf and adding your localports folder before the standard dports folder as described in the README file; then copy the py-gtk folder/portfile to your localports folder and issue a portindex command. I see they already have you on the "buried folder plan". Because why? It builds better 10 folders down? Apparently not... Thats like 93 characters in a folder name that they created themselves! Gee, I think their high colonic treatments are washing out some gray matter along the way. A touch too deep & thorough, I do opine.
