pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/44129: graphics/gdk-pixbuf2 does not build using gcc from NetBSD 4.0 (+FIX)



>Number:         44129
>Category:       pkg
>Synopsis:       graphics/gdk-pixbuf2 does not build using gcc from NetBSD 4.0 
>(+FIX)
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 22 13:55:00 +0000 2010
>Originator:     Robert Elz
>Release:        NetBSD 4.0  (pkgsrc current (HEAD) 2010-11-22)
>Organization:
        Prince of Songkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 5.1_RC3 NetBSD 5.1_RC3 (JADE-1.12-20100614) 
#2: Mon Jun 14 08:35:26 ICT 2010 
kre%jade.coe.psu.ac.th@localhost:/usr/obj/5.1/kernels/JADE i386
Architecture: i386
Machine: i386
>Description:
        graphics/gdk-pixbuf2 has some assembler files (for i386) that
        are preprocessed by cpp.  A couple of those files have # style
        (assembler) comments included.  The cpp in NetBSD 4.0 objects
        to those # lines as being invalid preprocessor directives.

>How-To-Repeat:
        I use pkg_comp with NetBSD 4.0 (release) sets installed, and libkver.
        I also use X11_TYPE=modular.   None of that is relevant to this
        problem (just NetBSD 4.0).

        In that environment, attempt to build graphics/gdk-pixbuf2 and
        expect to see ...

/bin/sh ../../libtool     --mode=compile cc -std=gnu99 -DHAVE_CONFIG_H  -I. 
-I../.. -I../.. -I../..                              -pthread 
-I/usr/pkg/include/glib/glib-2.0 -I/usr/pkg/lib/glib-2.0/include 
-I/usr/pkg/include/libpng14  -I/usr/pkg/include -I/usr/include 
-DG_DISABLE_SINGLE_INCLUDES   -O2 -I/usr/pkg/include -I/usr/include -MT 
have_mmx.lo -MD -MP -MF .deps/have_mmx.Tpo -c -o have_mmx.lo have_mmx.S
libtool: compile:  cc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -pthread 
-I/pkg_comp/obj/pkgsrc/graphics/gdk-pixbuf2/4x/.buildlink/include/glib/glib-2.0 
-I/pkg_comp/obj/pkgsrc/graphics/gdk-pixbuf2/4x/.buildlink/lib/glib-2.0/include 
-I/pkg_comp/obj/pkgsrc/graphics/gdk-pixbuf2/4x/.buildlink/include/libpng14 
-I/pkg_comp/obj/pkgsrc/graphics/gdk-pixbuf2/4x/.buildlink/include 
-DG_DISABLE_SINGLE_INCLUDES -O2 -MT have_mmx.lo -MD -MP -MF .deps/have_mmx.Tpo 
-c have_mmx.S  -fPIC -DPIC -o .libs/have_mmx.o
have_mmx.S:45:3: error: invalid preprocessing directive #Check
have_mmx.S:60:3: error: invalid preprocessing directive #OK
*** Error code 1

Stop.
make: stopped in 
/pkg_comp/obj/pkgsrc/graphics/gdk-pixbuf2/4x/gdk-pixbuf-2.22.1/gdk-pixbuf/pixops
*** Error code 1

Stop.

        Fix that one, and then ...

/bin/sh ../../libtool     --mode=compile cc -std=gnu99 -DHAVE_CONFIG_H  -I. 
-I../.. -I../.. -I../..                              -pthread 
-I/usr/pkg/include/glib/glib-2.0 -I/usr/pkg/lib/glib-2.0/include 
-I/usr/pkg/include/libpng14  -I/usr/pkg/include -I/usr/include 
-DG_DISABLE_SINGLE_INCLUDES   -O2 -I/usr/pkg/include -I/usr/include -MT 
composite_line_22_4a4_mmx.lo -MD -MP -MF .deps/composite_line_22_4a4_mmx.Tpo -c 
-o composite_line_22_4a4_mmx.lo composite_line_22_4a4_mmx.S
libtool: compile:  cc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -pthread 
-I/pkg_comp/obj/pkgsrc/graphics/gdk-pixbuf2/4x/.buildlink/include/glib/glib-2.0 
-I/pkg_comp/obj/pkgsrc/graphics/gdk-pixbuf2/4x/.buildlink/lib/glib-2.0/include 
-I/pkg_comp/obj/pkgsrc/graphics/gdk-pixbuf2/4x/.buildlink/include/libpng14 
-I/pkg_comp/obj/pkgsrc/graphics/gdk-pixbuf2/4x/.buildlink/include 
-DG_DISABLE_SINGLE_INCLUDES -O2 -MT composite_line_22_4a4_mmx.lo -MD -MP -MF 
.deps/composite_line_22_4a4_mmx.Tpo -c composite_line_22_4a4_mmx.S  -fPIC -DPIC 
-o .libs/composite_line_22_4a4_mmx.o
composite_line_22_4a4_mmx.S:192:3: error: invalid preprocessing directive #%
composite_line_22_4a4_mmx.S:193:3: error: invalid preprocessing directive #pxor
*** Error code 1

Stop.
make: stopped in 
/pkg_comp/obj/pkgsrc/graphics/gdk-pixbuf2/4x/gdk-pixbuf-2.22.1/gdk-pixbuf/pixops
*** Error code 1

Stop.

>Fix:
        Unpack the shar file included to make two new patch files,
        patches/patch-ad and patches/patch-ae - rebuild the distinfo
        file, and it all works.  (no revbump needed for this fix).

        These patches just remove the offending comments, I see no good
        reason for retaining them in the pkgsrc build process.  An alternative
        would be to substitute C style /* */ (or perhaps even //) comments
        for the assembler # comments - cpp will then remove them while it
        is processing (but at least the comments would remain in the source,
        if anyone feels there's some merit in that).

        A third way would be to require this package be built with some
        newer version of gcc (which I presume works, as this package
        seems to build OK on NetBSD 5.0).  That seems like a rather
        heavyweight solution to 4 meaningless comment lines however...

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#       patches/patch-ad
#       patches/patch-ae
#
echo x - patches/patch-ad
sed 's/^X//' >patches/patch-ad << 'END-of-patches/patch-ad'
X$NetBSD$
X
X--- gdk-pixbuf/pixops/have_mmx.S-broken        2010-06-25 21:40:10.000000000 
+0000
X+++ gdk-pixbuf/pixops/have_mmx.S       2010-11-22 13:19:17.000000000 +0000
X@@ -42,8 +42,6 @@
X       
X       push    %ebx
X 
X-# Check if bit 21 in flags word is writeable
X-
X       pushfl  
X       popl    %eax
X       movl    %eax,%ebx
X@@ -57,8 +55,6 @@
X 
X       je .notfound
X 
X-# OK, we have CPUID
X-
X       movl    $1, %eax
X       cpuid
X       
END-of-patches/patch-ad
echo x - patches/patch-ae
sed 's/^X//' >patches/patch-ae << 'END-of-patches/patch-ae'
X$NetBSD$
X
X--- gdk-pixbuf/pixops/composite_line_22_4a4_mmx.S-broken       2010-06-25 
21:40:10.000000000 +0000
X+++ gdk-pixbuf/pixops/composite_line_22_4a4_mmx.S      2010-11-22 
13:27:33.000000000 +0000
X@@ -189,9 +189,6 @@
X 
X       shll $2, %edx
X 
X-#     %mm4 will always be already clear here  
X-#     pxor %mm4, %mm4
X-
X       movl 16(%ebp),%edi
X       movl (%edi, %edx), %eax
X       movd (%edi, %edx), %mm5
END-of-patches/patch-ae
exit



Home | Main Index | Thread Index | Old Index