Bug 844462

Summary: tkimg FTBFS in rawhide
Product: [Fedora] Fedora Reporter: Tom Lane <tgl>
Component: tkimgAssignee: Tom "spot" Callaway <tcallawa>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: hhorak, tcallawa
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-31 19:10:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tom Lane 2012-07-30 18:05:25 UTC
Description of problem:
tkimg isn't building at the moment, with failures like this:

In file included from zlibtcl.h:56:0,
                 from zlibtclStubLib.c:20:
zlibtclDecls.h:123:21: error: expected ')' before 'file'
zlibtclDecls.h:123:26: error: expected ')' before '->' token
make[1]: *** [zlibtclStubLib.o] Error 1

It's not clear to me why this only started to fail recently, because it should have been broken for a long time.  The cause is that zlib.h defines gzgetc() as a macro, which zlibtclDecls.h isn't expecting.  I was able to work around it by inserting "#undef gzgetc", but that entire source file looks like a bad idea from here --- it will break anytime zlib.h changes.

Version-Release number of selected component (if applicable):
tkimg-1.4-9.fc18

How reproducible:
100%

Steps to Reproduce:
1.  Try to build in rawhide.

Comment 1 Tom "spot" Callaway 2012-07-31 18:19:29 UTC
tkimg pretty much falls into the "this is a bad idea" category as a whole, but I'll look into fixing this.

Comment 2 Tom "spot" Callaway 2012-07-31 18:50:19 UTC
This broke only because zlib.h in rawhide defines gzgetc() as a macro in the header, which it did not do in 1.2.5, and the tkimg code generation is very fragile.

Comment 3 Tom "spot" Callaway 2012-07-31 19:10:00 UTC
Fixed in tkimg-1.4-10.fc18. I switched it to use gzgetc_() instead.