Subject: port-macppc/32108: fpgetmask() linking failure with g++ on macppc
To: None <port-macppc-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <oster@cs.usask.ca>
List: netbsd-bugs
Date: 11/18/2005 19:29:01
>Number:         32108
>Category:       port-macppc
>Synopsis:       fpgetmask() linking failure with g++ on macppc
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    port-macppc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 18 19:29:00 +0000 2005
>Originator:     oster@cs.usask.ca
>Release:        NetBSD 3.0_BETA
>Organization:
>Environment:
System: NetBSD tika 3.0_BETA NetBSD 3.0_BETA (GENERIC) #0: Wed Nov  2 12:36:27 CST 2005  oster@gonzo:/u1/builds/build77/src/sys/arch/macppc/compile/GENERIC macppc
Architecture: powerpc
Machine: macppc
>Description:

'make package' of inkscape 0.42.2 fails on macppc.  Tail end of build
is included here.  More available on request. 

/bin/sh ../libtool --mode=link c++  -Wall -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch  -Wno-unused-parameter -O2 -I/usr/pkg/include -I/usr/include -I/usr/include/krb5 -DGLX_GLXEXT_LEGACY -I/usr/pkg/include/freetype2 -I/usr/X11R6/include  -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib -o inkscape --export-dynamic  main.o  libinkpre.a application/libinkapp.a ui/dialog/libuidialog.a dialogs/libspdialogs.a trace/libtrace.a svg/libspsvg.a widgets/libspwidgets.a display/libspdisplay.a helper/libspchelp.a libcroco/libcroco.a libnrtype/libnrtype.a libnr/libnr.a livarot/libvarot.a ui/view/libuiview.a ui/libui.a ui/widget/libuiwidget.a extension/libextension.a extension/implementation/libimplementation.a extension/internal/libinternal.a extension/script/libscript.a xml/libspxml.a util/libinkutil.a io/libio.a inkjar/libinkjar.a libinkpost.a debug/libinkdebug.a -Wl,-R/usr/pkg/lib -pthread -L/usr/pkg/lib -
 lgtkmm-2.4 -lgdkmm-2.4 -latkmm-1.6 -lpangomm-1.4 -lglibmm-2.4 -lxslt -lxml2 -lz -lsigc-2.0 -lgtkspell -laspell -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0   -lpng -lz -lpopt  -Wl,-R/usr/pkg/lib -pthread -Wl,--export-dynamic -L/usr/pkg/lib -lgnomevfs-2 -lbonobo-2 -lgconf-2 -lgobject-2.0 -lbonobo-activation -lORBit-2 -lm -lgmodule-2.0 -lgthread-2.0 -lglib-2.0   -Wl,-R/usr/pkg/lib -Wl,--rpath -Wl,/usr/pkg/lib -L/usr/pkg/lib -L/usr/X11R6/lib -lXft -lfreetype -lz -lXrender -lX11 -lfontconfig   -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0   -L/usr/pkg/lib -Wl,--rpath -Wl,/usr/pkg/lib -lfreetype -lz     -lgc  -lintl
mkdir .libs
c++ -Wall -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch -Wno-unused-parameter -O2 -I/usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/include -I/usr/include/krb5 -DGLX_GLXEXT_LEGACY -I/usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/include/freetype2 -I/usr/pkgsrc/graphics/inkscape/work.tika/.x11-buildlink/include -Wl,-R/usr/pkg/lib -Wl,-R/usr/X11R6/lib -o inkscape --export-dynamic main.o -pthread -pthread -Wl,--export-dynamic -Wl,--rpath -Wl,/usr/pkg/lib  -L/usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib -L/usr/pkgsrc/graphics/inkscape/work.tika/.x11-buildlink/lib libinkpre.a application/libinkapp.a ui/dialog/libuidialog.a dialogs/libspdialogs.a trace/libtrace.a svg/libspsvg.a widgets/libspwidgets.a display/libspdisplay.a helper/libspchelp.a libcroco/libcroco.a libnrtype/libnrtype.a libnr/libnr.a livarot/libvarot.a ui/view/libuiview.a ui/libui.a ui/widget/libuiwidget.a extension/libextension.a extension/implementation/libimplementatio
 n.a extension/internal/libinternal.a extension/script/libscript.a xml/libspxml.a util/libinkutil.a io/libio.a inkjar/libinkjar.a libinkpost.a debug/libinkdebug.a /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libgtkmm-2.4.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libgdkmm-2.4.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libatkmm-1.6.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libpangomm-1.4.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libglibmm-2.4.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libxslt.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libsigc-2.0.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libgtkspell.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libaspell.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libgtk-x11-2.0.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libgdk-x11-2.0.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlin
 k/lib/libatk-1.0.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libgdk_pixbuf-2.0.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libpangocairo-1.0.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libcairo.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libglitz.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libpng.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libgnomevfs-2.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libxml2.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libgnutls.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libtasn1.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libgcrypt.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libgpg-error.so -lrt /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libbonobo-2.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libgconf-2.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libbono
 bo-activation.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libORBitCosNaming-2.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libORBit-2.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libpopt.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libgthread-2.0.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libXft.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libXrender.so -lX11 /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libfontconfig.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libexpat.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libpangoft2-1.0.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libpango-1.0.so -lm /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libgobject-2.0.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libgmodule-2.0.so /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libglib-2.0.so /usr/pkgsrc/graphics/inkscape/work.tika/.b
 uildlink/lib/libfreetype.so -lz /usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib/libgc.so -lintl -Wl,--rpath -Wl,/usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib -Wl,--rpath -Wl,/usr/pkgsrc/graphics/inkscape/work.tika/.buildlink/lib
main.o(.text+0x124): In function `main':
: undefined reference to `fpgetmask()'
main.o(.text+0x130): In function `main':
: undefined reference to `fpsetmask(int)'
gmake[2]: *** [inkscape] Error 1
gmake[2]: Leaving directory `/usr/pkgsrc/graphics/inkscape/work.tika/inkscape-0.42.2/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/pkgsrc/graphics/inkscape/work.tika/inkscape-0.42.2'
gmake: *** [all] Error 2
*** Error code 2

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

Stop.
make: stopped in /usr/pkgsrc/graphics/inkscape
tika#     

>How-To-Repeat:

	cd /usr/pkg/graphics/inkscape
	make package
	*wait*

>Fix:

	Dunno.  The following compiles fine when compiled with gcc,
but fails with the same error as above when compiled with g++.
I was going to report this just as a package build problem, but given
that the following doesn't build with "g++ -o foo foo.c" on macppc
but does on i386 (for example), I've changed it to be a port-macppc issue.

-----8<------8<-----
#include <stdio.h>
#include <ieeefp.h>

int main()
{
        fp_except foo;
        foo = fpgetmask();

        printf("Done\n");
}
-----8<------8<-----

The g++ in question reports itself as:

Using built-in specs.
Configured with:
/home/nick/work/netbsd/src/tools/gcc/../../gnu/dist/gcc/configure
--enable-long-long --disable-multilib --enable-threads
--disable-symvers
--build=i386-unknown-netbsdelf2.0. --host=powerpc--netbsd
--target=powerpc--netbsd
Thread model: posix
gcc version 3.3.3 (NetBSD nb3 20040520)