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

[luajit] Crash on x64-osx with custom deployment target #33558

Closed
xiaozhuai opened this issue Sep 5, 2023 · 4 comments · Fixed by #33581
Closed

[luajit] Crash on x64-osx with custom deployment target #33558

xiaozhuai opened this issue Sep 5, 2023 · 4 comments · Fixed by #33581
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team.

Comments

@xiaozhuai
Copy link
Contributor

xiaozhuai commented Sep 5, 2023

Describe the bug
A clear and concise description of what the bug is.

Environment

  • OS: macOS 12.6.6 x86_64
  • Compiler: Apple clang version 14.0.0 (clang-1400.0.29.202)

To Reproduce

I have a custom triplet x64-osx-catalina-static-release.cmake

set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES x86_64)
set(VCPKG_BUILD_TYPE release)
set(VCPKG_OSX_DEPLOYMENT_TARGET 10.15)
  1. ./vcpkg install luajit:x64-osx-catalina-static-release
  2. Build and run my demo project https://github.com/xiaozhuai/vcpkg_demo/tree/master/src/luajit
  3. It crash.

It works if I remove this line (set(VCPKG_OSX_DEPLOYMENT_TARGET 10.15)) in x64-osx-catalina-static-release triplet

This problem was introduced by #30608, before that, my custom triplet can work.
It's very odd.
Maybe @dg0yt knows clues about the problem.

@dg0yt
Copy link
Contributor

dg0yt commented Sep 5, 2023

This is the error I can reproduce with a custom triplet file for the target:

result: false
libc++abi: terminating with uncaught exception of type std::runtime_error: error in error handling

The error goes away when I also set the host triplet to the custom one, i.e. enforce a native build instead of a cross build.
And cross builds are what #30608 changed significantly. luajit is particular difficult to adapt to vcpkg's triplet regime, and upstream is very rigid...

@FrankXie05 FrankXie05 added the category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. label Sep 6, 2023
@xiaozhuai
Copy link
Contributor Author

The error goes away when I also set the host triplet to the custom one

@dg0yt
Can we fix it in luajit port?

@dg0yt
Copy link
Contributor

dg0yt commented Sep 6, 2023

Please test #33581. Based on comparing native vs. cross build.

@xiaozhuai
Copy link
Contributor Author

Please test #33581. Based on comparing native vs. cross build.

@dg0yt
It works like a charm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants