[ wxwindows-Bugs-1861668 ] 2.4 compatibility fails due to missing
wxAppConsole symbols
SourceForge.net
noreply at sourceforge.net
Wed Jan 2 02:27:10 PST 2008
Bugs item #1861668, was opened at 2008-01-01 14:26
Message generated for change (Comment added) made by vaclavslavik
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1861668&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: Build -- unix
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Lincoln Ramsay (a1291762)
Assigned to: Nobody/Anonymous (nobody)
Summary: 2.4 compatibility fails due to missing wxAppConsole symbols
Initial Comment:
Building wxMac 2.8.7 on Mac OS X 10.4.11 (similar to how macports does but with 2.4 compatibility and xrc enabled) failed because the 2.4 compatibility ifdef was being handled incorrectly. The linker expected the symbols to be there (so someone including app.h had already included setup.h) but appbase.cpp did not include setup.h - hence the compatibility define was not set - and so the symbols weren't built.
I'd suspect the best fix would be to add #include "wx/setup.h" to app.h but perhaps just adding it to appbase.cpp would be enough.
----------------------------------------------------------------------
>Comment By: Vaclav Slavik (vaclavslavik)
Date: 2008-01-02 11:27
Message:
Logged In: YES
user_id=80834
Originator: NO
Look at the command line. You're getting a conflict with
Macports-installed version -- because -L/opt/local/lib is one of the first
flags on the command line, it takes precedence over the version in your
build directory. As a quick fix, either edit Makefile manually or
temporarily uninstall Macports version.
Now *why* is it put there before -L$(builddir)/lib, that's a question.
Looks like a bug in our build system to me (unless you did something
unfortunately, like setting CXX="g++ -L/opt/local/lib" env. variable).
----------------------------------------------------------------------
Comment By: Lincoln Ramsay (a1291762)
Date: 2008-01-02 11:15
Message:
Logged In: YES
user_id=736434
Originator: YES
I configured for monolithic build because that's what macports does (I
copied it's configure line and added the last 2 switches (2.4
compatibility, xrc). I want to install it over the macports version.
nm monodll_appbase.o | grep CreateLogTarget
00000180 T __ZN12wxAppConsole15CreateLogTargetEv
00001cf8 S __ZN12wxAppConsole15CreateLogTargetEv.eh
000002d2 T __ZN22wxConsoleAppTraitsBase15CreateLogTargetEv
00001d98 S __ZN22wxConsoleAppTraitsBase15CreateLogTargetEv.eh
nm monodll_appbase.o | grep CreateMessageOutput
000001a6 T __ZN12wxAppConsole19CreateMessageOutputEv
00001d20 S __ZN12wxAppConsole19CreateMessageOutputEv.eh
00000314 T __ZN22wxConsoleAppTraitsBase19CreateMessageOutputEv
00001dc8 S __ZN22wxConsoleAppTraitsBase19CreateMessageOutputEv.eh
It appears to be going into a lib. I removed the files in lib and ran
make:
g++ -dynamiclib -single_module -headerpad_max_install_names -o
/Users/link/Files/Incoming/build_wx/lib/libwx_macu-2.8.0.4.0.dylib
monodll_appbase.o ... -L/opt/local/lib -framework IOKit -framework Carbon
-framework Cocoa -framework System -framework QuickTime
-L/Users/link/Files/Incoming/build_wx/lib -install_name
/usr/local/lib/libwx_macu-2.8.0.dylib -compatibility_version 5.0
-current_version 5.0 -lz -lpthread -liconv -lwxtiff-2.8 -lwxjpeg-2.8
-lwxpng-2.8 -lwxregexu-2.8 -lwxexpat-2.8 -L/opt/local/lib -framework
IOKit -framework Carbon -framework Cocoa -framework System -framework
QuickTime -lz -lpthread -liconv -framework WebKit -L/opt/local/lib
-lSDLmain -lSDL -Wl,-framework,Cocoa
Then I got this (note that it's different to the error I got the first
time):
g++ -dynamiclib -single_module -headerpad_max_install_names -o
/Users/link/Files/Incoming/build_wx/lib/libwx_macu_gl-2.8.0.4.0.dylib
gldll_glcanvas.o -L/opt/local/lib -framework IOKit -framework Carbon
-framework Cocoa -framework System -framework QuickTime
-L/Users/link/Files/Incoming/build_wx/lib -install_name
/usr/local/lib/libwx_macu_gl-2.8.0.dylib -compatibility_version 5.0
-current_version 5.0 -lz -lpthread -liconv -lwxtiff-2.8 -lwxjpeg-2.8
-lwxpng-2.8 -lwxregexu-2.8 -lwxexpat-2.8 -L/opt/local/lib -framework
IOKit -framework Carbon -framework Cocoa -framework System -framework
QuickTime -lz -lpthread -liconv -framework WebKit -lwx_macu-2.8
-framework OpenGL -framework AGL
ld: Undefined symbols:
__ZN12wxAppConsole15CreateLogTargetEv
__ZN12wxAppConsole19CreateMessageOutputEv
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool: internal link edit
command failed
----------------------------------------------------------------------
Comment By: Vadim Zeitlin (vadz)
Date: 2008-01-02 00:34
Message:
Logged In: YES
user_id=71618
Originator: NO
Strange, these functions should be defined in monodll_appbase.o -- could
you please check with nm or otool if this is the case?
As for setup.h, it's always included so this is definitely not the
problem. And it almost certainly doesn't have anything to do with XRC.
BTW, why do you build in monolithic mode?
----------------------------------------------------------------------
Comment By: Lincoln Ramsay (a1291762)
Date: 2008-01-01 22:25
Message:
Logged In: YES
user_id=736434
Originator: YES
Here's the configure line (enabling 2.4 compatibility and xrc):
../wxMac-2.8.7/configure --mandir=/opt/local/share/man
--with-libiconv-prefix=/opt/local --with-libjpeg --with-libtiff
--with-libpng --with-zlib --with-sdl --with-opengl --with-mac
--disable-sdltest --enable-unicode --enable-display --enable-monolithic
--enable-compat24 --enable-xrc
----------------------------------------------------------------------
Comment By: Lincoln Ramsay (a1291762)
Date: 2008-01-01 22:21
Message:
Logged In: YES
user_id=736434
Originator: YES
Hmm... Looks like the XRC lib doesn't like the compatibility define.
/Users/link/Files/Incoming/build_wx/bk-deps g++ -c -o wxrc_wxrc.o
-D__WXMAC__ -I../../../wxMac-2.8.7/utils/wxrc -DWXUSINGDLL
-DwxUSE_GUI=0 -DWX_PRECOMP -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
-I/Users/link/Files/Incoming/build_wx/lib/wx/include/mac-unicode-release-2.8
-I../../../wxMac-2.8.7/include -fpascal-strings
-I../../../wxMac-2.8.7/src/mac/carbon/morefilex
-I/Developer/Headers/FlatCarbon -I/opt/local/include -Wall -Wundef
-Wno-ctor-dtor-privacy -O2 -fno-strict-aliasing -I/opt/local/include/SDL
-D_GNU_SOURCE=1 -D_THREAD_SAFE -fno-common
../../../wxMac-2.8.7/utils/wxrc/wxrc.cpp
g++ -o wxrc wxrc_wxrc.o -L/opt/local/lib -framework IOKit -framework
Carbon -framework Cocoa -framework System -framework QuickTime
-L/Users/link/Files/Incoming/build_wx/lib -lz -lpthread -liconv
-lwx_macu-2.8 -lwxregexu-2.8 -lwxexpat-2.8 -L/opt/local/lib -framework
IOKit -framework Carbon -framework Cocoa -framework System -framework
QuickTime -lz -lpthread -liconv -framework WebKit
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
wxAppConsole::CreateLogTarget()
wxAppConsole::CreateMessageOutput()
collect2: ld returned 1 exit status
----------------------------------------------------------------------
Comment By: Vaclav Slavik (vaclavslavik)
Date: 2008-01-01 14:36
Message:
Logged In: YES
user_id=80834
Originator: NO
And the errors you get are...?
----------------------------------------------------------------------
Comment By: Lincoln Ramsay (a1291762)
Date: 2008-01-01 14:34
Message:
Logged In: YES
user_id=736434
Originator: YES
I added my first suggestion but it didn't work. I'm currently building
with the compatibility ifdef commented out (ie. forced on) to see if that
will work. Commenting out just the .cpp file causes the symbols to be found
but vtable entries for them are not.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1861668&group_id=9863
More information about the wx-dev
mailing list