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

Build error - cheribuild.py cheribsd-aarch64 -d #354

Open
harsha0229 opened this issue Feb 27, 2023 · 2 comments
Open

Build error - cheribuild.py cheribsd-aarch64 -d #354

harsha0229 opened this issue Feb 27, 2023 · 2 comments

Comments

@harsha0229
Copy link

harsha0229 commented Feb 27, 2023

Hello,

When I try to build for aarch64, using the command 'cheribuild.py cheribsd-aarch64 -d', I get the following error in between and the build fails resulting in a fatal error as shown below:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[733/1686] Building CXX object tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o
FAILED: tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o
/usr/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_NO_DEFAULT_ADDRESS_SPACE -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/lib/ASTMatchers/Dynamic -I/home/duser/cheri/llvm-project/clang/lib/ASTMatchers/Dynamic -I/home/duser/cheri/llvm-project/clang/include -Itools/clang/include -Iinclude -I/home/duser/cheri/llvm-project/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -fno-exceptions -fno-rtti -UNDEBUG -std=c++14 -MD -MT tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o -MF tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o.d -o tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o -c /home/duser/cheri/llvm-project/clang/lib/ASTMatchers/Dynamic/Registry.cpp
[736/1686] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/AnalysisBasedWarnings.cpp.o
ninja: build stopped: subcommand failed.
Fatal error (in target llvm-native): Command nice cmake --build . --target all -- -j4 failed with non-zero exit code 1

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm using VMware WorkStation 16.1.2 build-17966106, Ubuntu 20.04.5 LTS, and the latest build on Github(of cheribuild as on today)

Also, when I try "./cheribuild.py llvm-aarch64", I get the following error:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[email protected]:~/Documents/Beam-connectivity/Project1/cheribuild$ ./cheribuild.py llvm-aarch64
Checking /home/duser/.config/cheribuild.json since /home/duser/Documents/Beam-connectivity/Project1/cheribuild/cheribuild.json doesn't exist
Note: Configuration file /home/duser/.config/cheribuild.json does not exist, using only command line arguments.
Sources will be stored in /home/duser/cheri
Build artifacts will be stored in /home/duser/cheri/output
cd /home/duser/Documents/Beam-connectivity/Project1/cheribuild && git fetch
Fatal error: Dependency for llvm-aarch64 missing: /home/duser/cheri/output/sdk/bin/clang version 0.0.0 is not supported. Clang version 3.8 or newer is required.
Possible solution: Run apt install clang
Alternatively if the repository version is too old, try running:
sudo apt install software-properties-common
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Can you please help me resolve this?

Thank you very much,
Harsha

@harsha0229
Copy link
Author

Hello,

I could resolve the issue. I updated the OS to Ubuntu 22.04 and retried from scratch. It worked.

Thank you,
Harsha

@jrtc27
Copy link
Member

jrtc27 commented Mar 1, 2023

For the first error I don’t know what the issue is, the log excerpt you posted doesn’t contain an actual error, just the build tool reporting that there was an error when running the compiler (which itself should have reported the actual error).

For the second error you didn’t have a working CHERI LLVM built yet and didn’t pass -d, so LLVM could not be cross-compiled for aarch64 using it.

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