You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/10/14 08:37:03 UTC

[GitHub] kohr-h opened a new issue #12822: [clojure-package] On modern Ubuntu, scala package cannot be loaded without legacy libcurl

kohr-h opened a new issue #12822: [clojure-package] On modern Ubuntu, scala package cannot be loaded without legacy libcurl
URL: https://github.com/apache/incubator-mxnet/issues/12822
 
 
   ## Description
   
   The Scala package as pulled in by the Clojure package has a dependency on legacy `libcurl` (on Ubuntu: `libcurl3`) and doesn't work with the current version (on Ubuntu: `libcurl4`).
   
   ## Environment info (Required)
   
   Only relevant part:
   ```
   ----------System Info----------
   Platform     : Linux-4.15.0-36-generic-x86_64-with-Ubuntu-18.04-bionic
   system       : Linux
   node         : pop-os
   release      : 4.15.0-36-generic
   version      : #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018
   ```
   
   Package used (Python/R/Scala/Julia): *Clojure*
   
   For Scala user, please provide: *(Okay, just in case)*
   1. Java version:
   openjdk version "10.0.2" 2018-07-17
   OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.2)
   OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.2, mixed mode)
   
   2. Maven version: nil
   3. Scala runtime if applicable: nil
   
   ## Error Message:
   
   ```
   INFO  MXNetJVM: Try loading mxnet-scala from native path.
   INFO  MXNetJVM: Try loading mxnet-scala-linux-x86_64-gpu from native path.
   INFO  MXNetJVM: Try loading mxnet-scala-linux-x86_64-cpu from native path.
   WARN  MXNetJVM: MXNet Scala native library not found in path. Copying native library from the archive. Consider installing the library somewhere in the path (for Windows: PATH, for Linux: LD_LIBRARY_PATH), or specifying by Java cmd option -Djava.library.path=[lib path].
   INFO  org.apache.mxnet.util.NativeLibraryLoader: Loading libmxnet-scala.so from /lib/native/ copying to mxnet-scala
   ERROR org.apache.mxnet.util.NativeLibraryLoader: Couldn't load copied link file: java.lang.UnsatisfiedLinkError: /tmp/mxnet3266536299040978061/mxnet-scala: /usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by /tmp/mxnet3266536299040978061/mxnet-scala)
   ERROR MXNetJVM: Couldn't find native library mxnet-scala
   ```
   
   ## Steps to reproduce
   
   Follow the installation instructions in [the clojure package README](https://github.com/apache/incubator-mxnet/tree/master/contrib/clojure-package).
   
   ## What have you tried to solve it?
   
   For projects that use Leiningen, there's a workaround that nicely integrates with the CIDER REPL in Emacs:
   
   0. Make a Leiningen project with `clojure-mxnet` dependency.
   1. In the top-level project directory, download the legacy `libcurl3` package:
      ```bash
      wget http://archive.ubuntu.com/ubuntu/pool/universe/c/curl3/libcurl3_7.58.0-2ubuntu2_amd64.deb
      ```
   2. Extract into a temporary directory:
      ```bash
      mkdir -p tmp && dpkg-deb -R libcurl3_7.58.0-2ubuntu2_amd64.deb tmp/
      ```
   3. Copy the shared library to a directory of your choice, here `resources`, and remove the temporary directory:
      ```bash
      cp tmp/usr/lib/x86_64-linux-gnu/libcurl.so.4 resources && rm tmp -r
      ```
   4. In the `project.clj` file, add the following:
      ```clojure
        :plugins [[lein-with-env-vars "0.2.0"]]
        :env-vars {:LD_LIBRARY_PATH "./resources"}
        :hooks [leiningen.with-env-vars/auto-inject]
      ```
   
   This works better than
   
   - installing `libcurl3` system-wide because it blocks `libcurl4`, which is a dependency of the `curl` package
   - globally setting `LD_LIBRARY_PATH` since it might break other packages that now find the wrong shared library
   - manually setting the environment variable because then, only stuff run from that console session will work correctly (including emacs).
   
   However, it would be much better if this problem didn't exist in the first place. What would it take to use `libcurl4` instead? Maybe the Scala package Dockerfile needs an update?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services