none
Cannot properly generate `.so` file due to bad "link" command RRS feed

  • Question

  • This has happened to me for more than one package installation. Basically the installer fails with the last couple of lines like:

    ```

    g++  -I/usr/lib64/microsoft-r/3.4/lib64/R/include -DNDEBUG  -DU_STATIC_IMPLEMENTATION -I"/home/gaow/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/home/gaow/R/x86_64-pc-linux-gnu-library/3.3/RcppEigen/include" -I"/home/gaow/R/x86_64-pc-linux-gnu-library/3.3/BH/include"      -c RcppExports.cpp -o RcppExports.o
    -L/usr/lib64/microsoft-r/3.4/lib64/R/lib -o DDRTree.so DDRTree.o DDRTree_init.o RcppExports.o -L/usr/lib64/microsoft-r/3.4/lib64/R/lib -lR
    sh: line 2: -L/usr/lib64/microsoft-r/3.4/lib64/R/lib: No such file or directory

    ```

    Notice that the line `-L/usr/lib64/microsoft-r/3.4/lib64/R/lib` is a new line without any `g++` switch. This should not happen. I can make it work by downloading package source and install via `devtools::install("/path/to/package")`, then `cd src` and manually type:

    ```

    g++ -shared -L/usr/lib64/microsoft-r/3.4/lib64/R/lib -o DDRTree.so DDRTree.o DDRTree_init.o RcppExports.o -L/usr/lib64/microsoft-r/3.4/lib64/R/lib -lR

    ```

    so that `DDRTree.so` is generated, then run the installation again 

    Would appreciate any official comments and hopefully a fix in the next release!


    • Edited by gaow Monday, August 7, 2017 3:41 PM
    Monday, August 7, 2017 3:15 PM

Answers

  • Found the same problem and solution here:

    https://stackoverflow.com/questions/41738088/xgboost-r-package-installation-fails

    • Marked as answer by gaow Sunday, August 13, 2017 6:08 PM
    Sunday, August 13, 2017 6:08 PM