Closed thomas-mangin closed 3 years ago
I noticed you're using the default Xcode compiler, which is most likely Apple clang. I don't believe there's any version of apple clang released that supports concepts yet. If you check the build instructions documentation there should be steps on how to get gcc 10.2.0 via homebrew and how to tell cmake to use that compiler.
gcc@10
programs were well installed at /usr/local/Cellar/gcc/10.2.0_2/bin/
but the gcc in the path is still /usr/bin/gcc as the installed version are called gcc-10 (and c++-10)
I re-installed it anyway ..
There is also the gcc/c++ which were compiled part of the Build (for me in /Users/thomas/tmp/serenity/Toolchain/Local/i686/bin/
with both i686-pc-serenity-gcc
and i686-pc-serenity-c++
which is reference in the ninja file ..
the rules.ninja
files were generated with c++ calls referencing Xcode:
#############################################
# Rule for compiling CXX files.
rule CXX_COMPILER__LagomCore_
depfile = $DEP_FILE
deps = gcc
command = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in
description = Building CXX object $out
the Build/CMakefiles/rules.ninja
has reference to the locally compiled version
#############################################
# Rule for compiling CXX files.
rule CXX_COMPILER__Kernel_
depfile = $DEP_FILE
deps = gcc
command = /Users/thomas/tmp/serenity/Toolchain/Local/i686/bin/i686-pc-serenity-g++ $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in
description = Building CXX object $out
Re-running ./BuildIt.sh
in the Toolchain folder and later on cmake .. -G Ninja
in the root Build
folder, still result in the Xcode.app gcc version being referenced.
And to be safe, re-cloning the repository, to restart from scratch and re-running the toolchain build, result in the same output.
You'll want to do cmake .. -GNinja -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10
to force CMake to use gcc/g++ version 10 that you installed in /usr/local/Cellar for the host part of the build
From the Build
folder using cmake .. -GNinja -DBUILD_LAGOM=ON -DENABLE_ALL_THE_DEBUG_MACROS=ON -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10
did indeed work, thank you !
next issue .. running ninja run
/Users/thomas/tmp/serenityos/Meta/run.sh
qemu-system-i386: -drive file=_disk_image,format=raw,index=0,media=disk: Could not open '_disk_image': No such file or directory
You need to run ninja install
, ninja image
and ninja run
in that order.
_disk_image
is generated by the ninja image
step.
@asynts thanks, yes, I skipped this part.
I had a conflict on port 8888 (another program) which caused QEMU to complain on start but once resolved all is working well. Thank you everyone for your help. going to now enjoy and have a look around :-)
π I was curious and attempted to build the OS. I failed. It could be a PEBKAC or unusual setup, I use an "exotic" shell for example.
I saved the terminal output but I would not rather not post this information on a public issue tracker. I can surely build the project using on a Linux VM/container so the report is mostly for information as it seems you are supporting/attempting to support OSX build.
I wish you good continuation with the project.