JuliaLang / PackageCompiler.jl

Compile your Julia Package
https://julialang.github.io/PackageCompiler.jl/dev/
MIT License
1.43k stars 193 forks source link

Error using `create_app`: 'uv.h' not found (on OSX) #361

Closed kmsquire closed 4 years ago

kmsquire commented 4 years ago

TL;DR: create_app is erroring for me using the official Julia 1.3.1 binaries, saying that it can't find uv.h (#included in src/embedding_wrapper.c, line 9).

/Applications/Julia-1.3.app/Contents/Resources/julia/include/julia is properly included in the file path, but strangely (to me) there are no header files in there. Are they supposed to be included in the official binary distributions?


Context: my computer died, so I started from a fresh install of Julia 1.3.1 using the official binaries. It worked fine on my previous system, also (as far as I remember) using the official binaries.

$ julia -e 'using PackageCompiler; create_app(".", "./build", app_name = "collect_samples", precompile_statements_file = "precompile/precompile.jl", force=true)'
[ Info: PackageCompiler: creating base system image (incremental=false)...
[ Info: PackageCompiler: creating system image object file, this might take a while...
[ Info: PackageCompiler: creating system image object file, this might take a while...
/Users/kevinsquire/.julia/packages/PackageCompiler/Bb58w/src/embedding_wrapper.c:9:10: fatal error: 'uv.h' file not found
#include "uv.h"
         ^~~~~~
1 error generated.
ERROR: failed process: Process(`gcc '-DJULIAC_PROGRAM_LIBNAME="collect_samples.dylib"' -m64 -march=x86-64 -o collect_samples /Users/kevinsquire/.julia/packages/PackageCompiler/Bb58w/src/embedding_wrapper.c collect_samples.dylib -O2 -Wl,-rpath,@executable_path -Wl,-rpath,@executable_path/../lib -std=gnu99 -I/Applications/Julia-1.3.app/Contents/Resources/julia/include/julia -fPIC -L/Applications/Julia-1.3.app/Contents/Resources/julia/lib -ljulia`, ProcessExited(1)) [1]

Stacktrace:
 [1] pipeline_error at ./process.jl:525 [inlined]
 [2] #run#565(::Bool, ::typeof(run), ::Cmd) at ./process.jl:440
 [3] run at ./process.jl:438 [inlined]
 [4] run_with_env at /Users/kevinsquire/.julia/packages/PackageCompiler/Bb58w/src/PackageCompiler.jl:93 [inlined]
 [5] #create_executable_from_sysimg#9(::String, ::String, ::typeof(PackageCompiler.create_executable_from_sysimg)) at /Users/kevinsquire/.julia/packages/PackageCompiler/Bb58w/src/PackageCompiler.jl:672
 [6] (::PackageCompiler.var"#kw##create_executable_from_sysimg")(::NamedTuple{(:sysimage_path, :executable_path),Tuple{String,String}}, ::typeof(PackageCompiler.create_executable_from_sysimg)) at ./none:0
 [7] (::PackageCompiler.var"#7#8"{Bool,Bool,String,String,String})() at /Users/kevinsquire/.julia/packages/PackageCompiler/Bb58w/src/PackageCompiler.jl:646
 [8] cd(::PackageCompiler.var"#7#8"{Bool,Bool,String,String,String}, ::String) at ./file.jl:104
 [9] #create_app#6(::String, ::Array{String,1}, ::String, ::Bool, ::Bool, ::Bool, ::Bool, ::String, ::typeof(create_app), ::String, ::String) at /Users/kevinsquire/.julia/packages/PackageCompiler/Bb58w/src/PackageCompiler.jl:620
 [10] (::PackageCompiler.var"#kw##create_app")(::NamedTuple{(:app_name, :precompile_statements_file, :force),Tuple{String,String,Bool}}, ::typeof(create_app), ::String, ::String) at ./none:0
 [11] top-level scope at none:1
make: *** [build/bin/collect_samples] Error 1

$ find /Applications/Julia-1.3.app/Contents/Resources/julia/include/julia
/Applications/Julia-1.3.app/Contents/Resources/julia/include/julia
/Applications/Julia-1.3.app/Contents/Resources/julia/include/julia/uv
julia> versioninfo()
Julia Version 1.3.1
Commit 2d5741174c (2019-12-30 21:36 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.6.0)
  CPU: Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, haswell)
kmsquire commented 4 years ago

Okay, nevermind. Redownloaded the official binaries, and the header files are back.