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

[Bug Report] Failed to precompile on Windows #712

Closed
yezhengkai opened this issue Oct 6, 2021 · 3 comments · Fixed by #713
Closed

[Bug Report] Failed to precompile on Windows #712

yezhengkai opened this issue Oct 6, 2021 · 3 comments · Fixed by #713

Comments

@yezhengkai
Copy link

Description

When use pkg> add GMT on Windows, the Windows installer successfully installed GMT, but when GMT.jl was precompiled, the console displayed the following error message.
image

Solution

I found that the path of _libgmt in deps.jl is "C:/programs/gmt6/bin/gmt_w64.dll", and when I change the path to "C:\\programs\\gmt6\\bin\\gmt_w64.dll" GMT.jl can be precompiled smoothly.

I think the bug comes from this

libgmt = string(chop(read(`$(joinpath("$(GMT_bindir)", "gmt")) --show-library`, String)))

And we might be able to fix this bug by using abspath instead of string

libgmt = abspath(chop(read(`$(joinpath("$(GMT_bindir)", "gmt")) --show-library`, String)))
@joa-quim
Copy link
Member

joa-quim commented Oct 6, 2021

Well, I don't really understand this error. It's not due to path separator because c:\\programs is exactly equal to c:/programs. And that error message, I've seen it many times (under other circumstances), unfortunately is very misleading because we may think it's complaining of not finding the file but it actually means that some unspecified dependency/symbol cannot be loaded. This is often a hellish problem to track but if it is real it should not go away with a path separator change. Can you run GMT programs normally?

We can certainly change that line to use abspath but I doubt this is really the source of any problem (I've been using it as is for years with no problems).

@yezhengkai
Copy link
Author

After GMT.jl is precompiled, I can run simple examples of GMT and GMT.jl.

@joa-quim
Copy link
Member

joa-quim commented Oct 7, 2021

Good. I don't understand hat happened but if that helps you and others that may have the same issue, I've added abspath in #713.
Thanks for reporting and digging.

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 a pull request may close this issue.

2 participants