PDB-REDO / dssp

Application to assign secondary structure to proteins
BSD 2-Clause "Simplified" License
166 stars 19 forks source link

Compilation error #50

Closed davidecarlson closed 1 year ago

davidecarlson commented 1 year ago

Dear dssp devs,

I'm trying to compile dssp with gcc 12.1.0 and running into some errors whose cause is not clear to me. I first built libcif++ from source and then ran the following in the dssp build directory:

`export libmcfp_DIR=/gpfs/software/mrc/build/1.3.6/lib64/cmake/libmcfp export cifpp_DIR=/gpfs/software/libcifpp/build/5.0.7.1

cmake .. -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=pwd/4.2.2 -DCMAKE_PREFIX_PATH=/gpfs/software/mrc/build/1.3.6 `

The cmake output appears to be fine:

-- The CXX compiler identification is GNU 12.1.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /gpfs/software/gcc/12.1.0/bin/g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for C++ include filesystem -- Looking for C++ include filesystem - found -- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED -- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED - Success -- Looking for C++ include pthread.h -- Looking for C++ include pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11") Using resources compiled with -- Configuring done -- Generating done -- Build files have been written to: /gpfs/software/dssp/build

However, the build fails with a lot of errors:

` cmake --build . --config Release [ 16%] Building CXX object CMakeFiles/dssp.dir/src/dssp.cpp.o [ 33%] Linking CXX static library libdssp.a [ 33%] Built target dssp [ 50%] Generating mkdssp_rsrc.obj, ALL [ 66%] Building CXX object CMakeFiles/mkdssp.dir/src/dssp-io.cpp.o /gpfs/software/dssp/src/dssp-io.cpp: In function ‘void writeSheets(cif::datablock&, const dssp&)’: /gpfs/software/dssp/src/dssp-io.cpp:668:48: error: ‘class cif::category’ has no member named ‘find_first’ 668 auto b1 = pdbx_poly_seq_scheme.find_first("asym_id"_key == strand1.front().asym_id() and "seq_id"_key == beg1SeqID); ^~~~~~ /gpfs/software/dssp/src/dssp-io.cpp:669:48: error: ‘class cif::category’ has no member named ‘find_first’ 669 auto e1 = pdbx_poly_seq_scheme.find_first("asym_id"_key == strand1.front().asym_id() and "seq_id"_key == end1SeqID); ^~~~~~ /gpfs/software/dssp/src/dssp-io.cpp:670:48: error: ‘class cif::category’ has no member named ‘find_first’ 670 auto b2 = pdbx_poly_seq_scheme.find_first("asym_id"_key == strand2.front().asym_id() and "seq_id"_key == beg2SeqID); ^~~~~~ /gpfs/software/dssp/src/dssp-io.cpp:671:48: error: ‘class cif::category’ has no member named ‘find_first’ 671 auto e2 = pdbx_poly_seq_scheme.find_first("asym_id"_key == strand2.front().asym_id() and "seq_id"_key == end2SeqID); ^~~~~~ /gpfs/software/dssp/src/dssp-io.cpp:686:79: error: expected primary-expression before ‘>’ token 686 { "range_1_label_comp_id", b1["mon_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:686:81: error: expected primary-expression before ‘)’ token 686 { "range_1_label_comp_id", b1["mon_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:687:80: error: expected primary-expression before ‘>’ token 687 { "range_1_label_asym_id", b1["asym_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:687:82: error: expected primary-expression before ‘)’ token 687 { "range_1_label_asym_id", b1["asym_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:688:78: error: expected primary-expression before ‘>’ token 688 { "range_1_label_seq_id", b1["seq_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:688:80: error: expected primary-expression before ‘)’ token 688 { "range_1_label_seq_id", b1["seq_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:689:84: error: expected primary-expression before ‘>’ token 689 { "range_1_PDB_ins_code", b1["pdb_ins_code"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:689:86: error: expected primary-expression before ‘)’ token 689 { "range_1_PDB_ins_code", b1["pdb_ins_code"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:691:83: error: expected primary-expression before ‘>’ token 691 { "range_1_auth_comp_id", b1["auth_mon_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:691:85: error: expected primary-expression before ‘)’ token 691 { "range_1_auth_comp_id", b1["auth_mon_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:692:85: error: expected primary-expression before ‘>’ token 692 { "range_1_auth_asym_id", b1["pdb_strand_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:692:87: error: expected primary-expression before ‘)’ token 692 { "range_1_auth_asym_id", b1["pdb_strand_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:693:83: error: expected primary-expression before ‘>’ token 693 { "range_1_auth_seq_id", b1["auth_seq_num"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:693:85: error: expected primary-expression before ‘)’ token 693 { "range_1_auth_seq_id", b1["auth_seq_num"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:695:79: error: expected primary-expression before ‘>’ token 695 { "range_2_label_comp_id", b2["mon_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:695:81: error: expected primary-expression before ‘)’ token 695 { "range_2_label_comp_id", b2["mon_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:696:80: error: expected primary-expression before ‘>’ token 696 { "range_2_label_asym_id", b2["asym_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:696:82: error: expected primary-expression before ‘)’ token 696 { "range_2_label_asym_id", b2["asym_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:697:78: error: expected primary-expression before ‘>’ token 697 { "range_2_label_seq_id", b2["seq_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:697:80: error: expected primary-expression before ‘)’ token 697 { "range_2_label_seq_id", b2["seq_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:698:84: error: expected primary-expression before ‘>’ token 698 { "range_2_PDB_ins_code", b2["pdb_ins_code"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:698:86: error: expected primary-expression before ‘)’ token 698 { "range_2_PDB_ins_code", b2["pdb_ins_code"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:700:83: error: expected primary-expression before ‘>’ token 700 { "range_2_auth_comp_id", b2["auth_mon_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:700:85: error: expected primary-expression before ‘)’ token 700 { "range_2_auth_comp_id", b2["auth_mon_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:701:85: error: expected primary-expression before ‘>’ token 701 { "range_2_auth_asym_id", b2["pdb_strand_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:701:87: error: expected primary-expression before ‘)’ token 701 { "range_2_auth_asym_id", b2["pdb_strand_id"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:702:83: error: expected primary-expression before ‘>’ token 702 { "range_2_auth_seq_id", b2["auth_seq_num"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:702:85: error: expected primary-expression before ‘)’ token 702 { "range_2_auth_seq_id", b2["auth_seq_num"].as() }, ^ /gpfs/software/dssp/src/dssp-io.cpp:680:48: error: no matching function for call to ‘cif::category::emplace()’ 680 pdbx_struct_sheet_hbond.emplace({ ~~~~~~~^~ 681 { "sheet_id", cif::cif_id_for_number(sheet) }, ~~~~~~~~~~ 682 { "range_id_1", s1 + 1 }, ~~~~~ 683 { "range_id_2", s2 + 1 }, ~~~~~ 684
685 { "range_1_label_atom_id", beg1AtomID },
~~~~~~~~
686 { "range_1_label_comp_id", b1["mon_id"].as() },
~~~~~~~~~~~~
687 { "range_1_label_asym_id", b1["asym_id"].as() },
~~~~~~~~~~~~~
688 { "range_1_label_seq_id", b1["seq_id"].as() },
~~~~~~~~~~~~~~~
689 { "range_1_PDB_ins_code", b1["pdb_ins_code"].as() },
~~~~~~~~~~~~~
690 { "range_1_auth_atom_id", beg1AtomID },
~~~~~~~~~~~
691 { "range_1_auth_comp_id", b1["auth_mon_id"].as() },
~~~~~~~~~~~~~~~~
692 { "range_1_auth_asym_id", b1["pdb_strand_id"].as() },
~~~~~~~~~~~~~~
693 { "range_1_auth_seq_id", b1["auth_seq_num"].as() },
~~~~~~~~~~~~~~~~
694 { "range_2_label_atom_id", beg2AtomID },
~~~~~~~~
695 { "range_2_label_comp_id", b2["mon_id"].as() },
~~~~~~~~~~~~
696 { "range_2_label_asym_id", b2["asym_id"].as() },
~~~~~~~~~~~~~
697 { "range_2_label_seq_id", b2["seq_id"].as() },
~~~~~~~~~~~~~~~
698 { "range_2_PDB_ins_code", b2["pdb_ins_code"].as() },
~~~~~~~~~~~~~
699 { "range_2_auth_atom_id", beg2AtomID },
~~~~~~~~~~~
700 { "range_2_auth_comp_id", b2["auth_mon_id"].as() },
~~~~~~~~~~~~~~~~
701 { "range_2_auth_asym_id", b2["pdb_strand_id"].as() },
~~~~~~~~~~~~~~
702 { "range_2_auth_seq_id", b2["auth_seq_num"].as() },
~~~~~~~~~~~~~~~~
703 });
~~

`

Any suggestions as to what the issue might be? Thanks! Dave

mhekkel commented 1 year ago

My apologies, I messed up by editing the trunk instead of the development branch. DSSP depends on libcifpp 5.0.8 which was not released yet.

I've pushed libcifpp and updated the dssp dependencies. Should be fixed now.

davidecarlson commented 1 year ago

Thanks for the update!

I pulled the libcifpp changes and tried to build v5.0.8. It seems that the required dependencies to build libcifpp 5.0.8 have now changed. I'm getting an error saying that bpp-phyl is required but not found:

CMake Error at CMakeLists.txt:19 (MESSAGE): bpp-phyl required but not found. Call Stack (most recent call first): CMakeLists.txt:33 (IMPROVED_FIND_LIBRARY)

bpp-phyl in turn appears to have several dependencies required (e.g., bpp-core3, bpp-seq3, possibly others) .

Is there any documentation as to what specifically is required for building libcifpp?

mhekkel commented 1 year ago

bpp-phyl is not something used in libcifpp. Are you sure you are typing in the right directory?

The requirements are limited, only zlib development files are needed. And boost is only required for building unit-tests.

davidecarlson commented 1 year ago

Thanks. Something weird must have happened when I pulled the changes.

I nuked the directory and cloned it again, and was able to build libcifpp without issue.

Thanks again! Dave