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

Compilation fails - PopOS! (Ubuntu 22.04) - clang 14 #192

Open
adventurist opened this issue Jun 30, 2023 · 2 comments
Open

Compilation fails - PopOS! (Ubuntu 22.04) - clang 14 #192

adventurist opened this issue Jun 30, 2023 · 2 comments
Labels
bug Something isn't right. build Related to compiling, linking, packaging and distribution.

Comments

@adventurist
Copy link

Specs:

OS: Pop!_OS 22.04 LTS
Kernel: 5.18.10-76051810-generic
Arch: x86_64
Compiler: clang version 14.0.0-1ubuntu1

Steps

  1. Install all dependencies (as described on https://github.com/matrix-construct/construct/wiki/BUILD)
  2. Init submodules
git submodule update --init deps/rocksdb
cd deps/rocksdb
git fetch --tags --force
git checkout v7.4.3
  1. Set compiler
export CXX=clang++
export CC=clang
  1. Autogen and configure
./autogen.sh
./configure --with-included-rocksdb --prefix=$HOME/.construct/ 
  1. Compile
    make -j

Result

Opaque pointer error:

clang -fident -fno-builtin -fverbose-asm -fno-discard-value-names -mllvm -propagate-attrs=true -O3 -fno-trapping-math -ffinite-math-only -fno-signed-zeros -ffp-contract=fast -std=cl2.0 -target amdgcn--amdhsa -nogpulib -march=amdgcn -Xclang -mlink-bitcode-file -Xclang /usr/lib/clc/amdgcn--amdhsa.bc -Dcl_clang_storage_class_specifiers -DNOFP64 -I../include -include "ircd/config.h" -Wall -Wextra -Wpointer-arith -Wcast-align -Wcast-qual -Wfloat-equal -Wwrite-strings -Wparentheses -Wundef -Wpacked -Wformat -Wformat-y2k -Wformat-nonliteral -Wstrict-aliasing=2 -Wstrict-overflow=5 -Wdisabled-optimization -Winvalid-pch -Winit-self -Wunreachable-code -Wno-overloaded-virtual -Wnon-virtual-dtor -Wsized-deallocation -Wctor-dtor-privacy -Wsign-promo -Wtrampolines -Wduplicated-cond -Wduplicate-branches -Wrestrict -Wnull-dereference -Wplacement-new=2 -Wundef -Wodr -Wimplicit-fallthrough -Werror=return-type -Werror=reorder -Werror=return-stack-address -Werror=abstract-final-class -Wundefined-reinterpret-cast -Wconditional-uninitialized -Wno-mismatched-tags -Wno-format-security -Wno-unknown-warning-option -Wno-profile-instr-unprofiled -Wno-missing-field-initializers -Wno-unused -Wno-unused-function -Wno-unused-label -Wno-unused-value -Wno-unused-variable -Wno-unused-parameter -Wunused-result -Wno-endif-labels -Wno-unknown-pragmas -Wno-deprecated-declarations -Wno-deprecated -Wno-unknown-attributes -Wno-uninitialized -Wno-psabi  -fpch-preprocess -DPCH -DNDEBUG    -DHAVE_CONFIG_H -DIRCD_UNIT -D__OPENCL_VERSION__=200 -emit-llvm -o gpt_gpu.gcn_hsa.bc -x cl -c gpt_gpu.cl
fatal error: cannot open file '/usr/lib/clc/amdgcn--amdhsa.bc': Opaque pointers are only supported in -opaque-pointers mode (Producer: 'LLVM15.0.7' Reader: 'LLVM 14.0.0')
1 error generated.
make[1]: *** [Makefile:1513: gpt_gpu.gcn_hsa.bc] Error 1

I tried passing compiler flags to ./configure, such as CCFLAGS="--opaque-pointers", but that doesn't work (and doesn't seem like the right solution).

Any help would be appreciated!

@jevolk jevolk added bug Something isn't right. build Related to compiling, linking, packaging and distribution. labels Jun 30, 2023
@jevolk
Copy link
Member

jevolk commented Jun 30, 2023

You should be able to pass --disable-opencl to ./configure for the time being until I can assess this further.

@adventurist
Copy link
Author

Thank you very much for getting back to me so quickly! That did the trick - my build completed successfully

I ran into something else, but unrelated, so will open a separate issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't right. build Related to compiling, linking, packaging and distribution.
Projects
None yet
Development

No branches or pull requests

2 participants