compilation error on OpenSuse tumbleweed
SinomeM opened this issue · 11 comments
Hi I'm getting the following error while trying to install the package:
> BiocManager::install('mzR')
'getOption("repos")' replaces Bioconductor standard repositories, see 'help("repositories", package = "BiocManager")' for
details.
Replacement repositories:
CRAN: https://cran.rstudio.com/
Bioconductor version 3.17 (BiocManager 1.30.20), R 4.3.0 (2023-04-21)
Installing package(s) 'mzR'
trying URL 'https://bioconductor.org/packages/3.17/bioc/src/contrib/mzR_2.34.0.tar.gz'
Content type 'application/x-gzip' length 7656299 bytes (7.3 MB)
==================================================
downloaded 7.3 MB
* installing *source* package ‘mzR’ ...
** using staged installation
** libs
using C++ compiler: ‘g++-12 (SUSE Linux) 12.3.0’
using C++11
rm -f RcppPwiz.o RcppPwizModule.o RcppIdent.o RcppIdentModule.o ./boost/libs/system/src/error_code.o ./boost/libs/regex/src/posix_api.o ./boost/libs/regex/src/regex_debug.o ./boost/libs/regex/src/regex.o ./boost/libs/regex/src/wide_posix_api.o ./boost/libs/regex/src/static_mutex.o ./boost/libs/iostreams/src/zlib.o ./boost/libs/iostreams/src/file_descriptor.o ./boost/libs/filesystem/src/operations.o ./boost/libs/filesystem/src/directory.o ./boost/libs/filesystem/src/exception.o ./boost/libs/filesystem/src/path.o ./boost/libs/filesystem/src/unique_path.o ./boost/libs/filesystem/src/utf8_codecvt_facet.o ./boost/libs/chrono/src/chrono.o ./boost/libs/chrono/src/process_cpu_clocks.o ./boost/libs/chrono/src/thread_clock.o ./pwiz/data/msdata/Version.o ./pwiz/data/identdata/Version.o ./pwiz/data/common/MemoryIndex.o ./pwiz/data/common/CVTranslator.o ./pwiz/data/common/cv.o ./pwiz/data/common/ParamTypes.o ./pwiz/data/common/BinaryIndexStream.o ./pwiz/data/common/diff_std.o ./pwiz/data/common/Unimod.o ./pwiz/data/msdata/mz5/Configuration_mz5.o ./pwiz/data/msdata/mz5/Connection_mz5.o ./pwiz/data/msdata/mz5/Datastructures_mz5.o ./pwiz/data/msdata/mz5/ReferenceRead_mz5.o ./pwiz/data/msdata/mz5/ReferenceWrite_mz5.o ./pwiz/data/msdata/mz5/Translator_mz5.o ./pwiz/data/msdata/DefaultReaderList.o ./pwiz/data/msdata/ChromatogramList_mzML.o ./pwiz/data/msdata/ChromatogramList_mz5.o ./pwiz/data/msdata/examples.o ./pwiz/data/msdata/Serializer_mzML.o ./pwiz/data/msdata/Serializer_MSn.o ./pwiz/data/msdata/Reader.o ./pwiz/data/msdata/Serializer_mz5.o ./pwiz/data/msdata/Serializer_MGF.o ./pwiz/data/msdata/Serializer_mzXML.o ./pwiz/data/msdata/SpectrumListBase.o ./pwiz/data/msdata/SpectrumList_MGF.o ./pwiz/data/msdata/SpectrumList_mzML.o ./pwiz/data/msdata/SpectrumList_MSn.o ./pwiz/data/msdata/SpectrumList_mz5.o ./pwiz/data/msdata/BinaryDataEncoder.o ./pwiz/data/msdata/Diff.o ./pwiz/data/msdata/MSData.o ./pwiz/data/msdata/References.o ./pwiz/data/msdata/SpectrumList_mzXML.o ./pwiz/data/msdata/IO.o ./pwiz/data/msdata/SpectrumList_BTDX.o ./pwiz/data/msdata/SpectrumInfo.o ./pwiz/data/msdata/LegacyAdapter.o ./pwiz/data/msdata/SpectrumIterator.o ./pwiz/data/msdata/MSDataFile.o ./pwiz/data/msdata/MSNumpress.o ./pwiz/data/msdata/SpectrumListCache.o ./pwiz/data/msdata/Index_mzML.o ./pwiz/data/msdata/SpectrumWorkerThreads.o ./pwiz/data/identdata/IdentDataFile.o ./pwiz/data/identdata/IdentData.o ./pwiz/data/identdata/DefaultReaderList.o ./pwiz/data/identdata/Reader.o ./pwiz/data/identdata/Serializer_protXML.o ./pwiz/data/identdata/Serializer_pepXML.o ./pwiz/data/identdata/Serializer_mzid.o ./pwiz/data/identdata/IO.o ./pwiz/data/identdata/References.o ./pwiz/data/identdata/MascotReader.o ./pwiz/data/proteome/Modification.o ./pwiz/data/proteome/Digestion.o ./pwiz/data/proteome/Peptide.o ./pwiz/data/proteome/AminoAcid.o ./pwiz/utility/minimxml/XMLWriter.o ./pwiz/utility/minimxml/SAXParser.o ./pwiz/utility/chemistry/Chemistry.o ./pwiz/utility/chemistry/ChemistryData.o ./pwiz/utility/chemistry/MZTolerance.o ./pwiz/utility/misc/IntegerSet.o ./pwiz/utility/misc/Base64.o ./pwiz/utility/misc/BinaryData.o ./pwiz/utility/misc/IterationListener.o ./pwiz/utility/misc/MSIHandler.o ./pwiz/utility/misc/Filesystem.o ./pwiz/utility/misc/TabReader.o ./pwiz/utility/misc/random_access_compressed_ifstream.o ./pwiz/utility/misc/SHA1.o ./pwiz/utility/misc/SHA1Calculator.o ./pwiz/utility/misc/sha1calc.o ./pwiz/utility/misc/String.o ./RcppExports.o ./boost/libs/thread/src/pthread/once.o ./boost/libs/thread/src/pthread/thread.o
g++ -std=gnu++11 -I"/usr/lib64/R/include" -DNDEBUG -I./boost_aux/ -I./boost/ -I. -D_LARGEFILE_SOURCE -DHAVE_PWIZ_MZML_LIB -D_NODEBUG -I'/home/simone/R/x86_64-suse-linux-gnu-library/4.3/Rcpp/include' -I'/home/simone/R/x86_64-suse-linux-gnu-library/4.3/Rhdf5lib/include' -I/usr/local/include -fpic -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -c RcppPwiz.cpp -o RcppPwiz.o
In file included from pwiz/data/msdata/MSDataFile.hpp:29,
from RcppPwiz.h:12,
from RcppPwiz.cpp:1:
pwiz/data/msdata/MSData.hpp:425:18: error: ‘int64_t’ in namespace ‘std’ does not name a type
425 | typedef std::int64_t value_type;
| ^~~~~~~
pwiz/data/msdata/MSData.hpp:431:28: error: ‘value_type’ was not declared in this scope
431 | pwiz::util::BinaryData<value_type> data;
| ^~~~~~~~~~
pwiz/data/msdata/MSData.hpp:431:38: error: template argument 1 is invalid
431 | pwiz::util::BinaryData<value_type> data;
| ^
In file included from pwiz/data/msdata/Reader.hpp:29,
from pwiz/data/msdata/MSDataFile.hpp:30:
./pwiz/utility/chemistry/MzMobilityWindow.hpp: In member function ‘bool pwiz::chemistry::MzMobilityWindow::mobilityValueInBounds(double) const’:
./pwiz/utility/chemistry/MzMobilityWindow.hpp:40:59: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
40 | mobilityBounds.get().first < mobilityValue && mobilityValue < mobilityBounds.get().second;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from pwiz/data/msdata/MSDataFile.hpp:31:
pwiz/data/msdata/BinaryDataEncoder.hpp: At global scope:
pwiz/data/msdata/BinaryDataEncoder.hpp:87:40: error: ‘int64_t’ is not a member of ‘std’
87 | void encode(const std::vector<std::int64_t>& data, std::string& result, size_t* binaryByteCount = NULL) const;
| ^~~~~~~
pwiz/data/msdata/BinaryDataEncoder.hpp:87:40: note: suggested alternatives:
In file included from /usr/include/sys/types.h:155,
from /usr/include/stdlib.h:395,
from /usr/include/c++/13/bits/std_abs.h:38,
from /usr/include/c++/13/cmath:49,
from /home/simone/R/x86_64-suse-linux-gnu-library/4.3/Rcpp/include/Rcpp/platform/compiler.h:100,
from /home/simone/R/x86_64-suse-linux-gnu-library/4.3/Rcpp/include/Rcpp/r/headers.h:62,
from /home/simone/R/x86_64-suse-linux-gnu-library/4.3/Rcpp/include/RcppCommon.h:30,
from /home/simone/R/x86_64-suse-linux-gnu-library/4.3/Rcpp/include/Rcpp.h:27,
from RcppPwiz.h:4:
/usr/include/bits/stdint-intn.h:27:19: note: ‘int64_t’
27 | typedef __int64_t int64_t;
| ^~~~~~~
/usr/include/bits/stdint-intn.h:27:19: note: ‘int64_t’
pwiz/data/msdata/BinaryDataEncoder.hpp:87:40: error: ‘int64_t’ is not a member of ‘std’
87 | void encode(const std::vector<std::int64_t>& data, std::string& result, size_t* binaryByteCount = NULL) const;
| ^~~~~~~
pwiz/data/msdata/BinaryDataEncoder.hpp:87:40: note: suggested alternatives:
/usr/include/bits/stdint-intn.h:27:19: note: ‘int64_t’
27 | typedef __int64_t int64_t;
| ^~~~~~~
/usr/include/bits/stdint-intn.h:27:19: note: ‘int64_t’
pwiz/data/msdata/BinaryDataEncoder.hpp:87:47: error: template argument 1 is invalid
87 | void encode(const std::vector<std::int64_t>& data, std::string& result, size_t* binaryByteCount = NULL) const;
| ^
pwiz/data/msdata/BinaryDataEncoder.hpp:87:47: error: template argument 2 is invalid
pwiz/data/msdata/BinaryDataEncoder.hpp:91:28: error: ‘int64_t’ in namespace ‘std’ does not name a type
91 | void encode(const std::int64_t* data, size_t dataSize, std::string& result, size_t* binaryByteCount = NULL) const;
| ^~~~~~~
pwiz/data/msdata/BinaryDataEncoder.hpp:100:82: error: ‘int64_t’ is not a member of ‘std’
100 | void decode(const char *encodedData, size_t len, pwiz::util::BinaryData<std::int64_t>& result) const;
| ^~~~~~~
pwiz/data/msdata/BinaryDataEncoder.hpp:100:82: note: suggested alternatives:
/usr/include/bits/stdint-intn.h:27:19: note: ‘int64_t’
27 | typedef __int64_t int64_t;
| ^~~~~~~
/usr/include/bits/stdint-intn.h:27:19: note: ‘int64_t’
pwiz/data/msdata/BinaryDataEncoder.hpp:100:82: error: ‘int64_t’ is not a member of ‘std’
100 | void decode(const char *encodedData, size_t len, pwiz::util::BinaryData<std::int64_t>& result) const;
| ^~~~~~~
pwiz/data/msdata/BinaryDataEncoder.hpp:100:82: note: suggested alternatives:
/usr/include/bits/stdint-intn.h:27:19: note: ‘int64_t’
27 | typedef __int64_t int64_t;
| ^~~~~~~
/usr/include/bits/stdint-intn.h:27:19: note: ‘int64_t’
pwiz/data/msdata/BinaryDataEncoder.hpp:100:89: error: template argument 1 is invalid
100 | void decode(const char *encodedData, size_t len, pwiz::util::BinaryData<std::int64_t>& result) const;
| ^
pwiz/data/msdata/BinaryDataEncoder.hpp:101:77: error: ‘int64_t’ is not a member of ‘std’
101 | void decode(const std::string& encodedData, pwiz::util::BinaryData<std::int64_t>& result) const
| ^~~~~~~
pwiz/data/msdata/BinaryDataEncoder.hpp:101:77: note: suggested alternatives:
/usr/include/bits/stdint-intn.h:27:19: note: ‘int64_t’
27 | typedef __int64_t int64_t;
| ^~~~~~~
/usr/include/bits/stdint-intn.h:27:19: note: ‘int64_t’
pwiz/data/msdata/BinaryDataEncoder.hpp:101:77: error: ‘int64_t’ is not a member of ‘std’
101 | void decode(const std::string& encodedData, pwiz::util::BinaryData<std::int64_t>& result) const
| ^~~~~~~
pwiz/data/msdata/BinaryDataEncoder.hpp:101:77: note: suggested alternatives:
/usr/include/bits/stdint-intn.h:27:19: note: ‘int64_t’
27 | typedef __int64_t int64_t;
| ^~~~~~~
/usr/include/bits/stdint-intn.h:27:19: note: ‘int64_t’
pwiz/data/msdata/BinaryDataEncoder.hpp:101:84: error: template argument 1 is invalid
101 | void decode(const std::string& encodedData, pwiz::util::BinaryData<std::int64_t>& result) const
| ^
RcppPwiz.cpp: In member function ‘Rcpp::List RcppPwiz::getPeakList(Rcpp::IntegerVector)’:
RcppPwiz.cpp:407:44: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
407 | if (current_scan < 1 || current_scan > n_scans) {
| ~~~~~~~~~~~~~^~~~~~~~~
RcppPwiz.cpp: In member function ‘Rcpp::DataFrame RcppPwiz::getChromatogramsInfo(int)’:
RcppPwiz.cpp:853:49: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
853 | } else if ( (whichChrom < 0) || (whichChrom > clp->size()) ) {
| ~~~~~~~~~~~^~~~~~~~~~~~~
RcppPwiz.cpp:863:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<pwiz::msdata::TimeIntensityPair>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
863 | for (int i = 0; i < pairs.size(); i++) {
| ~~^~~~~~~~~~~~~~
RcppPwiz.cpp: In member function ‘Rcpp::NumericMatrix RcppPwiz::get3DMap(std::vector<int>, double, double, double)’:
RcppPwiz.cpp:1014:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
1014 | for (int i = 0; i < scanNumbers.size(); i++)
| ~~^~~~~~~~~~~~~~~~~~~~
RcppPwiz.cpp:1020:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<pwiz::msdata::MZIntensityPair>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
1020 | for (int k=0; k < pairs.size(); k++)
| ~~^~~~~~~~~~~~~~
make: *** [/usr/lib64/R/etc/Makeconf:200: RcppPwiz.o] Error 1
ERROR: compilation failed for package ‘mzR’
* removing ‘/home/simone/R/x86_64-suse-linux-gnu-library/4.3/mzR’
Warning in install.packages(...) :
installation of package ‘mzR’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmp0iZPWg/downloaded_packages’
Installation paths not writeable, unable to update packages
path: /usr/lib64/R/library
packages:
class, KernSmooth, MASS, Matrix, nnet
I undertand that this can be expected and cannot be fixed by me but it requires an update on your side, am I correct?
Thanks, Simone
Hi, thanks for reporting. Is there a docker container where we can try to reproduce ?
So this is on gcc/g++ 12.3.0 ?
Seems very similar to #285
Yours,
Steffen
Hi, yes it should be on gcc 12.3. I'll try to replicate the error on the official docker image and be back!
So maybe doesn't need a Manjaro/OpenSuse container specifically, anything with very recent g++ should trigger it,
and the fix would be similar to https://gitlab.kitware.com/vtk/vtk/-/issues/18782 and https://bbs.archlinux.org/viewtopic.php?pid=2100273#p2100273
Yours, Steffen
Hi, on Fedora with GCC Red Hat 13.1.1-2, mzR compiles; I need a running xcms for a 3-days course next week; thus, I will work on Fedora 38 this time. In week 26+, I'm free again to test different compilers/ environments on Manjaro. Could there also be an issue with the boost libraries (a common problem with the trans-proteomic pipeline)?
So the pwiz code hasn't changed
https://github.com/ProteoWizard/pwiz/blob/09bc7650f1b3d4f5f85d018bdb8c6f84b4b1479a/pwiz/data/msdata/BinaryDataEncoder.hpp#L100
so it is not our aged pwiz snapshot we use.
It could be as simple as adding #include <cstdint>
somewhere in RcppPwiz.[cpp|h]
,
I can check once I know a container to easily reproduce. Unsure why it works on GCC Red Hat 13.1.1
Yours, Steffen
Just general question - wouldn't it maybe be easier for linux users to use the Bioc docker image instead of "system R"? Docker should run almost natively on linux and if there are any security concerns, singularity should be the best alternative. We're using that on our cluster (using the converted BioC docker image).
Hi, a hint from Kurt Hornik led me to investigate versions:
There was already a fix for this issue, it should be in 2.35.1
a9788d4
and seems to be in BioC devel: http://bioconductor.org/packages/devel/bioc/news/mzR/NEWS
but didn't make it into the current release: http://bioconductor.org/packages/release/bioc/news/mzR/NEWS
Can you check this fixes your issue ?
Yours, Steffen
I cherry-picked the commit into current release version, should be in mzR-2.34.1 shortly.
Let's keep fingers crossed, yours, Steffen
Cool, thanks for the feedback ! Yours, Steffen