Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73597 - unable to compile ghostscript-7.07.1-r8 without glib-2.xx and gtk
Summary: unable to compile ghostscript-7.07.1-r8 without glib-2.xx and gtk
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
: 73981 74261 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-06 15:13 UTC by Patrick Fourniols
Modified: 2004-12-14 22:25 UTC (History)
8 users (show)

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


Attachments
patch for ebuild without X (ghostscript-7.07.1-r8.patch,679 bytes, patch)
2004-12-09 06:38 UTC, Patrick Fourniols
Details | Diff
build against gtk2 with USE=gtk (ghostscript.patch,1.29 KB, patch)
2004-12-13 05:11 UTC, Marien Zwart (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Fourniols 2004-12-06 15:13:49 UTC
ghostscript-7.07.1-r8 dependency needed by foomatic-filters won't compile on a system without X and gtk.
the pb is from the line 'emake so -j1 || die "make failed"': CFLAGS_SO in Makefile need glib-2.0 includes. do we need to build "so" on a system without X? ;)
history: first break missing glib.h, normal not installed ;)
try to install glib-2.4.8 just in case not having to give time to this and a miracle rise... compile fine...
try to update ghostscript: 'gtk-config' file not found :( and if i emerge gtk X rise too, not necessery on a computer wiithout screen, keyboard and mouse, i think but perhaps i think bad... ;)
beside that unmerging glib-2.4.8 rise another pb:
emerge -upD world give me now an [ebuild NS ] dev-libs/glib-2.4.8 funny, not? ;)

Reproducible: Always
Steps to Reproduce:
1.emerge -upD world
2.
3.

Actual Results:  
nothing good ;)

Expected Results:  
don't know if this query is a joke or not ;)

Portage 2.0.51-r8 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0,
2.6.9-gentoo-r9 i686)
=================================================================
System uname: 2.6.9-gentoo-r9 i686 AMD Athlon(tm) processor
Gentoo Base System version 1.6.7
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Sep 29 2004, 17:32:41)]
distcc 2.18.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.8.5-r2, 1.5, 1.4_p6, 1.6.3, 1.7.9, 1.9.3
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.2-r7
virtual/os-headers:  2.6.8.1-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=athlon -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/fax /usr/share/config /var/bind /var/qmail/control /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=athlon -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks fixpackages sandbox sfperms"
GENTOO_MIRRORS="ftp://mir.zyrianes.net/gentoo/"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow apm arts avi berkdb bitmap-fonts clamav crypt cups encode f77 fam
foomaticdb fortran gdbm gif gpm gtk2 imlib jpeg libg++ libwww mad maildir mikmod
motif mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png python quicktime
readline samba sdl slang spell ssl svga tcpd tiff truetype x86 xml2 xmms xv zlib"
Comment 1 Heinrich Wendel (RETIRED) gentoo-dev 2004-12-07 01:08:58 UTC
you have gtk in your useflags, so why should it build without it?
Comment 2 Marien Zwart (RETIRED) gentoo-dev 2004-12-07 07:32:33 UTC
Not entirely sure this is the same bug, but anyway:

When trying to upgrade from ghostscript 7.07.1-r7 to -r8 I get the following (snipped, more log available if needed):

rm -f ./bin/../sobin/libgs.so.7
ln -s libgs.so.7.07 ./bin/../sobin/libgs.so.7
rm -f ./bin/../sobin/libgs.so
ln -s libgs.so.7.07 ./bin/../sobin/libgs.so
i686-pc-linux-gnu-gcc  -DHAVE_MKSTEMP -O2 -fPIC -I/usr/include/glib-2.0 -I/usr/l
ib/glib-2.0/include -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-p
rototypes -Wcast-qual -Wwrite-strings -fno-builtin -fno-common  -I./obj/../soobj
 -I./src  -g -o ./bin/../sobin/gsc ./src/dxmainc.c -L./bin/../sobin -lgs
i686-pc-linux-gnu-gcc  -DHAVE_MKSTEMP -O2 -fPIC -I/usr/include/glib-2.0 -I/usr/l
ib/glib-2.0/include -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-p
rototypes -Wcast-qual -Wwrite-strings -fno-builtin -fno-common  -I./obj/../soobj
 -I./src  -g `gtk-config --cflags` -o ./bin/../sobin/gsx ./src/dxmain.c -L./bin/
../sobin -lgs `gtk-config --libs`
/bin/sh: gtk-config: command not found
/bin/sh: gtk-config: command not found
./src/dxmain.c:36:21: gtk/gtk.h: No such file or directory
./src/dxmain.c:44: error: parse error before "data"
followed by 100 or so lines of other errors caused by missing gtk definitions.

I do have gtk-2 installed, but not gtk 1. I think gtk 1 has gtk-config, but gtk2 doesn't (it does have a pkgconfig .pc file). I tried compiling this file manually, using gcc `pkg-config --cflags gtk+-2.0` -o gs dxmain.c, and this seemed to work. I am not sure why the new ebuild failed and the old one didn't. I tried the merge both with and without gtk in USE, and both failed in the same way.

If more info is needed please ask, I am not sure what I need to provide...

Portage 2.0.51-r8 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0,
 2.6.9-gentoo-r9-m1 i686)             
=================================================================
System uname: 2.6.9-gentoo-r9-m1 i686 AMD Athlon(tm) XP 2600+
Gentoo Base System version 1.6.7
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Nov  8 2004, 18:55:58)]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.8.5-r2, 1.5, 1.4_p6, 1.6.3, 1.7.9, 1.9.3
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.2-r7
virtual/os-headers:  2.6.8.1-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer -fweb -frename-registers"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer -fweb -frename-registers"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig candy ccache distlocks noauto sandbox sfperms userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://mirror.nutsmaas.nl/gentoo/ http://ftp.easynet.nl/mirror/gentoo/ http://www.gigaload.org/gentoo.org/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="3dnow 3dnowex X alsa ansi apm avi bitmap-fonts cdr crypt dga edl emacs f77 faad fbcon foomaticdb fortran gnome gstreamer gtk2 imagemagick javascript jit jpeg libcaca libg++ libwww maildir md5sum mikmod mmx mmx2 mng mozdevelop mozsvg mpeg ncurses nethack network nls nntp no-old-linux no_wxgtk1 nptl nptlonly oggvorbis pam png python qemu-fast quicktime readline rtc softmmu spell sse ssl svg tetex truetype unicode userlocales x86 xml2 xv zlib"
Comment 3 Patrick Fourniols 2004-12-07 08:27:49 UTC
i have removed  gtk2 from use flags, re merged glib-2.4.8 ( CFLAGS_SO need it in Make file ;) ) but 'make so -j1'  want gtk-config like in above log.
Comment 4 Tobias Hunger 2004-12-08 06:55:39 UTC
I tried both 'USE="-gtk" emerge ghostscript' and 'USE="gtk" emerge ghostscript'. Both fail with the same error seen by the reporter. I have -gtk and -gtk2 in my USE flags, so I was surprised to see it fail with this error the first time round. That it does not build even with gtk set is a even bigger surprise to me.
Comment 5 Neil Bothwick 2004-12-09 02:46:39 UTC
I see the same here. First it failed to compile without glib-2.x. 
Merging that let the compilation run further, until it failed because
gtk-config was not availble. This is on a computer without X.


Portage 2.0.51-r8 (default-linux/x86/2004.0, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r9 i686)
=================================================================
System uname: 2.6.9-gentoo-r9 i686 VIA Samuel 2
Gentoo Base System version 1.6.7
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Aug  2 2004, 22:35:38)]
distcc 2.18.2 i586-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.9.3, 1.5, 1.8.5-r2, 1.6.3, 1.7.9, 1.4_p6
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.2-r7
virtual/os-headers:  2.6.8.1-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=c3 -Os -pipe -fomit-frame-pointer"
CHOST="i586-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=c3 -Os -pipe -fomit-frame-pointer"
DISTDIR="/mnt/portage/distfiles"
FEATURES="autoaddcvs autoconfig buildpkg ccache distcc distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://ftp.mirror.ac.uk/sites/www.ibiblio.org/gentoo/ ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/"
MAKEOPTS="-j4"
PKGDIR="/mnt/portage/packages/desatio"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow apache2 apm avi berkdb bitmap-fonts crypt cups encode exiscan-acl f77 fam foomaticdb fortran gdbm gif gtk2 imlib jpeg ldap libg++ libwww mad mbox mikmod mmx motif mpeg mysql ncurses oggvorbis opengl oss pam pdflib perl png ppds python quicktime readline samba slang ssl svga tcpd tiff usb x86 xml xml2 xmms xv zlib linguas_en_GB"
Comment 6 Patrick Fourniols 2004-12-09 03:23:01 UTC
just synced portage, noticed that line 'emake so -j1' was removed: shared objects need glib and gtk ... and X, but i think that line "make DESTDIR=${D} soinstall..." must also be removed, no? ;)
Comment 7 Luca Barbato gentoo-dev 2004-12-09 05:55:08 UTC
probably is enough add the glib dep to the latest ebuild
Comment 8 Patrick Fourniols 2004-12-09 06:38:42 UTC
Created attachment 45603 [details, diff]
patch for ebuild without X

sorry need new glasses ;) but remed off the two lines(*) and merging succeed.
lp /usr/share/ghostscript/7.07/examples/*.gs worked like a charm...
just a note on this computer i have glib-2.4.8 merged, will try on another
without. stay tuned ;)
here is the patch for the ebuild ( cd <where-portage-is>/app-text/ghostscript ;
patch < <where-the-patch-file-is>/ghostscript-7.07-r8.patch
Comment 9 miro 2004-12-09 23:19:10 UTC
Thank you, the patch worked for me.
Comment 10 Marien Zwart (RETIRED) gentoo-dev 2004-12-13 05:11:37 UTC
Created attachment 45902 [details, diff]
build against gtk2 with USE=gtk

The current ebuild still won't build without gtk1, as it uses gtk-config which
gtk2 doesn't have. A bit of sed can replace the gtk-config with pkgconfig. This
makes it build without gtk1, but this will probably not work with gtk1 and no
gtk2.

Since the ebuild already depends on gtk 2 if USE=gtk, I think the best thing to
do would be:

- if USE=gtk, patch the makefile to use pkgconfig, so it works with gtk2 (and
not with gtk1).
- if not USE=gtk, don't patch and skip the make so and make soinstall steps.

I can confirm this works on a system with glib1, glib2 and gtk2, both with and
without USE=gtk. It seems to be linking against glib 1 without the gtk USE. I'm
not sure if that's a problem, it does seem to be missing from the DEPEND.
Comment 11 Heinrich Wendel (RETIRED) gentoo-dev 2004-12-14 06:22:34 UTC
*** Bug 73981 has been marked as a duplicate of this bug. ***
Comment 12 Heinrich Wendel (RETIRED) gentoo-dev 2004-12-14 07:02:23 UTC
*** Bug 74261 has been marked as a duplicate of this bug. ***
Comment 13 Heinrich Wendel (RETIRED) gentoo-dev 2004-12-14 07:10:20 UTC
fixed
Comment 14 Ginsu 2004-12-14 22:04:39 UTC
There is a typo in the ebuild.  The line reads:
                sed -i -e "s:gtk-config:pkg-config gtk-2.0:" src/unix-dll.mak

and it should be:
                sed -i -e "s:gtk-config:pkg-config gtk+-2.0:" src/unix-dll.mak

The difference being gtk+ vs just gtk.
Comment 15 Ginsu 2004-12-14 22:25:54 UTC
Correction again. There are 2 calls to gtk-config in unix-dll.mak so the sed command should be:
                sed -i -e "s:gtk-config:pkg-config gtk+-2.0:g" src/unix-dll.mak

The extra g at the end of the expression will replace all occurences of gtk-config.