elbamos / largeVis

An implementation of the largeVis algorithm for visualizing large, high-dimensional datasets, for R
340 stars 62 forks source link

Install largeVis from Github met errors #60

Closed Shawnmhy closed 3 years ago

Shawnmhy commented 4 years ago

Hi, I was trying to install largeVis package using R function 'install_github()' with the error message: Can anyone help me solve this? `In file included from RcppExports.cpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppArmadillo/include/RcppArmadillo.h:31: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:26: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include/RcppCommon.h:29: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include/Rcpp/r/headers.h:67: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:100: In file included from /usr/local/clang4/bin/../include/c++/v1/cmath:305: /usr/local/clang4/bin/../include/c++/v1/math.h:301:15: fatal error: 'math.h' file not found

include_next

          ^~~~~~~~

1 error generated. make: *** [RcppExports.o] Error 1 ERROR: compilation failed for package ‘largeVis’

elbamos commented 4 years ago

Try installing from the feature/backoncran branch. If you still have problems let me know what compiler you’re using and what’s in your makeconf

On Aug 3, 2020, at 1:31 PM, Shawnmhy notifications@github.com wrote:

 Hi, I was trying to install largeVis package using R function 'install_github()' with the error message: Can anyone help me solve this? `In file included from RcppExports.cpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppArmadillo/include/RcppArmadillo.h:31: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:26: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include/RcppCommon.h:29: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include/Rcpp/r/headers.h:67: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include/Rcpp/platform/compiler.h💯 In file included from /usr/local/clang4/bin/../include/c++/v1/cmath:305: /usr/local/clang4/bin/../include/c++/v1/math.h:301:15: fatal error: 'math.h' file not found

include_next

^~~~ 1 error generated. make: *** [RcppExports.o] Error 1 ERROR: compilation failed for package ‘largeVis’

removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/largeVis’ Error: Failed to install 'largeVis' from GitHub: (converted from warning) installation of package ‘/var/folders/9w/9grv0t81461bxp0r26p689b40000gn/T//Rtmpzoqfvg/file3e849b7844c/largeVis_0.2.tar.gz’ had non-zero exit status` — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Shawnmhy commented 4 years ago

Try installing from the feature/backoncran branch. If you still have problems let me know what compiler you’re using and what’s in your makeconf On Aug 3, 2020, at 1:31 PM, Shawnmhy @.> wrote:  Hi, I was trying to install largeVis package using R function 'install_github()' with the error message: Can anyone help me solve this? `In file included from RcppExports.cpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppArmadillo/include/RcppArmadillo.h:31: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:26: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include/RcppCommon.h:29: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include/Rcpp/r/headers.h:67: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include/Rcpp/platform/compiler.h💯 In file included from /usr/local/clang4/bin/../include/c++/v1/cmath:305: /usr/local/clang4/bin/../include/c++/v1/math.h:301:15: fatal error: 'math.h' file not found #include_next ^~~~ 1 error generated. make: [RcppExports.o] Error 1 ERROR: compilation failed for package ‘largeVis’ removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/largeVis’ Error: Failed to install 'largeVis' from GitHub: (converted from warning) installation of package ‘/var/folders/9w/9grv0t81461bxp0r26p689b40000gn/T//Rtmpzoqfvg/file3e849b7844c/largeVis_0.2.tar.gz’ had non-zero exit status` — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Try installing from the feature/backoncran branch. If you still have problems let me know what compiler you’re using and what’s in your makeconf On Aug 3, 2020, at 1:31 PM, Shawnmhy @.> wrote:  Hi, I was trying to install largeVis package using R function 'install_github()' with the error message: Can anyone help me solve this? `In file included from RcppExports.cpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppArmadillo/include/RcppArmadillo.h:31: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:26: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include/RcppCommon.h:29: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include/Rcpp/r/headers.h:67: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include/Rcpp/platform/compiler.h💯 In file included from /usr/local/clang4/bin/../include/c++/v1/cmath:305: /usr/local/clang4/bin/../include/c++/v1/math.h:301:15: fatal error: 'math.h' file not found #include_next ^~~~ 1 error generated. make: [RcppExports.o] Error 1 ERROR: compilation failed for package ‘largeVis’ removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/largeVis’ Error: Failed to install 'largeVis' from GitHub: (converted from warning) installation of package ‘/var/folders/9w/9grv0t81461bxp0r26p689b40000gn/T//Rtmpzoqfvg/file3e849b7844c/largeVis_0.2.tar.gz’ had non-zero exit status` — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Thank you so much for your reply. Sorry to ask the dummy question: how to actually install this specific branch on Mac?

elbamos commented 4 years ago

I’m sorry for being short but I’m on mobile now - check the exact branch name on the GitHub page and then ?install_github

On Aug 3, 2020, at 1:51 PM, Shawnmhy notifications@github.com wrote:

 Try installing from the feature/backoncran branch. If you still have problems let me know what compiler you’re using and what’s in your makeconf … On Aug 3, 2020, at 1:31 PM, Shawnmhy @.> wrote:  Hi, I was trying to install largeVis package using R function 'install_github()' with the error message: Can anyone help me solve this? In file included from RcppExports.cpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppArmadillo/include/RcppArmadillo.h:31: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:26: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include/RcppCommon.h:29: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include/Rcpp/r/headers.h:67: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include/Rcpp/platform/compiler.h💯 In file included from /usr/local/clang4/bin/../include/c++/v1/cmath:305: /usr/local/clang4/bin/../include/c++/v1/math.h:301:15: fatal error: 'math.h' file not found #include_next ^~~~ 1 error generated. make: [RcppExports.o] Error 1 ERROR: compilation failed for package ‘largeVis’ removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/largeVis’ Error: Failed to install 'largeVis' from GitHub: (converted from warning) installation of package ‘/var/folders/9w/9grv0t81461bxp0r26p689b40000gn/T//Rtmpzoqfvg/file3e849b7844c/largeVis_0.2.tar.gz’ had non-zero exit status — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Try installing from the feature/backoncran branch. If you still have problems let me know what compiler you’re using and what’s in your makeconf … On Aug 3, 2020, at 1:31 PM, Shawnmhy @.> wrote:  Hi, I was trying to install largeVis package using R function 'install_github()' with the error message: Can anyone help me solve this? In file included from RcppExports.cpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppArmadillo/include/RcppArmadillo.h:31: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:26: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include/RcppCommon.h:29: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include/Rcpp/r/headers.h:67: In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include/Rcpp/platform/compiler.h💯 In file included from /usr/local/clang4/bin/../include/c++/v1/cmath:305: /usr/local/clang4/bin/../include/c++/v1/math.h:301:15: fatal error: 'math.h' file not found #include_next ^~~~ 1 error generated. make: [RcppExports.o] Error 1 ERROR: compilation failed for package ‘largeVis’ removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/largeVis’ Error: Failed to install 'largeVis' from GitHub: (converted from warning) installation of package ‘/var/folders/9w/9grv0t81461bxp0r26p689b40000gn/T//Rtmpzoqfvg/file3e849b7844c/largeVis_0.2.tar.gz’ had non-zero exit status — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Thank you so much for your reply. Sorry to ask the dummy question: how to actually install this specific branch on Mac?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Shawnmhy commented 4 years ago

Thank you. I tried to installing the specific branch you mentioned but still failed. I am using Rstudio but am not sure how to check the 'makeconf'. Previously I successfully installed largeVis on my mac, but few days ago I updated my OS (10.15.6 right now) and the package failed to be loaded with the error message:

Error: package or namespace load failed for ‘largeVis’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/largeVis/libs/largeVis.so': dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/largeVis/libs/largeVis.so, 6): Library not loaded: /usr/local/clang6/lib/libomp.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/largeVis/libs/largeVis.so Reason: image not found

Therefore I am trying to reinstall.

I just tried the same method on my window and it worked...

elbamos commented 4 years ago

I think I get what’s going on. The error you posted below just means the build failed. The error you posted earlier means the compiler couldn’t find one of the standard c++ headers. I’ve seen this occur when the OS X tool chain isn’t properly installed.

I’m going to propose the following hypothesis: when you upgraded OS X, the matching version of Xcode or it’s command line tools changed but you haven’t updated them. Or they got out of sync with each other somehow. I suggest looking at that issue. You may need to reinstall Xcode or command line tools. You may also need to rebuild your compiled R packages, particularly rcpp and rcpparmadillo.

Can you try that out and see if it helps?

Alternatively, you might consider switching to llvm via homebrew. You’ll have to install llvm and then modify your .R/Makeconf file to point to the correct compiler and appropriate libraries. Let’s try the other first.

On Aug 3, 2020, at 2:04 PM, Shawnmhy notifications@github.com wrote: Thank you. I tried to installing the specific branch you mentioned but still failed. I am using Rstudio but am not sure how to check the 'makeconf'. Previously I successfully installed largeVis on my mac, but few days ago I updated my OS (10.15.6 right now) and the package failed to be loaded with the error message:

Error: package or namespace load failed for ‘largeVis’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/largeVis/libs/largeVis.so': dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/largeVis/libs/largeVis.so, 6): Library not loaded: /usr/local/clang6/lib/libomp.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/largeVis/libs/largeVis.so Reason: image not found

Therefore I am trying to reinstall.

I just tried the same method on my window and it worked...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Shawnmhy commented 4 years ago

Thank you. I tried the first approach. I updated the Xcode but it not worked. Then I try to re-install the Rcpp and an error occurred:

/usr/local/clang4/bin/../include/c++/v1/math.h:301:15: fatal error: 'math.h' file not found

include_next

^~~~ 1 error generated. make: *** [api.o] Error 1 ERROR: compilation failed for package ‘Rcpp’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp’
  • restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp’ Warning in install.packages : installation of package ‘Rcpp’ had non-zero exit status

The error message also stating that the file 'math.h' can not be found. Looks like this is the cause, but not sure how to resolve

elbamos commented 4 years ago

Did you try reinstalling the Xcode command line tools?

is a system header. That’s what the <> means. It’s supposed to be provided by the operating system or the compiler. Are you able to compile other R packages? If reinstalling the command line tools and rebuilding R packages doesn’t work, I can try to walk you through switching to llvm, but that’ll then hit the limits of my understanding. > On Aug 3, 2020, at 6:52 PM, Shawnmhy wrote: > >  > Thank you. I tried the first approach. I updated the Xcode but it not worked. Then I try to re-install the Rcpp and an error occurred: > > /usr/local/clang4/bin/../include/c++/v1/math.h:301:15: fatal error: 'math.h' file not found > #include_next > ^~~~~~~~ > 1 error generated. > make: *** [api.o] Error 1 > ERROR: compilation failed for package ‘Rcpp’ > > removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp’ > restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp’ > Warning in install.packages : > installation of package ‘Rcpp’ had non-zero exit status > The error message also stating that the file 'math.h' can not be found. Looks like this is the cause, but not sure how to resolve > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub, or unsubscribe.
Shawnmhy commented 4 years ago

Yes, I reinstall the Xcode command line tools but it's still failed. I think I need to consider the alternative approach, could you please give me some guidance on switching to llvm?

elbamos commented 3 years ago

@Shawnmhy Please let me know if your issue isn't resolved, otherwise I'll close this in a few days.