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

Creating sysimage for BFloat16s.jl fails on Windows #1016

Open
abhro opened this issue Dec 3, 2024 · 2 comments
Open

Creating sysimage for BFloat16s.jl fails on Windows #1016

abhro opened this issue Dec 3, 2024 · 2 comments

Comments

@abhro
Copy link

abhro commented Dec 3, 2024

This issue is a duplicate of JuliaMath/BFloat16s.jl#88. I'm unsure which package is causing this issue however, so I'm essentially cross-posting here. A copy of the transcript is presented below:

Creation of a sysimage fails because g++ cannot find the required symbols (linking error). Minimal working example is to write a script bfloat16s-sysimage-creator.jl:

import Pkg

Pkg.activate(temp = true)

Pkg.add(["BFloat16s", "PackageCompiler"])

using PackageCompiler

create_sysimage(["BFloat16s"], sysimage_path = "bfloat16s-sysimage.dll")

The output of which is piped into a text file (see attachment bfloat16s-packagecompiler-log.txt)

The file is mostly warnings about unrecognized drectives, which also happens on other sysimage creation. The relevant lines are

$HOME\AppData\Local\Temp\jl_tyfKvKlihE-o.a(text#1.o): In function `BFloat16':
$HOME\.julia\packages\BFloat16s\u3WQc\src/bfloat16.jl:158: undefined reference to `__truncdfbf2'
$HOME\AppData\Local\Temp\jl_tyfKvKlihE-o.a(text#15.o): In function `BFloat16':
$HOME\.julia\packages\BFloat16s\u3WQc\src/bfloat16.jl:158: undefined reference to `__truncdfbf2'
collect2.exe: error: ld returned 1 exit status
@dgleich
Copy link

dgleich commented Dec 4, 2024

This also seems to occur with MLDatasets.jl on MacOS x86_64. (Which has BFloat16s via some chain of dependencies.)

✔ [02m:44s] PackageCompiler: compiling incremental system image
Undefined symbols for architecture x86_64:
  "___truncdfbf2", referenced from:
      _julia_BFloat16_47806 in jl_fCv4HAVk5o-o.a[2](text#0.o)
      _julia_BFloat16_47814 in jl_fCv4HAVk5o-o.a[4](text#2.o)
      _julia_BFloat16_47814 in jl_fCv4HAVk5o-o.a[4](text#2.o)
ld: symbol(s) not found for architecture x86_64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

julia> versioninfo()
Julia Version 1.11.2
Commit 5e9a32e7af2 (2024-12-01 20:02 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (x86_64-apple-darwin24.0.0)
  CPU: 16 × Intel(R) Xeon(R) W-2140B CPU @ 3.20GHz
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, skylake-avx512)
Threads: 1 default, 0 interactive, 1 GC (on 16 virtual cores)

(@TCB) pkg> st PackageCompiler
Status `~/.julia/environments/TCB/Project.toml`
  [9b87118b] PackageCompiler v2.1.24

@dgleich
Copy link

dgleich commented Dec 4, 2024

Possibly related... JuliaLang/julia#52067

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

No branches or pull requests

2 participants