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

MacOS-arm64 wheels for 18.1.1 and 17.0.6 fail with Error parsing translation unit #71

Closed
julian-smith-artifex-com opened this issue Mar 19, 2024 · 7 comments · Fixed by #72
Labels
bug Something isn't working

Comments

@julian-smith-artifex-com

Thanks for fixing #70. The new libclang-MacOS-x86_64 wheel on pypi.org works fine for me.

However i've noticed a different issue with the libclang-MacOS-arm64 18.1.1 and 17.0.6 wheels. They both fail to parse my C++ code with error clang.cindex.TranslationUnitLoadError: Error parsing translation unit..

The MacOS-arm64 16.06 wheel continues to work fine, as do the 18.1.1 wheels for other platforms (Linux, Windows, MacOS-x86_64).

There doesn't seem to be any detailed information about where the parse failed. I'm parsing the MuPDF library's header files. I suspect it's a build issue with the wheel? but i can probably create a simple reproducer if it would help.

@wyfo
Copy link

wyfo commented May 14, 2024

I'm currently facing the same issue on macOS with a m3 processor.

@JhnW
Copy link

JhnW commented May 23, 2024

I also encountered this issue by upgrading the MacOS version in my libclang dependent project (https://github.com/JhnW/devana). Migrating from 11 to 13 macos causes fail a lot of tests with parsing error.
Does anyone have any information on what's next for this problem? I don't have MacOS for development, either it will be fixed or I will simply disable this target...

@wyfo
Copy link

wyfo commented May 30, 2024

I managed to get it work by using a manually installed llvm and setting LIBCLANG_LIBRARY_PATH environment variable. But of course, I would love to be able to just do a pip install libclang.

@JhnW
Copy link

JhnW commented May 30, 2024

@sighingnow so if wyfo was able to using new clang just installed manually, maybe update version of package is needed or something happens during installation on mac target?

@sighingnow
Copy link
Owner

Will process this issue today, sorry for the late.

@JhnW
Copy link

JhnW commented Jun 15, 2024

Will process this issue today, sorry for the late.

Nice to hear. Any update about this topic?

JhnW added a commit to JhnW/devana that referenced this issue Jun 29, 2024
Temporary MacOS testing only due to dependency bug: sighingnow/libclang#71
@sighingnow
Copy link
Owner

I have uploaded a new revision to pypi and confirmed it works on M1 MacOS:

https://files.pythonhosted.org/packages/4b/49/f5e3e7e1419872b69f6f5e82ba56e33955a74bd537d8a1f5f1eff2f3668a/libclang-18.1.1-1-py2.py3-none-macosx_11_0_arm64.whl

Try to upgrade your installation via pip3 install -i https://pypi.org/simple -U libclang --force-reinstall and make sure the correct wheel is downloaded.

@sighingnow sighingnow added the bug Something isn't working label Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants