Try taking out the `-Wl,--no-as-needed`. the fake-gcc OS X toolchain
doesn't support it.

Not sure what's up with the first error though -- did you check permissions?

(ps: gist.github.com would be good to use for the full log output next
time, as this email is a bit unwieldy)

On Mon, May 18, 2015 at 6:57 PM, Ben Ward <[email protected]> wrote:

> Trying to build an executable from a basic script currently fails for me
> on OS X:
>
> Bens-MacBook-Pro:~ axolotlfan9250$ cat test.jl
>
> function main()
>
>         println("Hi")
>
>         println(1 + 1)
>
> end
>
> Bens-MacBook-Pro:~ axolotlfan9250$ julia julia/contrib/build_executable.jl
> testexec test.jl --force
>
> running: /Users/axolotlfan9250/julia/usr/bin/julia /Users/axolotlfan9250/
> julia/contrib/build_sysimg.jl /Users/axolotlfan9250/julia/usr/lib/libtestexec
> native /var/folders/1b/z19zbnq14416krlr623thd1r0000gn/T/tmpPe42mu/userimg.jl
> --force
>
> INFO: Building sys0.o...
>
> /Users/axolotlfan9250/julia/usr/bin/julia -C native --build /Users/
> axolotlfan9250/julia/usr/lib/sys0 sysimg.jl
>
> exports.jl
>
> base.jl
>
> reflection.jl
>
> build_h.jl
>
> version_git.jl
>
> c.jl
>
> options.jl
>
> promotion.jl
>
> tuple.jl
>
> range.jl
>
> expr.jl
>
> error.jl
>
> bool.jl
>
> number.jl
>
> int.jl
>
> operators.jl
>
> pointer.jl
>
> refpointer.jl
>
> rounding.jl
>
> float.jl
>
> complex.jl
>
> rational.jl
>
> abstractarray.jl
>
> subarray.jl
>
> array.jl
>
> subarray2.jl
>
> functors.jl
>
> bitarray.jl
>
> intset.jl
>
> dict.jl
>
> set.jl
>
> hashing.jl
>
> iterator.jl
>
> simdloop.jl
>
> reduce.jl
>
> inference.jl
>
> osutils.jl
>
> char.jl
>
> ascii.jl
>
> utf8.jl
>
> utf16.jl
>
> utf32.jl
>
> iobuffer.jl
>
> string.jl
>
> utf8proc.jl
>
> regex.jl
>
> pcre.jl
>
> base64.jl
>
> io.jl
>
> iostream.jl
>
> libc.jl
>
> libdl.jl
>
> env.jl
>
> path.jl
>
> intfuncs.jl
>
> nullable.jl
>
> task.jl
>
> lock.jl
>
> show.jl
>
> stream.jl
>
> uv_constants.jl
>
> socket.jl
>
> stat.jl
>
> fs.jl
>
> process.jl
>
> multimedia.jl
>
> grisu.jl
>
> file.jl
>
> methodshow.jl
>
> floatfuncs.jl
>
> math.jl
>
> float16.jl
>
> cartesian.jl
>
> multidimensional.jl
>
> primes.jl
>
> reducedim.jl
>
> ordering.jl
>
> collections.jl
>
> sort.jl
>
> version.jl
>
> gmp.jl
>
> mpfr.jl
>
> combinatorics.jl
>
> hashing2.jl
>
> dSFMT.jl
>
> random.jl
>
> printf.jl
>
> meta.jl
>
> Enums.jl
>
> serialize.jl
>
> multi.jl
>
> managers.jl
>
> loading.jl
>
> poll.jl
>
> mmap.jl
>
> sharedarray.jl
>
> datafmt.jl
>
> deepcopy.jl
>
> interactiveutil.jl
>
> replutil.jl
>
> test.jl
>
> i18n.jl
>
> help.jl
>
> Terminals.jl
>
> LineEdit.jl
>
> REPLCompletions.jl
>
> REPL.jl
>
> client.jl
>
> markdown/Markdown.jl
>
> docs.jl
>
> util.jl
>
> linalg.jl
>
> broadcast.jl
>
> statistics.jl
>
> sparse.jl
>
> fftw.jl
>
> dsp.jl
>
> sysinfo.jl
>
> constants.jl
>
> quadgk.jl
>
> fastmath.jl
>
> pkg.jl
>
> profile.jl
>
> Dates.jl
>
> deprecated.jl
>
> basedocs.jl
>
> precompile.jl
>
> INFO: Building sys.o...
>
> /Users/axolotlfan9250/julia/usr/bin/julia -C native --build /Users/
> axolotlfan9250/julia/usr/lib/libtestexec -J /Users/axolotlfan9250/julia/
> usr/lib/sys0.ji -f sysimg.jl
>
> exports.jl
>
> base.jl
>
> reflection.jl
>
> build_h.jl
>
> version_git.jl
>
> c.jl
>
> options.jl
>
> promotion.jl
>
> tuple.jl
>
> range.jl
>
> expr.jl
>
> error.jl
>
> bool.jl
>
> number.jl
>
> int.jl
>
> operators.jl
>
> pointer.jl
>
> refpointer.jl
>
> rounding.jl
>
> float.jl
>
> complex.jl
>
> rational.jl
>
> abstractarray.jl
>
> subarray.jl
>
> array.jl
>
> subarray2.jl
>
> functors.jl
>
> bitarray.jl
>
> intset.jl
>
> dict.jl
>
> set.jl
>
> hashing.jl
>
> iterator.jl
>
> simdloop.jl
>
> reduce.jl
>
> inference.jl
>
> osutils.jl
>
> char.jl
>
> ascii.jl
>
> utf8.jl
>
> utf16.jl
>
> utf32.jl
>
> iobuffer.jl
>
> string.jl
>
> utf8proc.jl
>
> regex.jl
>
> pcre.jl
>
> base64.jl
>
> io.jl
>
> iostream.jl
>
> libc.jl
>
> libdl.jl
>
> env.jl
>
> path.jl
>
> intfuncs.jl
>
> nullable.jl
>
> task.jl
>
> lock.jl
>
> show.jl
>
> stream.jl
>
> uv_constants.jl
>
> socket.jl
>
> stat.jl
>
> fs.jl
>
> process.jl
>
> multimedia.jl
>
> grisu.jl
>
> file.jl
>
> methodshow.jl
>
> floatfuncs.jl
>
> math.jl
>
> float16.jl
>
> cartesian.jl
>
> multidimensional.jl
>
> primes.jl
>
> reducedim.jl
>
> ordering.jl
>
> collections.jl
>
> sort.jl
>
> version.jl
>
> gmp.jl
>
> mpfr.jl
>
> combinatorics.jl
>
> hashing2.jl
>
> dSFMT.jl
>
> random.jl
>
> printf.jl
>
> meta.jl
>
> Enums.jl
>
> serialize.jl
>
> multi.jl
>
> managers.jl
>
> loading.jl
>
> poll.jl
>
> mmap.jl
>
> sharedarray.jl
>
> datafmt.jl
>
> deepcopy.jl
>
> interactiveutil.jl
>
> replutil.jl
>
> test.jl
>
> i18n.jl
>
> help.jl
>
> Terminals.jl
>
> LineEdit.jl
>
> REPLCompletions.jl
>
> REPL.jl
>
> client.jl
>
> markdown/Markdown.jl
>
> docs.jl
>
> util.jl
>
> linalg.jl
>
> broadcast.jl
>
> statistics.jl
>
> sparse.jl
>
> fftw.jl
>
> dsp.jl
>
> sysinfo.jl
>
> constants.jl
>
> quadgk.jl
>
> fastmath.jl
>
> pkg.jl
>
> profile.jl
>
> Dates.jl
>
> deprecated.jl
>
> basedocs.jl
>
> precompile.jl
>
> INFO: Linking sys.dylib
>
> ld: can't write output file:
> /Users/axolotlfan9250/julia/usr/lib/libtestexec.dylib for inferred
> architecture x86_64
>
> ERROR: LoadError: failed process: Process(`ld
> -L/Users/axolotlfan9250/julia/usr/lib -dylib -undefined dynamic_lookup
> -macosx_version_min 10.7 -o
> /Users/axolotlfan9250/julia/usr/lib/libtestexec.dylib
> /Users/axolotlfan9250/julia/usr/lib/libtestexec.o`, ProcessExited(1)) [1]
>
>  in run at /Users/axolotlfan9250/julia/usr/lib/julia/sys.dylib
>
>  in link_sysimg at /Users/axolotlfan9250/julia/contrib/build_sysimg.jl:135
>
>  in anonymous at /Users/axolotlfan9250/julia/contrib/build_sysimg.jl:61
>
>  in cd at ./file.jl:22
>
>  in build_sysimg at /Users/axolotlfan9250/julia/contrib/build_sysimg.jl:27
>
>  in include at ./boot.jl:252
>
>  in include_from_node1 at loading.jl:134
>
>  in process_options at ./client.jl:310
>
>  in _start at ./client.jl:409
>
> while loading /Users/axolotlfan9250/julia/contrib/build_sysimg.jl, in
> expression starting on line 168
>
>
>
> ERROR: LoadError: failed process:
> Process(`/Users/axolotlfan9250/julia/usr/bin/julia
> /Users/axolotlfan9250/julia/contrib/build_sysimg.jl
> /Users/axolotlfan9250/julia/usr/lib/libtestexec native
> /var/folders/1b/z19zbnq14416krlr623thd1r0000gn/T/tmpPe42mu/userimg.jl
> --force`, ProcessExited(1)) [1]
>
>  in run at /Users/axolotlfan9250/julia/usr/lib/julia/sys.dylib
>
>  in build_executable at
> /Users/axolotlfan9250/julia/contrib/build_executable.jl:109
>
>  in build_executable at
> /Users/axolotlfan9250/julia/contrib/build_executable.jl:58
>
>  in include at ./boot.jl:252
>
>  in include_from_node1 at loading.jl:134
>
>  in process_options at ./client.jl:310
>
>  in _start at ./client.jl:409
>
> while loading /Users/axolotlfan9250/julia/contrib/build_executable.jl, in
> expression starting on line 277
>
> If I use sudo to account for the error writing to file, I still hit a
> problem:
>
> running: gcc -g -Wl,--no-as-needed `` -I/Users/axolotlfan9250/julia/usr/
> include/julia -I/Users/axolotlfan9250/julia/src -I/Users/axolotlfan9250/
> julia/src/support -I/Users/axolotlfan9250/julia/usr/include /var/tmp/
> tmpd8vXBR/start_func.c -o /Users/axolotlfan9250/julia/usr/bin/testexec -Wl
> ,-rpath,/Users/axolotlfan9250/julia/usr/lib -L/Users/axolotlfan9250/julia/
> usr/lib -ljulia -ltestexec
>
> ld: unknown option: --no-as-needed
>
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
>
> ERROR: LoadError: failed process: Process(setenv(`gcc -g
> -Wl,--no-as-needed -I/Users/axolotlfan9250/julia/usr/include/julia
> -I/Users/axolotlfan9250/julia/src -I/Users/axolotlfan9250/julia/src/support
> -I/Users/axolotlfan9250/julia/usr/include /var/tmp/tmpd8vXBR/start_func.c
> -o /Users/axolotlfan9250/julia/usr/bin/testexec
> -Wl,-rpath,/Users/axolotlfan9250/julia/usr/lib
> -L/Users/axolotlfan9250/julia/usr/lib -ljulia -ltestexec`,Union(
> ASCIIString,UTF8String)["TERM=xterm-256color",
> "SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.LbHmKXZDwD/Listeners",
> "__CF_USER_TEXT_ENCODING=0x0:0:0",
> "PATH=/usr/local/share/python:/Users/axolotlfan9250/perl5/perlbrew/bin:/Users/axolotlfan9250/perl5/perlbrew/perls/perl-5.19.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/axolotlfan9250/julia/"
> ,"LANG=en_GB.UTF-8","HOME=/Users/axolotlfan9250",
> "DISPLAY=/private/tmp/com.apple.launchd.LK8fR5eLSf/org.macosforge.xquartz:0"
> ,"SHELL=/bin/bash","MAIL=/var/mail/root","LOGNAME=root","USER=root",
> "USERNAME=root","SUDO_COMMAND=/Users/axolotlfan9250/julia//julia
> julia/contrib/build_executable.jl testexec test.jl --force",
> "SUDO_USER=axolotlfan9250","SUDO_UID=501","SUDO_GID=20",
> "OPENBLAS_MAIN_FREE=1"]), ProcessExited(1)) [1]
>
>  in run at /Users/axolotlfan9250/julia/usr/lib/julia/sys.dylib
>
>  in build_executable at /Users/axolotlfan9250/julia/contrib/
> build_executable.jl:129
>
>  in build_executable at /Users/axolotlfan9250/julia/contrib/
> build_executable.jl:58
>
>  in include at ./boot.jl:252
>
>  in include_from_node1 at loading.jl:134
>
>  in process_options at ./client.jl:310
>
>  in _start at ./client.jl:409
>
> while loading /Users/axolotlfan9250/julia/contrib/build_executable.jl, in
> expression starting on line 277
>
>
>

Reply via email to