Comments (20)
This is a follow up from this reddit post
from buildexecutable.jl.
The issue is that the output of BuildExecutable does not actually load the associated precompiled image, so everything must be JIT'd again before the app can do anything. You can get normal (faster) startup by specifying the image manually:
JULIA_SYSIMAGE=libapp.dylib ./app Hello
(from the build directory, using the build command from your reddit post)
from buildexecutable.jl.
It works! Thank you very much. You may want to consider adding it to the README.
Could this be automatically done by the executable?
P.S.
I'm very new to Julia. Where is the best place to ask questions? Reddit? SO? discourse.julialang.org?
from buildexecutable.jl.
Hi,
I am also very new to Julia (have been using Matlab/Python for many years). I am using Julia 0.5.0 64bit on Windows and have tried to compile a simple program using build_executable, but I have not been successful - the process always breaks with a Load Error:
ERROR: LoadError: failed process: Process('C:\Users\merdmann\.julia\v0.5\WinRPM\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\gcc.exe' '-LC:\Julia-0.5.0\bin' -shared -ljulia -lssp -o 'C:\Julia-0.5.0\bin\libapp.dll' 'C:\Julia-0.5.0\bin\libapp.o'
, ProcessExited(1)) [1]
in pipeline_error(::Base.Process) at .\process.jl:616
in run at .\process.jl:592 [inlined]
in link_sysimg(::String, ::String, ::Bool) at C:\Users\merdmann.julia\v0.5\BuildExecutable\src\build_sysimg.jl:151
in (::##2#3{Bool,String})() at C:\Users\merdmann.julia\v0.5\BuildExecutable\src\build_sysimg.jl:80
in cd(::##2#3{Bool,String}, ::String) at .\file.jl:48
in #build_sysimg#1(::Bool, ::Bool, ::Function, ::String, ::String, ::String) at C:\Users\merdmann.julia\v0.5\BuildExecutable\src\build_sysimg.jl:38
in (::#kw##build_sysimg)(::Array{Any,1}, ::#build_sysimg, ::String, ::String, ::String) at .<missing>:0
in include_from_node1(::String) at .\loading.jl:488
in process_options(::Base.JLOptions) at .\client.jl:262
in _start() at .\client.jl:318
while loading C:\Users\merdmann.julia\v0.5\BuildExecutable\src\build_sysimg.jl, in expression starting on line 187
Would you mind to help me with this problem? Thanks a lot!
from buildexecutable.jl.
Julia just says that the command has failed and does not give more info.
Could you run the command (i.e. C:\Users\merdmann\.julia\v0.5\WinRPM\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\gcc.exe' '-LC:\Julia-0.5.0\bin' -shared -ljulia -lssp -o 'C:\Julia-0.5.0\bin\libapp.dll' 'C:\Julia-0.5.0\bin\libapp.o
) in a terminal and tell us the output ?
from buildexecutable.jl.
Unfortunately, the command does not produce any output - the command syntax seems to be incorrect.
The final Julia error message is:
LoadError: failed process: Process('C:\Julia-0.5.0\bin\julia' 'C:\Users\merdmann\.julia\v0.5\BuildExecutable\src\build_sysimg.jl' 'C:\Julia-0.5.0\bin\libapp' native 'C:\Users\merdmann\AppData\Local\Temp\jl_D63E.tmp\userimg.jl' --force
, ProcessExited(1)) [1]
in pipeline_error(::Base.Process) at .\process.jl:616
in run at .\process.jl:592 [inlined]
in #build_executable#1(::Bool, ::Bool, ::Function, ::String, ::String, ::String, ::String) at C:\Users\merdmann.julia\v0.5\BuildExecutable\src\BuildExecutable.jl:116
in build_executable(::String, ::String, ::String, ::String) at C:\Users\merdmann.julia\v0.5\BuildExecutable\src\BuildExecutable.jl:54
in include_string(::String, ::String) at .\loading.jl:441
in include_string(::Module, ::String, ::String) at C:\Users\merdmann.julia\v0.5\CodeTools\src\eval.jl:32
in (::Atom.##61#64{String,String})() at C:\Users\merdmann.julia\v0.5\Atom\src\eval.jl:81
in withpath(::Atom.##61#64{String,String}, ::String) at C:\Users\merdmann.julia\v0.5\CodeTools\src\utils.jl:30
in withpath(::Function, ::String) at C:\Users\merdmann.julia\v0.5\Atom\src\eval.jl:46
in macro expansion at C:\Users\merdmann.julia\v0.5\Atom\src\eval.jl:79 [inlined]
in (::Atom.##60#63{String,String})() at .\task.jl:60
while loading C:...\julia_sandbox\compilejulia.jl, in expression starting on line 2
My Julia version is 0.5.0 release x86_64-w64-mingw32 - but why mingw32? Does this point to a 64bit/32bit conflict?
from buildexecutable.jl.
What I meant is executing the gcc
command outside julia. If this commands has now output it means that it succeeded. Did you run
gcc.exe '-LC:\Julia-0.5.0\bin' -shared -ljulia -lssp -o 'C:\Julia-0.5.0\bin\libapp.dll' 'C:\Julia-0.5.0\bin\libapp.o
?
from buildexecutable.jl.
Ok - indeed, when leaving out all single quotation marks (but only then),
gcc.exe -LC:\Julia-0.5.0\bin -shared -ljulia -lssp -o C:\Julia-0.5.0\bin\libapp.dll C:\Julia-0.5.0\bin\libapp.o
does succeed (has no output).
from buildexecutable.jl.
Good catch ! Let's see what @dhoegh thinks about it. Could you use the "Insert code" button to format the codes in your posts ? it makes it a lot more readable ;)
from buildexecutable.jl.
Ok, By the way, I just tried compiling under Linux (Ubuntu 16.04) and got a similar error.
from buildexecutable.jl.
@MatthiasErdmann I have looked into the issue you are having and it is not related to this issue. The main issue you are having is probably related to the issue I am displaying below. If I am trying to run the command manually in CMD on windows I get the following error:
@MatthiasErdmann I suspect that when you execute the command manually you use a globally installed GCC while BuildExecutable
uses a local one, installed by WinRPM
in something like C:\Users\d-hoe\.julia\v0.5\WinRPM\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\gcc.exe
.
Do any one have an idea what is causing the build to fail with missing libwinpthread-1.dll
? I suspect it is caused by an newer GCC. Appveyor has just begun failing, while a month old build succeeded.
from buildexecutable.jl.
From http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_Factory/x86_64/ it seems the GCC version was updated 2016-12-30.
from buildexecutable.jl.
Actually, I have used the local gcc installed by WinRPM
- Pkg.add("BuildExecutable") leads to the installation of gcc version 6.3.0 under C:\Users\"me"\.julia\v0.5\WinRPM\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin
.
However, I get no error message concerning libwinpthread-1.dll
. I don't know if this might give hint, but during installation of the BuildExecutable package there is an INFO: "Multiple package candidates found for mingw64-unistd-pthread-devel, picking newest".
from buildexecutable.jl.
Hi,
@MatthiasErdmann, I have the same problem.
You need to path your "C:\Users"me".julia\v0.5\WinRPM\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin" in order to run the libwinpthread-1.dll. But after running, nothing happen.
Seem like the system execute the comment but there are no .exe file generated.
from buildexecutable.jl.
I'm experiencing the same problem as @MatthiasErdmann on Windows. I'll report more details tomorrow.
from buildexecutable.jl.
Good news, I have a fix for the windows issue in #30.
from buildexecutable.jl.
Thank you! Adding the bin dir of the local gcc (C:\Users\"me"\.julia\v0.5\WinRPM\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin
) to $PATH
works for me.
from buildexecutable.jl.
Thanks dhoegh.
from buildexecutable.jl.
I have now changed so BuildExecutable
to use precompiled image in #32. Please do a Pkg.checkout("BuildExecutable")
and verify it fixes the problem.
from buildexecutable.jl.
It works (at least on Mac). Thank you very much for the quick fix!
from buildexecutable.jl.
Related Issues (20)
- Compilation of packages HOT 4
- @windows_only is deprecated in Julia v0.5.0 HOT 2
- Writing to /usr/lib HOT 3
- Whats the point in using inference0? HOT 1
- BuildExecutable use-case question HOT 7
- .juliarc.jl not respected
- Test fails Ubuntu 16 Julia 0.5.2
- Test Failed under julia 0.6
- Fails with "@unix_only not defined" HOT 5
- Adopt approach from JuliaComputing/static-julia? HOT 1
- Tag a new release
- Portable cpu_target on Windows HOT 1
- Build sys.o hangs
- Test failed...
- Wont build with Gtk
- error
- undefined reference to `jl_show' HOT 1
- windows 7 portability issue
- Julia 1.0 Build Error
- Info about upcoming removal of packages in the General registry
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from buildexecutable.jl.