Skip to content
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

Build failure due to missing patch llvm-libunwind-prologue-epilogue.patch #44499

Closed
fxcoudert opened this issue Mar 7, 2022 · 9 comments · Fixed by #45189
Closed

Build failure due to missing patch llvm-libunwind-prologue-epilogue.patch #44499

fxcoudert opened this issue Mar 7, 2022 · 9 comments · Fixed by #45189
Labels
building Build system, or building Julia or its dependencies external dependencies Involves LLVM, OpenBLAS, or other linked libraries

Comments

@fxcoudert
Copy link
Contributor

Trying to build julia master branch on macOS:

$ make VERBOSE=1 prefix=/tmp/toto PYTHON=python3 MACOSX_VERSION_MIN=12 USE_BINARYBUILDER=0 USE_SYSTEM_LLVM=1 PYTHON=python3 MACOSX_VERSION_MIN=12
[…lots of output…]
cd /private/tmp/julia/deps/srccache/ && /usr/bin/tar xf /private/tmp/julia/deps/srccache/llvmunwind-12.0.1.tar.xz
mv /private/tmp/julia/deps/srccache/libunwind-12.0.1.src /private/tmp/julia/deps/srccache/llvmunwind-12.0.1
echo 1 > /private/tmp/julia/deps/srccache/llvmunwind-12.0.1/source-extracted
cd /private/tmp/julia/deps/srccache/llvmunwind-12.0.1 && patch -p2 -f < /private/tmp/julia/deps/patches/llvm-libunwind-prologue-epilogue.patch
/bin/sh: /private/tmp/julia/deps/patches/llvm-libunwind-prologue-epilogue.patch: No such file or directory
make[1]: *** [/private/tmp/julia/deps/srccache/llvmunwind-12.0.1/llvm-libunwind-prologue-epilogue.patch-applied] Error 1
make: *** [julia-deps] Error 2

This patch file is referenced here:

cd $(SRCCACHE)/llvmunwind-$(LLVMUNWIND_VER) && patch -p2 -f < $(SRCDIR)/patches/llvm-libunwind-prologue-epilogue.patch

It was introduced in #39127
but the patch file was removed in #42436

@fxcoudert
Copy link
Contributor Author

fxcoudert commented Mar 7, 2022

Using USE_BINARYBUILDER=0 leads to a different number of failures. This one is the first, but I find others (like, wrong arguments passed to lapack, etc). Should I report all those failures, or is USE_BINARYBUILDER=0 considered not really supported? @giordano

I'm willing to spend some time debugging and reporting bugs in the next couple of weeks to improve the current support of Julia on macOS, but I'd rather understand the current status and expectations before I start opening issues.

@vchuravy
Copy link
Member

vchuravy commented Mar 7, 2022

We should restore that patch to main and backport to 1.8. I was overly zealous in my removal of patches.

USE_BINARYBUILDER=0 is supported, but it is also a configuration less and less people have been running since it is less convenient.

@DilumAluthge can we add at nightly build for USE_BINARYBUILDER=0? Using ccache it should still be reasonable.

@DilumAluthge
Copy link
Member

can we add at nightly build for USE_BINARYBUILDER=0? Using ccache it should still be reasonable.

Yep, we actually have that already, it's just disabled currently while we transition things. We should be able to re-enable it soon. @staticfloat

@giordano giordano added building Build system, or building Julia or its dependencies external dependencies Involves LLVM, OpenBLAS, or other linked libraries labels Mar 7, 2022
@fxcoudert
Copy link
Contributor Author

I've tried to restore llvm-libunwind-prologue-epilogue.patch and llvm-libunwind-force-dwarf.patch by partially reverting #42436

The problem is that llvm-libunwind-force-dwarf.patch does not apply cleanly:

cd /private/tmp/julia/deps/srccache/llvmunwind-12.0.1 && patch -p2 -f < /private/tmp/julia/deps/patches/llvm-libunwind-force-dwarf.patch
patching file include/libunwind.h
Hunk #1 succeeded at 108 (offset 6 lines).
patching file src/UnwindCursor.hpp
Hunk #1 succeeded at 437 (offset 1 line).
Hunk #2 succeeded at 897 (offset 3 lines).
Hunk #3 succeeded at 967 (offset 25 lines).
Hunk #4 FAILED at 1202.
Hunk #5 succeeded at 1222 (offset 30 lines).
Hunk #6 succeeded at 1279 (offset 30 lines).
Hunk #7 succeeded at 1951 (offset 46 lines).
1 out of 7 hunks FAILED -- saving rejects to file src/UnwindCursor.hpp.rej
patching file src/libunwind.cpp
Hunk #1 succeeded at 71 (offset 2 lines).
Hunk #2 succeeded at 80 (offset 2 lines).
patching file src/libunwind_ext.h

@ViralBShah
Copy link
Member

@DilumAluthge can we add at nightly build for USE_BINARYBUILDER=0? Using ccache it should still be reasonable.

Would we run this on every commit, or just once a day or something? Wouldn't it be quite wasteful?

@DilumAluthge
Copy link
Member

DilumAluthge commented Mar 8, 2022

Just once every 24 hours

@fxcoudert
Copy link
Contributor Author

This error still exist on julia-1.8.0-beta3. Could the patch be backported please?

@fxcoudert
Copy link
Contributor Author

fxcoudert commented Apr 30, 2022

Actually I think this was never fixed :( even on master

@fxcoudert
Copy link
Contributor Author

@vchuravy could you please restore the needed patches to master and 1.8 branch?

fxcoudert added a commit to fxcoudert/julia that referenced this issue May 4, 2022
fxcoudert added a commit to fxcoudert/julia that referenced this issue May 6, 2022
giordano pushed a commit that referenced this issue May 17, 2022
KristofferC pushed a commit that referenced this issue May 18, 2022
Fixes #44499

(cherry picked from commit f18324c)
KristofferC pushed a commit that referenced this issue May 18, 2022
Fixes #44499

(cherry picked from commit f18324c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies external dependencies Involves LLVM, OpenBLAS, or other linked libraries
Projects
None yet
5 participants