Skip to content

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

Open
@adventurist

Description

@adventurist

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't right.buildRelated to compiling, linking, packaging and distribution.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions