git clone --branch main https://github.com/apple/swift-corelibs-libdispatch
cd swift-corelibs-libdispatch/
cmake -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ src
The above lines give this output:
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) in CMakeLists.txt:
cmake_minimum_required() should be called prior to this top-level project()
call. Please see the cmake-commands(7) manual for usage documentation of
both commands.
This warning is for project developers. Use -Wno-dev to suppress it.
-- The C compiler identification is Clang 20.1.2
-- The CXX compiler identification is Clang 20.1.2
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:143 (check_c_compiler_flag):
Unknown CMake command "check_c_compiler_flag".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.31)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
I can't figure out why there is an error Unknown CMake command "check_c_compiler_flag" when I can see this line in the CMakeLists.txt file:
include(CheckCCompilerFlag)
Has anyone successfully built swift-corelibs-libdispatch?
I just downloaded the gnustep-base-1.31.1.tar.gz, configured. and made locally (Slackware 15.0) under gcc/objc, with no libobjc2, nor libdispatch installed locally. It (libdispatch) might only be a requirement for clang toolchain, unfortunately the clang version I have doesn't support objc as packaged, and I cannot try to replace gcc in my attempt.
What error(s) do you get if you tried to configure/compile gnustep-base without libdispatch?
option passed to the configure script, but from what I can tell, if you don't have the library, there shouldn't be any trouble configuring and compiling without.
Thanks for checking. Good to know that gnustep-base can be built without libdispatch.
I don't recommend trying https://www.gnustep.org/getit.html. The changes that the script made somehow messed up my install so I could no longer compile Oolite at all. I had to painstakingly remove all folders and files with "gnustep" in them and then reinstall all the GNUStep default system packages to get it working again. I think I'll leave GNUStep alone for now!
As for Clang, I'm not sure how to get Oolite's makefile to use it instead of gcc. What would be the advantage of using Clang to build Oolite if it were possible?
GNUstep base, it warned me that it couldn't find Obj-C related files (i.e. you'd need a clang compiled with Obj-C support), and it also recommended to initially configure and install gnustep-make package for Clang compilation (using CC=clang there).
https://packages.fedoraproject.org/pkgs ... bdispatch/. Fedora builds it from source with up to date dependencies, so it should be possible. You can look at the .spec file for the exact instructions used. Also I compiled gnustep for the flatpak from a source tarball and it just worked using make (It was an older version though).
https://packages.fedoraproject.org/pkgs ... bdispatch/. Fedora builds it from source with up to date dependencies, so it should be possible. You can look at the .spec file for the exact instructions used. Also I compiled gnustep for the flatpak from a source tarball and it just worked using make (It was an older version though).
Thanks for your reply. Fortunately I was able to build Oolite with Clang without having to build libdispatch. I wrote about it here: viewtopic.php?t=21898. It's good to know though that there's a way to build libdispatch if I need to try again in future.