cryos / avogadro

Avogadro 1 is not under active development, the repository was archived in September 2021. Development of Avogadro 2 is being done at https://github.com/openchemistry/avogadrolibs. Avogadro is an advanced molecular editor designed for cross-platform use in computational chemistry, molecular modeling, bioinformatics, materials science, and related areas.
http://avogadro.cc/
GNU General Public License v2.0
334 stars 156 forks source link

Avogadro 1.2 - Build fails in Fedora 24 (x64) #836

Closed HenriqueCSJ closed 7 years ago

HenriqueCSJ commented 8 years ago

Builds of Avogadro 1.2 are failing in Fedora 24. Here is the error message:

[ 51%] Building C object libavogadro/src/extensions/symmetry/libmsym/CMakeFiles/msym.dir/src/orbital.c.o
In file included from /usr/include/stdlib.h:24:0,
                 from /home/henrique/avogadro-master/libavogadro/src/extensions/symmetry/libmsym/src/orbital.c:11:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
/home/henrique/avogadro-master/libavogadro/src/extensions/symmetry/libmsym/src/orbital.c: In function ‘orbitalFromQuantumNumbers’:
/home/henrique/avogadro-master/libavogadro/src/extensions/symmetry/libmsym/src/orbital.c:70:13: error: non-floating-point argument in call to function ‘__builtin_signbit’
             char *d = (signbit(m) == 1 ? "-" : "+");
             ^~~~
/home/henrique/avogadro-master/libavogadro/src/extensions/symmetry/libmsym/src/orbital.c:76:13: error: non-floating-point argument in call to function ‘__builtin_signbit’
             char *d = (signbit(m) == 1 ? "-" : "+");
             ^~~~
libavogadro/src/extensions/symmetry/libmsym/CMakeFiles/msym.dir/build.make:86: recipe for target 'libavogadro/src/extensions/symmetry/libmsym/CMakeFiles/msym.dir/src/orbital.c.o' failed
make[2]: *** [libavogadro/src/extensions/symmetry/libmsym/CMakeFiles/msym.dir/src/orbital.c.o] Error 1
CMakeFiles/Makefile2:2202: recipe for target 'libavogadro/src/extensions/symmetry/libmsym/CMakeFiles/msym.dir/all' failed
make[1]: *** [libavogadro/src/extensions/symmetry/libmsym/CMakeFiles/msym.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
rfkspada commented 8 years ago

Hi Henrique,

The "fix" would be to open the file

/home/henrique/avogadro-master/libavogadro/src/extensions/symmetry/libmsym/src/orbital.c

go to line 70 and change from:

char *d = (signbit(m) == 1 ? "-" : "+");

to:

char *d = (signbit((float) m) == 1 ? "-" : "+");

and do the same change in line 76.

After this, i hope it will compile. However I don't know if it will break any functionality from avogadro. The Admin should tell us.

cryos commented 8 years ago

I don't know that code very well, but casting to float would seem the simplest fix. The libmsym source is imported, and not something developed by us but simply used as a library.

HenriqueCSJ commented 8 years ago

Thank you guys, the fix worked and at a later stage suffered from the bug reported in https://github.com/cryos/avogadro/issues/833 (the fix proposed there worked).

Do you want me to submit a patch for this issue?

ghutchis commented 8 years ago

Please, submit a patch, yes. If you can check the libmsym project too, that would be ideal: https://github.com/mcodev31/libmsym

HenriqueCSJ commented 8 years ago

Unfortunately my compilation is not working properly. I'm unable to get MOs when oppening any ORCA output. Here are the messages I get in my terminal:

[henrique@localhost ~] $ avogadro12 
"Avogadro version:  1.2.0   Git:    
LibAvogadro version:    1.1.1   Git:    " 
Locale:  "pt_BR" 
System has OpenGL support. 
About to test OpenGL capabilities. 
OpenGL capabilities found: 
    Double Buffering.
    Direct Rendering.
    Antialiasing.
In a build directory - loading alternative... 
QStackedLayout::setCurrentWidget: Widget 0x1a06e50 not contained in stack
dev warning: Extension "GAMESS" is using a deprecated DockWidget loading method. See Extension::dockWidgets() documentation. 
dev warning: Extension "Orbitals" is using a deprecated DockWidget loading method. See Extension::dockWidgets() documentation. 
dev warning: Extension "Python Terminal" is using a deprecated DockWidget loading method. See Extension::dockWidgets() documentation. 
dev warning: Extension "Vibration" is using a deprecated DockWidget loading method. See Extension::dockWidgets() documentation. 
dev warning: Extension "Example Python Extension" is using a deprecated DockWidget loading method. See Extension::dockWidgets() documentation. 
HOMO at:  -1 
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: cHRM: invalid chromaticities
 read  1  molecules. 
Old molecule deleted... 
No matching basis set file found:  "/home/henrique/Quantum/ORCA/Benz/Benzene.out" 
HOMO at:  -1 
rfkspada commented 8 years ago

Hi Henrique,

First, your terminal says you are linking your avogadro 1.2 to a 1.1.1 library version. This may cause problems. Did you try to install the avogadro 1.1.1 first? Maybe from the Fedora repository? I think you should uninstall both and then compile the avogadro 1.2 version and check if it links to the 1.2 library.

Second, ORCA does not write the basis sets and molecular orbitals to the output by default. Be sure that you are asking for this in your input file.

HenriqueCSJ commented 8 years ago

Hi, @rfkspada You're right, I had Avogadro 1.1 from the repos installed. After uninstalling a did a rebuild from scratch. Now whenever I open any ORCA output it just crashes (but opens small molecules, like water, of CH4). Here is the terminal output:


[henrique@localhost ~] $ avogadro12 
"Avogadro version:  1.2.0   Git:    
LibAvogadro version:    1.2.0   Git:    " 
Locale:  "pt_BR" 
Libavogadro translations not found. 
System has OpenGL support. 
About to test OpenGL capabilities. 
OpenGL capabilities found: 
    Double Buffering.
    Direct Rendering.
    Antialiasing.
In a build directory - loading alternative... 
Loading plugins: "/home/henrique/bin/avogadro/build/bin/../lib" 
Searching for plugins in "/home/henrique/bin/avogadro/build/lib" 
"libavogadro_OpenQube.so" failed to load.  "The file '/home/henrique/bin/avogadro/build/lib/libavogadro_OpenQube.so.0.1.0' is not a valid Qt plugin." 
"libavogadro_OpenQube.so.0" failed to load.  "The file '/home/henrique/bin/avogadro/build/lib/libavogadro_OpenQube.so.0.1.0' is not a valid Qt plugin." 
"libavogadro_OpenQube.so.0.1.0" failed to load.  "The file '/home/henrique/bin/avogadro/build/lib/libavogadro_OpenQube.so.0.1.0' is not a valid Qt plugin." 
Settings are missing for the next engines: () 
QStackedLayout::setCurrentWidget: Widget 0x24349f0 not contained in stack
dev warning: Extension "GAMESS" is using a deprecated DockWidget loading method. See Extension::dockWidgets() documentation. 
dev warning: Extension "Orbitals" is using a deprecated DockWidget loading method. See Extension::dockWidgets() documentation. 
Could not find python module... 
dev warning: Extension "Python Terminal" is using a deprecated DockWidget loading method. See Extension::dockWidgets() documentation. 
dev warning: Extension "Vibration" is using a deprecated DockWidget loading method. See Extension::dockWidgets() documentation. 
HOMO at:  -1 
GLWidget initialisation... 
GLWidget initialised... 
createObjects() 
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: cHRM: invalid chromaticities
 read  1  molecules. 
Old molecule deleted... 
File "/home/henrique/Quantum/ORCA/Benz/Benzene.out" opened. 
Segmentation fault (imagem do núcleo gravada)
HenriqueCSJ commented 8 years ago

I have created a patch to fix that problem in orbital.c Here is the patch: https://gist.github.com/LonelySpooky/6871935dbff4ac57a0414f4c0c27eb96#file-libmsymfloat-patch

ghutchis commented 7 years ago

I'm going through old bugs - I believe this was resolved, correct?

sagitter commented 7 years ago

I'm going through old bugs - I believe this was resolved, correct?

I can confirm.

ghutchis commented 7 years ago

Thanks - glad it works now! :-)