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

installation problem #292

Open
Yingjie-ZhangOA opened this issue Mar 25, 2024 · 10 comments
Open

installation problem #292

Yingjie-ZhangOA opened this issue Mar 25, 2024 · 10 comments

Comments

@Yingjie-ZhangOA
Copy link

Hi,

I recently run into installation error, please see the error message and session below. It only concerns macos, neither on windows nor on linux.

I've updated mzR and bioconductor, unfortunately these were not enough to solve the issue.

Warning in fun(libname, pkgname) :
  mzR has been built against a different Rcpp version (1.0.9)
than is installed on your system (1.0.12). This might lead to errors
when loading mzR. If you encounter such issues, please send a report,
including the output of sessionInfo() to the Bioc support forum at
https://support.bioconductor.org/. For details see also
https://github.com/sneumann/mzR/wiki/mzR-Rcpp-compiler-linker-issue.
Error in .doLoadActions(where, attach) :
  error in load action .__A__.1 for package mzR: loadModule(module = "Pwiz", what = TRUE, env = ns, loadNow = TRUE): Unable to load module "Pwiz": vector is too large
Calls: <Anonymous> ... namespaceImport -> loadNamespace -> <Anonymous> -> .doLoadActions
Execution halted
ERROR: lazy loading failed for packageMergeION* removing/Users/yzhang/Library/R/x86_64/4.2/library/MergeION* restoring previous/Users/yzhang/Library/R/x86_64/4.2/library/MergeIONWarning message:
In i.p(...) :
  installation of package/var/folders/wc/1qjqcvbd3xqgtrmdwlbsjg_40000gp/T//Rtmpp4b6rR/file36c20bd025b/MergeION_0.2.tar.gzhad non-zero exit status
> sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur ... 10.16

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

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

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

loaded via a namespace (and not attached):
 [1] ps_1.7.6            prettyunits_1.2.0   crayon_1.5.2
 [4] withr_3.0.0         rprojroot_2.0.3     R6_2.5.1
 [7] cli_3.6.2           curl_5.2.1          remotes_2.5.0
[10] callr_3.7.3         desc_1.4.2          tools_4.2.2
[13] compiler_4.2.2      processx_3.8.4      pkgbuild_1.4.0
[16] BiocManager_1.30.22
>
@sneumann
Copy link
Owner

Hi, not having a Mac I can't reproduce, but could you try to re-install mzR from source, since your setup has a newer Rcpp 1.0.12 ? Yours, Steffen

@Yingjie-ZhangOA
Copy link
Author

Yingjie-ZhangOA commented Mar 26, 2024

Thanks.

I've reverted Rcpp version to 1.0.9 and install mzR from source.

install.packages('mzR_1.4.7.tar.gz', repos =NULL, type = 'source')
Installing package into/Users/yzhang/Library/R/x86_64/4.2/library’
(aslibis unspecified)
* installing *source* packagemzR...
** using staged installation
** libs
rm -f cramp.o  ramp_base64.o  ramp.o  RcppRamp.o RcppRampModule.o rnetCDF.o ./boost/system/src/error_code.o ./boost/regex/src/posix_api.o ./boost/regex/src/fileiter.o ./boost/regex/src/regex_raw_buffer.o ./boost/regex/src/cregex.o ./boost/regex/src/regex_debug.o ./boost/regex/src/instances.o ./boost/regex/src/icu.o ./boost/regex/src/usinstances.o ./boost/regex/src/regex.o ./boost/regex/src/wide_posix_api.o ./boost/regex/src/regex_traits_defaults.o ./boost/regex/src/winstances.o ./boost/regex/src/wc_regex_traits.o ./boost/regex/src/c_regex_traits.o ./boost/regex/src/cpp_regex_traits.o ./boost/regex/src/static_mutex.o ./boost/regex/src/w32_regex_traits.o ./pwiz/data/msdata/Version.o ./pwiz/utility/minimxml/XMLWriter.o ./pwiz/utility/minimxml/SAXParser.o ./boost/iostreams/src/zlib.o ./boost/thread/src/pthread/once.o ./boost/filesystem/src/operations.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/msdata/SpectrumList_MGF.o ./pwiz/data/msdata/DefaultReaderList.o ./pwiz/data/msdata/ChromatogramList_mzML.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_MGF.o ./pwiz/data/msdata/Serializer_mzXML.o ./pwiz/data/msdata/SpectrumList_mzML.o ./pwiz/data/msdata/SpectrumList_MSn.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/RAMPAdapter.o ./pwiz/data/msdata/LegacyAdapter.o ./pwiz/data/msdata/SpectrumIterator.o ./pwiz/data/msdata/MSDataFile.o ./pwiz/data/msdata/SpectrumListCache.o ./pwiz/utility/misc/IntegerSet.o ./pwiz/utility/misc/Base64.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 ./random_access_gzFile.o rampR.o
/usr/local/Cellar/gcc/13.2.0/bin/g++-13 -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -D_LARGEFILE_SOURCE -I./boost_aux/ -I. -DHAVE_PWIZ_MZML_LIB -I'/Users/yzhang/Library/R/x86_64/4.2/library/Rcpp/include' -I/usr/local/Cellar/gcc/13.2.0/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include   -fPIC  -g -O3 -Wall -std=c++11 -mtune=native -pipe -c cramp.cpp -o cramp.o
cramp.cpp:4:1: warning: "/*" within comment [-Wcomment]
    4 | /***************************************************************************
      |
In file included from cramp.cpp:40:
cramp.h: In copy constructor 'rampScanInfo::rampScanInfo(rampScanInfo&)':
cramp.h:236:14: warning: 'void* memmove(void*, const void*, size_t)' writing to an object of type 'class rampScanInfo' with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
  236 |       memmove(this,&rhs,sizeof(rhs));
      |       ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
cramp.h:228:7: note: 'class rampScanInfo' declared here
  228 | class rampScanInfo: public rampInfo  {
      |       ^~~~~~~~~~~~
cramp.h: In copy constructor 'rampRunInfo::rampRunInfo(const rampRunInfo&)':
cramp.h:283:14: warning: 'void* memmove(void*, const void*, size_t)' writing to an object of type 'class rampRunInfo' with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
  283 |       memmove(this,&rhs,sizeof(rhs));
      |       ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
cramp.h:275:7: note: 'class rampRunInfo' declared here
  275 | class rampRunInfo: public rampInfo  {
      |       ^~~~~~~~~~~
cramp.h: In constructor 'cRamp::cRamp(const char*, bool)':
cramp.h:143:9: warning: 'cRamp::m_declaredScansOnly' will be initialized after [-Wreorder]
  143 |    bool m_declaredScansOnly; // if true, suppress RAMP's habit of adding scans to fill in between declared scans
      |         ^~~~~~~~~~~~~~~~~~~
cramp.h:142:17: warning:   'rampRunInfo* cRamp::m_runInfo' [-Wreorder]
  142 |    rampRunInfo *m_runInfo; // scan count etc
      |                 ^~~~~~~~~
cramp.cpp:59:1: warning:   when initialized here [-Wreorder]
   59 | cRamp::cRamp( const char* fileName,bool declaredScansOnly ) :
      | ^~~~~
/usr/local/Cellar/gcc/13.2.0/bin/g++-13 -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -D_LARGEFILE_SOURCE -I./boost_aux/ -I. -DHAVE_PWIZ_MZML_LIB -I'/Users/yzhang/Library/R/x86_64/4.2/library/Rcpp/include' -I/usr/local/Cellar/gcc/13.2.0/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include   -fPIC  -g -O3 -Wall -std=c++11 -mtune=native -pipe -c ramp_base64.cpp -o ramp_base64.o
/usr/local/Cellar/gcc/13.2.0/bin/g++-13 -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -D_LARGEFILE_SOURCE -I./boost_aux/ -I. -DHAVE_PWIZ_MZML_LIB -I'/Users/yzhang/Library/R/x86_64/4.2/library/Rcpp/include' -I/usr/local/Cellar/gcc/13.2.0/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include   -fPIC  -g -O3 -Wall -std=c++11 -mtune=native -pipe -c ramp.cpp -o ramp.o
In file included from ./boost/smart_ptr/shared_ptr.hpp:32,
                 from ./boost/shared_ptr.hpp:17,
                 from ././pwiz/data/msdata/RAMPAdapter.hpp:30,
                 from ramp.cpp:43:
./boost/smart_ptr/detail/shared_count.hpp:196:33: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
  196 |     explicit shared_count( std::auto_ptr<Y> & r ): pi_( new sp_counted_impl_p<Y>( r.get() ) )
      |                                 ^~~~~~~~
In file included from /usr/local/Cellar/gcc/13.2.0/include/c++/13/memory:78,
                 from ./boost/config/no_tr1/memory.hpp:21,
                 from ./boost/smart_ptr/shared_ptr.hpp:27:
/usr/local/Cellar/gcc/13.2.0/include/c++/13/bits/unique_ptr.h:65:28: note: declared here
   65 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~
./boost/smart_ptr/shared_ptr.hpp:150:65: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
  150 | template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R >
      |                                                                 ^~~~~~~~
/usr/local/Cellar/gcc/13.2.0/include/c++/13/bits/unique_ptr.h:65:28: note: declared here
   65 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~
./boost/smart_ptr/shared_ptr.hpp:279:30: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
  279 |     explicit shared_ptr(std::auto_ptr<Y> & r): px(r.get()), pn()
      |                              ^~~~~~~~
/usr/local/Cellar/gcc/13.2.0/include/c++/13/bits/unique_ptr.h:65:28: note: declared here
   65 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~
./boost/smart_ptr/shared_ptr.hpp:323:34: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
  323 |     shared_ptr & operator=( std::auto_ptr<Y> & r )
      |                                  ^~~~~~~~
/usr/local/Cellar/gcc/13.2.0/include/c++/13/bits/unique_ptr.h:65:28: note: declared here
   65 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~
ramp.cpp: In function 'RAMPFILE* rampOpenFile(const char*)':
ramp.cpp:213:18: warning: unused variable 'fgot' [-Wunused-variable]
  213 |            char *fgot=ramp_fgets(buf,sizeof(buf)-1,result);
      |                  ^~~~
ramp.cpp: In function 'ramp_fileoffset_t getIndexOffset(RAMPFILE*)':
ramp.cpp:396:11: warning: unused variable 'nread' [-Wunused-variable]
  396 |    size_t nread = ramp_fread(indexOffsetTemp, sizeof(indexOffsetTemp), pFI);
      |           ^~~~~
ramp.cpp: In function 'ramp_fileoffset_t* readIndex(RAMPFILE*, ramp_fileoffset_t, int*)':
ramp.cpp:573:22: warning: unused variable 'fgot' [-Wunused-variable]
  573 |                char *fgot=ramp_fgets(buf, SIZE_BUF, pFI);
      |                      ^~~~
ramp.cpp:609:22: warning: unused variable 'fgot' [-Wunused-variable]
  609 |                char *fgot=ramp_fgets(buf, SIZE_BUF, pFI);
      |                      ^~~~
ramp.cpp:645:19: warning: unused variable 'fgot' [-Wunused-variable]
  645 |             char *fgot=ramp_fgets(buf, SIZE_BUF, pFI);
      |                   ^~~~
ramp.cpp: In function 'void readHeader(RAMPFILE*, ramp_fileoffset_t, ScanHeaderStruct*)':
ramp.cpp:1224:22: warning: unused variable 'fgot' [-Wunused-variable]
 1224 |                char *fgot=ramp_fgets(stringBuf, SIZE_BUF, pFI);
      |                      ^~~~
ramp.cpp: In function 'int readMsLevel(RAMPFILE*, ramp_fileoffset_t)':
ramp.cpp:1302:13: warning: unused variable 'fgot' [-Wunused-variable]
 1302 |       char *fgot=ramp_fgets(stringBuf, SIZE_BUF, pFI);
      |             ^~~~
ramp.cpp:1298:10: warning: unused variable 'fgot' [-Wunused-variable]
 1298 |    char *fgot=ramp_fgets(stringBuf, SIZE_BUF, pFI);
      |          ^~~~
ramp.cpp: In function 'char* rampConstructInputPath(char*, int, const char*, const char*)':
ramp.cpp:1496:20: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
 1496 |    for (int j= 0; j< g.gl_pathc; j++) { // for each file in directory
      |                   ~^~~~~~~~~~~~
ramp.cpp: In function 'RAMPREAL* readPeaks(RAMPFILE*, ramp_fileoffset_t)':
ramp.cpp:1796:23: warning: unused variable 'nread' [-Wunused-variable]
 1796 |                size_t nread = ramp_fread(pData+partial,(int)(peaksLen-partial), pFI);
      |                       ^~~~~
ramp.cpp:1939:36: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
 1939 |                   pEndAttrValue  = '\0';
      |                                    ^~~~
      |                                    |
      |                                    char
ramp.cpp:1958:35: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
 1958 |                   pEndAttrValue = '\0';
      |                                   ^~~~
      |                                   |
      |                                   char
ramp.cpp:1969:21: warning: unused variable 'fgot' [-Wunused-variable]
 1969 |               char *fgot=ramp_fgets(buf, sizeof(buf)-1 , pFI);
      |                     ^~~~
ramp.cpp:2013:17: warning: unused variable 'nread' [-Wunused-variable]
 2013 |          size_t nread = ramp_fread(pData+partial,peaksLen-partial, pFI);
      |                 ^~~~~
ramp.cpp:1894:13: warning: unused variable 'fgot' [-Wunused-variable]
 1894 |       char *fgot=ramp_fgets(buf, sizeof(buf)-1, pFI);
      |             ^~~~
ramp.cpp: In function 'void readMSRun(RAMPFILE*, RunHeaderStruct*)':
ramp.cpp:2171:13: warning: unused variable 'fgot' [-Wunused-variable]
 2171 |       char *fgot=ramp_fgets(stringBuf, SIZE_BUF, pFI);
      |             ^~~~
ramp.cpp:2191:13: warning: unused variable 'fgot' [-Wunused-variable]
 2191 |       char *fgot=ramp_fgets(stringBuf, SIZE_BUF, pFI);
      |             ^~~~
ramp.cpp:2167:10: warning: unused variable 'fgot' [-Wunused-variable]
 2167 |    char *fgot=ramp_fgets(stringBuf, SIZE_BUF, pFI);
      |          ^~~~
ramp.cpp: In function 'InstrumentStruct* getInstrumentStruct(RAMPFILE*)':
ramp.cpp:2333:16: warning: unused variable 'fgot' [-Wunused-variable]
 2333 |          char *fgot=ramp_fgets(stringBuf, SIZE_BUF, pFI);
      |                ^~~~
ramp.cpp:2369:15: warning: unused variable 'fgot' [-Wunused-variable]
 2369 |         char *fgot=ramp_fgets(stringBuf, SIZE_BUF, pFI);
      |               ^~~~
ramp.cpp:2323:10: warning: unused variable 'fgot' [-Wunused-variable]
 2323 |    char *fgot=ramp_fgets(stringBuf, SIZE_BUF, pFI);
      |          ^~~~
make: *** [ramp.o] Error 1
ERROR: compilation failed for package ‘mzR’
* removing ‘/Users/yzhang/Library/R/x86_64/4.2/library/mzR’
* restoring previous ‘/Users/yzhang/Library/R/x86_64/4.2/library/mzR’
Warning message:
In install.packages("mzR_1.4.7.tar.gz", repos = NULL, type = "source") :
  installation of package ‘mzR_1.4.7.tar.gz’ had non-zero exit status

@sneumann
Copy link
Owner

ok, that's (at least) two cases of invalid conversion from 'char' to 'const char*' on gcc-13.2.0.
The mzR_1.4.7.tar.gz is rather old (more than 10 yrs ?!), the current release is 2.36.0
https://bioconductor.org/packages/release/bioc/html/mzR.html
Can you try a more recent version ? If you need mzData support (hopefully not), you need something older than 2.29.3
Yours, Steffen

@Yingjie-ZhangOA
Copy link
Author

ah, sorry, I overlooked the version. Reinstalled from https://git.bioconductor.org/packages/mzR

Running /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL \
  /var/folders/wc/1qjqcvbd3xqgtrmdwlbsjg_40000gp/T//Rtmp1EVXxS/mzR_2.37.3.tar.gz \
  --install-tests
* installing to library/Users/yzhang/Library/R/x86_64/4.2/library* installing *source* packagemzR...
** using staged installation
** libs
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
/usr/local/Cellar/gcc/13.2.0/bin/g++-13 -fopenmp -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I./boost_aux/ -I./boost/ -I. -D_LARGEFILE_SOURCE -DHAVE_PWIZ_MZML_LIB -D_NODEBUG    -I'/Users/yzhang/Library/R/x86_64/4.2/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rhdf5lib/include' -I/usr/local/Cellar/gcc/13.2.0/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppPwiz.cpp -o RcppPwiz.o
In file included from pwiz/data/msdata/Reader.hpp:29,
                 from pwiz/data/msdata/MSDataFile.hpp:30,
                 from RcppPwiz.h:12,
                 from RcppPwiz.cpp:1:
./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;
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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++)
      |                         ~~^~~~~~~~~~~~~~
/usr/local/Cellar/gcc/13.2.0/bin/g++-13 -fopenmp -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I./boost_aux/ -I./boost/ -I. -D_LARGEFILE_SOURCE -DHAVE_PWIZ_MZML_LIB -D_NODEBUG    -I'/Users/yzhang/Library/R/x86_64/4.2/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rhdf5lib/include' -I/usr/local/Cellar/gcc/13.2.0/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppPwizModule.cpp -o RcppPwizModule.o
In file included from pwiz/data/msdata/Reader.hpp:29,
                 from pwiz/data/msdata/MSDataFile.hpp:30,
                 from RcppPwiz.h:12,
                 from RcppPwizModule.cpp:2:
./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;
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/gcc/13.2.0/bin/g++-13 -fopenmp -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I./boost_aux/ -I./boost/ -I. -D_LARGEFILE_SOURCE -DHAVE_PWIZ_MZML_LIB -D_NODEBUG    -I'/Users/yzhang/Library/R/x86_64/4.2/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rhdf5lib/include' -I/usr/local/Cellar/gcc/13.2.0/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppIdent.cpp -o RcppIdent.o
RcppIdent.cpp: In member function 'Rcpp::DataFrame RcppIdent::getScore()':
RcppIdent.cpp:293:32: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  293 |           for (size_t j = 0; j < nCvParams; j++) {
      |                              ~~^~~~~~~~~~~
RcppIdent.cpp: In member function 'Rcpp::List RcppIdent::getPara()':
RcppIdent.cpp:382:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<pwiz::data::CVParam>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  382 |     for(int i = 0 ; i < sip[0]->additionalSearchParams.cvParams.size(); i++)
      |                     ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RcppIdent.cpp:388:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<pwiz::data::UserParam>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  388 |     for(int i = 0; i < sip[0]->additionalSearchParams.userParams.size(); i++)
      |                    ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/gcc/13.2.0/bin/g++-13 -fopenmp -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I./boost_aux/ -I./boost/ -I. -D_LARGEFILE_SOURCE -DHAVE_PWIZ_MZML_LIB -D_NODEBUG    -I'/Users/yzhang/Library/R/x86_64/4.2/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rhdf5lib/include' -I/usr/local/Cellar/gcc/13.2.0/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppIdentModule.cpp -o RcppIdentModule.o
/usr/local/Cellar/gcc/13.2.0/bin/g++-13 -fopenmp -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I./boost_aux/ -I./boost/ -I. -D_LARGEFILE_SOURCE -DHAVE_PWIZ_MZML_LIB -D_NODEBUG    -I'/Users/yzhang/Library/R/x86_64/4.2/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rhdf5lib/include' -I/usr/local/Cellar/gcc/13.2.0/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include   -fPIC  -Wall -g -O2  -c boost/libs/system/src/error_code.cpp -o boost/libs/system/src/error_code.o
/usr/local/Cellar/gcc/13.2.0/bin/g++-13 -fopenmp -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I./boost_aux/ -I./boost/ -I. -D_LARGEFILE_SOURCE -DHAVE_PWIZ_MZML_LIB -D_NODEBUG    -I'/Users/yzhang/Library/R/x86_64/4.2/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rhdf5lib/include' -I/usr/local/Cellar/gcc/13.2.0/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include   -fPIC  -Wall -g -O2  -c boost/libs/regex/src/posix_api.cpp -o boost/libs/regex/src/posix_api.o
In file included from boost/libs/regex/src/posix_api.cpp:22:
./boost/regex.hpp:32:10: fatal error: boost/regex/v4/regex.hpp: No such file or directory
   32 | #include <boost/regex/v4/regex.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [boost/libs/regex/src/posix_api.o] Error 1
ERROR: compilation failed for packagemzR* removing/Users/yzhang/Library/R/x86_64/4.2/library/mzR* restoring previous/Users/yzhang/Library/R/x86_64/4.2/library/mzR

@sneumann
Copy link
Owner

Ok, we don't ship all of boost which'd become really huge, and new OS/compiler combinations can trigger missing files, which we then have to add manually.
I added now the regex/v4 in branch https://github.com/sneumann/mzR/tree/fix/issue292, which you can install via
devtools::install_github("sneumann/mzR", ref="fix/issue292")
I can't test at the moment, so if something else is missing, please mention here.
Or, you can grab the missing dirs from the upstream tarball https://www.boost.org/users/history/version_1_76_0.html
and open a PR here as soon as it works for you :-)
Yours, Steffen

@Yingjie-ZhangOA
Copy link
Author

Yingjie-ZhangOA commented Mar 26, 2024

Thanks. I could progress quite a bit by installing from fix/issue292 branch, but encountered another issue, note that '/Users/yzhang/Library/R/x86_64/4.2/library/00LOCK-mzR/00new/mzR/libs/mzR.so' does not exist.

...

/usr/local/Cellar/gcc/13.2.0/bin/g++-13 -fopenmp -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/Cellar/gcc/13.2.0/lib -Wl,-rpath,/usr/local/Cellar/gcc/13.2.0/lib -o mzR.so 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 -lpthread /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rhdf5lib/lib/libhdf5_cpp.a /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rhdf5lib/lib/libhdf5.a -L/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rhdf5lib/lib -lsz -laec -lz -ldl -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Users/yzhang/Library/R/x86_64/4.2/library/00LOCK-mzR/00new/mzR/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed formzRin dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Users/yzhang/Library/R/x86_64/4.2/library/00LOCK-mzR/00new/mzR/libs/mzR.so':
  dlopen(/Users/yzhang/Library/R/x86_64/4.2/library/00LOCK-mzR/00new/mzR/libs/mzR.so, 0x0006): symbol not found in flat namespace '__ZN2H56H5FileC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjRKNS_17FileCreatPropListERKNS_15FileAccPropListE'
Error: loading failed
Execution halted
ERROR: loading failed

@sneumann
Copy link
Owner

Hi, the lock thing is independent of mzR, and a halfway broken/aborted installation.
Simply rm -rf /Users/yzhang/Library/R/x86_64/4.2/library/00LOCK-mzR/ should do the trick.
Then re-run the install, and if it works, I'll merge my PR. Yours, Steffen

@Yingjie-ZhangOA
Copy link
Author

Hi, It doesn't seem like a lock issue. I retried with devtools::install(args = "--no-lock") still got the error pointing to the same shared object.

gr

Error: package or namespace load failed formzRin dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Users/yzhang/Library/R/x86_64/4.2/library/mzR/libs/mzR.so':
  dlopen(/Users/yzhang/Library/R/x86_64/4.2/library/mzR/libs/mzR.so, 0x0006): symbol not found in flat namespace '__ZN2H56H5FileC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjRKNS_17FileCreatPropListERKNS_15FileAccPropListE'
Error: loading failed
Execution halted
ERROR: loading failed

@sneumann
Copy link
Owner

sneumann commented Apr 2, 2024

Hi, that's a different message now, and indeed the lock thing is resolved.
This one looks like a mixup of C++ header files and DLLs,
or even a mixup of compilers (llvm and gcc). It can't find a symbol during linking, while during compilation "it was supposed to be available later". The symbol includes FileCreatPropList, which is part of the HDF5 libraries. So my guess would be that you have several versions of libhdf on the system, one maybe the /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rhdf5lib/include and then I have no idea whether you have another HDF5 somewhere in /usr/local/include or elsewhere.
Yours,
Steffen

@sneumann
Copy link
Owner

Hi, is the issue still happening ? There is a related WIP PR in #293 . Is that still needed ? Yours, Steffen

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

2 participants