Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 577828 - sci-visualization/gnuplot-5.0.3: USE="doc" fails to build unless USE="cairo" is set
Summary: sci-visualization/gnuplot-5.0.3: USE="doc" fails to build unless USE="cairo" ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ulrich Müller
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-20 11:12 UTC by Karl-Johan Karlsson
Modified: 2021-08-02 07:05 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,104.66 KB, text/plain)
2016-03-20 11:12 UTC, Karl-Johan Karlsson
Details
Do not require picins.sty (gnuplot-5.0.6-no-picins.patch,894 bytes, patch)
2017-11-02 11:15 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karl-Johan Karlsson 2016-03-20 11:12:35 UTC
Created attachment 428642 [details]
build.log

When building sci-visualization/gnuplot-5.0.3 with USE="doc", parts of the documentation is written in Gnuplot itself and hard-coded to use the "pdfcairo" terminal. If Gnuplot is built with USE="-cairo", this fails with the following messages:

   make: Entering directory '/var/tmp/portage/sci-visualization/gnuplot-5.0.3/work/gnuplot-5.0.3/docs'
   ./doc2tex -figures ./gnuplot.doc figures.tex
   GNUPLOT_LIB=../demo ../src/gnuplot ./plotstyles.gnu
   
   ;
       set term pdfcairo mono font fontspec size 3.5,2.0 dashlength 0.2;
   ;
       out = "./";
   
                  ^
   line 28: unknown or ambiguous terminal type; type just 'set terminal' for a list
   
   Makefile:968: recipe for target 'pdf_figures' failed
   make: *** [pdf_figures] Error 1
   make: Leaving directory '/var/tmp/portage/sci-visualization/gnuplot-5.0.3/work/gnuplot-5.0.3/docs'

Setting USE="cairo" makes the documentation build and the package install.

Portage 2.2.28 (python 3.4.3-final-0, hardened/linux/amd64, gcc-5.3.0, glibc-2.22-r2, 4.4.3-hardened x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.4.3-hardened-x86_64-AMD_Phenom-tm-_II_X4_905e_Processor-with-gentoo-2.2
KiB Mem:     7904620 total,    241216 free
KiB Swap:   16760828 total,  16483312 free
Timestamp of repository gentoo: Sun, 20 Mar 2016 02:00:01 +0000
sh bash 4.3_p42-r2
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r2::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.22.1::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.3-r7::gentoo, 3.5.1-r2::gentoo
dev-util/cmake:           3.5.0::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.20.5::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.13.4::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            5.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.5::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

creideiki
    location: /usr/local/portage
    masters: gentoo
    priority: 0

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

Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fweb -ftracer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/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="-march=native -O2 -pipe -fweb -ftracer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical --keep-going --quiet-build=n --verbose-conflicts"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch parallel-install 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://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--hash-style=gnu -Wl,--enable-new-dtags"
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="3dnow X a52 aac acl amd64 apache apache2 apng bash-completion berkdb bluray bzip2 cjk cli consolekit cracklib crypt cups cvs cxx dbus device-mapper dirac doc dri dts dvd emacs exif flac gdbm gif git glitz gpm gtk hal hardened iconv idn ipv6 jpeg justify kde kdehiddenvisibility kvm mad mmx mmxext mng modules mp3 mpeg multilib musepack mysql ncurses nls nptl offensive ogg opengl openmp pam pax_kernel pcre pie png postgres qemu qt qt3 qt3support qt4 raw readline rtmp rtsp schroedinger sdl seccomp semantic-desktop session speex sse sse2 ssl ssp subversion svg tcpd theora tiff truetype unicode urandom usb vhosts vorbis wxwindows x264 xattr xcb xft xinerama xtpax xvid zip zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbd authn_default authn_file authz_default authz_groupfile authz_host authz_owner authz_user autoindex cgi dav dav_fs dav_lock dbd dir env expires include info log_config logio mime mime_magic negotiation proxy proxy_http rewrite setenvif status userdir authn_core authz_core unixd socache_shmcb" APACHE2_MPMS="event" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB sv sv_SE" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby21 ruby22" USERLAND="GNU" 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, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

sci-visualization/gnuplot-5.0.3::gentoo was built with the following:
USE="X (-aqua) -bitmap cairo -compat doc -examples gd -ggi -latex -libcaca -libcerf -lua qt4 readline (-svga) -wxwidgets" ABI_X86="64"
Comment 1 Ulrich Müller gentoo-dev 2016-03-24 12:10:26 UTC
Fails for me even with USE="doc cairo", due to missing file picins.sty:


make -j2 -C docs gnuplot.pdf 
make: Entering directory '/var/tmp/portage/sci-visualization/gnuplot-5.0.3/work/gnuplot-5.0.3/docs'
./doc2tex -figures ./gnuplot.doc figures.tex
GNUPLOT_LIB=../demo ../src/gnuplot ./plotstyles.gnu
touch pdf_figures
if test pdflatex != no ; then \
  rm -f figures.idx ; \
  touch figures.idx ; \
  rm -f pdffigures.tex ; \
  ( echo "\usepackage{graphicx}" > pdffigures.tex ; \
    echo "\usepackage{picins}" >> pdffigures.tex ; \
  ) ; \
  TEXINPUTS=.:.:..:/usr/lib64/ocaml/ocamldoc:: pdflatex figures.tex ; \
  TEXINPUTS=.:.:..:/usr/lib64/ocaml/ocamldoc:: pdflatex figures.tex ; \
  TEXINPUTS=.:.:..:/usr/lib64/ocaml/ocamldoc:: pdflatex figures.tex ; \
  makeindex figures ; \
  TEXINPUTS=.:.:..:/usr/lib64/ocaml/ocamldoc:: pdflatex figures.tex ; \
  mv figures.pdf gnuplot.pdf ; \
  rm -f pdffigurex.tex pdffigures.aux ; \
else \
  echo pdflatex not found - cannot build pdf file ; \
fi
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./figures.tex
LaTeX2e <2015/01/01> patch level 2
Babel <3.9l> and hyphenation patterns for 14 languages loaded.
(./titlepag.tex (/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size10.clo)) (./toc_entr.sty
`toc_entry.sty' 1.0 of 13 Dec 90
) (/usr/share/texmf-dist/tex/latex/base/latexsym.sty)
(/usr/share/texmf-dist/tex/latex/base/inputenc.sty
(/usr/share/texmf-dist/tex/latex/ucs/utf8x.def))
(/usr/share/texmf-dist/tex/latex/ucs/ucs.sty
(/usr/share/texmf-dist/tex/latex/ucs/data/uni-global.def))
(/usr/share/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/share/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/usr/share/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/usr/share/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texmf-dist/tex/latex/oberdiek/auxhook.sty)
(/usr/share/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/usr/share/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/share/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/usr/share/texmf-dist/tex/latex/url/url.sty))

Package hyperref Message: Driver (autodetected): hpdftex.

(/usr/share/texmf-dist/tex/latex/hyperref/hpdftex.def
(/usr/share/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/usr/share/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty)
(/usr/share/texmf-dist/tex/latex/base/makeidx.sty)
Writing index file figures.idx
(/usr/share/texmf-dist/tex/latex/tools/longtable.sty)
\@input{pdffigures.aux}
(./pdffigures.tex (/usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texmf-dist/tex/latex/latexconfig/graphics.cfg)
(/usr/share/texmf-dist/tex/latex/pdftex-def/pdftex.def))))

! LaTeX Error: File `picins.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 
! Emergency stop.
<read *> 
         
l.51   \include{pdffigures}
                           ^^M
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on figures.log.


@ottxor: Looks like bug 517058 is hitting us again?
Comment 2 Serge Gavrilov 2017-11-01 16:47:47 UTC
> Fails for me even with USE="doc cairo", due to missing file picins.sty:

+1
Comment 3 Serge Gavrilov 2017-11-01 16:50:08 UTC
build of gnuplot-5.0.6 is still broken.
Comment 4 Ulrich Müller gentoo-dev 2017-11-02 11:15:17 UTC
Created attachment 501700 [details, diff]
Do not require picins.sty

Please test if attached patch fixes the build with USE="doc cairo".

The patch replaces the wrapped-around figures by plain figures. It slightly increases the size of gnuplot.pdf (from 259 to 263 pages here) but I think this is acceptable.

I have also tried replacing picins.sty by wrapfig.sty or floatflt.sty but the result of either is far from perfect. wrapfig gets completely confused at some point and doesn't reset the right margin (i.e. leaves the text narrow), and floatflt has some trouble too which results in overlap between text and figures.
Comment 5 Ulrich Müller gentoo-dev 2017-11-02 11:30:08 UTC
For the USE="doc -cairo" case I see five possible options (ordered by their intrusiveness):
1. Build the documentation without figures (i.e. nofigures.pdf) and output a warning.
2. Automatically disable doc with USE="-cairo"
3. Automatically enable cairo with USE="doc"
4. REQUIRED_USE="doc? ( cairo )"
5. Make cairo an unconditional dependency. (IMHO building without cairo should be strongly discouraged, as there won't be any PDF output without it.)

Unless somebody will raise a good argument against it, I will implement the first option in a few days from now.
Comment 6 Larry the Git Cow gentoo-dev 2017-11-19 11:46:49 UTC
The bug has been closed via the following commit(s):

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

commit 87d20a9ab246fda845fad3456e412a8b32fc8895
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2017-11-19 11:18:34 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2017-11-19 11:46:15 +0000

    sci-visualization/gnuplot: Fix building with USE="doc".
    
    - Do not require picins.sty.
    - Build documentation without figures if cairo is disabled.
    
    Closes: https://bugs.gentoo.org/577828
    Package-Manager: Portage-2.3.14, Repoman-2.3.6

 .../gnuplot/files/gnuplot-5.0.6-no-picins.patch    | 27 ++++++++++++++++++++++
 sci-visualization/gnuplot/gnuplot-5.0.6.ebuild     | 15 ++++++++----
 sci-visualization/gnuplot/gnuplot-5.0.9999.ebuild  | 15 ++++++++----
 3 files changed, 49 insertions(+), 8 deletions(-)
Comment 7 Larry the Git Cow gentoo-dev 2019-07-16 09:08:37 UTC
The bug has been referenced in the following commit(s):

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

commit 735a8c0df42dc1486356e695ad82017e23638593
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2019-07-16 09:07:38 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2019-07-16 09:08:12 +0000

    sci-visualization/gnuplot: Fix build of documentation without gd.
    
    Bug: https://bugs.gentoo.org/577828
    Package-Manager: Portage-2.3.69, Repoman-2.3.16
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 sci-visualization/gnuplot/gnuplot-5.0.7.ebuild    | 6 +++---
 sci-visualization/gnuplot/gnuplot-5.2.6.ebuild    | 4 ++--
 sci-visualization/gnuplot/gnuplot-5.2.7.ebuild    | 4 ++--
 sci-visualization/gnuplot/gnuplot-5.2.9999.ebuild | 6 +++---
 4 files changed, 10 insertions(+), 10 deletions(-)