cole-trapnell-lab/Scribe

error when installing

Closed this issue · 5 comments

Hello,

I got an error when doing R CMD INSTALL Scribe_0.1.tar.gz

kde/kde.cpp: In member function ‘double KDE::curvature(double, double, std::vector&)’:
kde/kde.cpp:236:8: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
for(auto it = data.begin(); it != data.end(); it++){
^
kde/kde.cpp:236:13: error: ‘it’ does not name a type
for(auto it = data.begin(); it != data.end(); it++){
^
kde/kde.cpp:236:32: error: expected ‘;’ before ‘it’
for(auto it = data.begin(); it != data.end(); it++){
^
kde/kde.cpp:236:32: error: ‘it’ was not declared in this scope
make: *** [kde/kde.o] Error 1
ERROR: compilation failed for package ‘Scribe’

Hi Yongjie, it seems like an issue related to gcc. What os system and gcc version are you using?

Hi Xiaojie,

I am installing Scribe using CentOS Linux release 7.5.1804 (Core) and gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)

Hi, Xiaojie,
I have the same problems when I install this package in Ubuntu. Then I updated gfortran, and install KDE. Then the problem still there, unsolved.
I try to rebuild the scribe, it also said make: *** [kde/kde.o] Error 1.
My gcc version is (Ubuntu1 5.4.0 -6ubuntu1~16.04.11)
How should I do to install this package?
I am looking forwards your reply, thanks.
Xiaomei

Dear Xiaojie,
Thanks for your hard working to develop this awesome methods. Now I solve the problem. When I install the package before, I execute this command: Sys.setenv("PKG_CXXFLAGS"="-std=c++11")
Then done.
Have a good day!
Xiaomei

Hi Xiaomei, thanks for sharing your solution. This seems an issue related to gcc version.

Also sorry for being slow on my side. I recently started my post-doc and got lagged on this. Just as another note, we will also release a python version for this package shortly which may be useful for someone who prefers python over R