kowallus / PgRC

PgRC: Pseudogenome based Read Compressor
GNU General Public License v3.0
10 stars 2 forks source link

Build Error in PgRC #5

Closed Abby3017 closed 3 years ago

Abby3017 commented 3 years ago

Hey,

I am trying to build PgRC on servers I am getting build erros.

First One, I tried to build on system having AMD Opteron(tm) Processor 3380. I am using cmake 3.15.2 in this one. PgRC build got successful but when I run any PgRC command it is throwing "illegal hardware instruction (core dumped)".

Second one, I tried to build on system having Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz. In this, cmake 3.15.5 is used. I also used cmake 3.20 but still same error is throwing up. make command is throwing following error:

Scanning dependencies of target PgRC
[  0%] Building CXX object CMakeFiles/PgRC.dir/PgRC.cpp.o
[  3%] Building CXX object CMakeFiles/PgRC.dir/PgRCManager.cpp.o
/scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.cpp: In member function 'void PgTools::PgRCManager::prepareChainData()':
/scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.cpp:80:17: error: use of deleted function 'std::basic_fstream<char>& std::basic_fstream<char>::operator=(const std::basic_fstream<char>&)'
         pgrcOut = fstream(pgRCFileName + TEMPORARY_FILE_SUFFIX, ios::out | ios::binary | ios::trunc);
                 ^
In file included from /scratch2/abhinav/genome_data/repo/PgRC/utils/helper.h:7:0,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.h:4,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.cpp:2:
/usr/include/c++/4.8.2/fstream:776:11: note: 'std::basic_fstream<char>& std::basic_fstream<char>::operator=(const std::basic_fstream<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_fstream : public basic_iostream<_CharT, _Traits>
           ^
/usr/include/c++/4.8.2/fstream:776:11: error: use of deleted function 'std::basic_iostream<char>& std::basic_iostream<char>::operator=(const std::basic_iostream<char>&)'
In file included from /usr/include/c++/4.8.2/iostream:40:0,
                 from /scratch2/abhinav/genome_data/repo/PgRC/utils/helper.h:6,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.h:4,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.cpp:2:
/usr/include/c++/4.8.2/istream:795:11: note: 'std::basic_iostream<char>& std::basic_iostream<char>::operator=(const std::basic_iostream<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_iostream
           ^
/usr/include/c++/4.8.2/istream:795:11: error: use of deleted function 'std::basic_istream<char>& std::basic_istream<char>::operator=(const std::basic_istream<char>&)'
/usr/include/c++/4.8.2/istream:58:11: note: 'std::basic_istream<char>& std::basic_istream<char>::operator=(const std::basic_istream<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_istream : virtual public basic_ios<_CharT, _Traits>
           ^
/usr/include/c++/4.8.2/istream:58:11: error: use of deleted function 'std::basic_ios<char>& std::basic_ios<char>::operator=(const std::basic_ios<char>&)'
In file included from /usr/include/c++/4.8.2/ios:44:0,
                 from /usr/include/c++/4.8.2/ostream:38,
                 from /usr/include/c++/4.8.2/iostream:39,
                 from /scratch2/abhinav/genome_data/repo/PgRC/utils/helper.h:6,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.h:4,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.cpp:2:
/usr/include/c++/4.8.2/bits/basic_ios.h:66:11: note: 'std::basic_ios<char>& std::basic_ios<char>::operator=(const std::basic_ios<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_ios : public ios_base
           ^
In file included from /usr/include/c++/4.8.2/ios:42:0,
                 from /usr/include/c++/4.8.2/ostream:38,
                 from /usr/include/c++/4.8.2/iostream:39,
                 from /scratch2/abhinav/genome_data/repo/PgRC/utils/helper.h:6,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.h:4,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.cpp:2:
/usr/include/c++/4.8.2/bits/ios_base.h:789:5: error: 'std::ios_base& std::ios_base::operator=(const std::ios_base&)' is private
     operator=(const ios_base&);
     ^
In file included from /usr/include/c++/4.8.2/ios:44:0,
                 from /usr/include/c++/4.8.2/ostream:38,
                 from /usr/include/c++/4.8.2/iostream:39,
                 from /scratch2/abhinav/genome_data/repo/PgRC/utils/helper.h:6,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.h:4,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.cpp:2:
/usr/include/c++/4.8.2/bits/basic_ios.h:66:11: error: within this context
     class basic_ios : public ios_base
           ^
In file included from /usr/include/c++/4.8.2/iostream:40:0,
                 from /scratch2/abhinav/genome_data/repo/PgRC/utils/helper.h:6,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.h:4,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.cpp:2:
/usr/include/c++/4.8.2/istream:795:11: error: use of deleted function 'std::basic_ostream<char>& std::basic_ostream<char>::operator=(const std::basic_ostream<char>&)'
     class basic_iostream
           ^
In file included from /usr/include/c++/4.8.2/iostream:39:0,
                 from /scratch2/abhinav/genome_data/repo/PgRC/utils/helper.h:6,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.h:4,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.cpp:2:
/usr/include/c++/4.8.2/ostream:58:11: note: 'std::basic_ostream<char>& std::basic_ostream<char>::operator=(const std::basic_ostream<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_ostream : virtual public basic_ios<_CharT, _Traits>
           ^
/usr/include/c++/4.8.2/ostream:58:11: error: use of deleted function 'std::basic_ios<char>& std::basic_ios<char>::operator=(const std::basic_ios<char>&)'
In file included from /scratch2/abhinav/genome_data/repo/PgRC/utils/helper.h:7:0,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.h:4,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.cpp:2:
/usr/include/c++/4.8.2/fstream:776:11: error: use of deleted function 'std::basic_filebuf<char>& std::basic_filebuf<char>::operator=(const std::basic_filebuf<char>&)'
     class basic_fstream : public basic_iostream<_CharT, _Traits>
           ^
/usr/include/c++/4.8.2/fstream:72:11: note: 'std::basic_filebuf<char>& std::basic_filebuf<char>::operator=(const std::basic_filebuf<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_filebuf : public basic_streambuf<_CharT, _Traits>
           ^
In file included from /usr/include/c++/4.8.2/ios:43:0,
                 from /usr/include/c++/4.8.2/ostream:38,
                 from /usr/include/c++/4.8.2/iostream:39,
                 from /scratch2/abhinav/genome_data/repo/PgRC/utils/helper.h:6,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.h:4,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.cpp:2:
/usr/include/c++/4.8.2/streambuf:810:7: error: 'std::basic_streambuf<_CharT, _Traits>& std::basic_streambuf<_CharT, _Traits>::operator=(const std::basic_streambuf<_CharT, _Traits>&) [with _CharT = char; _Traits = std::char_traits<char>]' is private
       operator=(const basic_streambuf& __sb)
       ^
In file included from /scratch2/abhinav/genome_data/repo/PgRC/utils/helper.h:7:0,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.h:4,
                 from /scratch2/abhinav/genome_data/repo/PgRC/PgRCManager.cpp:2:
/usr/include/c++/4.8.2/fstream:72:11: error: within this context
     class basic_filebuf : public basic_streambuf<_CharT, _Traits>
           ^
make[3]: *** [CMakeFiles/PgRC.dir/PgRCManager.cpp.o] Error 1
make[2]: *** [CMakeFiles/PgRC.dir/all] Error 2
make[1]: *** [CMakeFiles/PgRC.dir/rule] Error 2
make: *** [PgRC] Error 2

Thank you for taking a look into this and let me know if you need additional info.

kowallus commented 3 years ago

I see that you use a rather old gcc version. Could you try compiling using at least gcc 7?

Abby3017 commented 3 years ago

For the first(amd) one, I am using gcc 7.5.0. For the second(intel), I am using gcc 4.8.5. I tried on intel one with 7.5 and it worked. Thanks for answering my query. Any idea why for AMD one it was showing above error ?

kowallus commented 3 years ago

Sorry, I don't know. Maybe, gcc was not properly upgraded? According to stack thread switching to GCC >=5.1 should help.

Abby3017 commented 3 years ago

Thanks again for your input.