[cfarm-users] Unable to build clang on gcc220 x86_64-openbsd test machine

Pierre Muller pierre at freepascal.org
Thu May 18 19:28:26 CEST 2023


   I tried ti compile a custom clang on gcc220 test machine.

   For that I used a shallow copy of the git repository https://github.com/llvm/llvm-project.git
Followed by
  cd llvm-project
  mkdir build
  cd build
  ../configure
and
  gmake

which failed with this error:

[ 44%] Building AMDGPUGenAsmMatcher.inc...
LLVM ERROR: out of memory
Allocation failed
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: ../../../bin/llvm-tblgen -gen-asm-matcher -I /home/muller/gnu/llvm-clang/llvm-project/llvm/lib/Target/AMDGPU -I/home/muller/gnu/llvm-clang/llvm-project/build/include -I/home/muller/gnu/llvm-clang/llvm-project/llvm/include -I 
/home/muller/gnu/llvm-clang/llvm-project/llvm/lib/Target /home/muller/gnu/llvm-clang/llvm-project/llvm/lib/Target/AMDGPU/AMDGPU.td --write-if-changed -o /home/muller/gnu/llvm-clang/llvm-project/build/lib/Target/AMDGPU/AMDGPUGenAsmMatcher.inc
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  llvm-tblgen 0x00000fc0c676d987 __register_frame_info + 2708839
1  llvm-tblgen 0x00000fc0c676c97c __register_frame_info + 2704732
Abort trap (core dumped)
gmake[2]: *** [lib/Target/AMDGPU/CMakeFiles/AMDGPUCommonTableGen.dir/build.make:184: lib/Target/AMDGPU/AMDGPUGenAsmMatcher.inc] Error 134
gmake[1]: *** [CMakeFiles/Makefile2:21504: lib/Target/AMDGPU/CMakeFiles/AMDGPUCommonTableGen.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2
bash-5.2 ~/gnu/llvm-clang/llvm-project/build$

Is the fact that it is not possible to build clang on openbsd a known problem?

If it is, is thee a known fix?
Or it is rather a limitation due to the configuration of that test machine?

I tried to use the installed clang:
bash-5.2 ~/gnu/llvm-clang/llvm-project$ clang --version
OpenBSD clang version 13.0.0
Target: amd64-unknown-openbsd7.3
Thread model: posix
InstalledDir: /home/muller/bin

but trying to use that binary to cross-compile to darwin or ios
leads to parameter parsing errors that I do not see on other test machines:

Executing "/home/muller/bin/arm-ios-clang" (wjhich is a symlink to installed clang) with command line
  "-mfloat-abi=softfp -mfpu=vfpv3 -x assembler -c -target armv7-apple-ios9.0.0 -o /home/muller/pas/fixes_3_2/fpcsrc/rtl/units/arm-ios/system.o  -x assembler /home/muller/pas/fixes_3_2/fpcsrc/rtl/units/arm-ios/system.s"
clang (LLVM option parsing): Unknown command line argument '-arm-add-build-attributes'.  Try: 'clang (LLVM option parsing) --help'
clang (LLVM option parsing): Did you mean '--vplan-build-stress-test'?

system.pp(395) Error: Error while assembling exitcode 1
system.pp(395) Fatal: There were 2 errors compiling module, stopping


Pierre


More information about the cfarm-users mailing list