Bug 135909 - pwlib-1.8.7 does not compile with gcc-4.1
Bug#: 135909 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: stkn@gentoo.org Reported By: rain@matfyz.cz
Component: GCC Porting
URL: 
Summary: pwlib-1.8.7 does not compile with gcc-4.1
Keywords:  
Status Whiteboard: 
Opened: 2006-06-07 06:08 0000
Description:   Opened: 2006-06-07 06:08 0000
There already is a patch for gcc-4.1, however, it is not complete, possibly
because its author didn't compile against v4l2 USE flag?

The following patch should fix the remaining one extra qualification error.

------- Comment #1 From Zdenek Behan 2006-06-07 06:10:36 0000 -------
Created an attachment (id=88599) [details]
Fix for remaining extra qualification for gcc-4.1*

------- Comment #2 From Daniel Webert 2006-06-11 10:16:46 0000 -------
overhere on x86 pwlib-1.10.x w/ v4l/v4l2 works fine w/ gcc-4.1.1/glibc-2.4

------- Comment #3 From Frédéric COIFFIER 2006-06-14 03:06:42 0000 -------
pwlib-1.10.0 compiles on x86 witg gcc-4.1.1 but openh323 needs a version <=
1.8.7

------- Comment #4 From Zdenek Behan 2006-06-15 11:32:51 0000 -------
In that case, more details from me are here:

I have gcc-4.1.1, glibc-2.4-r3, not that i think this really matters, system is
x86, profile 2006.0.

I just synced, and tried emerging =pwlib-1.8.7, result:
g++ -mtune=pentium4 -march=pentium4 -mmmx -msse -msse2 -msse3 -pipe
-fomit-frame-pointer -floop-optimize -foptimize-register-move
-foptimize-sibling-calls -fprefetch-loop-arrays -ffast-math -O3 -D_REENTRANT 
-Wall  -fPIC -DUSE_ESD=1 -I/tmp/portage/pwlib-1.8.7/work/pwlib-1.8.7/include \
vidinput_names.cxx \
-I. -shared vidinput_v4l2.cxx -o ../pwlib/device/videoinput/v4l2_pwplugin.so
vidinput_v4l2.cxx:77: error: extra qualification 'V4L2Names::' on member
'BuildUserFriendly'
make[2]: *** [../pwlib/device/videoinput/v4l2_pwplugin.so] Error 1
make[2]: Leaving directory
`/tmp/portage/pwlib-1.8.7/work/pwlib-1.8.7/plugins/vidinput_v4l2'
make[1]: *** [opt] Error 2
make[1]: Leaving directory `/tmp/portage/pwlib-1.8.7/work/pwlib-1.8.7/plugins'
make: *** [opt] Error 2

This is exactly what the patch fixes. I also unpacked a clean source from
distfiles (pwlib-1.8.7.tar.gz, MD5: ba4fddd6cb8d4420cc18f308ccf48e00), and
checked it manually that the line (plugins/vidinput_v4l2/vidinput_v4l2.cxx:77)
is there, and with extra qualification, so it's not a dependency issue either.

The problem is obviously in v4l2 plugin as stated before, which is being
enabled in this place in the ebuild:
    econf \
        --enable-plugins \
        $(use_enable v4l2) \
        $(use_enable sdl) \
        $(use_enable oss) \
        ${myconf} || die "configure failed"

I don't see how this could not enable the failing plugin with v4l2 use enabled,
but maybe it does in some cases?

Configure line looks like this for me:
./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man
--infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
--localstatedir=/var/lib --enable-plugins --enable-v4l2 --enable-sdl
--enable-oss --enable-ipv6 --enable-v4l --enable-avc --enable-dc --enable-alsa
--build=i686-pc-linux-gnu

Looking at the source, i have no idea why this should work for some and not
work for others. It's simply an extra qualification, which _should_ fail with
gcc-4.1. 

The original patch for gcc-4.1 (pwlib/files/pwlib-1.8.7-gcc41.patch, md5:
223dafbac9787545227998ed2979a44f) does nothing about that, and the other
patches seem unrelated to this at all.

So, right now i have no idea what's wrong with either my or your system, but it
still fails on mine. ;)

------- Comment #5 From Ryan Hill 2006-07-02 22:53:45 0000 -------
(In reply to comment #4)

> So, right now i have no idea what's wrong with either my or your system, but it
> still fails on mine. ;)

they're building 1.10.1 which builds fine with gcc-4.1, while you're building
1.8.7 which doesn't.  unfortunately, as mentioned, openh323 requires 1.8.7.

------- Comment #6 From Steve Arnold 2006-07-04 17:53:33 0000 -------
This bit me today; it's partly the gnomemeeting->ekiga thing, and some depends
that need updating, but it's still a needed patch for now.