-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Unresolved symbol small_typeof
when jl_typeof
is used on Windows with 1.10.0-beta1
#50714
Comments
@vtjnash do we need to annotate |
Hmm, this doesn't reproduce for me in Cygwin: $ export JULIA_PATH="/cygdrive/c/Users/cody/.julia/juliaup/julia-1.10.0-beta1+0.x64.w64.mingw32/"
$ x86_64-w64-mingw32-gcc main.c -fPIC -I$JULIA_PATH/include/julia -ljulia -L$JULIA_PATH/bin -o $JULIA_PATH/bin/test.exe
$ $JULIA_PATH/bin/test.exe
1.4142135623730951 Can you share your build environment details, and the command-line invocations (or a build script) for the MWE? |
I used MSVC, configured as mentioned here. I'll have to check which versions I've used specifically. The problem originally arose in a Yggdrasil recipe that builds a static library, but that script is written in Rust (you can find it here if you're curious). @giordano is it possible to view old build logs for Yggdrasil? I think there might be some useful info there about what flags were set, otherwise I can retry it locally. |
Yep, reproduces for me with MSVC via main.c
C:\Users\cody\.julia\juliaup\julia-1.10.0-beta1+0.x64.w64.mingw32\include\julia\julia_assert.h(13): warning C4068: unknown pragma 'GCC'
C:\Users\cody\.julia\juliaup\julia-1.10.0-beta1+0.x64.w64.mingw32\include\julia\julia_assert.h(32): warning C4068: unknown pragma 'GCC'
main.obj : error LNK2019: unresolved external symbol small_typeof referenced in function jl_to_typeof
main.exe : fatal error LNK1120: 1 unresolved externals |
https://buildkite.com/julialang/yggdrasil/builds/4371#01899da4-2877-4b36-af5a-851595227d91/644-987 |
Thanks! I think I might know why it failed in Yggdrasil but @topolarity couldn't reproduce it: the build script doesn't link julia when the yggdrasil feature is enabled. That feature was originally added because linkjulia.dll.a was absent in the build environment, IIRC. |
Yeah, when you explicitly instructed it not to link against libjulia, we can't really expect that to work: https://github.com/Taaitaaiger/jlrs/blob/f77241a18d93f16242356eae621b5656aaa9afe0/jl_sys/build.rs#L177-L180 |
This reproduces with our standard build instructions for MSVC (and with the |
If I try to compile code on Windows that uses
jl_typeof
compilation fails becausesmall_typeof
can't be resolved.Reproducer:
The text was updated successfully, but these errors were encountered: