Skip to content

Add bfloat LLVM fix to 1.11 #57874

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

Merged
merged 3 commits into from
Apr 10, 2025
Merged

Add bfloat LLVM fix to 1.11 #57874

merged 3 commits into from
Apr 10, 2025

Conversation

gbaraldi
Copy link
Member

No description provided.

@KristofferC
Copy link
Member

Needs a rebase I think

@giordano
Copy link
Contributor

giordano commented Mar 24, 2025

https://buildkite.com/julialang/julia-release-1-dot-11/builds/421#0195c8c0-59a6-4ac7-a50f-d150114395de/715-2243

Message:/usr[buildroot]/usr/bin/../lib/libjulia-internal.so.1.11: Undefined symbol "_ZNSt3__122__libcpp_verbose_abortEPKcz"

@ararslan do we need to upgrade the FreeBSD image here in CI? That'd be relevant also for LLVM 20 and any other new builds

@ararslan
Copy link
Member

Ah right, yes, since Yggdrasil is building for FreeBSD 13.4 on x86-64 rather than 13.2, we probably need to upgrade Julia CI image from 13.2 to 13.4 as well.

@giordano
Copy link
Contributor

FAIL: Julia :: late-lower-gc.ll (11 of 45)
******************** TEST 'Julia :: late-lower-gc.ll' FAILED ********************
Script:
--
: 'RUN: at line 3';   opt -enable-new-pm=1 --opaque-pointers=0 --load-pass-plugin=libjulia-codegen.so -passes='function(LateLowerGCFrame)' -S /cache/build/tester-amdci5-15/julialang/julia-release-1-dot-11/test/llvmpasses/late-lower-gc.ll | FileCheck /cache/build/tester-amdci5-15/julialang/julia-release-1-dot-11/test/llvmpasses/late-lower-gc.ll -check-prefixes=CHECK,TYPED
: 'RUN: at line 5';   opt -enable-new-pm=1 --opaque-pointers=1 --load-pass-plugin=libjulia-codegen.so -passes='function(LateLowerGCFrame)' -S /cache/build/tester-amdci5-15/julialang/julia-release-1-dot-11/test/llvmpasses/late-lower-gc.ll | FileCheck /cache/build/tester-amdci5-15/julialang/julia-release-1-dot-11/test/llvmpasses/late-lower-gc.ll --check-prefixes=CHECK,OPAQUE
--
Exit Code: 2
Command Output (stderr):
--
/cache/build/tester-amdci5-15/julialang/julia-release-1-dot-11/test/llvmpasses/late-lower-gc.ll:137:22: warning: ptr type is only supported in -opaque-pointers mode
    %2 = load float, ptr addrspace(1) %0, align 4, !invariant.load !1
                     ^
opt: /cache/build/tester-amdci5-15/julialang/julia-release-1-dot-11/test/llvmpasses/late-lower-gc.ll:137:22: error: expected type
    %2 = load float, ptr addrspace(1) %0, align 4, !invariant.load !1
                     ^
FileCheck error: '<stdin>' is empty.
FileCheck command line:  FileCheck /cache/build/tester-amdci5-15/julialang/julia-release-1-dot-11/test/llvmpasses/late-lower-gc.ll -check-prefixes=CHECK,TYPED
--
********************

is this related to this PR?

@gbaraldi
Copy link
Member Author

No, that is broken on the target branch too

@giordano
Copy link
Contributor

Ok, so only problem is the FreeBSD image (which should be fixed anyway because it'll become a problem in the future, but Alex is already on the case)

@KristofferC KristofferC force-pushed the backports-release-1.11 branch 2 times, most recently from 5c74dc0 to 618c74e Compare March 31, 2025 19:26
@giordano
Copy link
Contributor

giordano commented Apr 1, 2025

The history here looks messed up now. I think only two most recent commits should be retained, all previous ones can be dropped

@giordano
Copy link
Contributor

giordano commented Apr 1, 2025

@ararslan

 clang -m64 -O3 -g -I/usr[buildroot]/src/flisp/../support -std=gnu11 -pipe -fPIC -fno-strict-aliasing -D_FILE_OFFSET_BITS=64  -I/usr[buildroot]/usr/include -I/usr[buildroot]/usr/include -I/usr[buildroot]/usr/include  -DJL_LIBRARY_EXPORTS_INTERNAL -DUTF8PROC_EXPORTS -DUSE_COMPUTED_GOTO -Wall -Wno-strict-aliasing -fvisibility=hidden -Wpointer-arith -Wundef -Wold-style-definition -Wstrict-prototypes -Wc++-compat -Wl,-Bdynamic -L/usr[buildroot]/usr/lib -Wl,-rpath,/usr[buildroot]/usr/lib /usr[buildroot]/src/flisp/flisp.o /usr[buildroot]/src/flisp/builtins.o /usr[buildroot]/src/flisp/string.o /usr[buildroot]/src/flisp/equalhash.o /usr[buildroot]/src/flisp/table.o /usr[buildroot]/src/flisp/iostream.o /usr[buildroot]/src/flisp/julia_extensions.o /usr[buildroot]/src/flisp/flmain.o -o /usr[buildroot]/src/flisp/flisp /usr[buildroot]/src/flisp/libflisp.a /usr[buildroot]/src/flisp/../support/libsupport.a /usr[buildroot]/usr/lib/libuv.a /usr[buildroot]/usr/lib/libutf8proc.a -lpthread -lelf -lkvm -lrt -lpthread -latomic -lgcc_s -Wl,--export-dynamic -Wl,--version-script=/usr[buildroot]/src/julia.expmap -Wl,--no-whole-archive
ld: error: version script assignment of 'JL_LIBJULIA_1.11' to symbol '__stack_chk_guard' failed: symbol not defined
ld: error: version script assignment of 'JL_LIBJULIA_1.11' to symbol 'asprintf' failed: symbol not defined
ld: error: version script assignment of 'JL_LIBJULIA_1.11' to symbol 'rec_backtrace' failed: symbol not defined
ld: error: version script assignment of 'JL_LIBJULIA_1.11' to symbol 'localtime_r' failed: symbol not defined
ld: error: version script assignment of 'JL_LIBJULIA_1.11' to symbol 'restore_signals' failed: symbol not defined
ld: error: version script assignment of 'JL_LIBJULIA_1.11' to symbol 'add_library_mapping' failed: symbol not defined
ld: error: version script assignment of 'JL_LIBJULIA_1.11' to symbol 'jlbacktrace' failed: symbol not defined
ld: error: version script assignment of 'JL_LIBJULIA_1.11' to symbol 'jlbacktracet' failed: symbol not defined
ld: error: version script assignment of 'JL_LIBJULIA_1.11' to symbol '_IO_stdin_used' failed: symbol not defined
ld: error: version script assignment of 'JL_LIBJULIA_1.11' to symbol '_Z24jl_coverage_data_pointerN4llvm9StringRefEi' failed: symbol not defined
ld: error: version script assignment of 'JL_LIBJULIA_1.11' to symbol '_Z22jl_coverage_alloc_lineN4llvm9StringRefEi' failed: symbol not defined
ld: error: version script assignment of 'JL_LIBJULIA_1.11' to symbol '_Z22jl_malloc_data_pointerN4llvm9StringRefEi' failed: symbol not defined
ld: error: version script assignment of 'JL_LIBJULIA_1.11' to symbol 'llvmGetPassPluginInfo' failed: symbol not defined

🤔

@ararslan
Copy link
Member

ararslan commented Apr 1, 2025

Issue with src/julia.expmap I guess? Maybe needs more/fewer entries?

@Zentrik
Copy link
Member

Zentrik commented Apr 2, 2025

I guess d269d7d isn't in 1.11

@ararslan
Copy link
Member

ararslan commented Apr 2, 2025

ld: error: version script assignment of 'JL_LIBJULIA_1.11' to symbol 'arraylist_grow' failed: symbol not defined
ld: error: version script assignment of 'JL_LIBJULIA_1.11' to symbol 'small_arraylist_grow' failed: symbol not defined

Perhaps those should be either removed or amended to arraylist_grow* and small_arraylist_grow* in the version script?

@Zentrik
Copy link
Member

Zentrik commented Apr 2, 2025

Was done in 97ecdb8

@giordano giordano marked this pull request as ready for review April 10, 2025 10:02
@giordano
Copy link
Contributor

Only test failure is on i686-linux-gnu:

Error in testset math:
Test Failed at /cache/build/tester-amdci4-10/julialang/julia-release-1-dot-11/julia-b387421113/share/julia/test/math.jl:1600
  Expression: Core.Compiler.is_foldable(effects)
     Context: effects = (+c,+e,+n,!t,+s,+m,+u,+o,+r)
              T = Float64

but that's happening also in #57714, so it's unrelated to this PR. I'm going to merge it.

@giordano giordano merged commit 8979836 into backports-release-1.11 Apr 10, 2025
4 of 6 checks passed
@giordano giordano deleted the gb/1.11llvmnew branch April 10, 2025 10:04
ararslan pushed a commit that referenced this pull request Apr 15, 2025
ararslan added a commit that referenced this pull request Apr 16, 2025
This includes three commits that fix the version script for use with
newer LLD. This has already been fixed on 1.11, 1.12, and master.

Commits were cherry-picked from #55363, #57874, and #53633.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants