Page 1 of 1

wX3.1.2 and 3.1.3 build, but all programs crash (missing symbols).

Posted: Fri Jun 28, 2019 11:04 am
by slashdev
I'm new to wxWidgets. I downloaded 3.1.2 (also tried cloning from github--3.1.3). Following the build instructions in the source for OSX, everything compiles without errors, but when I run any of the samples, it reports missing symbols.

Code: Select all

mkdir build-cocoa-debug
cd build-cocoa-debug
../configure --enable-debug
make install
no errors.

Code: Select all

cd samples; make; cd minimal; make;
./minimal

dyld: Symbol not found: __ZTISt12length_error
  Referenced from: /Users/<USERNAME>/repos/wxWidgets/build-debug/samples/minimal/./minimal
  Expected in: /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
 in /Users/<USERNAME>/repos/wxWidgets/build-debug/samples/minimal/./minimal
I get the same error if I use "open minimal.app" from terminal or Finder.

It looks like the symbol is in the framework.

Code: Select all

objdump -t /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox | grep __ZTISt12length_error

0000000000279be0 lw    O __DATA,__const	__ZTISt12length_error
I've tried a few different configure options (--disable-shared, --enable-stl, --with-cxx=14, --with-macos-sdk=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk, --disable-optimize). None seem to make any difference.

OSX 10.14.5 (mojave)
Apple clang version 11.0.0 (clang-1100.0.20.17)
Target: x86_64-apple-darwin18.6.0

Any help would be much appreciated. Thanks.

Re: wX3.1.2 and 3.1.3 build, but all programs crash (missing symbols).

Posted: Fri Jun 28, 2019 2:16 pm
by ONEEYEMAN
Hi,
Please create a new build directory and in there run:

Code: Select all

../configure --enable-debug --with-macosx-version-min=10.9
Check the proper option name with "../configure --help |grep -i osx". I'm not in front of my Mac right now.

I'm surprised you didn't receive any errors during wxWidgets compilation though...

Re: wX3.1.2 and 3.1.3 build, but all programs crash (missing symbols).

Posted: Fri Jun 28, 2019 4:01 pm
by slashdev
Done. Same result.

I was also surprised that there were no errors. There are a few infinite recursion warnings, but no errors.

Re: wX3.1.2 and 3.1.3 build, but all programs crash (missing symbols).

Posted: Wed Jul 03, 2019 6:35 am
by evstevemd
does using CMake make any difference?

Re: wX3.1.2 and 3.1.3 build, but all programs crash (missing symbols).

Posted: Wed Jul 03, 2019 12:56 pm
by BobsTheDude
You did a make install, where did the install put your dylib's?

These all work with 3.1.2, I have not tried on anything newer yet.

Run the following from the dir you created.

Debug shared (multiple dylib)

Code: Select all

../configure --enable-debug --with-osx_cocoa --with-macosx-version-min=10.9 --enable-monolithic --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk

make

cd samples; make;cd ..
cd demos;   make;cd ..

Debug shared (Single dylib)

Code: Select all

../configure --enable-debug --enable-monolithic --with-osx_cocoa --with-macosx-version-min=10.9 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk

make SHARED=1 MONOLITHIC=1 BUILD=debug

cd samples; make;cd ..
cd demos;   make;cd .[code]

Debug static (no dylib)
[code]
../configure --enable-debug --disable-shared --with-osx_cocoa --with-macosx-version-min=10.9 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk

make

cd samples; make;cd ..
cd demos;   make;cd .
This "MacOSX10.14.sdk" assumes you have that SDK installed.

The MacOSX10.14.sdk may not be required but I have not tested it yet to verify.

Re: wX3.1.2 and 3.1.3 build, but all programs crash (missing symbols).

Posted: Wed Jul 03, 2019 3:42 pm
by slashdev
That worked! Thanks.