Skip to content

USE_LLVM_SHLIB := 0 not statically linking llvm on Linux, julia 1.2.0-rc2 #32665

@Orbots

Description

@Orbots

CentOS 6 with gcc 6.4.0 building from:
https://github.com/JuliaLang/julia/archive/v1.2.0-rc2.zip

I had to employ this patch to get LLVM statically linked into libjulia.so and avoid a dependency on libLLVM-6.0.so

--- src/Makefile	2019-07-08 12:42:16.000000000 -0700
+++ src/Makefile	2019-07-23 15:49:49.556932000 -0700
@@ -96,7 +96,7 @@
 #       https://github.com/JuliaLang/julia/issues/29981
 else
 ifneq ($$(USE_LLVM_SHLIB),1)
-LLVMLINK += $$(shell $$(LLVM_CONFIG_HOST) --ldflags) $$(shell $$(LLVM_CONFIG_HOST) --libs $$(LLVM_LIBS)) $$(shell $$(LLVM_CONFIG_HOST) --ldflags) $$(shell $$(LLVM_CONFIG_HOST) --system-libs 2> /dev/null)
+LLVMLINK += $$(shell $$(LLVM_CONFIG_HOST) --ldflags --libs --link-static --system-libs) 
 else
 LLVMLINK += $$(shell $$(LLVM_CONFIG_HOST) --ldflags) -lLLVM
 endif
endef

Activity

vchuravy

vchuravy commented on Jul 24, 2019

@vchuravy
Member

Thank you for the diff and report, we discourage statically building LLVM, since it will block parts of the ecosystem using LLVM.jl like CUDAnative.jl

Orbots

Orbots commented on Jul 24, 2019

@Orbots
Author

Ah ok. It's a fix I found for some LLVM symbol mixing issues I've encountered. #32616
Cheers.

vtjnash

vtjnash commented on Aug 24, 2021

@vtjnash
SponsorMember

Fixed by #41276

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @vchuravy@vtjnash@Orbots

        Issue actions

          USE_LLVM_SHLIB := 0 not statically linking llvm on Linux, julia 1.2.0-rc2 · Issue #32665 · JuliaLang/julia