Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 851189 - media-gfx/openscad-2021.01-r3: Does not compile against sci-mathematics/cgal-5.4.1
Summary: media-gfx/openscad-2021.01-r3: Does not compile against sci-mathematics/cgal-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernd
URL:
Whiteboard:
Keywords: PATCH, PullRequest
: 851849 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-11 07:58 UTC by Bernd Feige
Modified: 2022-07-03 11:51 UTC (History)
5 users (show)

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


Attachments
Build log (build.log.xz,16.83 KB, application/x-xz)
2022-06-11 08:50 UTC, Bernd Feige
Details
patch for changes in cgal 5.4 (openscad-2021.01-cgal-fix.patch,6.34 KB, patch)
2022-06-12 19:06 UTC, Scott Alfter
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Feige 2022-06-11 07:58:16 UTC
I guess because CGAL is header-only, media-gfx/openscad is not automatically recompiled with the new sci-mathematics/cgal-5.4.1, so the issue only occurred on a system where media-gfx/openscad had to be updated as well.

Compilation against sci-mathematics/cgal-5.2-r2 succeeds.

Errors start with:
src/cgalutils-polyhedron.cc: In instantiation of ‘std::string CGALUtils::printPolyhedron(const Polyhedron&) [with Polyhedron = CGAL::Polyhedron_3<CGAL::Cartesian<CGAL::Gmpq> >; std::string = std::__cxx11::basic_string<char>]’:
src/cgalutils-polyhedron.cc:351:63:   required from here
src/cgalutils-polyhedron.cc:346:29: error: ‘generic_print_polyhedron’ was not declared in this scope
  346 |     generic_print_polyhedron(sstream, p, writer);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:5857: objects/src/cgalutils-polyhedron.o] Error 1



Reproducible: Always
Comment 1 Bernd 2022-06-11 08:32:01 UTC
Thanks for the report.

To properly process the bug, could you please attach a full build log and the output of emerge --info?

If you are unsure on how to do this, you can visit the Bugzilla Howto Guide[1] on the Gentoo Wiki.

Feel free to reopen the bug afterwards again and set the status to unconfirmed.

[1] https://wiki.gentoo.org/wiki/Bugzilla/Bug_report_guide
Comment 3 Bernd Feige 2022-06-11 08:49:54 UTC
Already tried to attach build.log but it was too large... Will retry compressed.

emerge --info:

Portage 3.0.30 (python 3.10.5-final-0, default/linux/amd64/17.1/systemd, gcc-11.3.0, glibc-2.35-r7, 5.18.3-gentoo x86_64)
=================================================================
System uname: Linux-5.18.3-gentoo-x86_64-AMD_Ryzen_7_1700_Eight-Core_Processor-with-glibc2.35
KiB Mem:    32820988 total,  15016336 free
KiB Swap:    9214972 total,   9210072 free
Timestamp of repository gentoo: Sat, 11 Jun 2022 05:15:01 +0000
Head commit of repository gentoo: 05652545b9e88a7ca0dceddedeb87e3dbd01cbc7
Head commit of repository flatpak-overlay: 4bf9a7815ca9361f86459c8a8e9bc403e3721704

sh bash 5.1_p16
ld GNU ld (Gentoo 2.38 p4) 2.38
distcc 3.4 x86_64-pc-linux-gnu [disabled]
ccache version 4.6.1 [enabled]
app-misc/pax-utils:        1.3.4::gentoo
app-shells/bash:           5.1_p16::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.36.0::gentoo
dev-lang/python:           3.9.11::gentoo, 3.10.5::gentoo
dev-lang/rust-bin:         1.61.0::gentoo
dev-util/ccache:           4.6.1::gentoo
dev-util/cmake:            3.23.2::gentoo
dev-util/meson:            0.62.2::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-apps/systemd:          251.2::gentoo
sys-devel/autoconf:        2.13-r1::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.38-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           14.0.4::gentoo
sys-devel/gcc:             11.3.0::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             14.0.4::gentoo
sys-devel/llvm:            12.0.1::gentoo, 14.0.4::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.18-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.35-r7::gentoo
Repositories:

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

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

haskell
    location: /gentoo/local/layman/haskell
    sync-type: laymansync
    sync-uri: https://github.com/gentoo-haskell/gentoo-haskell.git
    masters: gentoo
    priority: 50

science
    location: /gentoo/local/layman/science
    masters: gentoo
    priority: 50

sinustrom
    location: /gentoo/local/layman/sinustrom
    sync-type: laymansync
    sync-uri: https://github.com/zpuskas/sinustrom-gentoo-overlay.git
    masters: gentoo
    priority: 50

bfown
    location: /gentoo/overlay
    masters: gentoo science haskell
    priority: 100

Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=znver1 -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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=znver1 -O2 -pipe"
DISTDIR="/gentoo/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"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live ccache 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="-O2 -pipe"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ https://ftp.fau.de/gentoo http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en"
MAKEFLAGS="-j16"
MAKEOPTS="-j16"
PKGDIR="/gentoo/packages/x64"
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="R X a52 aac aacs acl acpi afs alsa amd64 audit bacula-clientonly bdplus blas bluetooth bluray btrfs bzip2 cairo caps cddb cdparanoia cdr cli clutter color-management colord cpudetection crypt cscope cups dbus dga djvu dri dri3 dv dvd dvdr dvdread dvi eds enblend encode eselect-ldso evo exif ext4 extrafilters faac ffmpeg fftw flac fluidsynth fontconfig fortran fuse g3dvl gdbm gdk-pixbuf gegl gif gimp gles2 gmp gnome gnome-keyring gnome-shell graphics graphviz gs gstreamer gtk gtk3 hddtemp hdri heif iconv icu id3tag imagemagick introspection ipv6 ipython jack java jbig jingle jpeg jpeg2k kerberos kpathsea ladspa lame lapack latex lcms ldap lensfun libdrm libglvnd libnotify libtirpc lm_sensors lv2 lyx lzma lzo mad matplotlib matroska md5sum midi mjpeg mng mp2 mp3 mpeg mtp multilib musepack nautilus ncurses nfs nftables nls nptl numpy office ofx ogg openal opencl opencv opengl openh264 openmp opus otr pam pcre pda pdf pep8 pipewire playlist plotutils plugins png pnm policykit postgres postscript pulseaudio pylint python qt3support quicktime radio rar raw readline real rtc rtmp rubberband sbsms scanner science scipy seccomp sendto sift sndfile sound soundtouch speex spell split-usr sqlite srt ssh ssl svg systemd t1lib taglib theora threads tiff tivo tracker truetype twolame udev udisks umfpack unicode upnp user-session v4l vaapi vamp vdpau vim-syntax vorbis vpx vulkan wayland webengine webp win32codecs wmf x264 x265 xattr xcomposite xetex xinerama xml xmp xmpp xps xv xvid xvmc zeromq zlib zoran zstd" ABI_X86="64" ADA_TARGET="gnat_2020" 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" CAMERAS="canon ptp2 samsung" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt sse3 sse4_1 sse4_2 sse4a ssse3" 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="libinput" KERNEL="linux" L10N="de en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer nlpsolver pdfimport" LUA_SINGLE_TARGET="luajit" LUA_TARGETS="luajit" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" QEMU_SOFTMMU_TARGETS="x86_64 i386 arm aarch64" QEMU_USER_TARGETS="x86_64 i386 arm aarch64" RUBY_TARGETS="ruby30" SANE_BACKENDS="hp5590 mustek" USERLAND="GNU" VIDEO_CARDS="radeon radeonsi amdgpu" 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, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 4 Bernd Feige 2022-06-11 08:50:33 UTC
Created attachment 784037 [details]
Build log
Comment 5 Bernd Feige 2022-06-11 09:25:21 UTC
(In reply to Sam James from comment #2)
> https://github.com/openscad/openscad/commit/
> 9aa0d7e9f2914fe5f547bdde69202161d1c6064d
> https://github.com/openscad/openscad/commit/
> abfebc651343909b534ef337aacc7604c99cf0ea
> 
> We may want some other patches from the branch:
> https://github.com/openscad/openscad/commits/2020.12-branch.

Thanks Sam, that's spot-on - openscad compiles with the two commits you mentioned plus https://github.com/openscad/openscad/commit/08bf69b4115c989fc5671254e0d05735d01bcca5 from 2020.12-branch ("Fix build issue with overloaded join().").
Comment 6 Bernd 2022-06-11 09:41:17 UTC
A good overview of patches since release is https://github.com/openscad/openscad/compare/openscad-2021.01...2020.12-branch. It also lists patches for 2 CVE issues.

I'll check and test these and prepare a patch.
Comment 7 Scott Alfter 2022-06-12 19:06:25 UTC
Created attachment 784400 [details, diff]
patch for changes in cgal 5.4

I have the three patches named above combined into this file, sitting in /etc/portage/patches.  OpenSCAD builds successfully against cgal 5.4.1 with this patch.
Comment 8 Bernd 2022-06-13 06:50:57 UTC
Thanks for the patch. I decided to mix in a few of the other patches as well.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-14 22:40:07 UTC
*** Bug 851849 has been marked as a duplicate of this bug. ***
Comment 10 Larry the Git Cow gentoo-dev 2022-07-03 11:51:24 UTC
The bug has been closed via the following commit(s):

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

commit e89baa8837fb77c1b0bcabb611e1cd7a03468af9
Author:     Bernd Waibel <waebbl-gentoo@posteo.net>
AuthorDate: 2022-06-13 06:06:49 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-07-03 11:51:21 +0000

    media-gfx/openscad: fix build against >=cgal-5.4.1
    
    Also address two CVE issues, CVE-2022-0496 and CVE-2022-0497
    Fix double quoting of output file parameter for ghostscript
    
    Closes: https://bugs.gentoo.org/851189
    Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
    Closes: https://github.com/gentoo/gentoo/pull/25870
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 ...fix-v5.4-renames-projection-traits-header.patch |  36 +++++++
 ...96-Out-of-bounds-memory-access-in-DXF-loa.patch |  74 ++++++++++++++
 ...97-Out-of-bounds-memory-access-in-comment.patch |  25 +++++
 ...ailure-with-generic_print_polyhedron-on-C.patch |  42 ++++++++
 ...1.01-Fix-build-issue-with-overloaded-join.patch |  60 +++++++++++
 ...le-quoting-of-the-output-file-parameter-f.patch |  20 ++++
 media-gfx/openscad/openscad-2021.01-r4.ebuild      | 112 +++++++++++++++++++++
 7 files changed, 369 insertions(+)