Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash: Opening the application after downloading. #498

Closed
NovaBro opened this issue Oct 28, 2019 · 4 comments
Closed

Crash: Opening the application after downloading. #498

NovaBro opened this issue Oct 28, 2019 · 4 comments
Labels

Comments

@NovaBro
Copy link

NovaBro commented Oct 28, 2019

System information

SolveSpace version: 2.3
*cant use the trick using the "use Help → About..." since it wont even open

Operating system: MacOS

Expected:
I would expect for it to launch after downloading and opening the 2.3 solvespace.dmg file.

What Happened:
It did not open and immediately crashed.

https://pastebin.com/3n5qgZB9

@whitequark
Copy link
Contributor

See the workaround here: #398

@NovaBro
Copy link
Author

NovaBro commented Nov 11, 2019

I followed their instructions of deleting the files highlighted in blue, but I did not understand how to complete the first step.
"brew install cmake libpng freetype
(see after the Installation "section" in "Building" from the the README.md)
Maybe it works without that"
Regardless, after deleting the files, I tried again but it did not work.

@LdBeth
Copy link

LdBeth commented Nov 16, 2019

https://brew.sh

this site gives your info on what is brew, where to get it, and how to use it.

For me in addition deleting the dylib files in the bundle, to get the app work requires using install_name_tool to edit dynamic shared library name linked to the app. Originally I'd like to recompile from the source but I don't want to install Xcode.

I'm actually not using brew but pkgsrc instead, so it's /opt/pkg rather than /usr/local

>> 0:~/Downloads $ cd solvespace.app/Contents/MacOS/                                                       << 23:31 <]
>> 0:~/D/s/C/MacOS $ ls                                                                                    << 23:33 <]
libfreetype.dylib libpng.dylib      libz.dylib        solvespace
>> 0:~/D/s/C/MacOS $ rm  *.dylib                                                                           << 23:33 <]
override r--r--r--  ldbeth/staff for libpng.dylib? y
>> 0:~/D/s/C/MacOS $ ls                                                                                    << 23:33 <]
solvespace
>> 0:~/D/s/C/MacOS $ ./solvespace                                                                          << 23:33 <]
dyld: Library not loaded: @executable_path/libpng.dylib
  Referenced from: /Users/ldbeth/Downloads/solvespace.app/Contents/MacOS/./solvespace
  Reason: image not found
fish: './solvespace' terminated by signal SIGABRT (Abort)
>> 134:~/D/s/C/MacOS $ otool -L solvespace                                                                 << 23:33 <]
solvespace:
	/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
	@executable_path/libpng.dylib (compatibility version 42.0.0, current version 42.0.0)
	@executable_path/libz.dylib (compatibility version 1.0.0, current version 1.2.5)
	@executable_path/libfreetype.dylib (compatibility version 19.0.0, current version 19.3.0)
	/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1404.46.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1258.1.0)
	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1258.0.0)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
>> 0:~/D/s/C/MacOS $ ./solvespace                                                                                                                         << 23:34 <]
dyld: Library not loaded: @executable_path/libpng.dylib
  Referenced from: /Users/ldbeth/Downloads/solvespace.app/Contents/MacOS/./solvespace
  Reason: image not found
fish: './solvespace' terminated by signal SIGABRT (Abort)
>> 134:~/D/s/C/MacOS $ install_name_tool -change @executable_path/libpng.dylib /opt/pkg/lib/libpng16.dylib solvespace                                     << 23:36 <]
>> 0:~/D/s/C/MacOS $ ./solvespace                                                                                                                         << 23:37 <]
dyld: Library not loaded: @executable_path/libfreetype.dylib
  Referenced from: /Users/ldbeth/Downloads/solvespace.app/Contents/MacOS/./solvespace
  Reason: image not found
fish: './solvespace' terminated by signal SIGABRT (Abort)
>> 134:~/D/s/C/MacOS $ install_name_tool -change @executable_path/libfreetype.dylib /opt/pkg/lib/libfreetype.dylib                                        << 23:37 <]
Usage: /Library/Developer/CommandLineTools/usr/bin/install_name_tool [-change old new] ... [-rpath old new] ... [-add_rpath new] ... [-delete_rpath old] ... [-id name] input
>> 1:~/D/s/C/MacOS $ install_name_tool -change @executable_path/libfreetype.dylib /opt/pkg/lib/libfreetype.dylib solvespace                               << 23:37 <]
>> 0:~/D/s/C/MacOS $ ./solvespace                                                                                                                         << 23:37 <]
Vector::WithMagnitude(2.6) of zero vector!
Vector::WithMagnitude(2.6) of zero vector!
Vector::WithMagnitude(2.6) of zero vector!
Vector::WithMagnitude(2.6) of zero vector!
Vector::WithMagnitude(2.6) of zero vector!
Vector::WithMagnitude(2.6) of zero vector!
Vector::WithMagnitude(2.6) of zero vector!
Vector::WithMagnitude(2.6) of zero vector!
Vector::WithMagnitude(2.6) of zero vector!
Vector::WithMagnitude(2.6) of zero vector!
Vector::WithMagnitude(2.6) of zero vector!
>> 0:~/D/s/C/MacOS $ otool -L solvespace                                                                                                                  << 23:38 <]
solvespace:
	/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
	/opt/pkg/lib/libpng16.dylib (compatibility version 42.0.0, current version 42.0.0)
	@executable_path/libz.dylib (compatibility version 1.0.0, current version 1.2.5)
	/opt/pkg/lib/libfreetype.dylib (compatibility version 19.0.0, current version 19.3.0)
	/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1404.46.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1258.1.0)
	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1258.0.0)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
>> 0:~/D/s/C/MacOS $ install_name_tool -change @executable_path/libz.dylib /opt/pkg/lib/libz.dylib                                                        << 23:38 <]
Usage: /Library/Developer/CommandLineTools/usr/bin/install_name_tool [-change old new] ... [-rpath old new] ... [-add_rpath new] ... [-delete_rpath old] ... [-id name] input
>> 1:~/D/s/C/MacOS $ install_name_tool -change @executable_path/libz.dylib /opt/pkg/lib/libz.dylib solvespace                                             << 23:39 <]

@NovaBro
Copy link
Author

NovaBro commented Nov 20, 2019

I was able to download HomeBrew and follow the original instructions. Thank you all for your help!

@NovaBro NovaBro closed this as completed Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants