You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed conflict happens when RandEigen is used alongside another library which also uses eigen.
The conflict only happens with the definition of plgamma
<command-line>: note: this is the location of the previous definition
In file included from /usr/include/eigen3/unsupported/Eigen/SpecialFunctions:47,
from /usr/include/eigen3/unsupported/Eigen/CXX11/Tensor:30,
from /opt/ros/noetic/include/pinocchio/fwd.hpp:31,
[...]
/usr/include/eigen3/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsPacketMath.h:19:8: error: redefinition of ‘template<class Packet> Packet Eigen::internal::plgamma(const Packet&)’
19 | Packet plgamma(const Packet& a) { using numext::lgamma; return lgamma(a); }
| ^~~~~~~
In file included from /usr/local/include/EigenRand/RandUtils.h:15,
from /usr/local/include/EigenRand/Core.h:16,
from /usr/local/include/EigenRand/EigenRand:17,
[...]
/usr/local/include/EigenRand/MorePacketMath.h:181:30: note: ‘template<class Packet> Packet Eigen::internal::plgamma(const Packet&)’ previously declared here
181 | EIGEN_STRONG_INLINE Packet plgamma(const Packet& x)
| ^~~~~~~
Once plgamma is commented, it compiles just fine. (Also removing the comments and compiling a second time does not
raise any error. The error comes for the first build or after a make clean).
I tried to avoid circular declaration in my own code, it might be an error from my side but I reported it just in case.
CXX compiler: GNU 9.3.0
cmake version 3.16.3
Eigen 3.3.7
RandEigen version 0.3.2
The text was updated successfully, but these errors were encountered:
Hi @MehdiN,
Thank you for your reporting.
I didn't know there is another plgamma in Eigen's SpecialFunctionsPacketMath.h.
I'll rename my plgamma for preventing conflicts in the next update.
I noticed conflict happens when RandEigen is used alongside another library which also uses eigen.
The conflict only happens with the definition of
plgamma
Once
plgamma
is commented, it compiles just fine. (Also removing the comments and compiling a second time does notraise any error. The error comes for the first build or after a
make clean
).I tried to avoid circular declaration in my own code, it might be an error from my side but I reported it just in case.
The text was updated successfully, but these errors were encountered: