LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Problems to install avogadro (chem. progr.) in Slackware13.37-current (https://www.linuxquestions.org/questions/slackware-14/problems-to-install-avogadro-chem-progr-in-slackware13-37-current-939892/)

DecioSP 04-15-2012 07:40 AM

Problems to install avogadro (chem. progr.) in Slackware13.37-current
 
I am trying to install avogadro program under slackware 13.37-current.
However, after installing tons of dependencies I can't figure what went wrong.
Firstly, in order to install avogadro, slackbuild showed openbabel as dependency and here is my problem.
In order to install openbabel I installed the following builds in the order listed below:
ORBit2 -> GConf -> wxPython
Despite some warning errors in almost all of those, I was able to create and install the pkg.
However, when I try to build the openbabel using (http://slackbuilds.org/repository/13...ies/openbabel/) it respond with a lot of errors like:
Code:

CMake Warning at test/CMakeLists.txt:53 (add_executable):
  Cannot generate a safe linker search path for target test_automorphism
  because files in some directories may conflict with libraries in implicit
  directories:

    link library [libm.so] in /usr/lib64 may be hidden by files in:
      /usr/X11R6/lib64
    link library [libz.so] in /usr/lib64 may be hidden by files in:
      /usr/X11R6/lib64

  Some of these libraries may not be found correctly.


CMake Warning at test/CMakeLists.txt:125 (add_executable):
  Cannot generate a safe linker search path for target test_bond because
  files in some directories may conflict with libraries in implicit
  directories:

    link library [libm.so] in /usr/lib64 may be hidden by files in:
      /usr/X11R6/lib64
    link library [libz.so] in /usr/lib64 may be hidden by files in:
      /usr/X11R6/lib64

  Some of these libraries may not be found correctly.

And exit with:
Code:

In file included from /usr/include/eigen2/Eigen/Core:99:0,
                from /tmp/SBo/openbabel-2.3.0/include/openbabel/math/align.h:26,
                from /tmp/SBo/openbabel-2.3.0/src/math/align.cpp:24:
/usr/include/eigen2/Eigen/src/Core/MathFunctions.h: In instantiation of 'T Eigen::ei_hypot(T, T) [with T = double]':
/usr/include/eigen2/Eigen/src/SVD/SVD.h:331:42:  required from 'void Eigen::SVD<MatrixType>::compute(const MatrixType&) [with MatrixType = Eigen::Matrix<double, 3, 3>]'
/usr/include/eigen2/Eigen/src/SVD/SVD.h:71:7:  required from 'Eigen::SVD<MatrixType>::SVD(const MatrixType&) [with MatrixType = Eigen::Matrix<double, 3, 3>]'
/tmp/SBo/openbabel-2.3.0/src/math/align.cpp:149:38:  required from here
/usr/include/eigen2/Eigen/src/Core/MathFunctions.h:40:18: error: 'ei_abs' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
In file included from /usr/include/eigen2/Eigen/Core:99:0,
                from /tmp/SBo/openbabel-2.3.0/include/openbabel/math/align.h:26,
                from /tmp/SBo/openbabel-2.3.0/src/math/align.cpp:24:
/usr/include/eigen2/Eigen/src/Core/MathFunctions.h:264:20: note: 'long double Eigen::ei_abs(long double)' declared here, later in the translation unit
In file included from /usr/include/eigen2/Eigen/Core:99:0,
                from /tmp/SBo/openbabel-2.3.0/include/openbabel/math/align.h:26,
                from /tmp/SBo/openbabel-2.3.0/src/math/align.cpp:24:
/usr/include/eigen2/Eigen/src/Core/MathFunctions.h:41:18: error: 'ei_abs' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
In file included from /usr/include/eigen2/Eigen/Core:99:0,
                from /tmp/SBo/openbabel-2.3.0/include/openbabel/math/align.h:26,
                from /tmp/SBo/openbabel-2.3.0/src/math/align.cpp:24:
/usr/include/eigen2/Eigen/src/Core/MathFunctions.h:264:20: note: 'long double Eigen::ei_abs(long double)' declared here, later in the translation unit
In file included from /usr/include/eigen2/Eigen/Core:99:0,
                from /tmp/SBo/openbabel-2.3.0/include/openbabel/math/align.h:26,
                from /tmp/SBo/openbabel-2.3.0/src/math/align.cpp:24:
/usr/include/eigen2/Eigen/src/Core/MathFunctions.h:45:34: error: 'ei_sqrt' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
In file included from /usr/include/eigen2/Eigen/Core:99:0,
                from /tmp/SBo/openbabel-2.3.0/include/openbabel/math/align.h:26,
                from /tmp/SBo/openbabel-2.3.0/src/math/align.cpp:24:
/usr/include/eigen2/Eigen/src/Core/MathFunctions.h:266:20: note: 'long double Eigen::ei_sqrt(long double)' declared here, later in the translation unit
make[2]: *** [src/CMakeFiles/openbabel.dir/math/align.o] Error 1
make[2]: Leaving directory `/tmp/SBo/openbabel-2.3.0/build'
make[1]: *** [src/CMakeFiles/openbabel.dir/all] Error 2
make[1]: Leaving directory `/tmp/SBo/openbabel-2.3.0/build'
make: *** [all] Error 2

Probably i am missing some dependency but I confess that I really don't know what and despite some random posts listing problems with wxWidget I couldn't find anything near this problem in the forum.

DecioSP 04-15-2012 11:57 PM

Same results with wxX11 and wxGTK :-(
Can't build openbabel and since avogadro has it as dependency can't install it either.

ponce 04-16-2012 01:37 AM

You probably already know that slackbuilds.org repository is compatible with the stable slackware version and, as in this case, with the compiler installed on that.

slackware-current ships gcc-4.7, and in some cases workarounds/patches are needed if the sources are not gcc-4.7-compliant: because I like to slack, I've patched the stuff of slackbuilds.org that I use to let it build on -current with sbopkg (you can spot the modifications in more detail here, hoping they can be useful too for the fellas running -current :) ).

luckily for us, this gcc seems more eloquent of its precedessors, it even offers solutions in the output! :)
the error you showed in the first post seems to match this part of the document above about porting code for the new gcc
Quote:

Name lookup changes

The C++ compiler no longer performs some extra unqualified lookups it had performed in the past, namely dependent base class scope lookups and unqualified template function lookups.

C++ programs that depended on the compiler's previous behavior may no longer compile. For example, code such as

Code:

template<typename T>
int t(T i)
{ return f(i); }

int
f(int i)
{ return i; }

int
main()
{
  return t(1);
}

Will result in the following diagnostic:

Code:

In instantiation of ‘int t(T) [with T = int]’
  required from here
  error: ‘f’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
  note: ‘int f(int)’ declared here, later in the translation unit

To fix, make sure the function f in the code above is declared before first use in function t. Like so:

Code:

int
f(int i)
{ return i; }

template<typename T>
int t(T i)
{ return f(i); }

int
main()
{
  return t(1);
}

This can be temporarily worked around by using -fpermissive.
so should be safe to modify openbabel.Slackbuild changing this line
Code:

    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
with
Code:

    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -fpermissive" \
you will need it also if you try to upgrade to openbabel 2.3.1 (svn shows the same behaviour).

DecioSP 04-16-2012 07:46 AM

Thank you very much, that worked like a charm!
Also, You made a concise and very helpful explanation as also posted some links like this that helped me more than you can imagine.
Post closed and +1 deserved.
Thanks again.

wmhrae 04-26-2012 10:09 AM

Fix error: 'ei_abs' was not declared in this scope, and no declarations were found by argument-depen
 
By Installing Eigen2 VERSION=2.0.17 solves this problem! Just take note that I also installed Eigen3 VERSION=3.0.5 as well, if you need build procedure come to contact-us at http://cersi.tk or drop email at wmh@cersi.tk

wmhrae 04-26-2012 10:14 AM

Fix error: 'ei_abs' was not declared in this scope, and no declarations were found by argument-depen
 
Fix error: 'ei_abs' was not declared in this scope, and no declarations were found by argument-depen
By Installing Eigen2 VERSION=2.0.17 solves this problem! Just take note that I also installed Eigen3 VERSION=3.0.5 as well, if you need build procedure come to contact-us at http://cersi.tk or drop email at wmh@cersi.tk


All times are GMT -5. The time now is 02:43 PM.