USE_GCC vs. packaging

Thomas-Martin Seck tmseck-lists at netcologne.de
Tue Mar 28 22:55:17 UTC 2006


Hi all,

I am currently working on updating www/dillo to 0.8.6. As part of the
transition from gtk1 to fltk2, dillo-0.8.6 will contain a download gui
based on fltk2 (thankfully not required for dillo to work, so it will
be a non-default option). This required me to do a port of fltk2 (to be
submitted within the next days). Unfortunately, current fltk2 snapshots
need gcc 3.x to compile, so the fltk2 port utilizes USE_GCC=3.4+.

Compiling fltk2 with gcc 3.4+ implies that I need to build dillo with
gcc 3.4+, too in order to get it linked correctly - fltk2 is a C++
library. So, if the user would like to build with fltk support, I need
set USE_GCC=3.4+ in www/dillo, too in that case. 

When I ran a test build in a 4.x jail today using gcc 3.4.6 release
($FreeBSD: ports/lang/gcc34/Makefile,v 1.238 2006/03/26 18:08:14 gerald Exp $)
I was surprised that this part of dillo now depends on gcc 3.4+ at
runtime:

$ ldd /usr/local/libexec/dillo/dpi/downloads/downloads.dpi
/usr/local/libexec/dillo/dpi/downloads/downloads.dpi:
        libglib-12.so.3 => /usr/local/lib/libglib-12.so.3 (0x280a4000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x280c6000)
        libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x28184000)
        libXinerama.so.1 => /usr/X11R6/lib/libXinerama.so.1 (0x2818c000)
        libXft.so.2 => /usr/X11R6/lib/libXft.so.2 (0x2818f000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x281a0000)
        libstdc++.so.6 =>
/usr/local/lib/gcc/i386-portbld-freebsd4.11/3.4.6/libstdc++.so.6
(0x281ae000)
        libm.so.2 => /usr/lib/libm.so.2 (0x28230000)
        libgcc_s.so.1 =>
/usr/local/lib/gcc/i386-portbld-freebsd4.11/3.4.6/libgcc_s.so.1
(0x2824b000)
        libc_r.so.4 => /usr/lib/libc_r.so.4 (0x28253000)
        libfontconfig.so.1 => /usr/X11R6/lib/libfontconfig.so.1
(0x2830a000)
        libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x28337000)
        libc.so.4 => /usr/lib/libc.so.4 (0x2833f000)
        libXThrStub.so.6 => /usr/X11R6/lib/libXThrStub.so.6 (0x283d9000)
        libfreetype.so.9 => /usr/local/lib/libfreetype.so.9 (0x283db000)
        libz.so.2 => /usr/lib/libz.so.2 (0x28440000)
        libexpat.so.6 => /usr/local/lib/libexpat.so.6 (0x2844d000)

A package built using this binary will fail unless libstc++.so.6 and
libgcc_s.so.1 are installed, too.

However, I then built fltk2/dillo after deinstalling gcc 3.4.6 and
installing the gcc-3.4.6_20060221 snapshot and got the following:

$ ldd /usr/local/libexec/dillo/dpi/downloads/downloads.dpi
/usr/local/libexec/dillo/dpi/downloads/downloads.dpi:
        libglib-12.so.3 => /usr/local/lib/libglib-12.so.3 (0x280a5000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x280c7000)
        libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x28185000)
        libXinerama.so.1 => /usr/X11R6/lib/libXinerama.so.1 (0x2818d000)
        libXft.so.2 => /usr/X11R6/lib/libXft.so.2 (0x28190000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x281a1000)
        libm.so.2 => /usr/lib/libm.so.2 (0x281af000)
        libc_r.so.4 => /usr/lib/libc_r.so.4 (0x281ca000)
        libfontconfig.so.1 => /usr/X11R6/lib/libfontconfig.so.1
(0x28281000)
        libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x282ae000)
        libc.so.4 => /usr/lib/libc.so.4 (0x282b6000)
        libXThrStub.so.6 => /usr/X11R6/lib/libXThrStub.so.6 (0x28350000)
        libfreetype.so.9 => /usr/local/lib/libfreetype.so.9 (0x28352000)
        libz.so.2 => /usr/lib/libz.so.2 (0x283b7000)
        libexpat.so.6 => /usr/local/lib/libexpat.so.6 (0x283c4000)

This binary is runtime independent of gcc or rather g++. Was this ever
correct?

So my question is: is USE_GCC to be fixed to generate a runtime
dependency at package building time now that (at least) gcc34 behaves
this way? (I did not check the other gcc ports but I suppose they now
all show the symptoms I tried to outline above.)


More information about the freebsd-ports mailing list