Closed chrisvwn closed 5 years ago
Step back for a second and realize that there are TWO repos and source packages. The old RcppMLPACK (also on CRAN) and a second, newer one. If you use the second one then you must also use a corresponding (recent enough) MLPACK installation. References of success with the former mean nothing.
The error message at end of your snippet is as clear as we can make it:
configure: error: Cannot find MLPACK headers.
@eddelbuettel I realize the two are different. Kindly ignore that part. I should have mentioned that I have mlpack 3.0.4 installed. What I am trying to figure out is why it cannot find the headers which are clearly under /usr/local/include/mlpack
. Is it related to my gcc? Is there a way that I can help the install find the headers?
@chrisvwn Ok, same page then. On my box it is /usr/include/mlpack/
which is the other default location. We'd need to dig into the configure.log
to see why/how it failed.
Hmm. I tried cloning the rcppmlpack/rcppmlpack2
repo and running ./configure
. Interestingly the default gcc 4.8.5 finds the mlpack headers (which I now installed to /usr/include/mlpack
) and configures fine.
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=c++11... yes
checking for pkg-config... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking mlpack/core.hpp usability... yes
checking mlpack/core.hpp presence... yes
checking for mlpack/core.hpp... yes
checking for mlpack/core.hpp... (cached) yes
checking for main in -lmlpack... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ -std=c++11 accepts -g... (cached) yes
checking whether g++ version is sufficient... yes, but without OpenMP as version 4.8.5 (Armadillo/MLPACK constraint)
checking for macOS... /usr/local/lib64/R/bin/Rscript: error while loading shared libraries: libiomp5.so: cannot open shared object file: No such file or directory
not found
configure: creating ./config.status
config.status: creating src/Makevars
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/inline.R
RcppMLPACK 3.0.1-1
==================
compiler: g++ -std=c++11
cflags:
libs: -lmlpack
pkgconfig: yes
Still fails with gcc 6.3.1. I have attached the 2 config.logs
. Hopefully someone can spot something?
I just perused the logs and this seems like the error gcc6 is encountering:
configure:4652: g++ -c -fopenmp -O2 -I/usr/local/include conftest.cpp >&5
In file included from /usr/include/mlpack/core.hpp:256:0,
from conftest.cpp:53:
/usr/include/mlpack/prereqs.hpp:94:2: error: #error Use of C++14 mode with Boost < 1.59 is known to cause compilation problems. Instead specify the C++11 standard (-std=c++11 with gcc or clang), or upgrade Boost to 1.59 or newer.
#error Use of C++14 mode with Boost < 1.59 is known to cause compilation \
^~~~~
It seems related to https://github.com/mlpack/mlpack/issues/1033
Do I need to upgrade my Boost
? Or can I pass -std=c++11
to gcc during the package install?
That may be the change vector. I have Boost 1.65 now on Ubuntu 18.04, I think it was 1.62 before that.
That said, I also never had that error when we did earlier work on RcppMLPACK2.
Also, RcppMLPACK2 alreay imposes C++11, see this line.
Thanks @eddelbuettel That leaves only boost. Let me install boost >= 1.59 from source. I think this will require a rebuild of armadillo and mlpack as well. Then try rcppmlpack2 again. I will come back to report.
Appreciate your patience. In case you have the ability to run Docker, our repo now has containers to
as that also made our live with Travis CI easier.
Ie the repo defines the Dockerfile, Docker Hub builds them, Travis uses the testing variant and we offer a run-time variant "just because we can". Let me know if that would help.
Good news! Installing boost solved the problem. I thought I would need to rebuild armadillo and mlpack but clearly I don't fully understand how they relate - not required.
Thanks for the information about using docker. This might actually be quite useful to us. We are currently building a test machine and being able to build a docker image of the final setup would be quite helpful. I will come back to you in case we do end up going down this path.
Thanks @eddelbuettel for your speedy help. Much appreciated!
Hi,
I am having an issue installing rcppmlpack2 on rhel 7. The default gcc is v4.8.5 but this is not sufficient for openmp which I require. So I have installed the devtoolset-6 which I enable using the command .
The install seems to choke on the source install of rcppMLPACK. Incidentally, I am able to install rcppMLPACK manually from CRAN successfully.
It seems the rcppMLPACK source is unable to find the mlpack headers in /usr/local/include? I did find that g++6 does not by default check
/usr/local/include
. Is there a variable I need to set that will solve this. I have tried CFLAGS, CPLUS_FLAGS, MLPACK_CFLAGS, MLPACK_CPPFLAGS. I have even tried setting gcc, g++, cpp aliases to include the library path like-I/usr/local/include
. However, I am unable to get the build/install to work. Any help appreciated.My sessionInfo:
The output from the install is below: