View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017590 | Scribus | Build System | public | 2025-07-23 02:52 | 2025-08-01 13:30 |
Reporter | softsun2 | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | Arm64 | OS | Macos | OS Version | 14 (Sonoma) |
Product Version | 1.7.0 | ||||
Summary | 0017590: Scribus build fails on ARM64 Darwin 23.2.0 | ||||
Description | This is my first bug-report and interaction with the scribus community please let me know if this information should follow a certain format or should be mentioned elsewhere. I am coming from nixpkgs where the scribus devel and stable builds on aarch64 darwin are broken. The builds fail reporting an issue related to an unset variable OSXMINVER. | ||||
Steps To Reproduce | On an ARM64 Darwin 23.2.0 attempt to build scribus from nixpkgs/master, I assume the same behavior can be reproduced from an ad-hoc build environment. | ||||
Additional Information | I checked the mirror and it seems the erroneous code is still there, I also haven't seen a related bug report, correct me if I'm wrong. I have locally identified the problem in CmakeLists.txt: execute_process( COMMAND ${CMAKE_C_COMPILER} -dumpmachine OUTPUT_VARIABLE MACHINE OUTPUT_STRIP_TRAILING_WHITESPACE ) This line sets MACHINE to a string like "arm64-apple-darwin" when the script depends on a format like "x86_64-apple-darwin23.5.0". I suggeest using uname or something more stable. The the apple cmake lists file the lines that set OSXMINVER are also commented out for more recent MacOS versions, these need to be uncommented. Was there a reason for this? I would be happy to provide a patch for this although it is not clear to me how I would go about this. I appreciate any response, thanks to the contributors supporting this awesome project! | ||||
Tags | #waiting, build, M1, MacOS | ||||
Patch | No | ||||
|
I didn't realize patches were submitted directly on this bug tracker. How are the reviewed/merged upstream? Anyways, here is my suggested change, I've only been able to test on my host platform. aarch64_darwin_build.diff (2,629 bytes)
Index: CMakeLists.txt =================================================================== --- CMakeLists.txt (revision 26968) +++ CMakeLists.txt (working copy) @@ -216,7 +216,12 @@ ## Do our Apple OSX version setup if (APPLE) if ((CMAKE_SIZEOF_VOID_P EQUAL 8) AND (ARCH_ARM_64)) - string(REGEX REPLACE ".*-darwin([0-9]+).*" "\\1" APPLE_OS_VERSION "${MACHINE}") + execute_process( + COMMAND uname -r + OUTPUT_VARIABLE DARWIN_ARCH_ARM_64_MACHINE + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + string(REGEX REPLACE "^([0-9]+)\\..*" "\\1" APPLE_OS_VERSION "${DARWIN_ARCH_ARM_64_MACHINE}") if (APPLE_OS_VERSION EQUAL "24") message(STATUS "Found macOS Sequoia Target: Apple, 64 bit, ARM") set(APPLE_15_00_X ON CACHE BOOL "Found macOS Sequoia Target: Apple, 64 bit, ARM") Index: CMakeLists_Apple.cmake =================================================================== --- CMakeLists_Apple.cmake (revision 26968) +++ CMakeLists_Apple.cmake (working copy) @@ -1,5 +1,5 @@ if(APPLE_15_00_X) - # set(OSXMINVER "15.00" CACHE STRING "OSX 15.00") + set(OSXMINVER "15.00" CACHE STRING "OSX 15.00") if (WANT_OSX_SDK) if(EXISTS("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.sdk")) set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.sdk") @@ -9,7 +9,7 @@ endif() endif() if(APPLE_14_00_X) - # set(OSXMINVER "14.00" CACHE STRING "OSX 14.00") + set(OSXMINVER "14.00" CACHE STRING "OSX 14.00") if (WANT_OSX_SDK) if(EXISTS("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk")) set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk") @@ -19,7 +19,7 @@ endif() endif() if(APPLE_13_00_X) - # set(OSXMINVER "13.00" CACHE STRING "OSX 13.00") + set(OSXMINVER "13.00" CACHE STRING "OSX 13.00") if (WANT_OSX_SDK) if(EXISTS("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk")) set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk") @@ -29,7 +29,7 @@ endif() endif() if(APPLE_12_00_X) - # set(OSXMINVER "12.00" CACHE STRING "OSX 12.00") + set(OSXMINVER "12.00" CACHE STRING "OSX 12.00") if (WANT_OSX_SDK) if(EXISTS("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk")) set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk") |
|
Can I host the git patch in a note for the nixpkgs build? Or is there a better place for this? |
|
It seems the build is not fully functional despite it succeeding, for instance the template example's content is still archived in gz files and saving the project files fails. How are the nightly builds compiled for arm64 darwin? |
|
The best would probably be to have the patch in the Scribus repository... Let's see what the MacOS maintainer think of the it. I guess that it might depend on the reasons why those lines have been commented out... |
|
What is the OS? Is it macOS? you indicate Sonoma. The code worked ok on Sonoma. We have used [compiler] -dumpmachine forever - since we moved to CMake many, many years ago. % gcc -dumpmachine arm64-apple-darwin24.6.0 % clang -dumpmachine arm64-apple-darwin24.6.0 We don't force OSXMINVER anymore based on the OS version - just set it yourself on the cmake command line. |
Date Modified | Username | Field | Change |
---|---|---|---|
2025-07-23 02:52 | softsun2 | New Issue | |
2025-07-23 02:52 | softsun2 | Tag Attached: build | |
2025-07-23 02:52 | softsun2 | Tag Attached: M1 | |
2025-07-23 02:52 | softsun2 | Tag Attached: MacOS | |
2025-07-23 03:41 | softsun2 | Note Added: 0052912 | |
2025-07-23 03:41 | softsun2 | File Added: aarch64_darwin_build.diff | |
2025-07-23 03:44 | softsun2 | Note Added: 0052913 | |
2025-07-23 04:28 | softsun2 | Note Added: 0052914 | |
2025-07-23 16:28 | ale | Note Added: 0052916 | |
2025-07-30 20:12 | cbradney | Note Added: 0052938 | |
2025-08-01 13:30 | ale | Tag Attached: #waiting |