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

Building Error in Windows #13

Closed
mes9 opened this issue Jul 13, 2016 · 13 comments
Closed

Building Error in Windows #13

mes9 opened this issue Jul 13, 2016 · 13 comments

Comments

@mes9
Copy link

mes9 commented Jul 13, 2016

When I try to build the GLMNet.jl it tells me that the file is not found. I dug around and it looks like the problem is inside the build.jl file:

pic = @windows ? "" : "-fPIC"
run(`gfortran -m$WORD_SIZE -fdefault-real-8 -ffixed-form $pic -shared -O3 glmnet5.f90 -o libglmnet.so`)

and when the run( ) line is read, under windows it will change $pic to '' instead of an actual blank, which messes up the build. When I removed the $pic from that line, it built fine

@simonbyrne
Copy link
Member

Supposedly mingw is available on appveyor, perhaps it is worth enabling it?

simonbyrne added a commit that referenced this issue Nov 16, 2016
@mogit
Copy link

mogit commented Sep 22, 2017

Hey. I was trying to build GLMNet for Julia on Windows and I get following errors .

julia

@amellnik
Copy link

@mogit You can install gfortran via Msys2 by following the instructions here: https://github.com/orlp/dev-on-windows/wiki/Installing-GCC--&-MSYS2

@raphaelsaavedra
Copy link

Hello,

I'm facing the exact same problem as @mogit. I have tried @amellnik's solution but it hasn't produced any change in the error.

@amellnik
Copy link

@raphaelsaavedra Did you also add the location of gfortran.exe to your path? It's something like C:\msys64\mingw64\bin.

@raphaelsaavedra
Copy link

Hey @amellnik, thanks for the quick answer. Yes, I have added the location of both mingw64 and 32 to my path.

When trying to run gfortran on MinGW, the following error occurs:

image

I have followed all instructions in the link you provided before. I'll also add I'm working on Windows 7. My friend who has a mac had no issues.

@amellnik
Copy link

That's expected. You should see the same thing if you run it from powershell/cmd in windows if you also added it to the windows (not Msys2) path. If that's the case then you should be able to run julia and try to add GLMNet again.

@raphaelsaavedra
Copy link

@amellnik I managed to make it work by running Julia as administrator. Apparently my user did not have the necessary permissions to run gfortran while building GLMNet? Either way thank you for the help.

@Jacob-Stevens-Haas
Copy link

@amellnik Thanks! I had the same problem, and the same solution.

@RuilinOuyang
Copy link

Hello @amellnik,
I'm also having the same problem as @mogit, but I'm using a Mac. Is there any suggestions? Thank you!

@amellnik
Copy link

Hi @RuilinOuyang -- as it happens I just became a Mac user myself. You can install gfortran via Homebrew with brew install gcc and everything should work fine after that.

@RuilinOuyang
Copy link

@amellnik Thank you! I did what you said, it's working now.

@PaulSoderlind
Copy link

Distributing compiled dependencies would be a great help to users.

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

8 participants