Comments (16)
I think i solved it by changing this line in setup.py
library_link_args = ['-l{0}'.format(lib) for lib in ('dracoenc', 'draco', 'dracodec', 'python')]
and using
python setup.py bdist_wheel --plat-name macosx-10.14-x86_64
and then
pip install dist/DracoPy-0.0.8-cp36-cp36m-macosx_10_14_x86_64.whl
based partly on this blog
https://blog.tim-smith.us/2015/09/python-extension-modules-os-x/
and partly from help I got from someone at the Allen.
from dracopy.
that didn't work actually... because i was using the gcc compiler in the mac which was linking against the system python, and then trying to use it in anaconda. I got it working within anaconda by install gcc, cmake and clang in my conda environment and then installed the mac 10.9 sdk as suggested here (ContinuumIO/anaconda-issues#9096 (comment)) from here (https://github.com/phracker/MacOSX-SDKs). I unzipped it to /opt/MacOSX10.9.sdk and then set an environment variable export CONDA_BUILD_SYSROOT=/opt/MacOSX10.9.sdk
. I then compiled a whl with python setup.py bdist_wheel --plat-name macosx-10.9-x86_64
and installed with pip install dist/DracoPy-0.0.8-cp36-cp36m-macosx_10_9_x86_64.whl
from dracopy.
you could setup travis and try https://docs.travis-ci.com/user/reference/osx/
from dracopy.
i also can't checkout the current code because the git submodule command says that that commit doesn't exist.
from dracopy.
DracoPy forrestc$ git submodule update --init error: Server does not allow request for unadvertised object 5b9d59769abf4a00a2589174ca45ec3674b5f192 Fetched in submodule path 'draco', but it did not contain 5b9d59769abf4a00a2589174ca45ec3674b5f192. Direct fetching of that commit failed.
from dracopy.
f2c8da7 fixes the submodule issue. I'll have to look into the OS X build problems
from dracopy.
I think that for all these c libraries/extensions having a conda build script for the major platforms would help distribution tremendously.
from dracopy.
Here's my stack trace from trying to install version 0.0.8:
Building wheels for collected packages: DracoPy
Building wheel for DracoPy (PEP 517) ... error
Complete output from command /Users/wms/.virtualenvs/kimi/bin/python3.6 /Users/wms/.virtualenvs/kimi/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/_v/0h6xtv2d009cmxcft7snynvh0000gn/T/tmpde65b33o:
Not searching for unused variables given on the command line.
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/_v/0h6xtv2d009cmxcft7snynvh0000gn/T/pip-install-6v2a2g0k/DracoPy/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
-- The C compiler identification is AppleClang 10.0.0.10001145
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- broken
CMake Error at /usr/local/Cellar/cmake/3.12.2/share/cmake/Modules/CMakeTestCXXCompiler.cmake:45 (message):
The C++ compiler
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /private/var/folders/_v/0h6xtv2d009cmxcft7snynvh0000gn/T/pip-install-6v2a2g0k/DracoPy/_cmake_test_compile/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_de0bc/fast"
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_de0bc.dir/build.make CMakeFiles/cmTC_de0bc.dir/build
Building CXX object CMakeFiles/cmTC_de0bc.dir/testCXXCompiler.cxx.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.6 -o CMakeFiles/cmTC_de0bc.dir/testCXXCompiler.cxx.o -c /private/var/folders/_v/0h6xtv2d009cmxcft7snynvh0000gn/T/pip-install-6v2a2g0k/DracoPy/_cmake_test_compile/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
1 warning generated.
Linking CXX executable cmTC_de0bc
/usr/local/Cellar/cmake/3.12.2/bin/cmake -E cmake_link_script CMakeFiles/cmTC_de0bc.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.6 -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_de0bc.dir/testCXXCompiler.cxx.o -o cmTC_de0bc
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cmTC_de0bc] Error 1
make: *** [cmTC_de0bc/fast] Error 2
from dracopy.
Thanks for helping guys. Sorry for these headaches, I will get a chance to look into this on OS X this weekend, I usually don't have access to an OS X machine
from dracopy.
Would either of you guys mind pip installing anew whenever you get the chance? I think I fixed it.
from dracopy.
i made a fresh python3.7 ananconda environment on my mac (10.14.3) and did a pip install dracopy and got the following result..
./src/DracoPy.cpp:3860:79: warning: result of comparison of constant -1 with expression of type 'uint32_t' (aka 'unsigned int') is always false [-Wtautological-constant-out-of-range-compare]
__pyx_t_5 = __Pyx_PyInt_As_uint32_t(__pyx_v_item); if (unlikely(__pyx_t_5 == -1LL && PyErr_Occurred())) __PYX_ERR(1, 52, __pyx_L1_error)
~~~~~~~~~ ^ ~~~~
./src/DracoPy.cpp:630:43: note: expanded from macro 'unlikely'
#define unlikely(x) __builtin_expect(!!(x), 0)
^
./src/DracoPy.cpp:5284:65: error: too many arguments to function call, expected 3, have 4
return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/include/stddef.h:100:18: note: expanded from macro 'NULL'
# define NULL __null
^~~~~~
./src/DracoPy.cpp:5795:21: error: no member named 'exc_type' in '_ts'
*type = tstate->exc_type;
~~~~~~ ^
./src/DracoPy.cpp:5796:22: error: no member named 'exc_value' in '_ts'; did you mean 'curexc_value'?
*value = tstate->exc_value;
^~~~~~~~~
curexc_value
/Users/forrestc/anaconda3/envs/dracopy/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
PyObject *curexc_value;
^
./src/DracoPy.cpp:5797:19: error: no member named 'exc_traceback' in '_ts'; did you mean 'curexc_traceback'?
*tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
/Users/forrestc/anaconda3/envs/dracopy/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
PyObject *curexc_traceback;
^
./src/DracoPy.cpp:5804:24: error: no member named 'exc_type' in '_ts'
tmp_type = tstate->exc_type;
~~~~~~ ^
./src/DracoPy.cpp:5805:25: error: no member named 'exc_value' in '_ts'; did you mean 'curexc_value'?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
/Users/forrestc/anaconda3/envs/dracopy/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
PyObject *curexc_value;
^
./src/DracoPy.cpp:5806:22: error: no member named 'exc_traceback' in '_ts'; did you mean 'curexc_traceback'?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
/Users/forrestc/anaconda3/envs/dracopy/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
PyObject *curexc_traceback;
^
./src/DracoPy.cpp:5807:13: error: no member named 'exc_type' in '_ts'
tstate->exc_type = type;
~~~~~~ ^
./src/DracoPy.cpp:5808:13: error: no member named 'exc_value' in '_ts'; did you mean 'curexc_value'?
tstate->exc_value = value;
^~~~~~~~~
curexc_value
/Users/forrestc/anaconda3/envs/dracopy/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
PyObject *curexc_value;
^
./src/DracoPy.cpp:5809:13: error: no member named 'exc_traceback' in '_ts'; did you mean 'curexc_traceback'?
tstate->exc_traceback = tb;
^~~~~~~~~~~~~
curexc_traceback
/Users/forrestc/anaconda3/envs/dracopy/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
PyObject *curexc_traceback;
^
./src/DracoPy.cpp:5854:24: error: no member named 'exc_type' in '_ts'
tmp_type = tstate->exc_type;
~~~~~~ ^
./src/DracoPy.cpp:5855:25: error: no member named 'exc_value' in '_ts'; did you mean 'curexc_value'?
tmp_value = tstate->exc_value;
^~~~~~~~~
curexc_value
/Users/forrestc/anaconda3/envs/dracopy/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
PyObject *curexc_value;
^
./src/DracoPy.cpp:5856:22: error: no member named 'exc_traceback' in '_ts'; did you mean 'curexc_traceback'?
tmp_tb = tstate->exc_traceback;
^~~~~~~~~~~~~
curexc_traceback
/Users/forrestc/anaconda3/envs/dracopy/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
PyObject *curexc_traceback;
^
./src/DracoPy.cpp:5857:13: error: no member named 'exc_type' in '_ts'
tstate->exc_type = local_type;
~~~~~~ ^
./src/DracoPy.cpp:5858:13: error: no member named 'exc_value' in '_ts'; did you mean 'curexc_value'?
tstate->exc_value = local_value;
^~~~~~~~~
curexc_value
/Users/forrestc/anaconda3/envs/dracopy/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
PyObject *curexc_value;
^
./src/DracoPy.cpp:5859:13: error: no member named 'exc_traceback' in '_ts'; did you mean 'curexc_traceback'?
tstate->exc_traceback = local_tb;
^~~~~~~~~~~~~
curexc_traceback
/Users/forrestc/anaconda3/envs/dracopy/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
PyObject *curexc_traceback;
^
6 warnings and 16 errors generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for dracopy
Running setup.py clean for dracopy
Failed to build dracopy
from dracopy.
seems related to the cython version (maybe you are on 3.6?) perhaps the package shouldn't include the cythonized files?
from dracopy.
on a python3.6 environment i get this
this is similar to what i was getting before, and made me compile from source with the plat-name specification
ERROR: Not searching for unused variables given on the command line.
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/93/pxx43tfd7nqbr7rbdxxm7jpn4fvqmh/T/pip-install-_g4q4hfi/dracopy/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
-- The C compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- broken
CMake Error at /usr/local/Cellar/cmake/3.14.2/share/cmake/Modules/CMakeTestCXXCompiler.cmake:53 (message):
The C++ compiler
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /private/var/folders/93/pxx43tfd7nqbr7rbdxxm7jpn4fvqmh/T/pip-install-_g4q4hfi/dracopy/_cmake_test_compile/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_7a2b7/fast
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_7a2b7.dir/build.make CMakeFiles/cmTC_7a2b7.dir/build
Building CXX object CMakeFiles/cmTC_7a2b7.dir/testCXXCompiler.cxx.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.7 -o CMakeFiles/cmTC_7a2b7.dir/testCXXCompiler.cxx.o -c /private/var/folders/93/pxx43tfd7nqbr7rbdxxm7jpn4fvqmh/T/pip-install-_g4q4hfi/dracopy/_cmake_test_compile/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
1 warning generated.
Linking CXX executable cmTC_7a2b7
/usr/local/Cellar/cmake/3.14.2/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7a2b7.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.7 -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_7a2b7.dir/testCXXCompiler.cxx.o -o cmTC_7a2b7
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cmTC_7a2b7] Error 1
make: *** [cmTC_7a2b7/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:4 (ENABLE_LANGUAGE)
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/93/pxx43tfd7nqbr7rbdxxm7jpn4fvqmh/T/pip-install-_g4q4hfi/dracopy/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
See also "/private/var/folders/93/pxx43tfd7nqbr7rbdxxm7jpn4fvqmh/T/pip-install-_g4q4hfi/dracopy/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
--------------------------------------------------------------------------------
-- Trying "Ninja" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja" generator - failure
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Trying "Unix Makefiles" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Unix Makefiles" generator - failure
--------------------------------------------------------------------------------
********************************************************************************
scikit-build could not get a working generator for your system. Aborting build.
Building MacOSX wheels for Python 3.6 requires XCode.
Get it here:
https://developer.apple.com/xcode/
********************************************************************************
----------------------------------------
ERROR: Failed building wheel for dracopy```
from dracopy.
:( Thanks for trying. I got it to work on High Sierra. Will have to test it somehow specifically on Mojave/10.14
from dracopy.
You were right about the Cython issue. I got it to work on 3.7 on High Sierra (forgot to test 3.7) after upgrading the cython version I was using. I think it will most likely work on Mojave w/ 3.7 now. I also setup Travis tests for 3.5, 3.6, & 3.7 for both Mojave & High Sierra. Oddly it's passing all the tests, Travis doesn't run into that clang linking problem.
from dracopy.
I'm confident that this works now after testing on Mojave and High Sierra, and the travis tests passing.
from dracopy.
Related Issues (20)
- DracoPy issue HOT 1
- Python 3.8 Binaries HOT 1
- Python 3.9 Binaries HOT 3
- Windows Binaries HOT 4
- Decoding error for hemibrain meshes introduced between 0.0.15 and 0.0.18 release HOT 3
- Encoding does not return resulting faces and points count HOT 2
- Custom metadata support HOT 2
- How to compress a obj file? HOT 5
- Attributes compression support? HOT 1
- Error in reshape HOT 3
- How to build wheel on apple silicon? HOT 3
- color & custom attributes encoding / decoding
- encoding and decoding intensity values in point cloud HOT 3
- Draco Submodule Should Point to Exact Version HOT 5
- Changes needed in setup.py in order to work with Python 3.11 on MacOS HOT 2
- std::vector larger than max_size HOT 2
- 1.2.1 with Python3.11 to PYPI HOT 5
- Removal of DracoPy.cpp from this repository HOT 2
- Pointcloud support HOT 14
- Encode .obj HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dracopy.