Skip to content
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.

Compilation fails under Windows10 #38

Open
ChristianKurz opened this issue Oct 28, 2017 · 9 comments
Open

Compilation fails under Windows10 #38

ChristianKurz opened this issue Oct 28, 2017 · 9 comments

Comments

@ChristianKurz
Copy link

ChristianKurz commented Oct 28, 2017

I tried using juliac.jl and get this error:

Build object file "hello.o":
`'C:\Users\Christian\AppData\Local\Julia-0.6.1\bin\julia.exe' -Cx86-64 '-JC:\Users\Christian\AppData\Local\Julia-0.6.1\lib\julia\sys.dll' --compile=yes --depwarn=yes --startup-file=no --output-o hello.o -e 'include("C:\\Users\\Christian\
\Documents\\Julia\\static-julia-master\\hello.jl"); push!(Base.LOAD_CACHE_PATH, "C:\\Users\\Christian\\.julia\\lib\\v0.6"); empty!(Base.LOAD_CACHE_PATH)'`
Build shared library "libhello.dll":
`'C:\Users\Christian\.julia\v0.6\WinRPM\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\gcc.exe' -m64 -shared -o libhello.dll hello.o -std=gnu99 '-IC:\Users\Christian\AppData\Local\Julia-0.6.1\include\julia' -DJULIA_ENABLE_THREADING=1 '-L
C:\Users\Christian\AppData\Local\Julia-0.6.1\bin' -Wl,--stack,8388608 -ljulia -lopenlibm -Wl,--export-all-symbols`
Build executable file "hello.exe":
`'C:\Users\Christian\.julia\v0.6\WinRPM\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\gcc.exe' -m64 -o hello.exe 'C:\Users\Christian\Documents\Julia\static-julia-master\program.c' libhello.dll -std=gnu99 '-IC:\Users\Christian\AppData\Lo
cal\Julia-0.6.1\include\julia' -DJULIA_ENABLE_THREADING=1 '-LC:\Users\Christian\AppData\Local\Julia-0.6.1\bin' -Wl,--stack,8388608 -ljulia -lopenlibm`
ERROR: LoadError: failed process: Process(`'C:\Users\Christian\.julia\v0.6\WinRPM\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\gcc.exe' -m64 -o hello.exe 'C:\Users\Christian\Documents\Julia\static-julia-master\program.c' libhello.dll -
std=gnu99 '-IC:\Users\Christian\AppData\Local\Julia-0.6.1\include\julia' -DJULIA_ENABLE_THREADING=1 '-LC:\Users\Christian\AppData\Local\Julia-0.6.1\bin' -Wl,--stack,8388608 -ljulia -lopenlibm`, ProcessExited(1)) [1]
Stacktrace:
 [1] pipeline_error(::Base.Process) at .\process.jl:682
 [2] run(::Cmd) at .\process.jl:651
 [3] julia_compile(::String, ::String, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at C:\Users\Christian\Documents\Julia\static-julia-master\juliac.jl:171
 [4] main(::Array{String,1}) at C:\Users\Christian\Documents\Julia\static-julia-master\juliac.jl:52
 [5] include_from_node1(::String) at .\loading.jl:576
 [6] include(::String) at .\sysimg.jl:14
 [7] process_options(::Base.JLOptions) at .\client.jl:305
 [8] _start() at .\client.jl:371
while loading C:\Users\Christian\Documents\Julia\static-julia-master\juliac.jl, in expression starting on line 215

MinGW was installed using WinRPM, i hardcoded the path to gcc.exe as my system could not find it otherwise.
Any idea what i am doing wrong?

@joaquimg
Copy link

I use x86_64-w64-mingw32-gcc on windows and it works just fine. Note that it is different from gcc.

@lucatrv
Copy link
Contributor

lucatrv commented Oct 31, 2017

Please follow these instructions to install the x86_64-w64-mingw32-gcc compiler with Cygwin.

@SimonDanisch
Copy link

Any idea what the reason is for this and if it's solvable? Would be nice to be able to use the gcc from WinRPM, to get automatic installation of gcc on windows working.

@SimonDanisch
Copy link

Ah fixed it I think! I will fix this in JuliaLang/PackageCompiler.jl#18

@ViralBShah
Copy link
Member

Awesome to see efforts unite with PackageCompiler.jl and this project. We should find a more general home. Perhaps in JuliaLang.

@lucatrv
Copy link
Contributor

lucatrv commented Feb 13, 2018

I was just working on adding WinRPM support to static-julia, maybe I should stop and go ahead after it is merged into PackageCompiler.jl?
@ViralBShah there is still PR #60 to merge (which allows to specify builddir without cprog), should I close it and open a new one on PackageCompiler.jl?

@ViralBShah
Copy link
Member

@SimonDanisch Any preferences? I suspect it is better to work on PackageCompiler.jl going forward.

@SimonDanisch
Copy link

sounds good to me!

@lucatrv
Copy link
Contributor

lucatrv commented Feb 15, 2018

I closed PR #60, I am going to open next PRs on PackageCompiler.jl.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants