MOSAICS-NIH / MOSAICS

A collection of tools for characterizing membrane structure and dynamics within simulated trajectories of molecular systems.
Other
4 stars 1 forks source link

Error during installation #5

Closed pcharchar closed 3 months ago

pcharchar commented 3 months ago

Hi there,

Tried sh install_commands and got a bunch of:

src/xdr/src/xdrfile.cpp:77:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
 };
 ^
src/xdr/src/xdrfile.cpp:77:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
src/xdr/src/xdrfile.cpp:77:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
src/xdr/src/xdrfile.cpp:77:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
src/xdr/src/xdrfile.cpp:77:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
src/xdr/src/xdrfile.cpp:77:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
src/xdr/src/xdrfile.cpp:77:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
src/xdr/src/xdrfile.cpp:77:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
src/xdr/src/xdrfile.cpp:77:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
src/xdr/src/xdrfile.cpp:77:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
src/xdr/src/xdrfile.cpp:77:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
src/xdr/src/xdrfile.cpp:77:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
src/xdr/src/xdrfile.cpp:77:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
src/xdr/src/xdrfile_trr.cpp: In function ‘int do_trnheader(XDRFILE*, mybool, t_trnheader*)’:
src/xdr/src/xdrfile_trr.cpp:96:18: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  char *version = "GMX_trn_file";
                  ^~~~~~~~~~~~~~

Any suggestions?

bernhardtna commented 3 months ago

Hi pcharchar, sorry you are having trouble with the installation. Maybe I can help. As far as I can tell, the warning messages are harmless. These originate from code sourced from MDTraj, which is used to read the trajectory files. In each case, a constant string is being converted to an array of chars, which could cause problems since the const tag means that the chars are stored in read only memory. However, this does not cause problems in the MDTraj code since updating the values is never attempted. I have been hesitant to fix this warning since it originates in MDTraj. However, I went ahead and did so and updated the Github. Hope that helps.

pcharchar commented 3 months ago

Good to know, thanks so much! I have the program installed now (seems to be working) and keen to give it a go on some real data! :)