# Failure to add package Gmsh

**URL:** <https://discourse.julialang.org/t/failure-to-add-package-gmsh/30652>\
**Category:** New to Julia\
**Tags:** package, gmsh\
**Created:** [November 3, 2019, 2:23pm UTC](https://discourse.julialang.org/t/failure-to-add-package-gmsh/30652 "2019-11-03T14:23:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![egcjm](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@egcjm](https://discourse.julialang.org/u/egcjm)\
**Post date:** [November 3, 2019, 2:23pm UTC](https://discourse.julialang.org/t/failure-to-add-package-gmsh/30652/1 "2019-11-03T14:23:01Z")

</div>

I fail to install package Gmsh. After Pkg.add(“Gmsh”), using Gmsh and Pkg.build(“Gmsh”) produce the errors below. I am an administrator on my Windows 10 environment running Julia 1.2 yet Pkg.build command seems to think otherwise: “On Windows, creating file symlinks requires Administrator privileges”. Any help appreciated. -Eric

ERROR: LoadError: Gmsh not installed properly, run Pkg.build(“Gmsh”), restart Julia and try again  
Stacktrace:  
[1] error(::String) at .\error.jl:33  
[2] top-level scope at C:\Users\emichiel.julia\packages\Gmsh\eZVOZ\src\Gmsh.jl:6  
[3] include at .\boot.jl:328 [inlined]  
[4] include\_relative(::Module, ::String) at .\loading.jl:1094  
[5] include(::Module, ::String) at .\Base.jl:31  
[6] top-level scope at none:2  
[7] eval at .\boot.jl:330 [inlined]  
[8] eval(::Expr) at .\client.jl:432  
[9] top-level scope at .\none:3  
in expression starting at C:\Users\emichiel.julia\packages\Gmsh\eZVOZ\src\Gmsh.jl:5

julia\> Pkg.build(“Gmsh”)  
Building Gmsh → `C:\Users\emichiel\.julia\packages\Gmsh\eZVOZ\deps\build.log`  
┌ Error: Error building `Gmsh`:  
│ ┌ Warning: On Windows, creating file symlinks requires Administrator privileges  
│ └ @ Base.Filesystem file.jl:797  
│ ERROR: LoadError: Your platform (“x86\_64-w64-mingw32”, parsed as “x86\_64-w64-mingw32-gcc7-cxx11”) is not supported by this package!  
│ Stacktrace:  
│ [1] error(::String) at .\error.jl:33  
│ [2] top-level scope at C:\Users\emichiel.julia\packages\Gmsh\eZVOZ\deps\build.jl:26  
│ [3] include at .\boot.jl:328 [inlined]  
│ [4] include\_relative(::Module, ::String) at .\loading.jl:1094  
│ [5] include(::Module, ::String) at .\Base.jl:31  
│ [6] include(::String) at .\client.jl:431  
│ [7] top-level scope at none:5  
│ in expression starting at C:\Users\emichiel.julia\packages\Gmsh\eZVOZ\deps\build.jl:22  
│ caused by [exception 1]  
│ IOError: symlink: operation not permitted (EPERM)  
│ Stacktrace:  
│ [1] uv\_error at .\libuv.jl:90 [inlined]  
│ [2] symlink(::String, ::String) at .\file.jl:800  
│ [3] probe\_symlink\_creation(::String) at C:\Users\emichiel.julia\packages\BinaryProvider\gnxnM\src\PlatformEngines.jl:121  
│ [4] #probe\_platform\_engines!#30(::Bool, ::typeof(BinaryProvider.probe\_platform\_engines!)) at C:\Users\emichiel.julia\packages\BinaryProvider\gnxnM\src\PlatformEngines.jl:175  
│ [5] probe\_platform\_engines! at C:\Users\emichiel.julia\packages\BinaryProvider\gnxnM\src\PlatformEngines.jl:169 [inlined]  
│ [6] **init** () at C:\Users\emichiel.julia\packages\BinaryProvider\gnxnM\src\BinaryProvider.jl:28  
│ [7] \_include\_from\_serialized(::String, ::Array{Any,1}) at .\loading.jl:685  
│ [8] \_require\_search\_from\_serialized(::Base.PkgId, ::String) at .\loading.jl:765  
│ [9] \_require(::Base.PkgId) at .\loading.jl:990  
│ [10] require(::Base.PkgId) at .\loading.jl:911  
│ [11] require(::Module, ::Symbol) at .\loading.jl:906  
│ [12] include at .\boot.jl:328 [inlined]  
│ [13] include\_relative(::Module, ::String) at .\loading.jl:1094  
│ [14] include(::Module, ::String) at .\Base.jl:31  
│ [15] include(::String) at .\client.jl:431  
│ [16] top-level scope at none:5  
└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package\_win64\build\usr\share\julia\stdlib\v1.2\Pkg\src\backwards\_compatible\_isolation.jl:647  
false

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [November 3, 2019, 2:29pm UTC](https://discourse.julialang.org/t/failure-to-add-package-gmsh/30652/2 "2019-11-03T14:29:46Z")

</div>

There seems to be an issue with your C/C++ environment. Look at `ERROR: LoadError: Your platform (“x86_64-w64-mingw32”, parsed as “x86_64-w64-mingw32-gcc7-cxx11”) is not supported by this package!`

---

<div class="post-metadata">

**Author:** ![egcjm](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@egcjm](https://discourse.julialang.org/u/egcjm)\
**Post date:** [November 3, 2019, 2:32pm UTC](https://discourse.julialang.org/t/failure-to-add-package-gmsh/30652/3 "2019-11-03T14:32:42Z")

</div>

Thanks. I would like to create fairly simple 2D triangular meshes for a finite element code. Are there other Julia packages that you recommend?

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [November 3, 2019, 2:48pm UTC](https://discourse.julialang.org/t/failure-to-add-package-gmsh/30652/4 "2019-11-03T14:48:20Z")

</div>

Check out FinEtools. It can do a bit. Targe2.jl might also be helpful.

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [November 3, 2019, 3:17pm UTC](https://discourse.julialang.org/t/failure-to-add-package-gmsh/30652/5 "2019-11-03T15:17:38Z")

</div>

It seems that the Gmsh package for Julia does not support a windows version:  
….julia\packages\Gmsh\eZVOZ\deps\build.jl

```julia
download_info = Dict(
    MacOS(:x86_64) => ("$bin_prefix/gmsh.v4.4.1.x86_64-apple-darwin14.tar.gz", "a29d761a6826bbca16e500b195c1ddd22487fd62ae8be99930e3755a1e170c33"),
    Linux(:x86_64, libc=:glibc) => ("$bin_prefix/gmsh.v4.4.1.x86_64-linux-gnu.tar.gz", "f9bb150e70877ad1c2da1edae697f5275776ffcff9c682f666d58f032c87ae89"),
)

```

But you can download the gmsh SDK:  
[http://gmsh.info/bin/Windows/gmsh-4.4.1-Windows64-sdk.zip](http://gmsh.info/bin/Windows/gmsh-4.4.1-Windows64-sdk.zip)  
Unpack the Zip file to some folder and open the Julia REPL:

```julia
julia> include(raw"d:\YOUR_PATH_TO\gmsh-git-Windows64-sdk\lib\gmsh.jl")
Main.gmsh

julia> gmsh.initialize(ARGS)

julia> gmsh.model.add("sphere_cut")

julia> R = 1
1

julia> R1 = 0.95
0.95

julia> sph = gmsh.model.occ.addSphere(0,0,0, R, -1, 0, pi/2, pi/2)
1

julia> b1 = gmsh.model.occ.addBox(R1,0,0, R,R,R)
2

julia> b2 = gmsh.model.occ.addBox(0,R1,0, R,R,R)
3

julia> b3 = gmsh.model.occ.addBox(0,0,R1, R,R,R)
4

julia> gmsh.model.occ.cut([(3,sph)], [(3,b1), (3,b2), (3,b3)])
(Tuple{Int32,Int32}[(3, 1)], Array{Tuple{Int32,Int32},1}[[(3, 1)], [], [], []])

julia> gmsh.model.occ.synchronize()

julia>

julia> gmsh.model.removeEntities([(3,sph)])

julia> gmsh.model.removeEntities([(2,2), (2,4), (2,6)], true)

julia> gmsh.fltk.run()

```

The last command opens the gmsh GUI with the 3D sphere model.  
The commands are taken from file  
d:\YOUR\_PATH\_TO\gmsh-git-Windows64-sdk\share\doc\gmsh\demos\api\spherical\_surf.jl

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [November 3, 2019, 3:23pm UTC](https://discourse.julialang.org/t/failure-to-add-package-gmsh/30652/6 "2019-11-03T15:23:30Z")

</div>

And there is something which may also help:  
[https://github.com/JuliaFEM/Gmsh.jl/issues/4](https://github.com/JuliaFEM/Gmsh.jl/issues/4)

---

<div class="post-metadata">

**Author:** ![egcjm](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@egcjm](https://discourse.julialang.org/u/egcjm)\
**Post date:** [November 3, 2019, 4:44pm UTC](https://discourse.julialang.org/t/failure-to-add-package-gmsh/30652/7 "2019-11-03T16:44:27Z")

</div>

THANKS. This worked.  
I’m afraid the “directly download Gmsh SDK” route is beyond my grasp…

---

<div class="post-metadata">

**Author:** ![NickLucido](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nicklucido/32/17928_2.png) [@NickLucido](https://discourse.julialang.org/u/NickLucido)\
**Post date:** [September 21, 2020, 9:27pm UTC](https://discourse.julialang.org/t/failure-to-add-package-gmsh/30652/8 "2020-09-21T21:27:15Z")

</div>

Has a new method for handling this issue on windows come about in the past year? I was able to bypass the issue by using the “include…” method, but it would be nice if something like “] add Gmsh” just worked.

I’m considering using Julia and gmsh for some small projects, but I would like my colleagues to be able easily reproduce code.

Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![marteaua](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marteaua/32/214927_2.png) [@marteaua](https://discourse.julialang.org/u/marteaua)\
**Post date:** [May 23, 2022, 7:11am UTC](https://discourse.julialang.org/t/failure-to-add-package-gmsh/30652/9 "2022-05-23T07:11:23Z")

</div>

Now Gmsh 4.10 was compiled with BinaryBuilder.jl on all supported platforms (windows included), with open cascade and FLTK, and is available in the gmsh\_jll package. So :

```julia
]add gmsh_jll
using gmsh_jll
include(gmsh_jll.gmsh_api)

```

should do what you wanted.

---

<div class="post-metadata">

**Author:** ![ovanvincq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ovanvincq/32/31869_2.png) [@ovanvincq](https://discourse.julialang.org/u/ovanvincq)\
**Post date:** [April 3, 2024, 9:49am UTC](https://discourse.julialang.org/t/failure-to-add-package-gmsh/30652/10 "2024-04-03T09:49:22Z")

</div>

I am currently unable to install simultaneously Gmsh.jl version 0.3 and MUMPS.jl version 1.4.

The problem is the dependency on SCOTCH\_jll.jl:

- MUMPS@1.4 requires SCOTCH\_jll@7.0.4 (this is specified in the compat section of the file project.toml of MUMPS\_jll.jl)
- Gmsh@0.3 requires MMG\_jll.jl version 5.6 and, when installing MMG\_jll@5.6, Pkg downgrades SCOTCH\_jll to version 6.1.3 (I don’t understand why since the version of SCOTCH\_jll is not specified in the project.toml file of MGG\_jll).

Does anyone have a solution?
