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

Link fails when building against latest supercollider master (and 3.11) #9

Closed
ajbt opened this issue Jun 11, 2020 · 3 comments
Closed

Comments

@ajbt
Copy link

ajbt commented Jun 11, 2020

I updated the supercollider sub-repo to latest master before building SuperColliderAU (for Qt-related reasons), and the build failed with the following:

Undefined symbols for architecture x86_64:
"_NSApp", referenced from:
      SC::Apple::EventLoop::run() in SC_Apple.mm.o
      SC::Apple::EventLoop::quit() in SC_Apple.mm.o
  "_OBJC_CLASS_$_NSApplication", referenced from:
      objc-class-ref in SC_Apple.mm.o
  "_OBJC_CLASS_$_NSEvent", referenced from:
      objc-class-ref in SC_Apple.mm.o

I'm aware that this is my own fault for doing something non-standard, but thought it might be helpful to note it here anyway!

Looks like the change to supercollider that causes this is here:
supercollider/supercollider@d47688d#diff-4ba3c1af785b08237306a79fe2332aae

I was able to 'fix' this by linking against framework AppKit rather than Foundation (diff below), but I'm highly ignorant about this stuff so have no idea whether this is sufficient.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index dd3d4c7..2e896b3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -244,7 +244,7 @@ target_link_libraries(${scau_bundle} "-framework CoreMIDI")
 target_link_libraries(${scau_bundle} "-framework CoreServices")
 #target_link_libraries(${scau_bundle} "-framework vecLib")
 target_link_libraries(${scau_bundle} "-framework Accelerate")
-target_link_libraries(${scau_bundle} "-framework Foundation")
+target_link_libraries(${scau_bundle} "-framework AppKit")
 target_link_libraries(${scau_bundle} ${SNDFILE_LIBRARIES})
 add_definitions("-DLIBSNDFILE_1018")

I'm on macOS High Sierra, 10.13.6

@joshpar
Copy link
Member

joshpar commented Jun 11, 2020 via email

@dyfer
Copy link
Member

dyfer commented Sep 27, 2020

Linking is broken in 3.11 branch currently. It does work - with some pending changes - with current develop (fixed in supercollider/supercollider#5014)

@dyfer
Copy link
Member

dyfer commented Sep 28, 2020

I think this can be closed as in #12 we use the updated develop branch

@dyfer dyfer closed this as completed Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants