Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: compilation failed for package 'presto' #16

Open
SeadonXing opened this issue Dec 10, 2021 · 6 comments
Open

ERROR: compilation failed for package 'presto' #16

SeadonXing opened this issue Dec 10, 2021 · 6 comments

Comments

@SeadonXing
Copy link

SeadonXing commented Dec 10, 2021

Hi ! Thank you for creating such cool software.

I got some trouble when I installed the presto.

I first try these commands:

library(devtools)
 install_github('immunogenomics/presto')

Then I got the following errors:

Downloading GitHub repo immunogenomics/presto@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet,  : 
  can't open URL'https://api.github.com/repos/immunogenomics/presto/tarball/HEAD'

So I downloaded the source code of presto from GitHub, and install it from the local with these commands :
devtools::install_local("D:/Software/Presto/presto-master.zip")

Then I got the following errors:

* installing *source* package 'presto' ...
** using staged installation
** libs

*** arch - i386
"C:/rtools40/mingw32/bin/"g++  -std=gnu++11 -I"D:/Program Files/R/R-4.1.0/include" -DNDEBUG  -I'D:/Program Files/R/R-4.1.0/library/Rcpp/include' -I'D:/Program Files/R/R-4.1.0/library/RcppArmadillo/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c RcppExports.cpp -o RcppExports.o
"C:/rtools40/mingw32/bin/"g++  -std=gnu++11 -I"D:/Program Files/R/R-4.1.0/include" -DNDEBUG  -I'D:/Program Files/R/R-4.1.0/library/Rcpp/include' -I'D:/Program Files/R/R-4.1.0/library/RcppArmadillo/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c fast_wilcox.cpp -o fast_wilcox.o
fast_wilcox.cpp: In function 'std::__cxx11::list<float> cpp_in_place_rank_mean(arma::vec&, int, int)':
fast_wilcox.cpp:116:34: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'unsigned int'} and 'int' [-Wsign-compare]
     for (size_t i = idx_begin; i <= idx_end; i++) {
                                ~~^~~~~~~~~~
C:/rtools40/mingw32/bin/g++ -shared -s -static-libgcc -o presto.dll tmp.def RcppExports.o fast_wilcox.o -LD:/Program Files/R/R-4.1.0/bin/i386 -lR
C:/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: C:/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/libstdc++.a(c++locale.o):(.text$_ZSt14__convert_to_vIfEvPKcRT_RSt12_Ios_IostateRKPi+0x6a): undefined reference to `__mingw_strtof'
C:/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: C:/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/libstdc++.a(c++locale.o):(.text$_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi+0x6a): undefined reference to `__mingw_strtod'
collect2.exe: error: ld returned 1 exit status
no DLL was created
ERROR: compilation failed for package 'presto'
 removing 'D:/Program Files/R/R-4.1.0/library/presto'
Warning message:
In i.p(...) :
  installation of package ‘C:/Users/admin/AppData/Local/Temp/RtmpCKCvXd/remotes428c7f519c8/presto-master’ had non-zero exit status

And I can't install and found presto from CRAN. Could you please help me or share with me the binary version of presto ?
Thank you in advance for your help. And I hope I can install presto from CRAN or Bioconductor soon ^*^.

Best wishes!

@slowkow
Copy link
Member

slowkow commented Dec 10, 2021

Thanks for reporting the issue.

The important error in your messages is this:

undefined reference to `__mingw_strtof'

Searching for "undefined reference to `__mingw_strtof'" takes me to this report:

The last comment on that page says:

I couldn't resist and removed all gcc entries from the env PATH, which solved the problem. I apologize for the unnecessary trouble I have caused - at least I learned several new things about mingw.

In other words, you might consider trying to reconfigure your system, and then compilation might work. Sorry for the hassle.

@SeadonXing
Copy link
Author

Dear Kamil,

Thank you very much for your help ! I reinstalled Rtools and installed presto from the local, which solved the problem.

Now I am enjoying the presto !
Many thanks !
Seadon

@massonix
Copy link

Hi presto team, thanks for developing this tool!

I obtain a similar error:

> remotes::install_github('immunogenomics/presto')
Downloading GitHub repo immunogenomics/presto@HEAD
Error: Failed to install 'presto' from GitHub:
  Could not find tools necessary to compile a package
Call `pkgbuild::check_build_tools(debug = TRUE)` to diagnose the problem.

Any idea what could be the issue?

@slowkow
Copy link
Member

slowkow commented Jan 21, 2022

@massonix Could you try running pkgbuild::check_build_tools(debug = TRUE) and reporting the output?

@Byronxy
Copy link

Byronxy commented Jul 12, 2022

I met the same issue in Ubuntu 20. I figure it our by installing in R console rather than in Rstudio

@denvercal1234GitHub
Copy link

denvercal1234GitHub commented Sep 18, 2022

pkgbuild::check_build_tools(debug = TRUE)
Your system is ready to build packages!

Hi @slowkow, I still obtained error while aiming to install the package which is a dependency to the Azimuth package I needed. Any advice to address this error? Thank you so much!

> install_github('immunogenomics/presto')
Using github PAT from envvar GITHUB_PAT
Downloading GitHub repo immunogenomics/presto@HEAD
✔  checking for file ‘/private/var/folders/yf/mfkcsd412qndhd65fdwcz7l40000gn/T/RtmptApd9r/remotes9058745962de/immunogenomics-presto-052085d/DESCRIPTION’ ...
─  preparing ‘presto’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘presto_1.0.0.tar.gz’
   
* installing *source* package ‘presto’ ...
** using staged installation
** libs
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:30:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/r/headers.h:62:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:100:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:642:26: error: no template named 'numeric_limits'
    bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:642:60: error: no template named 'numeric_limits'
    bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
                                                           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:643:18: error: no template named 'numeric_limits'
    int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:643:50: error: no template named 'numeric_limits'
    int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
                                                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:648:17: error: no template named 'numeric_limits'
  static_assert(numeric_limits<_FloatT>::radix == 2, "FloatT has incorrect radix");
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:651:25: error: no template named 'numeric_limits'
  return _FloatBigger ? numeric_limits<_IntT>::max() :  (numeric_limits<_IntT>::max() >> _Bits << _Bits);
                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:651:58: error: no template named 'numeric_limits'
  return _FloatBigger ? numeric_limits<_IntT>::max() :  (numeric_limits<_IntT>::max() >> _Bits << _Bits);
                                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:645:25: error: no return statement in constexpr function
_LIBCPP_CONSTEXPR _IntT __max_representable_int_for_float() _NOEXCEPT {
                        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:661:16: error: no template named 'numeric_limits'
  using _Lim = numeric_limits<_IntT>;
               ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:664:12: error: use of undeclared identifier '_Lim'
    return _Lim::max();
           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:665:21: error: use of undeclared identifier '_Lim'
  } else if (__r <= _Lim::lowest()) {
                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:666:12: error: use of undeclared identifier '_Lim'
    return _Lim::min();
           ^
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:30:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/r/headers.h:62:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:153:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/unordered_map:437:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__hash_table:16:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:653:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/functional:490:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/search.h:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__iterator/iterator_traits.h:14:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__iterator/incrementable_traits.h:14:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/concepts:134:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional_base:22:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/exception:83:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstdlib:138:9: error: target of using declaration conflicts with declaration already in scope
using ::abs _LIBCPP_USING_IF_EXISTS;
        ^
/usr/local/include/stdlib.h:132:6: note: target of using declaration
int      abs(int) __pure2;
         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:338:1: note: conflicting declaration
using ::abs _LIBCPP_USING_IF_EXISTS;
^
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:65:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/complex:853:1: error: declaration conflicts with target of using declaration already in scope
abs(const complex<_Tp>& __c)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:338:1: note: target of using declaration
using ::abs _LIBCPP_USING_IF_EXISTS;
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:338:9: note: using declaration
using ::abs _LIBCPP_USING_IF_EXISTS;
        ^
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:65:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/complex:910:16: error: reference to unresolved using declaration
        return abs(__c.real());
               ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:338:1: note: using declaration annotated with 'using_if_exists' here
using ::abs _LIBCPP_USING_IF_EXISTS;
^
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:65:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/complex:912:16: error: reference to unresolved using declaration
        return abs(__c.imag());
               ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:338:1: note: using declaration annotated with 'using_if_exists' here
using ::abs _LIBCPP_USING_IF_EXISTS;
^
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:65:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/complex:969:16: error: reference to unresolved using declaration
        __re = abs(__re);
               ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:338:1: note: using declaration annotated with 'using_if_exists' here
using ::abs _LIBCPP_USING_IF_EXISTS;
^
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:65:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/complex:1022:29: error: reference to unresolved using declaration
    return complex<_Tp>(log(abs(__x)), arg(__x));
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:338:1: note: using declaration annotated with 'using_if_exists' here
using ::abs _LIBCPP_USING_IF_EXISTS;
^
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:65:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/complex:1049:23: error: reference to unresolved using declaration
    return polar(sqrt(abs(__x)), arg(__x) / _Tp(2));
                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:338:1: note: using declaration annotated with 'using_if_exists' here
using ::abs _LIBCPP_USING_IF_EXISTS;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘presto’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/presto’
Warning in i.p(...) :
  installation of package ‘/var/folders/yf/mfkcsd412qndhd65fdwcz7l40000gn/T//RtmptApd9r/file9058186a187f/presto_1.0.0.tar.gz’ had non-zero exit status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants