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

build fails on Mac OS X #17460

Closed
josefsachsconning opened this issue Jul 16, 2016 · 14 comments
Closed

build fails on Mac OS X #17460

josefsachsconning opened this issue Jul 16, 2016 · 14 comments
Labels
building Build system, or building Julia or its dependencies system:mac Affects only macOS

Comments

@josefsachsconning
Copy link
Contributor

After make cleanall. My last successful build was at 1fd440e.

libgit2/libgit2.jl
LoadError("sysimg.jl",324,LoadError("libgit2/libgit2.jl",13,LoadError("libgit2/consts.jl",282,ErrorException("error compiling version: could not load library \"libgit2\"\ndlopen(libgit2.dylib, 1): Library not loaded: libssh2.1.dylib\n  Referenced from: /Users/sachs/src/julia-master/usr/lib//libgit2.dylib\n  Reason: image not found"))))
*** This error is usually fixed by running `make clean`. If the error persists, try `make cleanall`. ***
make[1]: *** [/Users/sachs/src/julia-master/usr/lib/julia/sys.o] Error 1
make: *** [julia-sysimg-release] Error 2
@andreasnoack
Copy link
Member

Try make -C deps distclean-libgit2. For some reason, I sometimes have to do that with libgit2.

@josefsachsconning
Copy link
Contributor Author

I tried that, and I still get the same error.

@rsrock
Copy link
Member

rsrock commented Jul 17, 2016

Same problem here. Probably #17391, which is something I wanted to test.

@tkelman tkelman added building Build system, or building Julia or its dependencies system:mac Affects only macOS labels Jul 17, 2016
@tkelman
Copy link
Contributor

tkelman commented Jul 17, 2016

can you do

ls -al usr/lib
otool -L usr/lib/libgit2.dylib
otool -L usr/lib/libssh2.dylib
otool -L usr/lib/libmbed*.dylib

@tkelman
Copy link
Contributor

tkelman commented Jul 17, 2016

looks like there are some bugs in the makefiles or bad cmake settings, ref https://build.julialang.org/builders/package_tarball64/builds/648/steps/make%20binary-dist/logs/stdio - the prefix probably needs to be an absolute path

will take a look and see if it fixes this too

@josefsachsconning
Copy link
Contributor Author

josefsachsconning commented Jul 17, 2016

mbp1% ls -al usr/lib
total 260408
drwxr-xr-x  113 sachs  staff      3842 Jul 16 21:14 .
drwxr-xr-x   10 sachs  staff       340 Jul 16 21:14 ..
-rwxr-xr-x    1 sachs  staff     13952 Jul 16 20:30 BugpointPasses.dylib
-rwxr-xr-x    1 sachs  staff     12208 Jul 16 20:30 LLVMHello.dylib
drwxr-xr-x    3 sachs  staff       102 Jul 16 21:09 cmake
drwxr-xr-x    3 sachs  staff       102 Jul 16 21:15 julia
lrwxr-xr-x    1 sachs  staff        17 Jul 16 20:30 libLLVM-3.7.1.dylib -> libLLVM-3.7.dylib
-rwxr-xr-x    1 sachs  staff  20890080 Jul 16 20:30 libLLVM-3.7.dylib
-rwxr-xr-x    1 sachs  staff   2573144 Jul 16 20:30 libLLVMAnalysis.a
-rwxr-xr-x    1 sachs  staff    363512 Jul 16 20:30 libLLVMAsmParser.a
-rwxr-xr-x    1 sachs  staff    641784 Jul 16 20:30 libLLVMAsmPrinter.a
-rwxr-xr-x    1 sachs  staff    224656 Jul 16 20:30 libLLVMBitReader.a
-rwxr-xr-x    1 sachs  staff    208144 Jul 16 20:30 libLLVMBitWriter.a
-rwxr-xr-x    1 sachs  staff   3943808 Jul 16 20:30 libLLVMCodeGen.a
-rwxr-xr-x    1 sachs  staff   3133016 Jul 16 20:30 libLLVMCore.a
-rwxr-xr-x    1 sachs  staff    281248 Jul 16 20:30 libLLVMDebugInfoDWARF.a
-rwxr-xr-x    1 sachs  staff    168128 Jul 16 20:30 libLLVMDebugInfoPDB.a
-rwxr-xr-x    1 sachs  staff    136472 Jul 16 20:30 libLLVMExecutionEngine.a
-rwxr-xr-x    1 sachs  staff     12744 Jul 16 20:30 libLLVMIRReader.a
-rwxr-xr-x    1 sachs  staff   1030936 Jul 16 20:30 libLLVMInstCombine.a
-rwxr-xr-x    1 sachs  staff    662520 Jul 16 20:30 libLLVMInstrumentation.a
-rwxr-xr-x    1 sachs  staff    261592 Jul 16 20:30 libLLVMInterpreter.a
-rwxr-xr-x    1 sachs  staff     74280 Jul 16 20:30 libLLVMLTO.a
-rwxr-xr-x    1 sachs  staff     12920 Jul 16 20:30 libLLVMLibDriver.a
-rwxr-xr-x    1 sachs  staff      9520 Jul 16 20:30 libLLVMLineEditor.a
-rwxr-xr-x    1 sachs  staff     93920 Jul 16 20:30 libLLVMLinker.a
-rwxr-xr-x    1 sachs  staff    703096 Jul 16 20:30 libLLVMMC.a
-rwxr-xr-x    1 sachs  staff     22520 Jul 16 20:30 libLLVMMCDisassembler.a
-rwxr-xr-x    1 sachs  staff     42936 Jul 16 20:30 libLLVMMCJIT.a
-rwxr-xr-x    1 sachs  staff    270168 Jul 16 20:30 libLLVMMCParser.a
-rwxr-xr-x    1 sachs  staff    105672 Jul 16 20:30 libLLVMMIRParser.a
-rwxr-xr-x    1 sachs  staff    183048 Jul 16 20:30 libLLVMObjCARCOpts.a
-rwxr-xr-x    1 sachs  staff    634032 Jul 16 20:30 libLLVMObject.a
-rwxr-xr-x    1 sachs  staff     58768 Jul 16 20:30 libLLVMOption.a
-rwxr-xr-x    1 sachs  staff    148504 Jul 16 20:30 libLLVMOrcJIT.a
-rwxr-xr-x    1 sachs  staff    254280 Jul 16 20:30 libLLVMPasses.a
-rwxr-xr-x    1 sachs  staff    185000 Jul 16 20:30 libLLVMProfileData.a
-rwxr-xr-x    1 sachs  staff    391504 Jul 16 20:30 libLLVMRuntimeDyld.a
-rwxr-xr-x    1 sachs  staff   2164864 Jul 16 20:30 libLLVMScalarOpts.a
-rwxr-xr-x    1 sachs  staff   2647696 Jul 16 20:30 libLLVMSelectionDAG.a
-rwxr-xr-x    1 sachs  staff   1291104 Jul 16 20:30 libLLVMSupport.a
-rwxr-xr-x    1 sachs  staff    403720 Jul 16 20:30 libLLVMTableGen.a
-rwxr-xr-x    1 sachs  staff     68536 Jul 16 20:30 libLLVMTarget.a
-rwxr-xr-x    1 sachs  staff   1148064 Jul 16 20:30 libLLVMTransformUtils.a
-rwxr-xr-x    1 sachs  staff    500024 Jul 16 20:30 libLLVMVectorize.a
-rwxr-xr-x    1 sachs  staff    617384 Jul 16 20:30 libLLVMX86AsmParser.a
-rwxr-xr-x    1 sachs  staff    279016 Jul 16 20:30 libLLVMX86AsmPrinter.a
-rwxr-xr-x    1 sachs  staff   2233656 Jul 16 20:30 libLLVMX86CodeGen.a
-rwxr-xr-x    1 sachs  staff   1571192 Jul 16 20:30 libLLVMX86Desc.a
-rwxr-xr-x    1 sachs  staff   1452784 Jul 16 20:30 libLLVMX86Disassembler.a
-rwxr-xr-x    1 sachs  staff      2120 Jul 16 20:30 libLLVMX86Info.a
-rwxr-xr-x    1 sachs  staff     18864 Jul 16 20:30 libLLVMX86Utils.a
-rwxr-xr-x    1 sachs  staff    175984 Jul 16 20:30 libLLVMipa.a
-rwxr-xr-x    1 sachs  staff    677344 Jul 16 20:30 libLLVMipo.a
-rwxr-xr-x    1 sachs  staff    123856 Jul 16 20:30 libLTO.a
-rwxr-xr-x    1 sachs  staff     86264 Jul 16 20:30 libLTO.dylib
-rwxr-xr-x    1 sachs  staff    350120 Jul 16 21:11 libarpack.2.dylib
-rw-r--r--    1 sachs  staff    488248 Jul 16 21:11 libarpack.a
lrwxr-xr-x    1 sachs  staff        17 Jul 16 21:11 libarpack.dylib -> libarpack.2.dylib
-rwxr-xr-x    1 sachs  staff      1023 Jul 16 21:11 libarpack.la
-rwxr-xr-x    1 sachs  staff     18508 Jul 16 19:58 libdSFMT.dylib
-rwxr-xr-x    1 sachs  staff    831276 Jul 16 21:13 libgit2.0.24.0.dylib
lrwxr-xr-x    1 sachs  staff        20 Jul 16 21:13 libgit2.24.dylib -> libgit2.0.24.0.dylib
lrwxr-xr-x    1 sachs  staff        16 Jul 16 21:13 libgit2.dylib -> libgit2.24.dylib
-rwxr-xr-x    1 sachs  staff    487644 Jul 16 21:07 libgmp.10.dylib
lrwxr-xr-x    1 sachs  staff        15 Jul 16 21:07 libgmp.dylib -> libgmp.10.dylib
-rwxr-xr-x    1 sachs  staff   2422144 Jul 16 21:14 libjulia.0.5.0.dylib
drwxr-xr-x    3 sachs  staff       102 Jul 16 21:14 libjulia.0.5.0.dylib.dSYM
lrwxr-xr-x    1 sachs  staff        20 Jul 16 21:14 libjulia.0.5.dylib -> libjulia.0.5.0.dylib
lrwxr-xr-x    1 sachs  staff        20 Jul 16 21:14 libjulia.dylib -> libjulia.0.5.0.dylib
lrwxr-xr-x    1 sachs  staff        25 Jul 16 21:09 libmbedcrypto.0.dylib -> libmbedcrypto.2.2.1.dylib
-rwxr-xr-x    1 sachs  staff    330368 Jul 16 21:09 libmbedcrypto.2.2.1.dylib
-rw-r--r--    1 sachs  staff    470448 Jul 16 21:09 libmbedcrypto.a
lrwxr-xr-x    1 sachs  staff        21 Jul 16 21:09 libmbedcrypto.dylib -> libmbedcrypto.0.dylib
lrwxr-xr-x    1 sachs  staff        22 Jul 16 21:09 libmbedtls.10.dylib -> libmbedtls.2.2.1.dylib
-rwxr-xr-x    1 sachs  staff    159884 Jul 16 21:09 libmbedtls.2.2.1.dylib
-rw-r--r--    1 sachs  staff    200472 Jul 16 21:09 libmbedtls.a
lrwxr-xr-x    1 sachs  staff        19 Jul 16 21:09 libmbedtls.dylib -> libmbedtls.10.dylib
lrwxr-xr-x    1 sachs  staff        23 Jul 16 21:09 libmbedx509.0.dylib -> libmbedx509.2.2.1.dylib
-rwxr-xr-x    1 sachs  staff     78892 Jul 16 21:09 libmbedx509.2.2.1.dylib
-rw-r--r--    1 sachs  staff     87640 Jul 16 21:09 libmbedx509.a
lrwxr-xr-x    1 sachs  staff        19 Jul 16 21:09 libmbedx509.dylib -> libmbedx509.0.dylib
-rwxr-xr-x    1 sachs  staff    471148 Jul 16 21:10 libmpfr.4.dylib
lrwxr-xr-x    1 sachs  staff        15 Jul 16 21:10 libmpfr.dylib -> libmpfr.4.dylib
-rwxr-xr-x    1 sachs  staff       993 Jul 16 21:10 libmpfr.la
-rwxr-xr-x    1 sachs  staff  69629640 Jul 16 21:05 libopenblas64_.dylib
-rwxr-xr-x    1 sachs  staff    177304 Jul 16 19:57 libopenlibm.2.2.dylib
lrwxr-xr-x    1 sachs  staff        21 Jul 16 19:57 libopenlibm.2.dylib -> libopenlibm.2.2.dylib
-rw-r--r--    1 sachs  staff    396304 Jul 16 19:57 libopenlibm.a
lrwxr-xr-x    1 sachs  staff        21 Jul 16 19:57 libopenlibm.dylib -> libopenlibm.2.2.dylib
-rwxr-xr-x    1 sachs  staff    176588 Jul 16 19:58 libopenspecfun.1.2.dylib
lrwxr-xr-x    1 sachs  staff        24 Jul 16 19:58 libopenspecfun.1.dylib -> libopenspecfun.1.2.dylib
-rw-r--r--    1 sachs  staff    239784 Jul 16 19:58 libopenspecfun.a
lrwxr-xr-x    1 sachs  staff        24 Jul 16 19:58 libopenspecfun.dylib -> libopenspecfun.1.2.dylib
-rw-r--r--    1 sachs  staff    219560 Jul 16 19:57 libosxunwind.a
-rwxr-xr-x    1 sachs  staff      4144 Jul 16 19:57 libosxunwind.dylib
-rwxr-xr-x    1 sachs  staff    548536 Jul 16 20:31 libpcre2-8.0.dylib
-rw-r--r--    1 sachs  staff    600072 Jul 16 20:31 libpcre2-8.a
lrwxr-xr-x    1 sachs  staff        18 Jul 16 20:31 libpcre2-8.dylib -> libpcre2-8.0.dylib
-rwxr-xr-x    1 sachs  staff       959 Jul 16 20:31 libpcre2-8.la
-rwxr-xr-x    1 sachs  staff      9056 Jul 16 20:31 libpcre2-posix.0.dylib
-rw-r--r--    1 sachs  staff      3640 Jul 16 20:31 libpcre2-posix.a
lrwxr-xr-x    1 sachs  staff        22 Jul 16 20:31 libpcre2-posix.dylib -> libpcre2-posix.0.dylib
-rwxr-xr-x    1 sachs  staff      1035 Jul 16 20:31 libpcre2-posix.la
-rwxr-xr-x    1 sachs  staff    167480 Jul 16 21:09 libssh2.1.0.1.dylib
lrwxr-xr-x    1 sachs  staff        19 Jul 16 21:09 libssh2.1.dylib -> libssh2.1.0.1.dylib
lrwxr-xr-x    1 sachs  staff        15 Jul 16 21:09 libssh2.dylib -> libssh2.1.dylib
-rw-r--r--    1 sachs  staff    292200 Jul 16 21:11 libutf8proc.a
-rwxr-xr-x    1 sachs  staff    267044 Jul 16 19:57 libuv.1.dylib
-rw-r--r--    1 sachs  staff    712224 Jul 16 19:57 libuv.a
lrwxr-xr-x    1 sachs  staff        13 Jul 16 19:57 libuv.dylib -> libuv.1.dylib
-rwxr-xr-x    1 sachs  staff       935 Jul 16 19:57 libuv.la
drwxr-xr-x    9 sachs  staff       306 Jul 16 21:13 pkgconfig
mbp1% otool -L usr/lib/libgit2.dylib
usr/lib/libgit2.dylib:
        libgit2.24.dylib (compatibility version 24.0.0, current version 0.24.0)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
        /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 57337.50.23)
        /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1258.1.0)
        libssh2.1.dylib (compatibility version 1.0.0, current version 1.0.1)
        /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
mbp1% otool -L usr/lib/libssh2.dylib
usr/lib/libssh2.dylib:
        libssh2.1.dylib (compatibility version 1.0.0, current version 1.0.1)
        libmbedtls.10.dylib (compatibility version 10.0.0, current version 2.2.1)
        libmbedx509.0.dylib (compatibility version 0.0.0, current version 2.2.1)
        libmbedcrypto.0.dylib (compatibility version 0.0.0, current version 2.2.1)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
mbp1% otool -L usr/lib/libmbed*.dylib
usr/lib/libmbedcrypto.0.dylib:
        libmbedcrypto.0.dylib (compatibility version 0.0.0, current version 2.2.1)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
usr/lib/libmbedcrypto.2.2.1.dylib:
        libmbedcrypto.0.dylib (compatibility version 0.0.0, current version 2.2.1)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
usr/lib/libmbedcrypto.dylib:
        libmbedcrypto.0.dylib (compatibility version 0.0.0, current version 2.2.1)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
usr/lib/libmbedtls.10.dylib:
        libmbedtls.10.dylib (compatibility version 10.0.0, current version 2.2.1)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
        libmbedx509.0.dylib (compatibility version 0.0.0, current version 2.2.1)
        libmbedcrypto.0.dylib (compatibility version 0.0.0, current version 2.2.1)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
usr/lib/libmbedtls.2.2.1.dylib:
        libmbedtls.10.dylib (compatibility version 10.0.0, current version 2.2.1)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
        libmbedx509.0.dylib (compatibility version 0.0.0, current version 2.2.1)
        libmbedcrypto.0.dylib (compatibility version 0.0.0, current version 2.2.1)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
usr/lib/libmbedtls.dylib:
        libmbedtls.10.dylib (compatibility version 10.0.0, current version 2.2.1)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
        libmbedx509.0.dylib (compatibility version 0.0.0, current version 2.2.1)
        libmbedcrypto.0.dylib (compatibility version 0.0.0, current version 2.2.1)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
usr/lib/libmbedx509.0.dylib:
        libmbedx509.0.dylib (compatibility version 0.0.0, current version 2.2.1)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
        libmbedcrypto.0.dylib (compatibility version 0.0.0, current version 2.2.1)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
usr/lib/libmbedx509.2.2.1.dylib:
        libmbedx509.0.dylib (compatibility version 0.0.0, current version 2.2.1)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
        libmbedcrypto.0.dylib (compatibility version 0.0.0, current version 2.2.1)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
usr/lib/libmbedx509.dylib:
        libmbedx509.0.dylib (compatibility version 0.0.0, current version 2.2.1)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
        libmbedcrypto.0.dylib (compatibility version 0.0.0, current version 2.2.1)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)

@andreasnoack
Copy link
Member

Why is this not detected by Travis?

@Keno
Copy link
Member

Keno commented Jul 17, 2016

Works fine for me locally, so I assume there's some configuration difference that explains this.

@wildart
Copy link
Member

wildart commented Jul 17, 2016

It look like RPATH is not added to libssh2 dependency in libgit2

@wildart
Copy link
Member

wildart commented Jul 17, 2016

@Keno
Copy link
Member

Keno commented Jul 17, 2016

The reason it works for me locally is because I have a global installation of libssh2 from a different source. I can now reproduce.

@tkelman
Copy link
Contributor

tkelman commented Jul 17, 2016

we should be isolating the cmake invocation so it doesn't pick up a system copy of libssh2 by default

@Keno
Copy link
Member

Keno commented Jul 17, 2016

It's not the CMake invocation, it's the dynamic linker.

@wildart
Copy link
Member

wildart commented Jul 17, 2016

only if we use this patch: #17391 (diff), which I assume is in place. So how the linker picked system libssh2 over provided in explicitly link path?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies system:mac Affects only macOS
Projects
None yet
Development

No branches or pull requests

6 participants