Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 317397 - Building media-video/gpac-0.4.5-r1 fails. Problem probably in zlib-1.2.5-r1 (zlib upgrade)
Summary: Building media-video/gpac-0.4.5-r1 fails. Problem probably in zlib-1.2.5-r1 (...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: High normal with 1 vote (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
: 317723 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-04-27 03:58 UTC by Sandor I Lengyel
Modified: 2010-04-30 12:52 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sandor I Lengyel 2010-04-27 03:58:18 UTC
Building media-video/gpac-0.4.5-r1 (with zlib-1.2.5-r1) fails during compile with 
x86_64-pc-linux-gnu-gcc -O2 -pipe -march=k8 -fno-strict-aliasing -I/var/tmp/portage/media-video/gpac-0.4.5-r1/work/gpac/include  -I../ -DGPAC_HAVE_CONFIG_H  -c -o utils/xml_parser.o utils/xml_parser.c 
In file included from utils/xml_parser.c:30:
/usr/include/zlib.h:1575:46: error: operator '&&' has no right operand
make[1]: *** [utils/xml_parser.o] 
gpac-0.4.5-r1 did build on my machine before. gpack does build and install with
zlib-1.2.5


Reproducible: Always

Steps to Reproduce:
1. emerge zlib-1.2.5-r1
2. emerge gpac
3.

Actual Results:  
gpac fails to compile

Expected Results:  
gpac builds and installs

My temporary solution is to install zlib-1.2.5
emerge --oneshot gpac
upgrade zlib to zlib-1.2.5-r1
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2010-04-27 11:08:48 UTC
Diego, looks like the patch in -r1 isn't... exactly working as it's supposed.
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-04-27 11:15:58 UTC
Mind if I ask which GCC version, and the content of the generated config.h?
Comment 3 DarkNRG 2010-04-27 11:52:38 UTC
I had the same problem, gcc is 4.4.3-r2, zlib was 1.2.5-r1, but downgrading to zlib 1.2.5 solved it.
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-04-27 11:58:56 UTC
Can somebody give me that file? I don't care if downgrades solve it, the downgrade breaks _more_ than it solves. We just need to fix this for good.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2010-04-27 12:09:36 UTC
/var/tmp/portage/media-video/gpac-0.4.5-r1/work/gpac/config.h

/* Automatically generated by configure */
#ifndef GF_CONFIG_H
#define GF_CONFIG_H
#define GPAC_CONFIG_LINUX
#define GPAC_HAS_JPEG
#define GPAC_HAS_PNG
#define GPAC_HAS_SSL
#define GPAC_HAS_IPV6
#endif

And with gcc-4.5.0.
Comment 6 Jimmy.Jazz 2010-04-27 20:21:43 UTC
Instead, I would change _LARGEFILE64_SOURCE with defined(_LARGEFILE64_SOURCE) in /usr/include/zlib.h line 1574

#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && \
_LFS64_LARGEFILE-0 && _LARGEFILE64_SOURCE

becomes

#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && \
_LFS64_LARGEFILE-0 && defined(_LARGEFILE64_SOURCE)

I didn't check further...
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-04-27 20:28:34 UTC
Different semantics:

# if FOO

will fail if FOO is undefined or defined to 0

# if defined(FOO)

will fail if FOO is undefined, but will proceed if it's defined to 0.
Comment 8 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-04-29 08:38:04 UTC
*** Bug 317723 has been marked as a duplicate of this bug. ***
Comment 9 Alexis Ballier gentoo-dev 2010-04-29 10:38:11 UTC
(In reply to comment #7)
> Different semantics:
> 
> # if FOO
> 
> will fail if FOO is undefined or defined to 0

why not using # if FOO-0 for this, just like in the other parts of zlib.h ?
Comment 10 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-04-29 10:40:18 UTC
Mostly because I was hoping to test that sooner… Alexis can you confirm that fixes it? If so, please feel free to bump to -r2 doing just that…
Comment 11 Alexis Ballier gentoo-dev 2010-04-29 10:52:39 UTC
I'm just blind guessing from an x86_64 here :)

anyway, considering this in zconf.h:

/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
 * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
 * though the former does not conform to the LFS document), but considering
 * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
 * equivalently requesting no 64-bit operations
 */
#if -_LARGEFILE64_SOURCE - -1 == 1
#  undef _LARGEFILE64_SOURCE
#endif

# if and #if defined() should be equivalent here.
Comment 12 Alexis Ballier gentoo-dev 2010-04-29 10:57:26 UTC
(In reply to comment #11)
> I'm just blind guessing from an x86_64 here :)

not that blind actually, it fails here too
Comment 13 Samuli Suominen (RETIRED) gentoo-dev 2010-04-29 20:44:09 UTC
well, both luatex and gpac worked fine with the new 1.2.5-r2.
Comment 14 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-04-29 20:55:32 UTC
The same goes for dovecot (which hit on the tinderbox).
Comment 15 Guy 2010-04-30 11:12:30 UTC
You guys are terrific!

zlib-1.2.5-r2 fixed my gpac and luatex here.

gcc-4.4.3 glibc-2.11.1-r0 vanilla-sources-2.6.33.2 on a Pentium 3 Mobile system.

Thanks!
Comment 16 Samuli Suominen (RETIRED) gentoo-dev 2010-04-30 12:52:30 UTC
Closing this as fixed by zlib-1.2.5-r2.