Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 342817 - dev-tex/catdvi-0.14 does not compile with dev-libs/kpathsea-6.0.0_p20100722
Summary: dev-tex/catdvi-0.14 does not compile with dev-libs/kpathsea-6.0.0_p20100722
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Ulrich Müller
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-26 19:33 UTC by Martin Väth
Modified: 2010-10-28 17:37 UTC (History)
1 user (show)

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


Attachments
Fix to change type of kpathsea_version_string (catdvi-kpathsea.patch,228 bytes, patch)
2010-10-26 19:35 UTC, Martin Väth
Details | Diff
catdvi-0.14-kpathsea.patch (catdvi-0.14-kpathsea.patch,234 bytes, patch)
2010-10-26 20:42 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Väth 2010-10-26 19:33:23 UTC
Apparently, the type of kpathsea_version_string has changed from char *
to const char *
Hence, catdvi will not compile with >=kpathsea-6
I attach a trivial patch which fixes the problem
Comment 1 Martin Väth 2010-10-26 19:35:58 UTC
Created attachment 252093 [details, diff]
Fix to change type of kpathsea_version_string
Comment 2 Ulrich Müller gentoo-dev 2010-10-26 20:34:40 UTC
Unfortunately, your patch breaks compilation with app-text/texlive-core-2009-r2:

gcc -O -march=core2 -ggdb -O2 -pipe  -DCFG_HAS_GETOPT_LONG  -c -o kpathsea.o kpathsea.c
kpathsea.c: In function ‘version_findtfm’:
kpathsea.c:39: error: conflicting types for ‘kpathsea_version_string’
/usr/include/kpathsea/version.h:24: note: previous declaration of ‘kpathsea_version_string’ was here
make: *** [kpathsea.o] Error 1
make: *** Waiting for unfinished jobs....
Comment 3 Ulrich Müller gentoo-dev 2010-10-26 20:42:33 UTC
Created attachment 252099 [details, diff]
catdvi-0.14-kpathsea.patch

Variable kpathsea_version_string should be declared in kpathsea header files, so I believe that we can simply remove the declaration.

Does attached patch fix the problem for you?
Comment 4 Martin Väth 2010-10-27 21:07:54 UTC
Yes, it works. It is clearly the better solution.
Comment 5 Ulrich Müller gentoo-dev 2010-10-27 21:56:43 UTC
Fixed in -r1. Thank you for reporting and for pinpointing the problem.
Comment 6 Alexis Ballier gentoo-dev 2010-10-28 03:03:22 UTC
iirc kpathsea/version.h wasn't available with kpathsea versions prior to texlive 2008 (or was it 2007?) and kpathsea_version_string wasn't declared in any header. That's why I used such a patch instead:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/freetype/files/freetype-1.4_pre20080316-kpathsea_version.patch?revision=1.1&view=markup


if its already included unconditionaly then it's good to remove the extra define though.
Comment 7 Ulrich Müller gentoo-dev 2010-10-28 05:53:41 UTC
Thanks for this info. It is included from kpathsea.h, but only in TL 2009. So I guess we have to detect version.h in configure and explicitly include it.
Comment 8 Ulrich Müller gentoo-dev 2010-10-28 16:47:48 UTC
Fixed again, thanks Alexis. (The build system of this package is strange, by the way.)

@Martin: Could you report this bug upstream, too? There's not much activity, but I think it should be done anyway.
Comment 10 Ulrich Müller gentoo-dev 2010-10-28 17:37:29 UTC
Thank you again.

Since this bug is referenced from the upstream tracker, our fix is here:
<http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-tex/catdvi/files/catdvi-0.14-kpathsea.patch?view=markup>