Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 383309 - media-video/smplayer-0.6.9-r1 fails to compile with sys-libs/zlib-1.2.5.1-r1
Summary: media-video/smplayer-0.6.9-r1 fails to compile with sys-libs/zlib-1.2.5.1-r1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
: 383667 383949 417591 418123 (view as bug list)
Depends on: 383179
Blocks:
  Show dependency tree
 
Reported: 2011-09-17 05:55 UTC by Igor Ulyanov
Modified: 2012-05-29 20:00 UTC (History)
18 users (show)

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


Attachments
build log (build.log,74.86 KB, text/plain)
2011-09-17 05:57 UTC, Igor Ulyanov
Details
emerge --info (emerge.log,5.32 KB, text/plain)
2011-09-17 05:59 UTC, Igor Ulyanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Ulyanov 2011-09-17 05:55:54 UTC
x86_64-pc-linux-gnu-gcc -c -pipe -O2 -pipe -march=native -Wall -W -D_REENTRANT -DDOWNLOAD_SUBS -DDATA_PATH=\"/usr/share/smplayer\" -DDOC_PATH=\"/usr/share/doc/smplayer-0.6.9-r1\" -DTRANSLATION_PATH=\"/usr/share/smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/smplayer/shortcuts\" -DNO_DEBUG_ON_CONSOLE -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4 -Ifindsubtitles -Ivideopreview -Impcgui -Ifindsubtitles/filedownloader -Ifindsubtitles/quazip -I.moc -I.ui -o .obj/ioapi.o findsubtitles/quazip/ioapi.c
In file included from findsubtitles/quazip/ioapi.c:14:0:
findsubtitles/quazip/ioapi.h:38:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'


Reproducible: Always
Comment 1 Igor Ulyanov 2011-09-17 05:57:26 UTC
Created attachment 286755 [details]
build log
Comment 2 Igor Ulyanov 2011-09-17 05:59:41 UTC
Created attachment 286757 [details]
emerge --info
Comment 3 octoploid 2011-09-17 06:56:26 UTC
A downgrade to zlib-1.2.5.1 solves the issue.

zlib-1.2.5.1-r1 renames the ON macro and that causes this bug:

        # clean up namespace a little #383179
        # we do it here so we only have to tweak 2 files
        sed -i -r 's:\<(O[FN])\>:_Z_\1:g' "${D}"/usr/include/*.h
Comment 4 SpanKY gentoo-dev 2011-09-17 20:39:00 UTC
packages relying on OF/ON are broken.  there's no reason to use these things as they're only for supporting old compilers.
Comment 5 Dmitri 2011-09-18 00:58:47 UTC
same error here.
Downgraded zlib solved the issue.
Comment 6 Richard 2011-09-18 01:04:22 UTC
(In reply to comment #5)
> same error here.
> Downgraded zlib solved the issue.

I can confirm that.
Comment 7 SpanKY gentoo-dev 2011-09-18 02:00:23 UTC
smplayer fails because it is actually copying the minizip code out of zlib itself, modifying it a bit, and then linking it into its own binary

simple fix to add to smplayer that'll work with any zlib version:
    sed -i '1i#define OF(x) x' src/findsubtitles/quazip/*.h
Comment 8 Andreas Proteus 2011-09-18 02:26:00 UTC
(In reply to comment #7)
> simple fix to add to smplayer that'll work with any zlib version:
>     sed -i '1i#define OF(x) x' src/findsubtitles/quazip/*.h

simple fix worked here.
Comment 9 Claudio Roberto França Pereira 2011-09-18 08:11:43 UTC
There is actually a dev-libs/quazip package/atom in portage. Shouldn't it be a dependency of smplayer? Or smplayer already has the source code for it embedded?
Comment 10 Fabio Coatti 2011-09-18 09:22:28 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > simple fix to add to smplayer that'll work with any zlib version:
> >     sed -i '1i#define OF(x) x' src/findsubtitles/quazip/*.h
> 
> simple fix worked here.

Confirmed also here.
Comment 11 Markos Chandras (RETIRED) gentoo-dev 2011-09-20 13:37:18 UTC
*** Bug 383667 has been marked as a duplicate of this bug. ***
Comment 12 Sebastian Pipping gentoo-dev 2011-09-21 12:43:01 UTC
dev-libs/quazip is affected, too:

+  21 Sep 2011; Sebastian Pipping <sping@gentoo.org> quazip-0.4.3-r1.ebuild,
+  +files/quazip-0.4.3-zlib.patch:
+  Fix compilation against zlib-1.2.5.1-r1 (bug #383309)
+
Comment 13 Sebastian Pipping gentoo-dev 2011-09-21 13:14:13 UTC
+*smplayer-0.6.9-r2 (21 Sep 2011)
+
+  21 Sep 2011; Sebastian Pipping <sping@gentoo.org> +smplayer-0.6.9-r2.ebuild,
+  +files/smplayer-0.6.9-quazip.patch:
+  Unbundle quazip (bug #383309), re-keywording requested (bug #383945)
+

Thanks to Claudio for the hint on dev-libs/quazip!
Comment 14 Duncan 2011-09-21 13:25:22 UTC
(In reply to comment #7)
> simple fix to add to smplayer that'll work with any zlib version:
>     sed -i '1i#define OF(x) x' src/findsubtitles/quazip/*.h

Assuming have a recent version of portage, it's possible to make this even simpler and avoid editing and re-manifesting the ebuild itself.  Simply create a file:

/etc/portage/env/media-video/smplayer-0.6.9-r1

(You can call it simply smplayer if desired, but hopefully the next version bump will include this fix, and specifying the version including the -r1 might prevent problems with later versions.)

In that file, put the following three lines:

post_src_prepare () {
    sed -i '1i#define OF(x) x' src/findsubtitles/quazip/*.h
}


smplayer should rebuild just fine after that. =:^)

Duncan
Comment 15 SpanKY gentoo-dev 2011-09-21 15:16:21 UTC
*** Bug 383949 has been marked as a duplicate of this bug. ***
Comment 16 Jeroen Roovers (RETIRED) gentoo-dev 2012-05-27 15:38:15 UTC
*** Bug 417591 has been marked as a duplicate of this bug. ***
Comment 17 Jeroen Roovers (RETIRED) gentoo-dev 2012-05-29 20:00:36 UTC
*** Bug 418123 has been marked as a duplicate of this bug. ***