On Sun, 1 Jul 2012 15:49:17 +0100, Mikolaj Kucharski wrote:
> On Sat, Jun 30, 2012 at 08:15:06PM +0200, Marc Espie wrote:
> > 
> > Not necessarily, the thing to do is to see in the code what those tests 
> > lead to, whether it will actually bring something to OpenBSD, and then
> > decide whether we want to disable the tests or not.
> 
> Well, looking at the code, this is beyond my expertise to know is it
> okay to disable libexecinfo or libmagic in different parts of gcc..
> 
> 
> In gcc-4.6.3 sources I see only following files which include <magic.h>
> 
> ./libjava/java/net/natVMURLConnection.cc
> ./libjava/classpath/native/jni/java-net/java_net_VMURLConnection.c
> 
> In .cc file it looks to me that libmagic.so is dlopen'ed and used in
> java::net::VMURLConnection::guessContentTypeFromBuffer()
> 
> In .c file I don't see the code using dlopen for libmagic but
> function Java_java_net_VMURLConnection_guessContentTypeFromBuffer() uses
> it libmagic functions.
> 
> Then here is the list of files which include <exeinfo.h>
> 
> ./libgfortran/runtime/backtrace.c
> ./libstdc++-v3/include/profile/impl/profiler_node.h
> ./libmudflap/mf-runtime.c
> ./boehm-gc/os_dep.c
> 
> 
> Does anyone know / can judge is it safe to disable libexecinfo or
> libmagic in gcc port? Or, can anyone actually reproduce build failure of
> gcc-4.6 with libexecinfo / libmagic installed? I would probably have a
> look how this looks in gcc-4.7, maybe it's affected as well.
> 
> 
> # cd /usr/ports/lang/gcc/4.6 && make show=PKGNAMES
> gcc-4.6.3p3 g95-4.6.3p3 gobjc-4.6.3p3 gcj-4.6.3p4 g++-4.6.3p5
> libstdc++-4.6.3p3 gnat-4.6.3p3 gccgo-4.6.3p3
> 
> 
> Below patch inlined again.

Yes, seems like you've found a hidden build dependency.  The only thing
execinfo.h does is enable the define _GLIBCXX_HAVE_EXECINFO_H, so I
think it's better to just put it in BUILD_DEPENDS.  libmagic, on the
other hand, would require a runtime dependency for the -java subpackage.
I'm inclined to disable it, though if anyone wants it ...

ok for this diff?



Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/gcc/4.6/Makefile,v
retrieving revision 1.26
diff -u -p -r1.26 Makefile
--- Makefile    14 May 2012 23:39:39 -0000      1.26
+++ Makefile    1 Jul 2012 15:56:39 -0000
@@ -19,7 +19,7 @@ PKGNAME-ada =   gnat-${FULL_PKGVERSION}
 PKGNAME-go =   gccgo-${FULL_PKGVERSION}
 
 REVISION-main = 2
-REVISION-c++ = 4
+REVISION-c++ = 5
 REVISION-estdc = 2
 REVISION-f95 = 2
 REVISION-java = 3
@@ -62,7 +62,8 @@ EXTRACT_ONLY =        ${DISTNAME}.tar.bz2
 
 USE_LIBTOOL =  Yes
 
-BUILD_DEPENDS +=       devel/bison
+BUILD_DEPENDS +=       devel/bison \
+                       devel/libexecinfo
 
 REGRESS_DEPENDS =      devel/dejagnu \
                        devel/autogen
@@ -107,6 +108,7 @@ MODGNU_CONFIG_GUESS_DIRS =  ${WRKSRC} ${W
 
 EXTRA_ENV += am_cv_func_iconv=no JAR=no
 EXTRA_ENV += ac_cv_prog_M4=/usr/bin/m4
+EXTRA_ENV += ac_cv_header_magic_h=no
 MAKE_FLAGS +=   ac_cv_path_mkdir=/bin/mkdir
 
 CONFIGURE_ENV += ${EXTRA_ENV}

Reply via email to