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

Installation on M1 still failing on newer version #59

Open
joeylitalien opened this issue Mar 15, 2023 · 5 comments
Open

Installation on M1 still failing on newer version #59

joeylitalien opened this issue Mar 15, 2023 · 5 comments

Comments

@joeylitalien
Copy link

Hi Francis,

Thanks for your great work, love your library! I usually develop on Linux but wanted to try your lib on my M1 Macbook. To my surprise, it failed even on the latest release and a fresh virtual env. This is the error I am getting on a normal import:

Traceback (most recent call last):
  File "/tmp/test.py", line 2, in <module>
    import point_cloud_utils as pcu
  File "/tmp/demo/lib/python3.10/site-packages/point_cloud_utils/__init__.py", line 4, in <module>
    from ._pcu_internal import sample_mesh_poisson_disk, sample_mesh_random, \
ImportError: dlopen(/tmp/demo/lib/python3.10/site-packages/point_cloud_utils/_pcu_internal.cpython-310-darwin.so, 0x0002): tried: '/tmp/demo/lib/python3.10/site-packages/point_cloud_utils/_pcu_internal.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/_pcu_internal.cpython-310-darwin.so' (no such file)

For the record, a manual build of v0.29.2 works just fine, just not through pip. I've tried running pip install point-cloud-utils==0.29.2 but I get the same result.

Best,
Joey

@fwilliams
Copy link
Owner

fwilliams commented Mar 19, 2023

Hey Joey, thanks for pointing this out! The issue seems to be with the CI building m1 packages on Intel macs. It passes a flag to indicate it’s supposed to build for M1 which I’m currently ignoring. So the m1 packages on PyPI are actually Intel Mac packages 😬😬😬.

For now building from source should work. I’ll need to fix the ci at some point. Sorry!

@usccolumbia
Copy link

Hi, fwilliams,
could u fix this error? I have the same issue to install it on my mac with M1 -:) thanks

@joeylitalien
Copy link
Author

joeylitalien commented Apr 25, 2023

@usccolumbia, fixing bugs for an open source library like this one requires having access to an M1/M2 machine, which is not always possible. Please be considerate and build the library from scratch as a temporary fix until @fwilliams finds the time to solve this problem.

@CharlesPlusC
Copy link

Hello, I have tried to build from source but was unable to. I get this error. I saw this was mentioned in #42 but I couldn't see any fixes for it. Is there no fix for this? Thanks for any info.

[100%] Linking CXX shared module /Users/charlesc/Documents/GitHub/point-cloud-utils/point-cloud-utils/build/lib.macosx-11.0-arm64-cpython-311/point_cloud_utils/_pcu_internal.cpython-311-darwin.so 0 0x100577648 __assert_rtn + 72 1 0x10049fc5c ld::Fixup::applyFixup(ld::Atom const*, ld::LayoutLinkedImage const&, unsigned char*) const + 8268 2 0x1005327d8 ___ZN2ld16LayoutExecutable27writeContentWithoutLinkEditENSt3__14spanIhLm18446744073709551615EEEy_block_invoke + 332 3 0x1a620c440 _dispatch_client_callout2 + 20 4 0x1a621ff1c _dispatch_apply_invoke + 224 5 0x1a620c400 _dispatch_client_callout + 20 6 0x1a621dfb8 _dispatch_root_queue_drain + 684 7 0x1a621e6c0 _dispatch_worker_thread2 + 164 8 0x1a63b8038 _pthread_wqthread + 228 ld: Assertion failed: (extras.otherInstrOffset != 0 && "Kind::arm64_adrp_ldr missing extra info"), function applyFixup, file Fixup.cpp, line 793. clang: error: linker command failed with exit code 1 (use -v to see invocation) gmake[2]: *** [CMakeFiles/_pcu_internal.dir/build.make:850: /Users/charlesc/Documents/GitHub/point-cloud-utils/point-cloud-utils/build/lib.macosx-11.0-arm64-cpython-311/point_cloud_utils/_pcu_internal.cpython-311-darwin.so] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:406: CMakeFiles/_pcu_internal.dir/all] Error 2 gmake: *** [Makefile:166: all] Error 2 Traceback (most recent call last): File "/Users/charlesc/Documents/GitHub/point-cloud-utils/point-cloud-utils/setup.py", line 116, in <module> main() File "/Users/charlesc/Documents/GitHub/point-cloud-utils/point-cloud-utils/setup.py", line 89, in main setuptools.setup( File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup return distutils.core.setup(**attrs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) ^^^^^^^^^^^^^^^^^^ File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/dist.py", line 1244, in run_command super().run_command(command) File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/command/install.py", line 80, in run self.do_egg_install() File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/command/install.py", line 129, in do_egg_install self.run_command('bdist_egg') File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/dist.py", line 1244, in run_command super().run_command(command) File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/command/bdist_egg.py", line 164, in run cmd = self.call_command('install_lib', warn_dir=0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/command/bdist_egg.py", line 150, in call_command self.run_command(cmdname) File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/dist.py", line 1244, in run_command super().run_command(command) File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/command/install_lib.py", line 11, in run self.build() File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/_distutils/command/install_lib.py", line 111, in build self.run_command('build_ext') File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/dist.py", line 1244, in run_command super().run_command(command) File "/Users/charlesc/anaconda3/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/Users/charlesc/Documents/GitHub/point-cloud-utils/point-cloud-utils/setup.py", line 39, in run self.build_extension(ext) File "/Users/charlesc/Documents/GitHub/point-cloud-utils/point-cloud-utils/setup.py", line 72, in build_extension subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp) File "/Users/charlesc/anaconda3/lib/python3.11/subprocess.py", line 413, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.

@gattia
Copy link
Contributor

gattia commented Mar 22, 2024

@fwilliams it looks like GHA now have an apple silicon runner. If you specify macos-13 you get intel, and if you specify macos-14 you get apple silicon. I assume this will help with fixing deployment of builds:

https://cibuildwheel.pypa.io/en/stable/setup/#github-actions

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

5 participants