Package Details: llvm-ocaml-git 18.0.0_r484887.953ae94149f0-1

Git Clone URL: https://aur.archlinux.org/llvm-git.git (read-only, click to copy)
Package Base: llvm-git
Description: OCaml bindings for LLVM
Upstream URL: https://llvm.org/
Keywords: clang git lld lldb llvm polly
Licenses: custom:Apache 2.0 with LLVM Exception
Conflicts: llvm-ocaml
Provides: llvm-ocaml
Submitter: yurikoles
Maintainer: rjahanbakhshi
Last Packager: rjahanbakhshi
Votes: 118
Popularity: 0.005457
First Submitted: 2018-12-05 13:56 (UTC)
Last Updated: 2024-04-17 08:17 (UTC)

Pinned Comments

Lone_Wolf commented on 2021-08-16 11:26 (UTC)

When you have this package installed applications that are built against repo-llvm/clang WILL fail unless they are rebuild against this package.

This includes QTCreator, kdevelop , mesa, intel-compute-runtime, gnome-builder to name a few.

Lone_Wolf commented on 2020-08-22 12:18 (UTC) (edited on 2021-02-06 12:51 (UTC) by Lone_Wolf)

Archlinux currently has 3 llvm git implementations

  1. This package

    • It aims to provide a full llvm/clang compiler environment for development purposes.
    • Supports cross-compiling , bindings for external stuff (python, ocaml etc) , and some things not in extra-llvm.
    • intended to be used with archlinux core,extra & community repos
    • CONFLICTS with extra llvm/clang packages
    • Currently there's no repo with binary versions
  2. llvm-minimal-git

    • focuses on providing stuff needed for AUR mesa-git. Doesn't support cross-compiling or any bindings for external stuff like ocaml & python.
    • intended to be used with archlinux core,extra & community repos
    • compatible with extra llvm/clang packages
    • no repo with binary versions
  3. packages created & maintained by Lordheavy, an arch developer

    • intended to be used with archlinux testing repos
    • sometimes has problems on systems where testing repos are disabled
    • uses same package structure as llvm/clang in official repos
    • source
    • binary versions in LordHeavys unoffical repo

Lone_Wolf commented on 2019-04-12 20:41 (UTC) (edited on 2019-12-16 22:45 (UTC) by Lone_Wolf)

I've looked good at clang-trunk , llvm-svn, repo llvm/clang packages and think this package is now on route to become a worthy successor to llvm-svn .

  • llvm-libs-git holds the runtime libraries.

    It conflicts with the repo llvm-libs package. This is the only way to make sure the llvm linker from git is used, and that's needed for a full dev environment.

  • llvm-git

    has llvm , clang, compiler-rt, ocaml & python bindings, polly , lld , lldb .


The Package now uses a new environment variable to make ninja behave, NINJAFLAGS. If you want to use it adjust the snippet below to your desired values and add it to makepkg.conf.

Incase you are satisfied with ninja defaults you don't need to do anything.

# Add to makepkg.conf
# limit ninja to 20 jobs
# requires special code in PKGBUILD
# see ninja --help for additonal options
NINJAFLAGS="-j20"

The check() function fails rather often, but I do suggest to build with them. If build fails due to test failure you can add --nocheck to skip the tests.

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 11 12 .. 70 Next › Last »

Lone_Wolf commented on 2021-10-22 11:09 (UTC) (edited on 2021-10-22 11:13 (UTC) by Lone_Wolf)

==> Starting build()...
-- clang project is enabled
-- clang-tools-extra project is enabled

Normally the first few lines after starting build deal with detectibng which compiler is used

-- The C compiler identification is GNU 11.1.0
-- The CXX compiler identification is GNU 11.1.0
-- The ASM compiler identification is GNU

Also :: Downloading the latest sources for devel packages llvm-git, llvm-libs-git, llvm-ocaml-git... indicates you are using some aur helper.

That suggest some potential causes :

  • your aur helper

  • cmake using stale cached date

  • something in your makepkg.conf

Try building with makepkg --syncdeps --rmdeps . If that gives simlar results , try makepkg --cleanbuild --syncdeps --rmdeps .

weltio commented on 2021-10-22 10:16 (UTC)

@rjahanbakhshi unfortunately not, it is probably a thing on my side I just tried it

rjahanbakhshi commented on 2021-10-22 08:44 (UTC)

@weltio @Lone_Wolf

I just built it in an updated clean chroot and it was successful. Perhaps an upstream update? Can you double-check if the error still exists?

weltio commented on 2021-10-22 06:34 (UTC)

:: Downloading the latest sources for devel packages llvm-git, llvm-libs-git, llvm-ocaml-git...

:: Starting the build:
==> Making package: llvm-git 14.0.0_r402452.64f002c6d36d-1 (Do 21 Okt 2021 22:20:39 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Updating llvm-project git repo...
Fetching origin
-> Found llvm-config.h
==> Validating source files with md5sums...
    llvm-project ... Skipped
    llvm-config.h ... Passed
==> Validating source files with sha512sums...
    llvm-project ... Skipped
    llvm-config.h ... Passed
==> Extracting sources...
-> Creating working copy of llvm-project git repo...
Reset branch 'makepkg'
==> Starting pkgver()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
-- clang project is enabled
-- clang-tools-extra project is enabled
-- compiler-rt project is enabled
-- cross-project-tests project is disabled
-- libc project is disabled
-- libclc project is disabled
-- libcxx project is disabled
-- libcxxabi project is disabled
-- libunwind project is disabled
-- lld project is enabled
-- lldb project is enabled
-- mlir project is disabled
-- openmp project is disabled
-- parallel-libs project is disabled
-- polly project is enabled
-- pstl project is disabled
-- flang project is disabled
-- Found LibXml2: /usr/lib/libxml2.so (found version "2.9.12") 
-- Native target architecture is X86
-- Threads enabled.
-- Doxygen disabled.
-- Go bindings enabled.
-- Ninja version: 1.10.2
-- OCaml bindings enabled.
-- LLVM host triple: x86_64-pc-linux-gnu
-- LLVM default target triple: x86_64-pc-linux-gnu
-- Building with -fPIC
-- Found Python3: /usr/bin/python3.9 (found suitable version "3.9.7", minimum required is "3.6") found components: Interpreter 
-- Targeting AArch64
-- Targeting AMDGPU
-- Targeting ARM
-- Targeting AVR
-- Targeting BPF
-- Targeting Hexagon
-- Targeting Lanai
-- Targeting Mips
-- Targeting MSP430
-- Targeting NVPTX
-- Targeting PowerPC
-- Targeting RISCV
-- Targeting Sparc
-- Targeting SystemZ
-- Targeting WebAssembly
-- Targeting X86
-- Targeting XCore
-- Compiler-RT supported architectures: x86_64;i386
-- Builtin supported architectures: i386;x86_64
-- For i386 builtins preferring i386/fp_mode.c to fp_mode.c
-- For i386 builtins preferring i386/ashldi3.S to ashldi3.c
-- For i386 builtins preferring i386/ashrdi3.S to ashrdi3.c
-- For i386 builtins preferring i386/divdi3.S to divdi3.c
-- For i386 builtins preferring i386/floatdidf.S to floatdidf.c
-- For i386 builtins preferring i386/floatdisf.S to floatdisf.c
-- For i386 builtins preferring i386/floatundidf.S to floatundidf.c
-- For i386 builtins preferring i386/floatundisf.S to floatundisf.c
-- For i386 builtins preferring i386/lshrdi3.S to lshrdi3.c
-- For i386 builtins preferring i386/moddi3.S to moddi3.c
-- For i386 builtins preferring i386/muldi3.S to muldi3.c
-- For i386 builtins preferring i386/udivdi3.S to udivdi3.c
-- For i386 builtins preferring i386/umoddi3.S to umoddi3.c
-- For i386 builtins preferring i386/floatdixf.S to floatdixf.c
-- For i386 builtins preferring i386/floatundixf.S to floatundixf.c
-- For x86_64 builtins preferring i386/fp_mode.c to fp_mode.c
-- For x86_64 builtins preferring x86_64/floatdidf.c to floatdidf.c
-- For x86_64 builtins preferring x86_64/floatdisf.c to floatdisf.c
-- For x86_64 builtins preferring x86_64/floatundidf.S to floatundidf.c
-- For x86_64 builtins preferring x86_64/floatundisf.S to floatundisf.c
-- For x86_64 builtins preferring x86_64/floatdixf.c to floatdixf.c
-- For x86_64 builtins preferring x86_64/floatundixf.S to floatundixf.c
-- Builtin supported architectures: i386;x86_64
-- Generated Sanitizer SUPPORTED_TOOLS list on "Linux" is "asan;lsan;msan;tsan;ubsan"
-- sanitizer_common tests on "Linux" will run against "asan;lsan;msan;tsan;ubsan"
-- check-shadowcallstack does nothing.
-- Clang version: 14.0.0
-- Sphinx enabled.
-- Not building amdgpu-arch: hsa-runtime64 not found
-- Sphinx enabled.
-- LLD version: 14.0.0
-- Sphinx enabled.
-- Enable editline support in LLDB: TRUE
-- Enable curses support in LLDB: TRUE
-- Enable LZMA compression support in LLDB: TRUE
-- Enable Lua scripting support in LLDB: TRUE
-- Found Python3: /usr/bin/python3.9 (found version "3.9.7") found components: Interpreter Development Development.Module Development.Embed 
-- Enable Python scripting support in LLDB: TRUE
-- Found LibXml2: /usr/lib/libxml2.so (found suitable version "2.9.12", minimum required is "2.8") 
-- Enable Libxml 2 support in LLDB: TRUE
-- LLDB version: 14.0.0
-- Symbols (liblldb): exporting all symbols from the lldb namespace
-- Sphinx enabled.
CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) 
-- Sphinx enabled.
-- ISL version: isl-0.24-69-g54aac5ac
-- PPCG version: ppcg-0.07
-- Registering Polly as a pass plugin (static build: ON)
-- Registering Bye as a pass plugin (static build: OFF)
-- Sphinx enabled.
-- LLVM FileCheck Found: /usr/bin/FileCheck
-- Version: 0.0.0
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/ssd/pikaur/build/llvm-git/src/_build
ninja: Entering directory `_build'

Those are the first lines of the build process, but there is no mention of lua besides "-- Enable Lua scripting support in LLDB: TRUE"

Lone_Wolf commented on 2021-10-21 22:10 (UTC)

lua_newuserdata appears to be replaced in lu 5.4, and lldb requires lua 5.3 . Looks like the dependency needs to be changed to lua53.

In your build log there should be lines similar to

-- Found SWIG: /usr/bin/swig (found suitable version "4.0.2", minimum required is "3.0")  
-- Found Lua: /usr/lib/liblua5.3.so;/usr/lib/libm.so (found suitable exact version "5.3.6") 
-- Found LuaAndSwig: /usr/lib/liblua5.3.so;/usr/lib/libm.so  
-- Enable Lua scripting support in LLDB: TRUE

Post those lines from your system.

weltio commented on 2021-10-21 20:19 (UTC) (edited on 2021-10-21 20:21 (UTC) by weltio)

LLDBWrapLua.cpp:(.text.SWIG_Lua_NewPointerObj.constprop.0+0x1d): undefined reference to `lua_newuserdata'
/usr/bin/ld: tools/lldb/source/API/CMakeFiles/liblldb.dir/__/__/bindings/lua/LLDBWrapLua.cpp.o: in function `SWIG_Lua_NewPointerObj.constprop.1':
LLDBWrapLua.cpp:(.text.SWIG_Lua_NewPointerObj.constprop.1+0x1d): undefined reference to `lua_newuserdata'
/usr/bin/ld: tools/lldb/source/API/CMakeFiles/liblldb.dir/__/__/bindings/lua/LLDBWrapLua.cpp.o: in function `SWIG_Lua_add_namespace_details.isra.0':
LLDBWrapLua.cpp:(.text.SWIG_Lua_add_namespace_details.isra.0+0x255): undefined reference to `lua_newuserdata'
/usr/bin/ld: tools/lldb/source/API/CMakeFiles/liblldb.dir/__/__/bindings/lua/LLDBWrapLua.cpp.o: in function `_wrap_SBFile_GetFile':
LLDBWrapLua.cpp:(.text._wrap_SBFile_GetFile+0x2da): undefined reference to `lua_newuserdata'
/usr/bin/ld: tools/lldb/source/API/CMakeFiles/liblldb.dir/__/__/bindings/lua/LLDBWrapLua.cpp.o: in function `_wrap_SBDebugger_GetInputFileHandle':
LLDBWrapLua.cpp:(.text._wrap_SBDebugger_GetInputFileHandle+0x2ea): undefined reference to `lua_newuserdata'
/usr/bin/ld: tools/lldb/source/API/CMakeFiles/liblldb.dir/__/__/bindings/lua/LLDBWrapLua.cpp.o:LLDBWrapLua.cpp:(.text._wrap_SBDebugger_GetErrorFileHandle+0x2ea): more undefined references to `lua_newuserdata' follow
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Probably due to:

pacman -Q lua lua51 lua52 lua53 
lua 5.4.3-1
lua51 5.1.5-9
lua52 5.2.4-5
lua53 5.3.6-1

right? Is there a solution for that?

Sinistar commented on 2021-10-20 00:27 (UTC)

just a heads up. libffi has been updated, so user will need to rebuild LLVM.

Lone_Wolf commented on 2021-08-23 10:08 (UTC)

Glad you found the solution , for those wanting more info :

https://wiki.archlinux.org/title/Debugging/Getting_traces

weltio commented on 2021-08-22 22:42 (UTC) (edited on 2021-08-23 07:11 (UTC) by weltio)

I built the package with -D CMAKE_BUILD_TYPE=Debug and

readelf --debug-dump=decodedline llvm-git/src/_build/lib/libclang.so.14.0.0

actually shows debugging content but:

readelf --debug-dump=decodedline /usr/lib/libclang.so.14.0.0

does not - is the file not installed correctly or what happens? isnt it expected to be there with debugging symbols?

Sorry for being stupid:

-options=('staticlibs')
+options=('staticlibs' 'debug' '!strip')

Lone_Wolf commented on 2021-08-16 14:44 (UTC)

Those are used by aur mesa-git to differentiate between this package and the one from lordheavy unofficial repo that also has a llvm-git package .