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

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
slashdev
In need of some credit
In need of some credit
Posts: 3
Joined: Fri Jun 28, 2019 10:34 am

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

Post 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.
Last edited by catalin on Fri Jun 28, 2019 8:08 pm, edited 1 time in total.
Reason: Improved readability a bit
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7481
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

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

Post 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...
slashdev
In need of some credit
In need of some credit
Posts: 3
Joined: Fri Jun 28, 2019 10:34 am

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

Post by slashdev »

Done. Same result.

I was also surprised that there were no errors. There are a few infinite recursion warnings, but no errors.
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2409
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

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

Post by evstevemd »

does using CMake make any difference?
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
BobsTheDude
Earned a small fee
Earned a small fee
Posts: 23
Joined: Wed Mar 06, 2019 10:33 pm

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

Post 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.
slashdev
In need of some credit
In need of some credit
Posts: 3
Joined: Fri Jun 28, 2019 10:34 am

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

Post by slashdev »

That worked! Thanks.