pkgsrc-Users archive

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

Re: compiling ImageMagick on NetBSD 5



On Tue, Oct 07, 2014 at 01:02:43PM +0100, Patrick Welche wrote:
> On Tue, Oct 07, 2014 at 11:38:55AM +0100, Patrick Welche wrote:
> > On Fri, Oct 03, 2014 at 04:53:41PM +0100, Patrick Welche wrote:
> > > I don't seem to be able to compile ImageMagick (2014Q3) on NetBSD 5,
> > > neither with gcc 4.9:
> > > 
> > >   CCLD     utilities/animate
> > > /usr/pkg/gcc49/lib/./libstdc++.so.6: undefined reference to `_Unwind_GetIPInfo'
> > > Makefile:6825: recipe for target 'utilities/animate' failed
> > > gmake[1]: *** [utilities/animate] Error 1
> 
> Essentially, I think that CCLD should be a CXXLD. animate is written C,
> but some of the libraries are written in C++. The compilation works if
> I manually /usr/pkg/gcc49/bin/c++ the -o utilities/.libs/animate linking
> step.

It turns out that at least on NetBSD 5/i386 with Q3 pkgsrc, it still doesn't
help: c++/g++ doesn't fail with _Unwind_GetIP, but

/usr/obj/graphics/ImageMagick/work/.buildlink/lib/libIlmImf.so: undefined reference to `_ZNSt8ios_base4InitD1Ev@GLIBCXX_3.4'
/usr/obj/graphics/ImageMagick/work/.buildlink/lib/libIlmImf.so: undefined reference to `_ZNSsC1ERKSsjj@GLIBCXX_3.4'
...

> One question is how automake is meant to know to link using C++,
> the other is why doesn't it break from me compiling ImageMagick on
> NetBSD-current?

Still don't know why it works on -current:

  /bin/sh ./libtool  --tag=CC   --mode=link gcc  -pthread ... -march=corei7-avx ...

the only obvious difference being the extra -march corresponding to that
particular -current/amd64 box, and of course that everything is built with
the same compiler.


I'm now giving up, and attaching a patch to make OpenEXR support optional.

Question: leave it on by default, as that is what is currently the case,
or switch it off, magically fix the netbsd 5 builds?
(Patch does the former)

Cheers,

Patrick
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/ImageMagick/Makefile,v
retrieving revision 1.208
diff -u -u -r1.208 Makefile
--- Makefile	22 Aug 2014 11:24:25 -0000	1.208
+++ Makefile	10 Oct 2014 09:07:44 -0000
@@ -80,7 +80,6 @@
 .include "../../fonts/fontconfig/buildlink3.mk"
 .include "../../graphics/freetype2/buildlink3.mk"
 .include "../../graphics/lcms2/buildlink3.mk"
-.include "../../graphics/openexr/buildlink3.mk"
 .include "../../graphics/libwebp/buildlink3.mk"
 .include "../../graphics/png/buildlink3.mk"
 .include "../../graphics/tiff/buildlink3.mk"
Index: buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/ImageMagick/buildlink3.mk,v
retrieving revision 1.54
diff -u -u -r1.54 buildlink3.mk
--- buildlink3.mk	22 Aug 2014 11:24:25 -0000	1.54
+++ buildlink3.mk	10 Oct 2014 09:07:44 -0000
@@ -21,6 +21,9 @@
 .if !empty(PKG_BUILD_OPTIONS.ImageMagick:Mjasper)
 .include "../../graphics/jasper/buildlink3.mk"
 .endif
+.if !empty(PKG_BUILD_OPTIONS.ImageMagick:Mopenexr)
+.include "../../graphics/openexr/buildlink3.mk"
+.endif
 .if !empty(PKG_BUILD_OPTIONS.ImageMagick:Mwmf)
 .include "../../graphics/libwmf/buildlink3.mk"
 .endif
Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/ImageMagick/options.mk,v
retrieving revision 1.14
diff -u -u -r1.14 options.mk
--- options.mk	25 Apr 2013 03:53:11 -0000	1.14
+++ options.mk	10 Oct 2014 09:07:45 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: options.mk,v 1.14 2013/04/25 03:53:11 sbd Exp $
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.ImageMagick
-PKG_SUPPORTED_OPTIONS=	x11 jasper djvu ghostscript wmf
+PKG_SUPPORTED_OPTIONS=	x11 jasper djvu ghostscript openexr wmf
 PKG_SUGGESTED_OPTIONS=	x11 jasper openexr
 
 .include "../../mk/bsd.options.mk"
@@ -36,6 +36,13 @@
 CONFIGURE_ARGS+=	--without-gslib
 .endif
 
+.if !empty(PKG_OPTIONS:Mopenexr)
+.include "../../graphics/openexr/buildlink3.mk"
+CONFIGURE_ARGS+=	--with-openexr
+.else
+CONFIGURE_ARGS+=	--without-openexr
+.endif
+
 .if !empty(PKG_OPTIONS:Mwmf)
 .include "../../graphics/libwmf/buildlink3.mk"
 CONFIGURE_ARGS+=	--with-wmf


Home | Main Index | Thread Index | Old Index