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

build error (OS framework issue?) #6

Closed
egradman opened this issue Jul 6, 2019 · 2 comments
Closed

build error (OS framework issue?) #6

egradman opened this issue Jul 6, 2019 · 2 comments

Comments

@egradman
Copy link

egradman commented Jul 6, 2019

Really excited to test this module out! Having trouble building on 10.14.3, up-to-date XCode, cmake 3.14.5 (homebrew)

running build
running build_ext
-- pybind11 v2.3.dev0
-- Framework Foundation found at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework
-- Framework OpenGL found at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework
-- Framework AppKit found at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/egradman/dev/syphonpy/build/temp.macosx-10.13-x86_64-3.7
[ 90%] Built target syphon_lib
make[2]: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Foundation', needed by `../lib.macosx-10.13-x86_64-3.7/syphonpy.cpython-37m-darwin.so'.  Stop.
make[1]: *** [CMakeFiles/syphonpy.dir/all] Error 2
make: *** [all] Error 2
Traceback (most recent call last):
  File "setup.py", line 68, in <module>
    zip_safe=False,
  File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 140, in setup
    return distutils.core.setup(**attrs)
  File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 32, in run
    self.build_extension(ext)
  File "setup.py", line 57, in build_extension
    subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
  File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 341, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.

The /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/ directory is present, and contains Foundation.tbd but not Foundation

My XCode-fu is not strong. Sorry if this is obvious.

@egradman
Copy link
Author

egradman commented Jul 6, 2019

I did this and it compiled, installed and ran! I'd submit this as a pull req, but it's probably wrong for a different reason :)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d66e322..126e4b3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,7 +32,7 @@ macro(ADD_OSX_FRAMEWORK fwname target)
     if( ${FRAMEWORK_${fwname}} STREQUAL FRAMEWORK_${fwname}-NOTFOUND)
         MESSAGE(ERROR ": Framework ${fwname} not found")
     else()
-        TARGET_LINK_LIBRARIES(${target} PUBLIC "${FRAMEWORK_${fwname}}/${fwname}")
+        TARGET_LINK_LIBRARIES(${target} PUBLIC "${FRAMEWORK_${fwname}}")
         MESSAGE(STATUS "Framework ${fwname} found at ${FRAMEWORK_${fwname}}")
     endif()
 endmacro(ADD_OSX_FRAMEWORK)

egradman pushed a commit to egradman/syphonpy that referenced this issue Jul 6, 2019
njazz added a commit that referenced this issue Jul 6, 2019
fixed build error\nhttps://github.com//issues/6
@njazz
Copy link
Owner

njazz commented Jul 6, 2019

Hello

Seems to work fine, merged ecac4eb

@njazz njazz closed this as completed Jul 6, 2019
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

2 participants