Bug 480007 - craft kcalc fails to build. CMake directory pointers are wrong. May be related
Summary: craft kcalc fails to build. CMake directory pointers are wrong. May be related
Status: REPORTED
Alias: None
Product: Craft
Classification: Unmaintained
Component: Core (show other bugs)
Version: unspecified
Platform: Compiled Sources macOS
: NOR normal
Target Milestone: ---
Assignee: Hannah von Reth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-18 18:03 UTC by Richard Francis
Modified: 2024-01-18 18:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
CMake output log (31.18 KB, text/plain)
2024-01-18 18:03 UTC, Richard Francis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Francis 2024-01-18 18:03:52 UTC
Created attachment 165016 [details]
CMake output log

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
I installed a fresh version of craft on macOS 14.1.1 (Sonoma) using the recipe at https://community.kde.org/Get_Involved/development/Mac. I chose Qt6 and arm64 as options (I'm running on Apple Silicon - a MacBook Pro with Apple M1 Max processor). I have a standard install of Xcode 15.2, and added the command line tools following the above-mentioned recipe.

The first test is to build kcalc. This fails as it does not build the executable. 

A possible connection is with the lines in CMakeOutput.log (attached):
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/local/include"
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/Library/Frameworks"

These do not point to the right place. The actual directory structure is (starting at SDKs)
SDKs/MacOSX14.2.sdk/usr/include
SDKs/MacOSX14.2.sdk/System/Library/Frameworks

and in each case the MacOSX14.2.sdk is an alias to MacOSX.sdk

STEPS TO REPRODUCE
1. Install craft on an Apple Silicon machine running macOS14.1.1 following https://community.kde.org/Get_Involved/development/Mac

2. using the default zsh shell, enter the craft environment with: source ~/CraftRoot/craft/craftenv.sh
3. enter craft kcalc

OBSERVED RESULT
failure to build

EXPECTED RESULT
built app, according to the recipe mentioned

SOFTWARE/OS VERSIONS
Windows: 
macOS: 14.1.1 (Sonoma)
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 6

ADDITIONAL INFORMATION
I seem to only be able to attach one file, so I've attached CMakeOutput.log. There is also CMakeError.log, which I will copy here:
-----------------------
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang 
Build flags: -fdiagnostics-color=always
Id flags:  

The output was:
1
ld: library 'System' not found
clang: ;1;31merror: [0m[1mlinker command failed with exit code 1 (use -v to see invocation)[0m


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ 
Build flags: 
Id flags:  

The output was:
1
ld: library 'c++' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
-----------------------

Yet at the start of the attached CMakeOutput.log, these lines do not show an error.