Re: Build failure of gcc-4.6.3p3 with execinfo.h installed

2012-07-01 Thread Mikolaj Kucharski
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.


Index: Makefile
===
RCS file: /cvs/ports/lang/gcc/4.6/Makefile,v
retrieving revision 1.27
diff -u -r1.27 Makefile
--- Makefile21 Jun 2012 13:56:57 -  1.27
+++ Makefile1 Jul 2012 14:38:26 -
@@ -107,6 +107,8 @@
 
 EXTRA_ENV += am_cv_func_iconv=no JAR=no
 EXTRA_ENV += ac_cv_prog_M4=/usr/bin/m4
+EXTRA_ENV += ac_cv_header_execinfo_h=no
+EXTRA_ENV += ac_cv_header_magic_h=no
 MAKE_FLAGS +=   ac_cv_path_mkdir=/bin/mkdir
 
 CONFIGURE_ENV += ${EXTRA_ENV}



OpenBSD 5.2-beta (GENERIC.MP) #299: Tue Jun 26 23:12:21 MDT 2012
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP

-- 
best regards
q#



Re: Build failure of gcc-4.6.3p3 with execinfo.h installed

2012-07-01 Thread Pascal Stumpf
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
--- Makefile14 May 2012 23:39:39 -  1.26
+++ Makefile1 Jul 2012 15:56:39 -
@@ -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}



Re: Build failure of gcc-4.6.3p3 with execinfo.h installed

2012-07-01 Thread Marc Espie
On Sun, Jul 01, 2012 at 05:57:55PM +0200, Pascal Stumpf wrote:
 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 ...

What ? so that other stuff may actually depend on it ? this looks rather
dangerous and weird.

Could you look further ? what's the point of that define ? what further
stuff down the road will require it ?



Re: Build failure of gcc-4.6.3p3 with execinfo.h installed

2012-07-01 Thread Pascal Stumpf
On Sun, 1 Jul 2012 18:34:44 +0200, Marc Espie wrote:
 On Sun, Jul 01, 2012 at 05:57:55PM +0200, Pascal Stumpf wrote:
  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 ...
 
 What ? so that other stuff may actually depend on it ? this looks rather
 dangerous and weird.
 
 Could you look further ? what's the point of that define ? what further
 stuff down the road will require it ?
 
 

Profiling features of libstdc++.  It won't be pulled in unless anyone
requests it:

$ eg++ -D_GLIBCXX_PROFILE foo.cc

(and running the program collects advice in a file called
libstdcxx-profile.txt)

Though it's not a big deal, since you can also define
_GLIBCXX_HAVE_EXECINFO_H on the command line (see
libstdc++-v3/doc/html/manual/profile_mode.html).



Re: Build failure of gcc-4.6.3p3 with execinfo.h installed

2012-07-01 Thread Marc Espie
On Sun, Jul 01, 2012 at 06:52:55PM +0200, Pascal Stumpf wrote:
 On Sun, 1 Jul 2012 18:34:44 +0200, Marc Espie wrote:
  On Sun, Jul 01, 2012 at 05:57:55PM +0200, Pascal Stumpf wrote:
   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 ...
  
  What ? so that other stuff may actually depend on it ? this looks rather
  dangerous and weird.
  
  Could you look further ? what's the point of that define ? what further
  stuff down the road will require it ?
  
  
 
 Profiling features of libstdc++.  It won't be pulled in unless anyone
 requests it:
 
 $ eg++ -D_GLIBCXX_PROFILE foo.cc
 
 (and running the program collects advice in a file called
 libstdcxx-profile.txt)
 
 Though it's not a big deal, since you can also define
 _GLIBCXX_HAVE_EXECINFO_H on the command line (see
 libstdc++-v3/doc/html/manual/profile_mode.html).
oh well, then I'm okay with it.



Re: Build failure of gcc-4.6.3p3 with execinfo.h installed

2012-06-30 Thread Mikolaj Kucharski
On Sat, Jun 30, 2012 at 10:12:36AM +0100, Mikolaj Kucharski wrote:
 Hi,
 
 Ports build by `dpb -a' fails at lang/gcc/4.6 with below:
 
 # zgrep execinfo gcc-4.6.3p3.log.gz
 checking execinfo.h usability... yes
 checking execinfo.h presence... yes
 checking for execinfo.h... yes
 checking execinfo.h usability... yes
 checking execinfo.h presence... yes
 checking for execinfo.h... yes
 checking execinfo.h usability... yes
 checking execinfo.h presence... yes
 checking for execinfo.h... yes
 /home/users/build/obj/gcc-4.6.3/gcc-4.6.3/libgfortran/runtime/backtrace.c:42:22:
  fatal error: execinfo.h: No such file or directory
 
 # ls -1 /var/db/pkg/ | grep execinfo
 libexecinfo-0.2p0v0
 
 Full log available at:
 
   http://www.kucharski.name/pub/ports/
 

I got another failure from libjava about magic.h, unfortunately VM
crashed and I don't have the log.

I downloaded lang/gcc/4.6 packages from nearest mirror:

# 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

extracted all above packages and ran objdump -p on all the files from
the packages:

# grep -w NEEDED lang-gcc-46.objdump | sort | uniq
  NEEDED  libc.so.65.0
  NEEDED  libgcj-tools.so.1.0
  NEEDED  libgcj.so.1.0
  NEEDED  libgij.so.1.0
  NEEDED  libgmp.so.9.0
  NEEDED  libm.so.7.0
  NEEDED  libmpc.so.0.1
  NEEDED  libmpfr.so.1.1
  NEEDED  libpthread.so.16.0
  NEEDED  libz.so.4.1

I don't see libmagic and libexecinfo there, so does following change
make sense?


Index: Makefile
===
RCS file: /cvs/ports/lang/gcc/4.6/Makefile,v
retrieving revision 1.27
diff -u -r1.27 Makefile
--- Makefile21 Jun 2012 13:56:57 -  1.27
+++ Makefile30 Jun 2012 17:57:44 -
@@ -107,6 +107,8 @@

 EXTRA_ENV += am_cv_func_iconv=no JAR=no
 EXTRA_ENV += ac_cv_prog_M4=/usr/bin/m4
+EXTRA_ENV += ac_cv_header_execinfo_h=no
+EXTRA_ENV += ac_cv_header_magic_h=no
 MAKE_FLAGS +=   ac_cv_path_mkdir=/bin/mkdir

 CONFIGURE_ENV += ${EXTRA_ENV}


I just started the build with above patch, but I'm not sure is this the
way to go. Any comments?

-- 
best regards
q#



Re: Build failure of gcc-4.6.3p3 with execinfo.h installed

2012-06-30 Thread Marc Espie
On Sat, Jun 30, 2012 at 07:00:26PM +0100, Mikolaj Kucharski wrote:
 
 I got another failure from libjava about magic.h, unfortunately VM
 crashed and I don't have the log.
 
 I downloaded lang/gcc/4.6 packages from nearest mirror:
 
 # 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
 
 extracted all above packages and ran objdump -p on all the files from
 the packages:
 
 # grep -w NEEDED lang-gcc-46.objdump | sort | uniq
   NEEDED  libc.so.65.0
   NEEDED  libgcj-tools.so.1.0
   NEEDED  libgcj.so.1.0
   NEEDED  libgij.so.1.0
   NEEDED  libgmp.so.9.0
   NEEDED  libm.so.7.0
   NEEDED  libmpc.so.0.1
   NEEDED  libmpfr.so.1.1
   NEEDED  libpthread.so.16.0
   NEEDED  libz.so.4.1
 
 I don't see libmagic and libexecinfo there, so does following change
 make sense?
 
 
 Index: Makefile
 ===
 RCS file: /cvs/ports/lang/gcc/4.6/Makefile,v
 retrieving revision 1.27
 diff -u -r1.27 Makefile
 --- Makefile21 Jun 2012 13:56:57 -  1.27
 +++ Makefile30 Jun 2012 17:57:44 -
 @@ -107,6 +107,8 @@
 
  EXTRA_ENV += am_cv_func_iconv=no JAR=no
  EXTRA_ENV += ac_cv_prog_M4=/usr/bin/m4
 +EXTRA_ENV += ac_cv_header_execinfo_h=no
 +EXTRA_ENV += ac_cv_header_magic_h=no
  MAKE_FLAGS +=   ac_cv_path_mkdir=/bin/mkdir
 

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.