-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Compile from source without pre-built deps failed #45645
Comments
This comment was marked as resolved.
This comment was marked as resolved.
|
# change the SONAME of Julia's private LLVM | |
# i.e. libLLVM-6.0jl.so | |
# see #32462 | |
LLVM_CMAKE += -DLLVM_VERSION_SUFFIX:STRING="jl" | |
LLVM_CMAKE += -DLLVM_SHLIB_SYMBOL_VERSION:STRING="JL_LLVM_$(LLVM_VER_SHORT)" |
solution
libLLVM.dll
now called libLLVM-13jl.dll
fix patch
diff --git a/deps/llvm.mk b/deps/llvm.mk
index e0512137da..ecc7756e03 100644
--- a/deps/llvm.mk
+++ b/deps/llvm.mk
@@ -258,7 +258,7 @@ LLVM_INSTALL = \
cp -r $$(SRCCACHE)/$$(LLVM_SRC_DIR)/llvm/utils/lit $2$$(build_depsbindir)/ && \
$$(CMAKE) -DCMAKE_INSTALL_PREFIX="$2$$(build_prefix)" -P cmake_install.cmake
ifeq ($(OS), WINNT)
-LLVM_INSTALL += && cp $2$$(build_shlibdir)/libLLVM.dll $2$$(build_depsbindir)
+LLVM_INSTALL += && cp $2$$(build_shlibdir)/libLLVM-*.dll $2$$(build_depsbindir)/libLLVM.dll
endif
ifeq ($(OS),Darwin)
# https://github.com/JuliaLang/julia/issues/29981
Maybe macOS's command need a patch too?
Lines 260 to 266 in a9e3cc7
ifeq ($(OS), WINNT) | |
LLVM_INSTALL += && cp $2$$(build_shlibdir)/libLLVM.dll $2$$(build_depsbindir) | |
endif | |
ifeq ($(OS),Darwin) | |
# https://github.com/JuliaLang/julia/issues/29981 | |
LLVM_INSTALL += && ln -s libLLVM.dylib $2$$(build_shlibdir)/libLLVM-$$(LLVM_VER_SHORT).dylib | |
endif |
Intermittent build errors in cygwin
Line 258 in fa2f304
cp -r $$(SRCCACHE)/$$(LLVM_SRC_DIR)/llvm/utils/lit $2$$(build_depsbindir)/ && \ |
cygwin
sometimes fails when copying test files which located in the llvm/utils/lit
folder.
solution
- workaround: A possible solution is to force
cp
to always returntrue
:
- cp -r $$(SRCCACHE)/$$(LLVM_SRC_DIR)/llvm/utils/lit $2$$(build_depsbindir)/ && \
+ cp -r $$(SRCCACHE)/$$(LLVM_SRC_DIR)/llvm/utils/lit $2$$(build_depsbindir)/ || true && \
|
This comment was marked as resolved.
This comment was marked as resolved.
|
This comment was marked as resolved.
This comment was marked as resolved.
Finally, julia can be compiled successfully.
|
Sadly many deps are not configured correctly to invoke correct cross compiler. |
@inkydragon Will you be making a PR with these? |
@ViralBShah Yes, I will. Maybe I'll open a draft pr later. At the moment, I haven't found the right patch for some problems and need to manually deal with them.
Some issues may require upstream patches:
|
@inkydragon |
In order to correctly cross compile, we need to ensure all deps invoke the correct cross compiler:
|
If this is all fixed on master, we should close. I don't think it is worth worrying about backporting. But it would also need CI to avoid regressing. @DilumAluthge Do we do full source CI on any platform? If so, would be good to enable Windows once @inkydragon gives us a heads up. |
Yeah, we have full source CI on x86_64-linux-gnu. |
Although it looks like the build regressed recently. Compare a passing build on Saturday (https://buildkite.com/julialang/julia-master-scheduled/builds/140#018422c5-9cdd-4877-8ac2-e306a3add207) to a failing build on Sunday (https://buildkite.com/julialang/julia-master-scheduled/builds/141#01842c63-d05a-41c9-aea4-237e2d402f83). |
What I think may be an better Cygwin LLVM copy bug work around. Tim S.
|
Adding a dependency may not be a good idea.
--LLVM_INSTALL = \
- cd $1 && mkdir -p $2$$(build_depsbindir) && \
- cp -r $$(SRCCACHE)/$$(LLVM_SRC_DIR)/llvm/utils/lit $2$$(build_depsbindir)/ && \
- $$(CMAKE) -DCMAKE_INSTALL_PREFIX="$2$$(build_prefix)" -P cmake_install.cmake
+LLVM_INSTALL = cd $1 && mkdir -p $2$$(build_depsbindir)
+ifeq ($(OS), WINNT)
+# https://stackoverflow.com/questions/58048185/cygwin-cp-cant-copy-file-abc-because-destination-dir-contains-file-abc-exe
+# ON Windows (Cygwin/MSYS), you need to copy none-ext files first,
+# then copy `.exe` files.
+LLVM_INSTALL += && cd $$(SRCCACHE)/$$(LLVM_SRC_DIR)/llvm/utils/ \
+ && find lit/ ! -name '*.exe' -exec cp --parents \{\} $2$$(build_depsbindir)/ \; \
+ && find lit/ -name '*.exe' -exec cp --parents \{\} $2$$(build_depsbindir)/ \; \
+ && cd $(build_prefix)/../deps/$1
+else
+LLVM_INSTALL += && cp -r $$(SRCCACHE)/$$(LLVM_SRC_DIR)/llvm/utils/lit $2$$(build_depsbindir)/
+endif
+LLVM_INSTALL += && $$(CMAKE) -DCMAKE_INSTALL_PREFIX="$2$$(build_prefix)" -P cmake_install.cmake
+ifneq (,$(findstring MINGW,$(shell uname)))
+# Win + MSYS/MINGW
+# Or you may add `.exe` to the full path
+CMAKE_COMMON += -DCMAKE_C_COMPILER="$(CC_BASE)"
+else
# The call to which here is to work around https://cmake.org/Bug/view.php?id=14366
CMAKE_COMMON += -DCMAKE_C_COMPILER="$$(which $(CC_BASE))"
+endif This issue is a bit messy at the moment. |
Please see USE_BINARYBUILDER_BLASTRAMPOLINE = 0 fails Tim S. |
This seems rather old, and possibly outdated |
error list
blastrampoline
libblastrampoline_jll
load errorzlib
source build error: fixed by [deps/zlib]: fix source build #45912llvm
LLVM_SHARED_LIB_NAME
#45908libgit2
source build errorcurl
curl
source build error: fixed bylibssh2
patch [deps/libssh2]: fix import library name #45914libcurl
load error: fixed by [deps/curl]: sync build flags withYggdrasil/LibCURL
#45933p7zip
source build errorSome patches may need to be backported to v1.7, v1.8
env
cc
,gcc
,g++
,x86_64-w64-mingw32-gcc
,x86_64-w64-mingw32-gfortran
11.2.0Make.user
compile steps:
julia source verison
master
The text was updated successfully, but these errors were encountered: