lorenzo-rovigatti / oxDNA

A new version of the code to simulate the oxDNA/oxRNA models, now equipped with Python bindings
https://dna.physics.ox.ac.uk/
GNU General Public License v3.0
42 stars 27 forks source link

Getting error when installing #59

Closed naliio closed 1 year ago

naliio commented 1 year ago

Hi, I encountered some errors when I install oxDNA3.5.0. My system is CentOS 7.6 with gcc 4.8.5. Accroding to installation requirements for g++≥4.9, I first installed gcc5.1.0. Then I used gcc5.1.0 to compile and entered the following command: _cd oxDNA2 mkdir build cd build /share/home/nli/soft/cmake-3.4.3/bin/cmake .. make -j4

In the last step, an error occurred as follows:

1

Then I tried to use the original gcc4.8.5 of CentOS7.6. I entered the same command as above. There was no error reported this time. As I mainly want to perform forward flux sampling using oxDNA, I tested the example in the directory _examples/FFSexample/FFS/FLUX/. However, it runned for a few seconds and reported the error as follows:

38aa02362a2ec6aa0da58969757eb08

I am confused about the _regexerror. I tested other examples such as HAIRPIN, and it also reported _regexerror. In addition, the last few lines in the screenshot seemed to indicate a bug with the ffs_flux.py code.

Does it indicate that I didn’t install the oxDNA correctly? How should I deal with these errors? Thank you.

Best regards, na

ErikPoppleton commented 1 year ago

Lorenzo can probably give a better answer for why it's not working with GCC 5.1.0. For the second one, regex wasn't implemented until GCC 4.9.0, and instead just returns false resulting in weird behavior like this.

lorenzo-rovigatti commented 1 year ago

Hi! As Erik wrote, it makes sense that gcc 4.8 does not work here. The problem with gcc 5.1 is more puzzling, as the error you get refers to a library that supports gcc >= 4.9. Can you attach the whole compilation output (i.e. the output you obtain from cmake and make) as text?

naliio commented 1 year ago

Hi! As Erik wrote, it makes sense that gcc 4.8 does not work here. The problem with gcc 5.1 is more puzzling, as the error you get refers to a library that supports gcc >= 4.9. Can you attach the whole compilation output (i.e. the output you obtain from cmake and cmake) as text?

(base) [nli@mgt01 build]$ export CC=/share/home/nli/soft/gcc5.1/usr/local/bin/gcc (base) [nli@mgt01 build]$ export CXX=/share/home/nli/soft/gcc5.1/usr/local/bin/g++ (base) [nli@mgt01 oxDNA_2]$ mkdir build (base) [nli@mgt01 oxDNA_2]$ cd build (base) [nli@mgt01 build]$ /share/home/nli/soft/cmake343/bin/cmake .. -- The C compiler identification is GNU 5.1.0 -- The CXX compiler identification is GNU 5.1.0 -- Check for working C compiler: /share/home/nli/soft/gcc5.1/usr/local/bin/gcc -- Check for working C compiler: /share/home/nli/soft/gcc5.1/usr/local/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /share/home/nli/soft/gcc5.1/usr/local/bin/g++ -- Check for working CXX compiler: /share/home/nli/soft/gcc5.1/usr/local/bin/g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test COMPILER_SUPPORTS_MARCH_NATIVE -- Performing Test COMPILER_SUPPORTS_MARCH_NATIVE - Success -- Found Git: /usr/bin/git (found version "1.8.3.1") fatal: Not a git repository (or any parent up to mount point /share/home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). fatal: Not a git repository (or any parent up to mount point /share/home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). -- Found Doxygen: /usr/bin/doxygen (found version "1.8.5") -- Adding the targets found in the /share/home/nli/soft/oxDNA_2/contrib/randisi folder -- Adding the targets found in the /share/home/nli/soft/oxDNA_2/contrib/romano folder -- Adding the targets found in the /share/home/nli/soft/oxDNA_2/contrib/rovigatti folder -- Found PkgConfig: /usr/bin/pkg-config (found version "0.27.1") -- Checking for module 'gsl' -- Package 'gsl' not found -- Adding the targets found in the /share/home/nli/soft/oxDNA_2/contrib/tostiguerra folder -- Configuring done -- Generating done -- Build files have been written to: /share/home/nli/soft/oxDNA_2/build (base) [nli@mgt01 build]$ make -j4 I attached a plain text file of this command's output for legibility, as it's too long. Thank you for your time and help. make -j4.txt

lorenzo-rovigatti commented 1 year ago

Unfortunately I don't have access to a system with a compiler older than gcc 5.4 so I can't really work on this issue directly. However, with the latest commit I have added a cmake option that can be used to disable JSON support (and hopefully bypass the compilation issues you are having). To test it you'll have to download the "bleeding edge" version of the code and then use the -DJSON_ENABLED=Off option when invoking cmake. Let me know if it works, and if it doesn't feel free to attach the output as you have done before.

naliio commented 1 year ago

Unfortunately I don't have access to a system with a compiler older than gcc 5.4 so I can't really work on this issue directly. However, with the latest commit I have added a cmake option that can be used to disable JSON support (and hopefully bypass the compilation issues you are having). To test it you'll have to download the "bleeding edge" version of the code and then use the -DJSON_ENABLED=Off option when invoking cmake. Let me know if it works, and if it doesn't feel free to attach the output as you have done before.

Hi! I downloaded the "bleeding edge" version oxDNA3.5.0 and the output when invoking cmake is as follows:

(base) [nli@mgt01 build]$ /share/home/nli/soft/cmake343/bin/cmake .. -DJSON_ENABLED=Off -- The C compiler identification is GNU 5.1.0 -- The CXX compiler identification is GNU 5.1.0 -- Check for working C compiler: /share/home/nli/soft/gcc5.1/usr/local/bin/gcc -- Check for working C compiler: /share/home/nli/soft/gcc5.1/usr/local/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /share/home/nli/soft/gcc5.1/usr/local/bin/g++ -- Check for working CXX compiler: /share/home/nli/soft/gcc5.1/usr/local/bin/g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test COMPILER_SUPPORTS_MARCH_NATIVE -- Performing Test COMPILER_SUPPORTS_MARCH_NATIVE - Success -- Found Git: /usr/bin/git (found version "1.8.3.1") fatal: Not a git repository (or any parent up to mount point /share/home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). fatal: Not a git repository (or any parent up to mount point /share/home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). -- Found Doxygen: /usr/bin/doxygen (found version "1.8.5") -- Adding the targets found in the /share/home/nli/soft/oxDNA_2/contrib/randisi folder -- Adding the targets found in the /share/home/nli/soft/oxDNA_2/contrib/romano folder -- Adding the targets found in the /share/home/nli/soft/oxDNA_2/contrib/rovigatti folder -- Found PkgConfig: /usr/bin/pkg-config (found version "0.27.1") -- Checking for module 'gsl' -- Package 'gsl' not found -- Adding the targets found in the /share/home/nli/soft/oxDNA_2/contrib/tostiguerra folder -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project:

JSON_ENABLED

-- Build files have been written to: /share/home/nli/soft/oxDNA_2/build

\ The option -DJSON_ENABLED=Off didn't work. Likewise, the same error was reported as the attached file above when I entered "make -j4".

Then I installed gcc5.5.0 and used it to compile oxDNA with -DJSON_ENABLED=Off option. The output of cmake was the same as above. (I also tried to compile oxDNA without that option.) Surprisingly, it didn't report any error after entering "make -j4". But when I invoke oxDNA, it showed as follows:

(base) [nli@mgt01 ~]$ oxDNA oxDNA: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by oxDNA) oxDNA: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by oxDNA) oxDNA: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by oxDNA) oxDNA: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by oxDNA)

At last, I switched to a different server with gcc8.5.0 and cmake3.24.2. The oxDNA was installed smoothly and an example inside can also run. I just bypassed the previous errors in this way, but those errors may indicate some possible issues. Thank you very much, and I would be happy to provide relevant information if needed.

lorenzo-rovigatti commented 1 year ago

Sorry about that, maybe I should have been a bit more explicit. The 3.5.0 is the last "stable" version, whereas with "bleeding edge" I refer to the state of the master branch on the github repo. You can download the current snapshot of the repo by clicking on "code" and then "download zip" or using this link.

As for the error you got when you tried to use gcc 5.5.0, it seems related to the configuration of the server rather than to oxDNA itself.

naliio commented 1 year ago

Sorry about that, maybe I should have been a bit more explicit. The 3.5.0 is the last "stable" version, whereas with "bleeding edge" I refer to the state of the master branch on the github repo. You can download the current snapshot of the repo by clicking on "code" and then "download zip" or using this link.

As for the error you got when you tried to use gcc 5.5.0, it seems related to the configuration of the server rather than to oxDNA itself.

It doesn't matter. I also think it's my server's problem. Thank you a thousand times.