-
-
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
ccall()
with an absolute library path while outputting an .o
file causes linker issues on Windows
#34680
Comments
This is the same error that I reported last year that caused the MKL building fail. I posted a possible solution JuliaLinearAlgebra/MKL.jl#24 (comment), but I am not sure if it helps.
|
This is a regression from 1.3.0 (appeared in 1.3.1) so putting on milestone. Probably #34062. |
Can we have this backported too or not possible?
|
A quick question about this issue if I could. I've been running into it while using PackageCompiler (the refactored version - dev release 1.0.0) to build a system image that includes a custom package. The process fails when gcc tries to process an import directive for a binary dependency for CodecZlib. My team was hoping to get the system image soon, so I was wondering if there's a patch I could apply to fix ccall. Would you advise trying a nightly build? Right now, I'm on Julia 1.3.1. Thanks for any pointers! |
You can try this PR: #34754 |
Thanks for the quick response. Using that PR will require building Julia myself, right? Sorry for the elementary question, but I haven't done that before. I can try following the instructions on the Julia readme, though. |
That's correct, but I can help you get a binary of that version. What OS are you using? |
Thank you very much! I'm on Windows 10 Professional 64-bit.
…Sent from my mobile
________________________________
From: Elliot Saba <[email protected]>
Sent: Friday, February 14, 2020 7:31:47 PM
To: JuliaLang/julia <[email protected]>
Cc: Jason W. Veysey <[email protected]>; Manual <[email protected]>
Subject: Re: [JuliaLang/julia] `ccall()` with an absolute library path while outputting an `.o` file causes linker issues on Windows (#34680)
That's correct, but I can help you get a binary of that version. What OS are you using?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#34680?email_source=notifications&email_token=AJGJHPIA5B4GB5ZLTH5CVN3RC4ZXHA5CNFSM4KQTHMO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL24FHI#issuecomment-586531485>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJGJHPPK76CV2RSVHGKYEQLRC4ZXHANCNFSM4KQTHMOQ>.
|
@staticfloat, thank you very much for your guidance on this. I tried that build, and it seemed to work for my compilation. I have to do a bit more testing on the system image, but it's looking good so far! Do you have a sense when the fix will be included in an official release? |
I tried the latest Julia 1.5 and it worked too (building MKL). Maybe the new PackageCompiler uses a workaround for that. |
Didn't you use JuliaLinearAlgebra/MKL.jl#29 for that? That PR makes it so that there is no absolute path and this issue is avoided. |
It will be in 1.4 which shouldn't take too long to release (hopefully). |
Yes, I used this PR. so that explains the stuff.
That's awesome. Thank you! |
Yes, thanks for the update on the release. |
Other bad cases are probably less common, but still exist. The code to fix those is included in JuliaLang#25984. Fixes JuliaLang#34680
Kristoffer and I were tracking down precompilation failures for PackageCompilerX, when we noticed a strange error coming from
ld
while it was trying to link together the system image:This is being emitted as a global variable from
ccall()
, but appears to have some quoting issues on Windows, as the linker doesn't like the backslashes in the symbol name. We're not sure if the linker is truly to blame here, as we usually don't pass absolute library paths so we may have never actually tried to link a system image with this usage pattern before.You can reproduce this with the following mini reproducer:
Looking at the other
ccalllib
symbols, they are all "soname" style:The text was updated successfully, but these errors were encountered: