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 failed to get libcoinblas #38

Closed
blegat opened this issue Sep 17, 2018 · 21 comments · Fixed by #48
Closed

Build failed to get libcoinblas #38

blegat opened this issue Sep 17, 2018 · 21 comments · Fixed by #48

Comments

@blegat
Copy link
Member

blegat commented Sep 17, 2018

When building on Julia v1.0 and Arch Linux I get

ERROR: LoadError: LoadError: LibraryProduct(nothing, ["libcoinblas"], Symbol(""), "Prefix(/home/blegat/.julia/dev/Clp/deps/usr)") is not satisfied, cannot generate deps.jl!
Stacktrace:
 [1] #write_deps_file#134(::Bool, ::Function, ::String, ::Array{LibraryProduct,1}) at /home/blegat/.julia/packages/BinaryProvider/UTYxu/src/Products.jl:409
 [2] write_deps_file(::String, ::Array{LibraryProduct,1}) at /home/blegat/.julia/packages/BinaryProvider/UTYxu/src/Products.jl:396
 [3] top-level scope at none:0
 [4] include at ./sysimg.jl:29 [inlined]
 [5] include(::String) at ./loading.jl:1073
 [6] top-level scope at none:0
in expression starting at /home/blegat/.julia/dev/Clp/deps/build_COINBLASBuilder.v1.4.6.jl:45
in expression starting at /home/blegat/.julia/dev/Clp/deps/build.jl:46

However, I get

$ ls -R usr
usr:
downloads  lib  logs  manifests

usr/downloads:
COINBLASBuilder.v1.4.6.x86_64-linux-gnu.tar.gz  COINBLASBuilder.v1.4.6.x86_64-linux-gnu.tar.gz.sha256

usr/lib:
libcoinblas.a  libcoinblas.la  libcoinblas.so  libcoinblas.so.1  libcoinblas.so.1.4.6  pkgconfig

usr/lib/pkgconfig:
coinblas.pc

usr/logs:
COINBLASBuilder.log

usr/manifests:
COINBLASBuilder.v1.4.6.x86_64-linux-gnu.list
@mlubin
Copy link
Member

mlubin commented Sep 18, 2018

@juan-pablo-vielma

@mlubin
Copy link
Member

mlubin commented Sep 18, 2018

@blegat how was Julia installed? AFAIK BinaryBuilder binaries don't work with Julia source builds.

@blegat
Copy link
Member Author

blegat commented Sep 18, 2018

Through pacman

@juan-pablo-vielma
Copy link
Contributor

Can you please post the output of ldd libcoinblas.so and ls -la on julia-1.0.0/lib/julia

@juan-pablo-vielma
Copy link
Contributor

actually I see pacman uses the systems gcc (there is no libgfortran in usr/lib/julia/) so the important info is the version of libgfortran installed by that version of gcc. Looks like it would be gcc v8 which comes with libgfortran v5, while
libcoinblas.so requires libgfortran v4 which would explain the problem. If this is indeed the case, adding libgfortran.so.4 (e.g. from GCC v7) to the LD_LIBRARY_PATH should fix it (or copying it to Clp's usr/lib directory).

@blegat
Copy link
Member Author

blegat commented Sep 18, 2018

Indeed, it seems to be the missing libgfortran.so.4

$ ldd libcoinblas.so
	linux-vdso.so.1 (0x00007ffc97dca000)
	libgfortran.so.4 => not found
	libm.so.6 => /usr/lib/libm.so.6 (0x00007f38ca445000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f38ca42b000)
	libquadmath.so.0 => /usr/lib/libquadmath.so.0 (0x00007f38ca3e8000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f38ca224000)
	/usr/lib64/ld-linux-x86-64.so.2 (0x00007f38ca849000)
$ cd /usr/lib/julia 
$ julia ls -a
.                      libgit2.so          libpcre2-8.so
..                     libgmp.so           libpcre2-8.so.0
libamd.so              libmpfr.so          libpcre2-8.so.0.6.0
libcamd.so             libmpfr.so.6        libspqr.so
libccalltest.so        libmpfr.so.6.0.1    libsuitesparseconfig.so
libccalltest.so.debug  libopenblas.so      libsuitesparse_wrapper.so
libccolamd.so          libopenblas.so.0    libumfpack.so
libcholmod.so          libopenlibm.so      sys.so
libcolamd.so           libopenlibm.so.2
libdSFMT.so            libopenlibm.so.2.5

@juan-pablo-vielma
Copy link
Contributor

I just thought of inelegant, but simple solution. Copy the libgfortran.so.4 from the Julia pre-build binaries to somewhere BP can find 🙂

@ianfiske
Copy link
Contributor

Sounds similar to the workaround being implemented by users of Arpack.jl: JuliaLinearAlgebra/Arpack.jl#5 (comment), needed by folks to get Gadfly working, as noted in https://discourse.julialang.org/t/julia-1-0-support-just-landed-on-gadfly-master/14978/16.

@juan-pablo-vielma
Copy link
Contributor

Linking this BB issue that should eventually resolve everything
JuliaPackaging/BinaryBuilder.jl/issues/253

@jzazo
Copy link

jzazo commented Oct 9, 2018

Hi! It seems the previous issue was recently closed. I however cannot use Clp in Julia v0.7 or v1 because of the following build error:

Error: Error building `Clp`:
│   % Total    % Received % Xferd  Average Speed   Time    Time     TimeCurrent
│                                  Dload  Upload   Total   Spent    LeftSpeed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--100   172    0   172    0     0   1508      0 --:--:-- --:--:-- --:--:--1508
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--100   622    0   622    0     0   3417      0 --:--:-- --:--:-- --:--:--607k
│ curl: (6) Could not resolve host: github-production-release-asset-2e65be.s3.amazonaws.com
│ ┌ Warning: platform_key() is deprecated, use platform_key_abi() from now on
│ │   caller = ip:0x0
│ └ @ Core :-1
│ ERROR: LoadError: failed process: Process(`curl -g -L -f -o build_COINBLASBuilder.v1.4.6.jl https://github.com/juan-pablo-vielma/COINBLASBuilder/releases/download/v1.4.6-beta2/build_COINBLASBuilder.v1.4.6.jl`, ProcessExited(6)) [6]

Can a fix be released now that BB has been updated?
I assume the error I get is related, but maybe is a different issue. Thanks.

@juan-pablo-vielma
Copy link
Contributor

Can you send me more info on your system, it could be unrelated.

@jzazo
Copy link

jzazo commented Oct 9, 2018

It seems it was unrelated. I am on Ubuntu 18.04. Yesterday I installed gfortran-7 but I didn't reboot. Today I tried again and it was building, maybe that was it. I will report if I encounter the problem again, but it looks fine at the moment. Thank you.

@blegat
Copy link
Member Author

blegat commented Oct 9, 2018

I also encountered this problem on Travis, then I restarted the build and it succeeded

@yakir12
Copy link

yakir12 commented Nov 29, 2018

Same problem here:

   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.0.2 (2018-11-08)
 _/ |\__'_|_|_|\__'_|  |  
|__/                   |

(v1.0) pkg> build Clp
  Building Clp → `~/.julia/packages/Clp/9Gz64/deps/build.log`
┌ Error: Error building `Clp`: 
│   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
│                                  Dload  Upload   Total   Spent    Left  Speed
100   172    0   172    0     0     39      0 --:--:--  0:00:04 --:--:--    39
100   622    0   622    0     0    117      0 --:--:--  0:00:05 --:--:--     0
100  3355  100  3355    0     0    394      0  0:00:08  0:00:08 --:--:--  1430
│ ┌ Warning: platform_key() is deprecated, use platform_key_abi() from now on
│ │   caller = ip:0x0
│ └ @ Core :-1
│ ERROR: LoadError: LoadError: LibraryProduct(nothing, ["libcoinblas"], Symbol(""), "Prefix(/home/yakir/.julia/packages/Clp/9Gz64/deps/usr)") is not satisfied, cannot generate deps.jl!
│ Stacktrace:
│  [1] #write_deps_file#152(::Bool, ::Function, ::String, ::Array{LibraryProduct,1}) at /home/yakir/.julia/packages/BinaryProvider/4F5Hq/src/Products.jl:414
│  [2] write_deps_file(::String, ::Array{LibraryProduct,1}) at /home/yakir/.julia/packages/BinaryProvider/4F5Hq/src/Products.jl:395
│  [3] top-level scope at none:0
│  [4] include at ./sysimg.jl:29 [inlined]
│  [5] include(::String) at ./loading.jl:1079
│  [6] top-level scope at none:0
│ in expression starting at /home/yakir/.julia/packages/Clp/9Gz64/deps/build_COINBLASBuilder.v1.4.6.jl:45
│ in expression starting at /home/yakir/.julia/packages/Clp/9Gz64/deps/build.jl:38
└ @ Pkg.Operations /build/julia/src/julia/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1097

I'm on Manjaro.

@juan-pablo-vielma
Copy link
Contributor

what version of BinaryProvider is installed? (e.g. ] st -m)

@yakir12
Copy link

yakir12 commented Nov 29, 2018

[b99e7846] BinaryProvider v0.5.3

@juan-pablo-vielma
Copy link
Contributor

Can you please try
] add https://github.com/juan-pablo-vielma/Clp.jl.git
and see if that builds ok?

@yakir12
Copy link

yakir12 commented Nov 30, 2018

That worked! Thanks!!!

@blegat
Copy link
Member Author

blegat commented Nov 30, 2018

@juan-pablo-vielma I am impressed, how did you make it work ? Is is https://github.com/JuliaOpt/COINBLASBuilder that creates a blas library that is with the 64_ suffix that is installed for ArchLinux ?

@juan-pablo-vielma
Copy link
Contributor

Just used the new multi-gcc version of BB/BP that figures the right version of libgfortran available to Julia. COINBLASBuilder then provides a version of blas that uses that version of libgfortran. So it is still not using ArchLinux's (or Julia's) blas library. I still need to double check that this "COIN" version of blas plays nice with (at least) Julia's version when they are both used at the same time. It looks like the error in jump-dev/Cbc.jl#56 was because there were two incompatible versions of the Osi libraries that were loaded at the same time (the BB version from Clp and the old one from Cbc).

Any pointers on how to test this are welcome.

@sbromberger
Copy link

Just as an aside, this also resolved the build problems on a source-built Julia 1.0.3 on OSX. (I haven't tested functionality yet, but using works without issue.)

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

Successfully merging a pull request may close this issue.

7 participants