Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 619544 - sci-chemistry/avogadro-1.1.1: Cmake fails in MacroEnsureVersion with 'math cannot parse the expression: "x86_646*10000 + x86_643*100 + x86_640"'
Summary: sci-chemistry/avogadro-1.1.1: Cmake fails in MacroEnsureVersion with 'math ca...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Chemistry-Related Packages
URL:
Whiteboard:
Keywords: PATCH
: 625548 640352 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-05-24 12:16 UTC by Erik Zeek
Modified: 2018-01-14 09:43 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log (sci-chemistry:avogadro-1.1.1:20170524-115629.log.gz,3.91 KB, application/gzip)
2017-05-24 12:16 UTC, Erik Zeek
Details
emerge --info '=sci-chemistry/avogadro-1.1.1::gentoo' (emerge-info.txt,14.14 KB, text/plain)
2017-05-24 12:17 UTC, Erik Zeek
Details
Proposed patch (avogadro-1.1.1-gcc_version.patch,643 bytes, patch)
2017-05-24 12:49 UTC, Erik Zeek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Zeek 2017-05-24 12:16:26 UTC
Created attachment 474018 [details]
Build log

In cmake I get errors:

-- Performing Test HAVE_GCC_VISIBILITY
-- Performing Test HAVE_GCC_VISIBILITY - Success
CMake Error at cmake/modules/MacroEnsureVersion.cmake:76 (MATH):
  math cannot parse the expression: "x86_646*10000 + x86_643*100 + x86_640":
  syntax error, unexpected exp_NUMBER, expecting $end (8)
Call Stack (most recent call first):
  cmake/modules/MacroEnsureVersion.cmake:95 (NORMALIZE_VERSION)
  CMakeLists.txt:98 (macro_ensure_version)


CMake Error at cmake/modules/MacroEnsureVersion.cmake:76 (MATH):
  math cannot parse the expression: "x86_646*10000 + x86_643*100 + x86_640":
  syntax error, unexpected exp_NUMBER, expecting $end (8)
Call Stack (most recent call first):
  cmake/modules/MacroEnsureVersion.cmake:95 (NORMALIZE_VERSION)
  CMakeLists.txt:99 (macro_ensure_version)


-- Performing Test COMPILES_WITHOUT_FPERMISSIVE
-- Performing Test COMPILES_WITHOUT_FPERMISSIVE - Failed
Comment 1 Erik Zeek 2017-05-24 12:17:24 UTC
Created attachment 474020 [details]
emerge --info '=sci-chemistry/avogadro-1.1.1::gentoo'
Comment 2 Erik Zeek 2017-05-24 12:49:35 UTC
Created attachment 474022 [details, diff]
Proposed patch
Comment 3 Erik Zeek 2017-05-24 12:52:18 UTC
The patch fixes the cmake issue, but it fails with a bunch of Eigen errors later.
Comment 4 fuse809 2017-06-22 10:22:03 UTC
@Erik Zeek you should probably attach your build log after applying the proposed patch if you want to help devs fix this issue (which I'm guessing is why you created the patch in the first place).

Here is my system details:

emerge --info 'sci-chemistry/avogadro-1.1.1' returns:

Portage 2.3.6 (python 3.4.6-final-0, default/linux/amd64/13.0/desktop/plasma/systemd, gcc-6.3.0, gl
ibc-2.24-r3, 4.11.6-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.11.6-gentoo-x86_64-Intel-R-_Core-TM-_i7-4700MQ_CPU_@_2.40GHz-with-gentoo-2.4.
1
KiB Mem:    16344240 total,   3208156 free
KiB Swap:          0 total,         0 free
sh bash 4.4_p12
ld GNU ld (Gentoo 2.27 p1.0) 2.27
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.13::gentoo, 3.4.6::gentoo
dev-util/cmake:           3.8.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1::gentoo
sys-apps/openrc:          0.27.2::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r3::gentoo
sys-devel/automake:       1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.15.1::gentoo
sys-devel/binutils:       2.27::gentoo, 2.28-r2::gentoo
sys-devel/gcc:            6.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.24-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo/gentoo.git
    priority: -1000

fusion809
    location: /usr/local/fusion809-overlay
    masters: gentoo

flatpak-overlay
    location: /usr/local/flatpak-overlay
    sync-type: git
    sync-uri: git://github.com/fosero/flatpak-overlay.git
    masters: gentoo
    priority: 50

gamerlay
    location: /var/lib/layman/gamerlay
    sync-type: git
    sync-uri: git://anongit.gentoo.org/proj/gamerlay.git
    masters: gentoo
    priority: 50

games-overlay
    location: /var/lib/layman/games-overlay
    sync-type: git
    sync-uri: git://github.com/hasufell/games-overlay.git
    masters: gentoo
    priority: 50

gnome
    location: /var/lib/layman/gnome
    sync-type: git
    sync-uri: git://github.com/gentoo/gnome.git
    masters: gentoo
    priority: 50

grub2-themes
    location: /var/lib/layman/grub2-themes
    sync-type: git
    sync-uri: git://github.com/gentoo/grub2-themes-overlay.git
    masters: gentoo
    priority: 50

kde
    location: /var/lib/layman/kde
    sync-type: git
    sync-uri: git://anongit.gentoo.org/proj/kde.git
    masters: gentoo
    priority: 50

mozilla
    location: /var/lib/layman/mozilla
    sync-type: git
    sync-uri: git://anongit.gentoo.org/proj/mozilla.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: git
    sync-uri: git://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

tlp
    location: /var/lib/layman/tlp-portage
    sync-type: git
    sync-uri: git://github.com/dywisor/tlp-portage.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.swin.edu.au/gentoo"
LANG="en_AU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb branding bumblebee bzip2 cairo cdda cdr cli cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv ipv6 jpeg kde kipi kms kwallet lcms ldap libnotify mad mng modules mp3 mp4 mpeg multilib ncurses nls nptl nvidia ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qml qt3support qt4 qt5 readline sdl seccomp semantic-desktop session spell ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vorbis wayland widgets wxwidgets x264 xattr xcb xcomposite xinerama xml xscreensaver xv xvid xwayland zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" L10N="en en_AU en_GB en_US en-AU en-GB en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_AU en_GB en-AU en-GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="nvidia intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

emerge -pqv '=sci-chemistry/avogadro-1.1.1' returns:

[ebuild  N    ] sci-chemistry/avogadro-1.1.1  USE="glsl -python {-test}" CPU_FLAGS_X86="sse2" PYTHON_TARGETS="python2_7"

I get the same error when I don't use your patch. With your patch I get this build log (can't attach it as trying to fails due to attachment.cgi failing to respond): https://paste.pound-python.org/show/I3dIr9Yqpd8obpZT91Fh/.
Comment 5 fuse809 2017-06-22 10:50:49 UTC
The reason the build failed with Erik's patch was because Eigen >3.2 was being used, there's an error in my log:

�[01m�[K/usr/include/eigen3/Eigen/Core:321:2:�[m�[K �[01;31m�[Kerror: �[m�[K#error Eigen2-support is only available up to version 3.2. Please go to "http://eigen.tuxfamily.org/index.php?title=Eigen2" for further information

Using Eigen 3.2.10 fixes this issue.
Comment 6 Toralf Förster gentoo-dev 2017-08-05 14:37:27 UTC
*** Bug 625548 has been marked as a duplicate of this bug. ***
Comment 7 Thomas Albers 2017-12-02 23:50:50 UTC
Since with the recent move to profiles version 17.0 GCC versions < 6 became masked the workaround of using GCC 5 became a little harder. Erik's patch works with eigen-3.2.8
Comment 8 Rolf Eike Beer archtester 2017-12-18 20:11:47 UTC
The code should use CMAKE_C_COMPILER_VERSION or CMAKE_CXX_COMPILER_VERSION (depending on the language here) instead. These variables are determined by CMake itself and are available since CMake 2.8.10. No need to parse anything from the compiler.
Comment 9 Andreas Sturmlechner gentoo-dev 2017-12-25 22:22:47 UTC
*** Bug 640352 has been marked as a duplicate of this bug. ***
Comment 10 Attila Tóth 2017-12-25 22:39:13 UTC
Patch proposes [3456], but it should rather be [34567], since we are already moving on to gcc-7*. Some other distro even sets it to [0-9] to be more future proof. Before the statement gets correctef to CMAKE_C_COMPILER_VERSION or CMAKE_CXX_COMPILER_VERSION as suggested by Rolf above.
Comment 11 Larry the Git Cow gentoo-dev 2018-01-14 09:43:25 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63b820bd77d76e5aa5a1a50717716d11c0c84bc3

commit 63b820bd77d76e5aa5a1a50717716d11c0c84bc3
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2018-01-13 23:53:09 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2018-01-14 09:42:42 +0000

    sci-chemistry/avogadro: Fix cmake w/ >=GCC-6
    
    Using the upstream patch, even if it is not the proper solution.
    
    Closes: https://bugs.gentoo.org/619544
    Package-Manager: Portage-2.3.19, Repoman-2.3.6

 sci-chemistry/avogadro/avogadro-1.1.1.ebuild       |  3 ++-
 .../files/avogadro-1.1.1-gcc-version.patch         | 23 ++++++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)