sebleedelisle / ofxLaser

An openFrameworks addon for controlling multiple lasers.
Mozilla Public License 2.0
258 stars 32 forks source link

make failure linking/compiling on arm64 macos #38

Closed sevaepsteyn closed 2 years ago

sevaepsteyn commented 2 years ago
ld: warning: ignoring file /Users/seva/Documents/src/of-0.11.2/addons/ofxLaser/libs/libusb/lib/osx/usb-1.0.0-latest-superspeed.a, building for macOS-arm64 but attempting to link with file built for unknown-unsupported file format ( 0x21 0x3C 0x61 0x72 0x63 0x68 0x3E 0x0A 0x23 0x31 0x2F 0x32 0x30 0x20 0x20 0x20 )
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks//QTKit.framework/QTKit.tbd, missing required architecture arm64 in file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks//QTKit.framework/QTKit.tbd
Undefined symbols for architecture arm64:
  "_svgtiny_create", referenced from:
      ofxSVGExtra::loadFromString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in ofxSvgExtra.o
  "_svgtiny_free", referenced from:
      ofxSVGExtra::loadFromString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in ofxSvgExtra.o
  "_svgtiny_parse", referenced from:
      ofxSVGExtra::loadFromString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in ofxSvgExtra.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
sebleedelisle commented 2 years ago

Try including the ofxKinect add-on and see if that helps.

sevaepsteyn commented 2 years ago

Including ofxKinect add-on didn't create any changes

sebleedelisle commented 2 years ago

Looking more closely it seems that the svgtiny lib isn't getting linked properly... is that something you could look into? I don't have an ARM64 dev environment set up right now unfortunately.

sevaepsteyn commented 2 years ago

This is on MacOS arm64 by the way. Is the source for svgtiny included with ofxLaser? I only see the header file and some precompiled libraries, although the MacOS version seems to include both x86_64 and arm64 in a universal binary:

% file ./libs/ofxSvgExtra/libs/svgtiny/lib/osx/svgtiny.a
./libs/ofxSvgExtra/libs/svgtiny/lib/osx/svgtiny.a: Mach-O universal binary with 2 architectures: [x86_64:current ar archive random librarycurrent ar archive random library] [arm64:current ar archive random librarycurrent ar archive random library]
./libs/ofxSvgExtra/libs/svgtiny/lib/osx/svgtiny.a (for architecture x86_64):    current ar archive random library
./libs/ofxSvgExtra/libs/svgtiny/lib/osx/svgtiny.a (for architecture arm64): current ar archive random library
sevaepsteyn commented 2 years ago

Doesn't look like make is adding svgtiny.a to the list of libraries to link

sebleedelisle commented 2 years ago

Ah sorry I didn't see the MacOS part. It's building here fine for me on an M1 Mac with Xcode. How did you build the project? Which version of oF are you using? libsvgtiny should be included with openFrameworks.

sevaepsteyn commented 2 years ago

OF 0.11.2, I dropped ofxLaser main into the addons and added "ofxLaser" to addons.make in the emptyExample and ran "make"

sevaepsteyn commented 2 years ago

OF 0.11.2, I dropped ofxLaser main into the addons and added "ofxLaser" to addons.make in the emptyExample and ran "make"

sebleedelisle commented 2 years ago

I've never used that method for compiling oF projects, I use the projectGenerator so unfortunately I can't help. Let me know if you get to the bottom of it, thanks!

sevaepsteyn commented 2 years ago

Hmm, I just tried from scratch and using projectGenerator and the empty app with ofxLaser compiles..

zumpchke commented 11 months ago

@sevaepsteyn did you fix this?