sneumann / mzR

This is the git repository matching the Bioconductor package mzR: parser for netCDF, mzXML, mzData and mzML files (mass spectrometry data)
42 stars 26 forks source link

Installation failling #211

Closed caitsimop closed 4 years ago

caitsimop commented 4 years ago

I'm working on Mac OS X 10.14.6 and am unable to install mzR.

I followed the solution from issue #188 and changed the compiler R was calling from clang to gcc.

The tail end of the console output is:

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__config:1090:48: note: expanded from macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
pwiz/data/identdata/Serializer_pepXML.cpp:1545:5: warning: control may reach end of non-void function [-Wreturn-type]
    }
    ^
In file included from pwiz/data/identdata/Serializer_pepXML.cpp:25:
In file included from pwiz/data/identdata/Serializer_pepXML.hpp:27:
In file included from pwiz/data/identdata/IdentData.hpp:29:
In file included from ./pwiz/utility/misc/Exception.hpp:29:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string:505:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string_view:176:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__string:57:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:2428:5: error: static_assert failed due to requirement '__is_forward_iterator<boost::iterators::transform_iterator<pwiz::identdata::(anonymous namespace)::EnzymePtr_specificity, std::__1::__wrap_iter<const boost::shared_ptr<pwiz::identdata::Enzyme> *>, boost::iterators::use_default, boost::iterators::use_default> >::value' "std::min_element requires a ForwardIterator"
    static_assert(__is_forward_iterator<_ForwardIterator>::value,
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:2445:19: note: in instantiation of function template specialization 'std::__1::min_element<boost::iterators::transform_iterator<pwiz::identdata::(anonymous namespace)::EnzymePtr_specificity, std::__1::__wrap_iter<const boost::shared_ptr<pwiz::identdata::Enzyme> *>, boost::iterators::use_default, boost::iterators::use_default>, std::__1::__less<int, int> >' requested here
    return _VSTD::min_element(__first, __last,
                  ^
./boost/boost/range/algorithm/min_element.hpp:44:17: note: in instantiation of function template specialization 'std::__1::min_element<boost::iterators::transform_iterator<pwiz::identdata::(anonymous namespace)::EnzymePtr_specificity, std::__1::__wrap_iter<const boost::shared_ptr<pwiz::identdata::Enzyme> *>, boost::iterators::use_default, boost::iterators::use_default> >' requested here
    return std::min_element(boost::begin(rng), boost::end(rng));
                ^
pwiz/data/identdata/Serializer_pepXML.cpp:418:41: note: in instantiation of function template specialization 'boost::range::min_element<boost::range_detail::transformed_range<pwiz::identdata::(anonymous namespace)::EnzymePtr_specificity, const std::__1::vector<boost::shared_ptr<pwiz::identdata::Enzyme>, std::__1::allocator<boost::shared_ptr<pwiz::identdata::Enzyme> > > > >' requested here
    int minSpecificity = *boost::range::min_element(sip.enzymes.enzymes | boost::adaptors::transformed(EnzymePtr_specificity()));
                                        ^
In file included from pwiz/data/identdata/Serializer_pepXML.cpp:25:
In file included from pwiz/data/identdata/Serializer_pepXML.hpp:27:
In file included from pwiz/data/identdata/IdentData.hpp:29:
In file included from ./pwiz/utility/misc/Exception.hpp:29:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string:505:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string_view:176:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__string:57:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:2494:5: error: static_assert failed due to requirement '__is_forward_iterator<boost::iterators::transform_iterator<pwiz::identdata::(anonymous namespace)::EnzymePtr_missedCleavages, std::__1::__wrap_iter<const boost::shared_ptr<pwiz::identdata::Enzyme> *>, boost::iterators::use_default, boost::iterators::use_default> >::value' "std::max_element requires a ForwardIterator"
    static_assert(__is_forward_iterator<_ForwardIterator>::value,
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:2512:19: note: in instantiation of function template specialization 'std::__1::max_element<boost::iterators::transform_iterator<pwiz::identdata::(anonymous namespace)::EnzymePtr_missedCleavages, std::__1::__wrap_iter<const boost::shared_ptr<pwiz::identdata::Enzyme> *>, boost::iterators::use_default, boost::iterators::use_default>, std::__1::__less<int, int> >' requested here
    return _VSTD::max_element(__first, __last,
                  ^
./boost/boost/range/algorithm/max_element.hpp:44:17: note: in instantiation of function template specialization 'std::__1::max_element<boost::iterators::transform_iterator<pwiz::identdata::(anonymous namespace)::EnzymePtr_missedCleavages, std::__1::__wrap_iter<const boost::shared_ptr<pwiz::identdata::Enzyme> *>, boost::iterators::use_default, boost::iterators::use_default> >' requested here
    return std::max_element(boost::begin(rng), boost::end(rng));
                ^
pwiz/data/identdata/Serializer_pepXML.cpp:504:49: note: in instantiation of function template specialization 'boost::range::max_element<boost::range_detail::transformed_range<pwiz::identdata::(anonymous namespace)::EnzymePtr_missedCleavages, const std::__1::vector<boost::shared_ptr<pwiz::identdata::Enzyme>, std::__1::allocator<boost::shared_ptr<pwiz::identdata::Enzyme> > > > >' requested here
        int maxMissedCleavages = *boost::range::max_element(sip.enzymes.enzymes | boost::adaptors::transformed(EnzymePtr_missedCleavages()));
                                                ^
3 warnings and 2 errors generated.
make: *** [pwiz/data/identdata/Serializer_pepXML.o] Error 1
ERROR: compilation failed for package ‘mzR’
* removing ‘/usr/local/lib/R/3.6/site-library/mzR’

The downloaded source packages are in
    ‘/private/var/folders/7r/y6k22kpj4272slmcx0jc1ffc0000gr/T/Rtmpkfh8QK/downloaded_packages’
Warning message:
In install.packages(...) :
  installation of package ‘mzR’ had non-zero exit status

My sessionInfo() is:

R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin18.6.0 (64-bit)
Running under: macOS Mojave 10.14.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /usr/local/Cellar/openblas/0.3.6_1/lib/libopenblasp-r0.3.6.dylib

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] BiocManager_1.30.8 compiler_3.6.1     tools_3.6.1       

Any help would be appreciated!

jorainer commented 4 years ago

I usually compiled R from source, but that has become more and more tedious over the time. My last setup was the following:

Now, you would have to adapt some settings in that shell script but you could install an R-release with ./install-R-release <r version> <installation dir>, r version could be e.g. 3.6.1 and install dir the directory where you would like to install R. With that installed versions of R I did not have problems installing mzR.

I did however change now to use R/Bioconductor within docker (see https://www.bioconductor.org/help/docker/). It's a little tricky to setup, but works quite well - and I don't have to fiddle around anymore with compiling/installing R on mac (getting the correct compilers etc).

caitsimop commented 4 years ago

Thank you so much for your help!

I tried compiling from source and ran into issues with my libiconv libraries... decided to just reinstall from the precompiled R file and it worked like a charm.

Thanks again!