-
Notifications
You must be signed in to change notification settings - Fork 7
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 Julia1.0-compatible Clang/LLVM binaries #34
Comments
In a Julia 1.0 compatible build we need to turn off:
That is the only one that immediately jumps at me. We would also need to turn off Polly, but that is already the case. An alternative solution that we might try first is to set:
To something else aka JLBB_LLVM_ instead of JL_LLVM .
@Gnimuc could you give that a try? |
@vchuravy just built 6.0.0-6(d1ae9ac) without WebAssembly enabled. Although there is a warning, the libclang works pretty well. I also tried the second solution with the latest master, but no luck: https://gist.github.com/Gnimuc/f726f7f2ae8185f256723784b34756ac
|
[100%] Linking CXX executable ../../../../bin/clang.exe
cd /workspace/srcdir/llvm-6.0.0.src/build/tools/clang/tools/driver && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/clang.dir/link.txt --verbose=1
/usr/local/bin/cmake -E remove -f CMakeFiles/clang.dir/objects.a
/opt/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-ar cr CMakeFiles/clang.dir/objects.a @CMakeFiles/clang.dir/objects1.rsp
/opt/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-g++ --sysroot=/opt/x86_64-w64-mingw32/x86_64-w64-mingw32/sys-root/ -remap -D__USING_SJLJ_EXCEPTIONS__ -D__CRT__NO_INLINE -Wa,-mbig-obj -Werror=date-time -std=gnu++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wundef -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -fno-common -Woverloaded-virtual -fno-strict-aliasing -O2 -DNDEBUG -Wl,--stack,16777216 -Wl,--whole-archive CMakeFiles/clang.dir/objects.a -Wl,--no-whole-archive -o ../../../../bin/clang.exe -Wl,--out-implib,../../../../lib/libclang.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles/clang.dir/linklibs.rsp
[100%] Linking CXX executable ../../../../bin/clang-import-test.exe
cd /workspace/srcdir/llvm-6.0.0.src/build/tools/clang/tools/clang-import-test && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/clang-import-test.dir/link.txt --verbose=1
/usr/local/bin/cmake -E remove -f CMakeFiles/clang-import-test.dir/objects.a
/opt/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-ar cr CMakeFiles/clang-import-test.dir/objects.a @CMakeFiles/clang-import-test.dir/objects1.rsp
/opt/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-g++ --sysroot=/opt/x86_64-w64-mingw32/x86_64-w64-mingw32/sys-root/ -remap -D__USING_SJLJ_EXCEPTIONS__ -D__CRT__NO_INLINE -Wa,-mbig-obj -Werror=date-time -std=gnu++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wundef -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -fno-common -Woverloaded-virtual -fno-strict-aliasing -O2 -DNDEBUG -Wl,--stack,16777216 -Wl,--whole-archive CMakeFiles/clang-import-test.dir/objects.a -Wl,--no-whole-archive -o ../../../../bin/clang-import-test.exe -Wl,--out-implib,../../../../lib/libclang-import-test.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles/clang-import-test.dir/linklibs.rsp
[100%] Linking CXX executable ../../../../bin/c-index-test.exe
cd /workspace/srcdir/llvm-6.0.0.src/build/tools/clang/tools/c-index-test && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/c-index-test.dir/link.txt --verbose=1
/usr/local/bin/cmake -E remove -f CMakeFiles/c-index-test.dir/objects.a
/opt/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-ar cr CMakeFiles/c-index-test.dir/objects.a @CMakeFiles/c-index-test.dir/objects1.rsp
/opt/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-g++ --sysroot=/opt/x86_64-w64-mingw32/x86_64-w64-mingw32/sys-root/ -remap -D__USING_SJLJ_EXCEPTIONS__ -D__CRT__NO_INLINE -Wa,-mbig-obj -Werror=date-time -std=gnu++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wundef -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -fno-common -Woverloaded-virtual -fno-strict-aliasing -O2 -DNDEBUG -Wl,--stack,16777216 -Wl,--whole-archive CMakeFiles/c-index-test.dir/objects.a -Wl,--no-whole-archive -o ../../../../bin/c-index-test.exe -Wl,--out-implib,../../../../lib/libc-index-test.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles/c-index-test.dir/linklibs.rsp
../../../../lib/libclangCodeGen.a(CGObjCMac.cpp.obj):CGObjCMac.cpp:(.text$_ZN5clang7CodeGen13CGObjCRuntime29EmitNSAutoreleasePoolClassRefERNS0_15CodeGenFunctionE+0x0): multiple definition of `clang::CodeGen::CGObjCRuntime::EmitNSAutoreleasePoolClassRef(clang::CodeGen::CodeGenFunction&)'
../../../../lib/libclangCodeGen.a(CGObjC.cpp.obj):CGObjC.cpp:(.text$_ZN5clang7CodeGen13CGObjCRuntime29EmitNSAutoreleasePoolClassRefERNS0_15CodeGenFunctionE+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [tools/clang/tools/driver/CMakeFiles/clang.dir/build.make:143: bin/clang.exe] Error 1
make[2]: Leaving directory '/workspace/srcdir/llvm-6.0.0.src/build'
make[1]: *** [CMakeFiles/Makefile2:15803: tools/clang/tools/driver/CMakeFiles/clang.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/workspace/srcdir/llvm-6.0.0.src/build'
[100%] Built target clang-import-test
make[2]: Leaving directory '/workspace/srcdir/llvm-6.0.0.src/build'
[100%] Built target c-index-test
make[1]: Leaving directory '/workspace/srcdir/llvm-6.0.0.src/build'
make: *** [Makefile:152: all] Error 2
ERROR: LoadError: Build for LLVM on x86_64-w64-mingw32 did not complete successfully
|
oh, never mind. I gave it another try and this time, no errors. I've tested the first solution on Linux(x64), Windows(x86+x64) and MacOS, all works great! |
That’s awesome! To be clear, this is with your custom-built Julia or the official Julia 1.0 binaries? |
All of the tests are on the official Julia 1.0 binaries. (Never thought this issue could be one-line fixed!) |
@tshort how is your long-term need for WebAssembly support? If you want it
we should enable it in Julia base.
I should also note that with LLVM 8 WebAssembly most likely will be
promoted to an officially supported backend and not an experimental one.
…On Sat, Sep 22, 2018, 03:53 Gnimuc ***@***.***> wrote:
All of the tests are on the official Julia 1.0 binaries. (Never thought
this issue could be one-line fixed!)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#34 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAI3agXVK2VFLNokBFP_NfaNAlR5iHXuks5udeyKgaJpZM4WuPxi>
.
|
Would you mind tagging a new v6.0.0-7 release with WebAssembly disabled? |
I'm going to tag a |
Instead of having a nowasm tag we should just add binary artefacts.
…On Mon, Sep 24, 2018, 08:09 Elliot Saba ***@***.***> wrote:
I'm going to tag a v6.0.1-3+nowasm build that will stay on its own
branch. God willing, we will eventually be able to merge the two, but some
people need WebAssembly, so we'll keep them separate for now.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#34 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAI3am9XscqABW2TqwCgYCs4ROxzXPuOks5ueMt-gaJpZM4WuPxi>
.
|
I talked it over with Valentine, and for now we're just going to do a separate tag, as it appears likely that in the future (e.g. for Julia 1.1+) we will be able to have compatibility with Julia, even with WASM turned on: JuliaLang/julia#29341 |
1. use BinaryProvider instead of Homebrew on MacOS 2. Simplify build script on Linux 3. Add Windows support
the binaries are still not dlopen-able on Windows, I'm bisecting the issue:
|
now I find even the linux version can be loaded successfully, some function calls refuse to work(throw weird errors or crash Julia). but the macos version works fine, very strange.
|
Did you mean the linux version can not be loaded successfully? |
@staticfloat It can be dlopen-ed, but calling some functions got failed. I also rebuilt LLVM 6.0.0 yesterday, the result is the same(see below).
|
oh, never mind. I did a fresh installation of an older version of BinaryBuilder(e973095) and it's working again.
|
@staticfloat I just noticed that Julia 1.0.X will use LLVM 6.0.0 and the nowasm build we provide are for LLVM 6.0.1 |
Is there not enough API stability between 6.0.0 and 6.0.1 that this is okay? |
Not really guaranteed by anyone... Especially since libraries like clang
will resolve their weekly linked symbols to the first darn LLVM they can
find.
…On Sun, Nov 25, 2018, 00:28 Elliot Saba ***@***.*** wrote:
Is there not enough API stability between 6.0.0 and 6.0.1 that this is
okay?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#34 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAI3arD3CQhBHe6IpIcHminLgkxlc9z7ks5uyipjgaJpZM4WuPxi>
.
|
As per discussed on Slack, there are no versions of Clang/LLVM binaries in the LLVMBuilder that are being compatible with the LLVM shipped with Julia 1.0. For example, loading and using
libclang.dylib
(6.0.0-6) will crash Julia.It could work as long as we rebuild Julia with
USE_BINARYBUILDER_LLVM=1
(use the LLVMBuilder binaries). However, since Julia 1.0 has already been shipped, for compatibility's sake, we may need to tweak LLVMBuilder for building a version that can work along with Julia 1.0.cc @staticfloat
The text was updated successfully, but these errors were encountered: