pkgsrc-Bugs archive

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

pkg/31871: graphics/xv build fails on MacOS X 10.3.9, 10.4.2



>Number:         31871
>Category:       pkg
>Synopsis:       graphics/xv build fails on MacOS X 10.3.9, 10.4.2
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 19 20:59:00 +0000 2005
>Originator:     John D. Baker
>Release:        Mac OS X 10.4.2
>Organization:
>Environment:
Darwin pm8500.technoskunk.fur 8.2.0 Darwin Kernel Version 8.2.0: Fri Jun 24 
17:46:54 PDT 2005; root:xnu-792.2.4.obj~3/RELEASE_PPC Power Macintosh powerpc
>Description:
Building graphics/xv on MacOS X 10.4.2 (and 10.3.9) fail as follows:

[...]
make depend
gccmakedep  -- -I/usr/pkg/include -I/usr/pkg/include -I/usr/pkg/include 
-I/usr/pkg/include  -I/usr/pkg/include -I/usr/X11R6/include   -D__DARWIN__      
                           -DNO_ALLOCA -DCSRG_BASED              -DDOJPEG 
-DDOTIFF -DDOPNG -DDOPDS         -DMGCSFXDIR=\"/usr/pkg/lib/X11\"   -- xv.c 
xvevent.c xvroot.c xvmisc.c xvimage.c xvcolor.c xvsmooth.c        xv24to8.c 
xvgif.c xvpm.c xvinfo.c xvctrl.c xvscrl.c xvalg.c     xvgifwr.c xvdir.c 
xvbutt.c xvpbm.c xvxbm.c xvgam.c xvbmp.c      xvdial.c xvgraf.c xvsunras.c 
xvjpeg.c xvps.c xvpopup.c xvdflt.c xvtiff.c xvtiffwr.c xvpds.c xvrle.c xviris.c 
xvgrab.c vprintf.c         xvbrowse.c xvtext.c xvpcx.c xviff.c xvtarga.c 
xvxpm.c xvcut.c   xvxwd.c xvfits.c xvpng.c xvzx.c xvwbmp.c xvpcd.c        
xvmag.c xvpic.c xvmaki.c xvpi.c xvpic2.c xvvd.c xvmgcsfx.c      xvml.c bggen.c 
vdcomp.c xcmap.c
gcc: installation problem, cannot exec '/usr/bin/i686-apple-darwin8-gcc-4.0.0': 
No such file or directory
In file included from xv.c:11:
xv.h:216:23: error: malloc.h: No such file or directory
gcc: installation problem, cannot exec '/usr/bin/i686-apple-darwin8-gcc-4.0.0': 
No such file or directory
In file included from xvevent.c:24:
xv.h:216:23: error: malloc.h: No such file or directory
[...]
powerpc-apple-darwin8-gcc-4.0.0: -arch_multiple: linker input file unused 
because linking not done
lipo: can't open input file: /var/tmp//ccUmoDRX.out (No such file or directory)
lipo: can't open input file: /var/tmp//ccfDlJfr.out (No such file or directory)
[...]
lipo: can't open input file: /var/tmp//ccqQ77BA.out (No such file or directory)
lipo: can't open input file: /var/tmp//ccavgkWe.out (No such file or directory)
lipo: can't figure out the architecture type of: /var/tmp//cc2LUtoQ.out
lipo: can't open input file: /var/tmp//cc7S6Iut.out (No such file or directory)
lipo: can't figure out the architecture type of: /var/tmp//ccp84fGS.out
===> Building for xv-3.10anb10
  building xv ...

gcc -pipe -g -Os -Wall -Wpointer-arith -no-cpp-precomp   -I/usr/pkg/include 
-I/usr/pkg/include -I/usr/pkg/include -I/usr/pkg/include  -I/usr/pkg/include 
-I/usr/X11R6/include   -D__DARWIN__                                 -DNO_ALLOCA 
-DCSRG_BASED                    -DDOJPEG -DDOTIFF -DDOPNG -DDOPDS         
-DMGCSFXDIR=\"/usr/pkg/lib/X11\"  -no-cpp-precomp -I/usr/pkg/include 
-I/usr/include -c xv.c
In file included from xv.c:11:
xv.h:216:23: error: malloc.h: No such file or directory
*** Error code 1

Stop.
bmake: stopped in /Volumes/NetBSD/tmp/pkgsrc/graphics/xv/work/xv-3.10a
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/graphics/xv
===> 
===> There was an error during the ``build'' phase.
===> Please investigate the following for more information:
===>      * log of the build
===>      * /Volumes/NetBSD/tmp/pkgsrc/graphics/xv/work/.work.log
===> 
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/graphics/xv

(10.3.9 with GCC 3.3 only complains about not finding an i386 specs file
and does not produce the "lipo:" output lines.)


Later...

[...]
gcc -pipe -o bggen -g -Os -Wall -Wpointer-arith -no-cpp-precomp     
-L/usr/pkg/lib -L/usr/X11R6/lib  bggen.o -lXext -lX11 -L/usr/pkg/lib -L/usr/lib 
-L/usr/X11R6/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -ljpeg -L/usr/pkg/lib -ltiff 
-ljpeg -lz -L/usr/pkg/lib -lpng -lz  -L/usr/X11R6/lib  -lm   
gcc -pipe -g -Os -Wall -Wpointer-arith -no-cpp-precomp   -I/usr/pkg/include 
-I/usr/pkg/include -I/usr/pkg/include -I/usr/pkg/include  -I/usr/pkg/include 
-I/usr/X11R6/include   -D__DARWIN__                                 -DNO_ALLOCA 
-DCSRG_BASED                    -DDOJPEG -DDOTIFF -DDOPNG -DDOPDS         
-DMGCSFXDIR=\"/usr/pkg/lib/X11\"  -no-cpp-precomp -I/usr/pkg/include 
-I/usr/include -c vdcomp.c
vdcomp.c:125:25: error: malloc.h: No such file or directory
*** Error code 1

Stop.
bmake: stopped in /Volumes/NetBSD/tmp/pkgsrc/graphics/xv/work/xv-3.10a
[...]

>How-To-Repeat:
On MacOS X 10.3.9 or 10.4.2:

cd .../graphics/xv
bmake
>Fix:
I don't know why it's trying to find an i386/i686 compiler on a PowerPC
system.  Otherwise these messages seem harmless.

On MacOS X, the prototypes for 'malloc' are in <stdlib.h>.  <malloc.h>
does not exist.

Workaround:

bmake clean clean-depends
bmake patch
cp work/xv-3.10a/xv.h work/xv-3.10a/xv.h.orig2

Apply the following patch to xv.h.orig2 resulting in new xv.h:

--- work/xv-3.10a/xv.h.orig2    2005-10-19 15:38:51.000000000 -0500
+++ work/xv-3.10a/xv.h  2005-10-19 15:39:55.000000000 -0500
@@ -213,7 +213,11 @@
 #  if defined(hp300) || defined(hp800) || defined(NeXT)
 #   include <sys/malloc.h>                /* it's in 'sys' on HPs and NeXT */
 #  else
-#   include <malloc.h>
+#    if defined(__DARWIN__)
+#      include <stdlib.h>
+#    else
+#      include <malloc.h>
+#    endif /* __DARWIN__ */
 #  endif
 # endif
 #endif /* !VMS */

bmake

cp work/xv-3.10a/vdcomp.c work/xv-3.10a/vdcomp.c.orig

Apply the following patch:

--- work/xv-3.10a/vdcomp.c.orig 2005-10-19 15:51:45.000000000 -0500
+++ work/xv-3.10a/vdcomp.c      2005-10-19 15:54:56.000000000 -0500
@@ -122,7 +122,11 @@
      but the macro is defined in <sys/parm.h>, which I don't know all
      machine has or not.
      */
-#     include <malloc.h>
+#     if defined(__DARWIN__)
+#       include <stdlib.h>
+#     else
+#       include <malloc.h>
+#     endif /* __DARWIN __ */
 #   endif
 #  endif
 # endif


bmake




Home | Main Index | Thread Index | Old Index