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

Gmsh fails on initial build in macOS (but not unsupported platform error) #1

Closed
CrashBurnRepeat opened this issue Mar 17, 2019 · 11 comments

Comments

@CrashBurnRepeat
Copy link

When trying to build Gmsh for the first time on macOS, I get the following error:

(v1.1) pkg> add https://github.com/JuliaFEM/Gmsh.jl.git
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Cloning git-repo `https://github.com/JuliaFEM/Gmsh.jl.git`
  Updating git-repo `https://github.com/JuliaFEM/Gmsh.jl.git`
 Resolving package versions...
  Updating `~/.julia/environments/v1.1/Project.toml`
  [705231aa] + Gmsh v0.1.0 #master (https://github.com/JuliaFEM/Gmsh.jl.git)
  Updating `~/.julia/environments/v1.1/Manifest.toml`
  [705231aa] + Gmsh v0.1.0 #master (https://github.com/JuliaFEM/Gmsh.jl.git)
  Building Gmsh → `~/.julia/packages/Gmsh/9J8He/deps/build.log`
┌ Error: Error building `Gmsh`: 
│ ERROR: LoadError: MethodError: no method matching iterate(::Nothing)
│ Closest candidates are:
│   iterate(!Matched::Core.SimpleVector) at essentials.jl:568
│   iterate(!Matched::Core.SimpleVector, !Matched::Any) at essentials.jl:568
│   iterate(!Matched::ExponentialBackOff) at error.jl:199
│   ...
│ Stacktrace:
│  [1] indexed_iterate(::Nothing, ::Int64) at ./tuple.jl:66
│  [2] top-level scope at /Users/crashburnrepeat/.julia/packages/Gmsh/9J8He/deps/build.jl:24
│  [3] include at ./boot.jl:326 [inlined]
│  [4] include_relative(::Module, ::String) at ./loading.jl:1038
│  [5] include(::Module, ::String) at ./sysimg.jl:29
│  [6] include(::String) at ./client.jl:403
│  [7] top-level scope at none:0
│ in expression starting at /Users/crashburnrepeat/.julia/packages/Gmsh/9J8He/deps/build.jl:21
└ @ Pkg.Operations /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

Looking through the source code, it seems only Linux is supported at the moment, and there is logic for catching build errors on unsupported platforms, but it seems that this error is a different type than the one anticipated. Does this logic need to be revised to show the correct error, assuming this is an unsupported platform problem? Even better, is there a chance that binaries can be built for OSs other than Linux?

If there's more information that I can provide, please let me know.

@ahojukka5
Copy link
Member

What Julia version are you using? That build.jl template is taken from BinaryProvider.jl, I think. I make binaries only for Linux at first because I wanted to have something working soon. Creating binaries for other operating systems should be trivial, as long as Gmsh is compiling. We also should disable unnecessary parts (at least GUI) in the build process to reduce the size of the binary, it's over 100 MB now.

@CrashBurnRepeat
Copy link
Author

I knew there would be something obvious I'd miss; I'm using version 1.1.0 (2019-01-21). Since I have the Mac to validate on, is this something I could assist with? I'm trying to do a port of some electromagnetic code to Julia, so this would be a big help.

@ahojukka5
Copy link
Member

Everything should work with the newest versions. It seems that the problem is this line:

url, tarball_hash = choose_download(download_info)

choose_download is returning nothing and unpacking to two variables is trying to iterate on that. Usually the function should return the tuple shown in download_info, i.e.

("$bin_prefix/gmsh.v4.1.5.x86_64-linux-gnu.tar.gz", "b037e5376bbe9a381f5938936cbea4f99feafa7f3f1705357d1a5950cfe54061")

for Linux binaries. I think the problem finally is that there is no compiled binaries for OSX at the moment.

@ahojukka5
Copy link
Member

I copied the template from a mock package LibFoo.jl, https://github.com/JuliaPackaging/BinaryProvider.jl/blob/master/test/LibFoo.jl/deps/build.jl#L37. Maybe @staticfloat knows is there any internal changes how choose_download works or is it just me.

@ahojukka5
Copy link
Member

I'm anyway compiling the OSX binaries now so if everything goes like in movies soon this issue should vanish.

@ahojukka5
Copy link
Member

Ok, it looks that the structure of build.jl has been changing. After PR #2 everything should be fine, also for OSX.

@ahojukka5
Copy link
Member

Also, it looks that 4.2.2 version has been released a couple of days ago, I also update binaries to that.

@ahojukka5
Copy link
Member

This package should be tagged so that it can be found from metadata as usual. Any ideas should this follow what version number, Gmsh or...? cc: @TeroFrondelius

ahojukka5 added a commit that referenced this issue Mar 19, 2019
@ahojukka5
Copy link
Member

Ok, now we should have support for OSX also. Have you considered doing electromagnetism using JuliaFEM? I would be happy to help with that. After all, we are aiming to be multiphysics and I'm interested to see what new challenges is electromagnetism is giving.

@staticfloat
Copy link

Yep, looks like you've figured it out. :)

@CrashBurnRepeat
Copy link
Author

I just got the chance to pull these updates on my Mac, and things seem to be good (at least I was able to pull the update and precompile). I also have access to a Windows machine and the correct error was shown when I pull the new code, although I don't need a Windows binary at this point.

@ahojukka5, much thanks for the speedy response, and I'll write you separately about the EM work I'm hoping to do.

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

3 participants