Skip to content

Commit

Permalink
Update libjulia 1.12.0-DEV to latest master (#9331)
Browse files Browse the repository at this point in the history
There were several breaking kernel API changes

Also update 1.11 to 1.11.0-rc3

Co-authored-by: Benjamin Lorenz <lorenz@math.tu-berlin.de>
  • Loading branch information
fingolfin and benlorenz authored Sep 3, 2024
1 parent 334fe02 commit 0fca019
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 92 deletions.
2 changes: 1 addition & 1 deletion L/libjulia/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Pkg.Types.is_stdlib(uuid::Base.UUID, julia_version::VersionNumber)
return false
end

jllversion=v"1.10.10"
jllversion=v"1.10.11"
for ver in julia_full_versions
build_julia(ARGS, ver; jllversion)
end
38 changes: 0 additions & 38 deletions L/libjulia/bundled/patches/1.11.0-rc1/loader_trampolines.patch

This file was deleted.

29 changes: 29 additions & 0 deletions L/libjulia/bundled/patches/1.11.0-rc3/bf16-workaround.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 9e4740467d9597bde827aa93b50fa1a52d80513f Mon Sep 17 00:00:00 2001
From: Max Horn <max@quendi.de>
Date: Tue, 3 Sep 2024 09:55:42 +0200
Subject: [PATCH] Workaround linker error on macOS about missing __truncsfbf2

Since for libjulia_jll we only care about the kernel API/ABI,
and this does not seem to affect it, just turn off the user of
the __bf16 type.

For details see Julia issue #52067
---
src/runtime_intrinsics.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/runtime_intrinsics.c b/src/runtime_intrinsics.c
index db4007d320..e3448e2e2f 100644
--- a/src/runtime_intrinsics.c
+++ b/src/runtime_intrinsics.c
@@ -355,6 +355,7 @@ float julia_bfloat_to_float(uint16_t param) {
#if ((defined(__GNUC__) && __GNUC__ > 12) || \
(defined(__clang__) && __clang_major__ > 16)) && \
!defined(_CPU_PPC64_) && !defined(_CPU_PPC_) && \
+ !(defined(_CPU_X86_64_) && defined(_OS_DARWIN_)) && \
!defined(_OS_WINDOWS_)
#define BFLOAT16_TYPE __bf16
#define BFLOAT16_TO_UINT16(x) (*(uint16_t*)&(x))
--
2.46.0

29 changes: 29 additions & 0 deletions L/libjulia/bundled/patches/1.12.0-DEV/bf16-workaround.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 9e4740467d9597bde827aa93b50fa1a52d80513f Mon Sep 17 00:00:00 2001
From: Max Horn <max@quendi.de>
Date: Tue, 3 Sep 2024 09:55:42 +0200
Subject: [PATCH] Workaround linker error on macOS about missing __truncsfbf2

Since for libjulia_jll we only care about the kernel API/ABI,
and this does not seem to affect it, just turn off the user of
the __bf16 type.

For details see Julia issue #52067
---
src/runtime_intrinsics.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/runtime_intrinsics.c b/src/runtime_intrinsics.c
index db4007d320..e3448e2e2f 100644
--- a/src/runtime_intrinsics.c
+++ b/src/runtime_intrinsics.c
@@ -355,6 +355,7 @@ float julia_bfloat_to_float(uint16_t param) {
#if ((defined(__GNUC__) && __GNUC__ > 12) || \
(defined(__clang__) && __clang_major__ > 16)) && \
!defined(_CPU_PPC64_) && !defined(_CPU_PPC_) && \
+ !(defined(_CPU_X86_64_) && defined(_OS_DARWIN_)) && \
!defined(_OS_WINDOWS_)
#define BFLOAT16_TYPE __bf16
#define BFLOAT16_TO_UINT16(x) (*(uint16_t*)&(x))
--
2.46.0

38 changes: 0 additions & 38 deletions L/libjulia/bundled/patches/1.12.0-DEV/loader_trampolines.patch

This file was deleted.

46 changes: 31 additions & 15 deletions L/libjulia/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using BinaryBuilder, Pkg
include("../../fancy_toys.jl") # for get_addable_spec

# list of supported Julia versions
julia_full_versions = [v"1.6.3", v"1.7.0", v"1.8.2", v"1.9.0", v"1.10.0", v"1.11.0-beta1", v"1.12.0-DEV"]
julia_full_versions = [v"1.6.3", v"1.7.0", v"1.8.2", v"1.9.0", v"1.10.0", v"1.11.0-rc3", v"1.12.0-DEV"]
if ! @isdefined julia_versions
julia_versions = Base.thispatch.(julia_full_versions)
end
Expand Down Expand Up @@ -49,16 +49,12 @@ function build_julia(ARGS, version::VersionNumber; jllversion=version)
v"1.8.2" => "3e2cea35bf5df963ed7b75a83e8febfc000acf1e664ecd657a0772508eb1fb5d",
v"1.9.0" => "48f4c8a7d5f33d0bc6ce24226df20ab49e385c2d0c3767ec8dfdb449602095b2",
v"1.10.0" => "a4136608265c5d9186ae4767e94ddc948b19b43f760aba3501a161290852054d",
v"1.11.0-rc3" => "8f82f0dbbf5877f6af1c8de7d9d4ec0ea79ecc188c23fc281264a5fa963db5f0",
)

if version == v"1.11.0-beta1"
if version == v"1.12.0-DEV"
sources = [
GitSource("https://github.com/JuliaLang/julia.git", "08e1fc0abb959ce5bd4c75b05518a41b85e4aba1"),
DirectorySource("./bundled"),
]
elseif version == v"1.12.0-DEV"
sources = [
GitSource("https://github.com/JuliaLang/julia.git", "ccba6c91e24ebc0940acc2f8c390e6391ce0e292"),
GitSource("https://github.com/JuliaLang/julia.git", "0622123121a33668f4dc771a6183b95fff533a53"),
DirectorySource("./bundled"),
]
else
Expand Down Expand Up @@ -162,7 +158,7 @@ function build_julia(ARGS, version::VersionNumber; jllversion=version)
elif [[ "${version}" == 1.11.* ]]; then
LLVMVERMAJOR=16
elif [[ "${version}" == 1.12.* ]]; then
LLVMVERMAJOR=16
LLVMVERMAJOR=18
else
echo "Error, LLVM version not specified"
exit 1
Expand Down Expand Up @@ -268,6 +264,26 @@ function build_julia(ARGS, version::VersionNumber; jllversion=version)
EOM
fi
if [[ "${version}" == 1.[7-9].* ]] ||
[[ "${version}" == 1.1[0-1].* ]]; then
if [[ "${target}" == *apple* ]]; then
# Always define LLVMLIBUNWIND for apple and julia 1.6 to 1.11 to work
# around issues in old versions of the Julia build system which did
# not always add this flag when needed (was fixed in Julia 1.12 via
# https://github.com/JuliaLang/julia/pull/55639).
cat << EOM >>Make.user
JCPPFLAGS+=-DLLVMLIBUNWIND
EOM
elif [[ "${target}" == *freebsd* ]]; then
# the julia symbol version script contains undefined entries,
# which cause newer lld versions to emit errors
# see e.g. https://github.com/JuliaLang/julia/pull/55363
cat << EOM >>Make.user
OSLIBS+=-Wl,--undefined-version
EOM
fi
fi
# lld is too strict about some libraries that were built a long time ago
# (libLLVM-11jl.so for julia 1.6 on freebsd)
if [[ "${version}" == 1.6.* ]] && [[ "${target}" == *freebsd* ]]; then
Expand Down Expand Up @@ -409,17 +425,17 @@ function build_julia(ARGS, version::VersionNumber; jllversion=version)
push!(dependencies, Dependency(get_addable_spec("LLVMLibUnwind_jll", v"12.0.1+0"); platforms=filter(Sys.isapple, platforms)))
push!(dependencies, BuildDependency(get_addable_spec("LLVM_full_jll", v"15.0.7+10")))
elseif version.major == 1 && version.minor == 11
push!(dependencies, BuildDependency(get_addable_spec("SuiteSparse_jll", v"7.2.1+1")))
push!(dependencies, Dependency(get_addable_spec("LibUV_jll", v"2.0.1+15")))
push!(dependencies, BuildDependency(get_addable_spec("SuiteSparse_jll", v"7.7.0+0")))
push!(dependencies, Dependency(get_addable_spec("LibUV_jll", v"2.0.1+16")))
push!(dependencies, Dependency(get_addable_spec("LibUnwind_jll", v"1.7.2+2"); platforms=filter(!Sys.isapple, platforms)))
push!(dependencies, Dependency(get_addable_spec("LLVMLibUnwind_jll", v"12.0.1+0"); platforms=filter(Sys.isapple, platforms)))
push!(dependencies, BuildDependency(get_addable_spec("LLVM_full_jll", v"16.0.6+4")))
elseif version.major == 1 && version.minor == 12
push!(dependencies, BuildDependency(get_addable_spec("SuiteSparse_jll", v"7.2.1+1")))
push!(dependencies, Dependency(get_addable_spec("LibUV_jll", v"2.0.1+15")))
push!(dependencies, Dependency(get_addable_spec("LibUnwind_jll", v"1.7.2+2"); platforms=filter(!Sys.isapple, platforms)))
push!(dependencies, BuildDependency(get_addable_spec("SuiteSparse_jll", v"7.8.0+0")))
push!(dependencies, Dependency(get_addable_spec("LibUV_jll", v"2.0.1+16")))
push!(dependencies, Dependency(get_addable_spec("LibUnwind_jll", v"1.8.1+1"); platforms=filter(!Sys.isapple, platforms)))
push!(dependencies, Dependency(get_addable_spec("LLVMLibUnwind_jll", v"12.0.1+0"); platforms=filter(Sys.isapple, platforms)))
push!(dependencies, BuildDependency(get_addable_spec("LLVM_full_jll", v"16.0.6+4")))
push!(dependencies, BuildDependency(get_addable_spec("LLVM_full_jll", v"18.1.7+2")))
else
error("Unsupported Julia version")
end
Expand Down

0 comments on commit 0fca019

Please sign in to comment.