Bug 400223

Summary: Please do not define the macro R: the variable R is used in Eigen and causes a name collision
Product: [Applications] kalzium Reporter: Yuri <yuri>
Component: generalAssignee: Kalzium Developers <kalzium>
Status: RESOLVED FIXED    
Severity: normal CC: jazeix
Priority: NOR Keywords: junior-jobs
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: FreeBSD   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Yuri 2018-10-23 22:26:33 UTC
In file included from /wrkdirs/usr/ports/science/kalzium-kde4/work/kalzium-4.14.3/src/kalzium.cpp:44:
In file included from /wrkdirs/usr/ports/science/kalzium-kde4/work/kalzium-4.14.3/src/tools/moleculeview.h:19:
In file included from src/ui_moleculeviewerwidget.h:29:
In file included from /wrkdirs/usr/ports/science/kalzium-kde4/work/kalzium-4.14.3/src/tools/../../compoundviewer/kalziumglwidget.h:17:
In file included from /usr/local/include/avogadro/glwidget.h:34:
In file included from /usr/local/include/eigen3/Eigen/Core:491:
/usr/local/include/eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h:1589:30: error: expected unqualified-id
              SResPacketHalf R = res.template gatherPacket<SResPacketHalf>(i, j2);
                             ^
/wrkdirs/usr/ports/science/kalzium-kde4/work/kalzium-4.14.3/src/calculator/gasCalculator.h:31:11: note: expanded from macro 'R'
#define R 0.08206
          ^
In file included from /wrkdirs/usr/ports/science/kalzium-kde4/work/kalzium-4.14.3/src/kalzium.cpp:44:
In file included from /wrkdirs/usr/ports/science/kalzium-kde4/work/kalzium-4.14.3/src/tools/moleculeview.h:19:
In file included from src/ui_moleculeviewerwidget.h:29:


Log URL: http://beefy5.nyi.freebsd.org/data/104i386-default/482808/logs/kalzium-kde4-4.14.3_5.log

Found during the FreeBSD port build.
Comment 1 Jazeix Johnny 2020-12-20 23:10:58 UTC
This was updated to a const double R = 0.08206 (https://invent.kde.org/education/kalzium/-/commit/1eee121af8f734667143617ac677ca0807c512c5, in 2016)

Can you test with a more recent version?