compilation fails on riscv64 with /var/tmp/portage/sci-chemistry/openbabel-2.4.1-r2/work/openbabel-2.4.1/src/formats/yasaraformat.cpp: In member function ‘virtual bool OpenBabel::YOBFormat::WriteMolecule(OpenBabel::OBBase*, OpenBabel::OBConversion*)’: 4 /var/tmp/portage/sci-chemistry/openbabel-2.4.1-r2/work/openbabel-2.4.1/src/formats/yasaraformat.cpp:475:40: erro r: narrowing conversion of ‘-16’ from ‘int’ to ‘char’ [-Wnarrowing] 5 475 | char double1[8]={0,0,0,0,0,0,-16,0x3f}; 6 | ^ 7 distcc[1191858] ERROR: compile /var/tmp/portage/sci-chemistry/openbabel-2.4.1-r2/work/openbabel-2.4.1/src/formats/yasaraformat.cpp on localhost failed Reproducible: Always
Created attachment 737566 [details] emerge --info
Created attachment 737569 [details] build log
The type 'char' in riscv is unsigned, which causes the conversion problem. The fix is simple by changing 'char' to 'unsigned char', which has already been fixed in newer upstream version 3.* Add arm into the CC list because arm also has unsigned char.
Nice find & debugging!
https://gitweb.gentoo.org/repo/gentoo.git/commit/sci-chemistry/openbabel?id=1fce6e91e642ac7fe5c3b9f675c54244be423a53