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

Error when trying to build any package in macOS #1348

Open
ronisbr opened this issue Dec 5, 2024 · 1 comment
Open

Error when trying to build any package in macOS #1348

ronisbr opened this issue Dec 5, 2024 · 1 comment

Comments

@ronisbr
Copy link

ronisbr commented Dec 5, 2024

Hi!

I tried to build some packages in macOS using BinaryBuilder.jl (packages from Yggdrasil, as is), and I am getting this error:

[ Info: Docker base image already exists, skipping import...
[14:32:12]  ---> cd $WORKSPACE/srcdir
[14:32:12]  ---> mkdir build
[14:32:12]  ---> cd build/
[14:32:12]  ---> qtsrcdir=`ls -d ../qtsvg-*`
[14:32:12]  ---> case "$bb_full_target" in
[14:32:12]  ---> apple_sdk_root=$WORKSPACE/srcdir/MacOSX13.3.sdk
[14:32:12]  ---> sed -i "s!/opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root!$apple_sdk_root!" $CMAKE_TARGET_TOOLCHAIN
[14:32:12]  ---> cmake -G Ninja -DQT_HOST_PATH=$host_prefix -DPython_ROOT_DIR=/usr -DCMAKE_INSTALL_PREFIX=${prefix} -DCMAKE_PREFIX_PATH=$host_prefix -DCMAKE_FIND_ROOT_PATH=$prefix -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} -DCMAKE_SYSROOT=$apple_sdk_root -DCMAKE_FRAMEWORK_PATH=$apple_sdk_root/System/Library/Frameworks -DCMAKE_OSX_DEPLOYMENT_TARGET=11 -DQT_NO_APPLE_SDK_AND_XCODE_CHECK=ON -DCMAKE_BUILD_TYPE=Release $qtsrcdir
[14:32:12] Re-run cmake no build system arguments
[14:32:12] CMake Error at /usr/share/cmake/Modules/Compiler/._ADSP-DetermineCompiler.cmake:1:
[14:32:12]   Parse error.  Expected a command name, got bad character with text "".
[14:32:12] Call Stack (most recent call first):
[14:32:12]   /usr/share/cmake/Modules/CMakeCompilerIdDetection.cmake:6 (include)
[14:32:12]   /usr/share/cmake/Modules/CMakeCompilerIdDetection.cmake:33 (_readFile)
[14:32:12]   /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:282 (compiler_id_detection)
[14:32:12]   /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:301 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
[14:32:12]   /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:6 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
[14:32:12]   /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:59 (__determine_compiler_id_test)
[14:32:12]   /usr/share/cmake/Modules/CMakeDetermineCXXCompiler.cmake:120 (CMAKE_DETERMINE_COMPILER_ID)
[14:32:12]   CMakeLists.txt:7 (project)

I tried to downgrade docker to 4.31 due to this issue JuliaPackaging/BinaryBuilderBase.jl#389, as suggested by @giordano, but it did not work.

@AlCap23
Copy link

AlCap23 commented Jan 21, 2025

For anyone who is looking for a quick and dirty solution to this, appending a preamble in the build_tarballs.jl seems to work for me now:

# This is for anyone who is on macOS 
preamble = if os() === "macos"
    raw"cd /usr/share/cmake/Modules/Compiler/; find  . -name '._*' -exec rm {} \;"
else
    raw""
end 

script = preamble * raw"
 # Do stuff 
"

This is far from optimal, but after iterating through a few hours of docker settings, errors, and reinstalls, this works reliably ( for now ).

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