Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 881995 - media-gfx/openscad-2021.01-r4 fails to build (invalid conversion error) with dev-libs/mpfr-4.1.1
Summary: media-gfx/openscad-2021.01-r4 fails to build (invalid conversion error) with ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal normal (vote)
Assignee: Bernd
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-19 11:08 UTC by Roy Bamford
Modified: 2022-11-24 07:21 UTC (History)
5 users (show)

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


Attachments
Build log (media-gfx:openscad-2021.01-r4:20221119-104456.log.bz2,13.96 KB, application/x-bzip)
2022-11-19 11:17 UTC, Roy Bamford
Details
dev-libs/mpfr-4.1.1: Revert definition of mpfr_custom_get_kind (mpfr-4.1.1-revert-mpfr_custom_get_kind.patch,1.45 KB, patch)
2022-11-19 20:26 UTC, Tee KOBAYASHI
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roy Bamford gentoo-dev 2022-11-19 11:08:43 UTC
On arm64 the build fails with  aarch64-unknown-linux-gnu-g++ -c -mcpu=cortex-a72+crc -mtune=cortex-a72 -ftree-vectorize -O2 -pipe -fomit-frame-pointer -flto=6 -DSTACKSIZE=8388608 -fno-strict-aliasing -std=c++1y -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include -I/usr/include/hidapi -I/usr/include/libxml2 -I/usr/include/lib3mf -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DEIGEN_DONT_ALIGN -frounding-math -D_REENTRANT -Wall -Wextra -Wno-unused-local-typedefs -fPIC -DOPENSCAD_VERSION=2021.01 -DOPENSCAD_SHORTVERSION=2021.01 -DOPENSCAD_YEAR=2021.0 -DOPENSCAD_MONTH=01.0 -DOPENSCAD_DAY=.0 -DDEBUG -DSTACKSIZE=8388608 -DUSE_QOPENGLWIDGET -DENABLE_DBUS -DENABLE_JOYSTICK -DENABLE_CAIRO -DENABLE_SPNAV -DENABLE_HIDAPI -DENABLE_LIBZIP -DLIB3MF_API_2 -DENABLE_LIB3MF -DENABLE_OPENCSG -DENABLE_CGAL -DCGAL_HEADER_ONLY -DUSE_SCINTILLA_EDITOR -DQSCINTILLA_DLL -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_NETWORK_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Isrc -Isrc/ext/libtess2/Include -I/usr/include/qt5 -I/usr/include/qt5/QtPrintSupport -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtMultimedia -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtConcurrent -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore -Iobjects -I/usr/include/eigen3 -I/usr/lib64/qt5/mkspecs/linux-g++ -o objects/src/polyset-utils.o src/polyset-utils.cc
In file included from /usr/include/CGAL/GMP/Gmpz_type.h:25,
                 from /usr/include/CGAL/Gmp_coercion_traits.h:22,
                 from /usr/include/CGAL/Gmpz.h:25,
                 from /usr/include/CGAL/Gmpq.h:17,
                 from src/cgal.h:13,
                 from src/cgalutils.h:3,
                 from src/polyset-utils.cc:9:
/usr/include/CGAL/GMP/Gmpfr_type.h: In constructor ‘CGAL::Gmpfr::Gmpfr(mpfr_srcptr)’:
/usr/include/CGAL/GMP/Gmpfr_type.h:199:25: error: invalid conversion from ‘mpfr_srcptr’ {aka ‘const __mpfr_struct*’} to ‘mpfr_ptr’ {aka ‘__mpfr_struct*’} [-fpermissive]
  199 |                         mpfr_custom_get_kind(f),
      |                         ^
      |                         |
      |                         mpfr_srcptr {aka const __mpfr_struct*}


Reproducible: Always

Steps to Reproduce:
1. emerge media-gfx/openscad
2.
3.
Actual Results:  
The above is enough

Expected Results:  
A successful build so I could go on to build media-gfx/freecad

# emerge --info
Portage 3.0.38.1 (python 3.10.8-final-0, default/linux/arm64/17.0/desktop, gcc-12, glibc-2.36-r5, 5.15.16-gentoo aarch64)
=================================================================
System uname: Linux-5.15.16-gentoo-aarch64-with-glibc2.36
KiB Mem:    65148416 total,  54399108 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Fri, 18 Nov 2022 19:30:01 +0000
Head commit of repository gentoo: b9fe457202f5c9c67ce53ece146c1c87996b5e52
Head commit of repository genpi: adc09cffd847306cde05e2b51aff48c1f5db5f4f

sh bash 5.1_p16-r2
ld GNU ld (Gentoo 2.39 p5) 2.39.0
distcc 3.4 aarch64-unknown-linux-gnu [disabled]
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r2::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.36.0-r1::gentoo
dev-lang/python:           3.9.15_p3::gentoo, 3.10.8_p3::gentoo, 3.11.0_p2::gentoo
dev-lang/rust:             1.65.0::gentoo
dev-util/cmake:            3.25.0::gentoo
dev-util/meson:            0.64.0::gentoo
sys-apps/baselayout:       2.9::gentoo
sys-apps/openrc:           0.45.2-r1::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.39-r4::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           14.0.6-r1::gentoo, 15.0.5::gentoo
sys-devel/gcc:             12.2.1_p20221105::gentoo
sys-devel/gcc-config:      2.8::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             14.0.6-r1::gentoo, 15.0.5::gentoo
sys-devel/llvm:            13.0.1::gentoo, 14.0.6-r2::gentoo, 15.0.5::gentoo
sys-devel/make:            4.4::gentoo
sys-kernel/linux-headers:  6.0::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r5::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24

genpi
    location: /var/db/repos/genpi
    sync-type: git
    sync-uri: https://github.com/NeddySeagoon/genpi64-overlay
    masters: gentoo

Installed sets: @extras, @fs-extras, @kde-extras, @more_extras
ACCEPT_KEYWORDS="arm64 ~arm64"
ACCEPT_LICENSE="@FREE all-rights-reserved bh-luxi bluez-firmware fairuse FraunhoferFDK freedist IUPAC-InChi kaptan linux-firmware linux-fw-redistributable MPEG-4 MSttfEULA no-source-code OSGi-Specification-2.0 raspberrypi-videocore-bin rpi-eeprom SSPL-1 sun-bcla-jai Turkowski unRAR xgraph"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-mcpu=cortex-a72+crc -mtune=cortex-a72 -ftree-vectorize -O2 -pipe -fomit-frame-pointer -flto=6"
CHOST="aarch64-unknown-linux-gnu"
CONFIG_PROTECT="/boot/cmdline.txt /boot/config.txt /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/php/apache2-php7.4/ext-active/ /etc/php/apache2-php8.0/ext-active/ /etc/php/apache2-php8.1/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/php/cli-php8.0/ext-active/ /etc/php/cli-php8.1/ext-active/ /etc/php/fpm-php7.4/ext-active/ /etc/php/fpm-php8.0/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/phpdbg-php7.4/ext-active/ /etc/php/phpdbg-php8.0/ext-active/ /etc/php/phpdbg-php8.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-mcpu=cortex-a72+crc -mtune=cortex-a72 -ftree-vectorize -O2 -pipe -fomit-frame-pointer -flto=6"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-mcpu=cortex-a72+crc -mtune=cortex-a72 -ftree-vectorize -O2 -pipe -fomit-frame-pointer -flto=6"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg buildpkg-live collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-mcpu=cortex-a72+crc -mtune=cortex-a72 -ftree-vectorize -O2 -pipe -fomit-frame-pointer -flto=6"
GENTOO_MIRRORS="http://mirrors.gethosted.online/gentoo                 http://www.mirrorservice.org/sites/distfiles.gentoo.org/                 http://mirrors.soeasyto.com/distfiles.gentoo.org/                 http://mirror.leaseweb.com/gentoo/                 http://gentoo.mirrors.ovh.net/gentoo-distfiles/                 http://ftp.snt.utwente.nl/pub/os/linux/gentoo                 https://www.mirrorservice.org/sites/distfiles.gentoo.org/                 http://mirror.bytemark.co.uk/gentoo/                  http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/                  http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_GB"
MAKEOPTS="-j32"
PKGDIR="/var/cache/packages"
PORTAGE_BINHOST="http://bloodnoc.org/~roy/BINHOSTS/gcc-12.x/armv8a"
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"
SHELL="/bin/bash"
USE="X a52 aac aalib accessibility acl acpi alsa arm64 bluetooth bluray branding btrfs bzip2 cairo cdda cdr clamav clang cli context crypt cups dbus default-gold dillo dmraid doc dot dri dts dvd dvdnav dvdr eds egl elogind encode exif extras f2fs faad fat flac fontconfig fortran gdbm geoclue gif gles1 gnome-keyring gpm graphite gstreamer gtk gtk3 gui hfs iconv icu introspection iptables ipv6 jack jadetex jfs jit jpeg kde latex lcms libglvnd libnotify libtirpc lto mad map mdadm minizip mng modemmanager mp3 mp4 mpeg mysql mysqli ncurses netifrc ngspice nls nptl nss ntfs ogg openexr opengl openmp openssl pam pango pcre pcre16 pcre32 pdf php pie pim png policykit postgres postproc ppds python qml qt5 rar raspberry-pi readline reiser4 reiserfs script sdk sdl seccomp servletapi skia speex spell split-usr sqlite ssl ssp startup-notification svc svg test-rust thesaurus threads tiff tk truetype twolame udev udf udisks unicode upower usb vala virt-network vorbis vulkan webengine widgets wmf wxwidgets x264 x265 xattr xcb xface xfs xml xpm xscreensaver xv xvfb xvid xvmc zip zlib" ADA_TARGET="gnat_2021" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb vfp vfpv3 vfpv4 vfp-d32 crc32 v4 v5 v6 v7 v8 thumb2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev libinput synaptics" KERNEL="linux" L10N="en en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby26 ruby27 ruby30 ruby31" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev nouveau radeon v3d vc4" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Roy Bamford gentoo-dev 2022-11-19 11:17:41 UTC
Created attachment 833631 [details]
Build log
Comment 2 Bernd 2022-11-19 12:01:38 UTC
Have you tried, if the 9999 ebuild works? The 2021.01 ebuild still uses qmake, but qmake is no longer supported upstream, yet they haven't published an updated cmake based version. The 9999 version uses cmake.
Opening bugs upstream when using qmake has failed in the past, see https://github.com/openscad/openscad/issues/4344
Comment 3 Tee KOBAYASHI 2022-11-19 20:26:40 UTC
Created attachment 833837 [details, diff]
dev-libs/mpfr-4.1.1: Revert definition of mpfr_custom_get_kind

This seems to be caused by the definition of mpfr_custom_get_kind in dev-libs/mpfr-4.1.1.
Comment 4 Tee KOBAYASHI 2022-11-19 20:47:53 UTC
To clarify, this is not (much) relevant to media-gfx/openscad, because the following C++ program can trigger the error:

#include <CGAL/Gmpq.h>
int main() { return 0; }
Comment 5 Bernd 2022-11-20 10:18:18 UTC
Instead of reverting the mpfr changes, which could be used as a temporary solution, should this not addressed by the sci-mathematics/cgal folks? IMO they should change their code to work with changes from mpfr.
Comment 6 Bernd 2022-11-20 10:21:46 UTC
Cgal lists an issue for this already, https://github.com/CGAL/cgal/issues/7064
Comment 7 Roy Bamford gentoo-dev 2022-11-20 14:28:50 UTC
It looks like the least worst way to get freecad with openscad support is to drop the ~arm64 keyword on sci-mathematics/cgal-5.5.0 until the cgal and mpfr differences are settled.

I suspect its not just an ~arm64 thing too but that's for others to determine.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-20 22:33:13 UTC
If you believe it's a bug in another package like mpfr, please CC its maintainers :)

Done it now.
Comment 9 Larry the Git Cow gentoo-dev 2022-11-22 18:50:09 UTC
The bug has been closed via the following commit(s):

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

commit bb48158fa851ab5f552b125de478a60b5bef65f7
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-11-22 18:49:54 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-22 18:50:03 +0000

    dev-libs/mpfr: backport mpfr_custom_get_kind macro fix
    
    Closes: https://bugs.gentoo.org/881995
    Signed-off-by: Sam James <sam@gentoo.org>

 .../mpfr-4.1.1-fix-mpfr_custom_get_kind.patch      | 79 ++++++++++++++++++++++
 .../{mpfr-4.1.1.ebuild => mpfr-4.1.1-r1.ebuild}    |  1 +
 2 files changed, 80 insertions(+)
Comment 10 Larry the Git Cow gentoo-dev 2022-11-24 07:21:14 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=901acc0c32ffdbcd6f7dad926bd7ae215f59f32c

commit 901acc0c32ffdbcd6f7dad926bd7ae215f59f32c
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-11-24 07:06:59 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-24 07:20:39 +0000

    dev-libs/mpfr: add 4.1.1_p1, drop 4.1.1-r1
    
    Bug: https://bugs.gentoo.org/881995
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/mpfr/Manifest                             |  1 +
 .../mpfr-4.1.1-fix-mpfr_custom_get_kind.patch      | 79 ----------------------
 .../{mpfr-4.1.1-r1.ebuild => mpfr-4.1.1_p1.ebuild} |  1 -
 3 files changed, 1 insertion(+), 80 deletions(-)