Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jan 2012 15:26:49 GMT
From:      Heath Nielson <heathn@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/164141: [PATCH]  graphics/ufraw doesn't build with gcc4.6
Message-ID:  <201201151526.q0FFQnaN003741@red.freebsd.org>
Resent-Message-ID: <201201151530.q0FFUBMw030608@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         164141
>Category:       ports
>Synopsis:       [PATCH]  graphics/ufraw doesn't build with gcc4.6
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 15 15:30:11 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Heath Nielson
>Release:        FreeBSD 8.2-STABLE
>Organization:
>Environment:
FreeBSD hershey.bar.net 9.0-PRERELEASE FreeBSD 9.0-PRERELEASE #11: Sat Dec 24 14:11:38 MST 2011     heath@hershey.bar.net:/usr/obj/usr/src/sys/HERSHEY  amd64
>Description:
When building ufraw with gcc46 I get the following link error:

gcc46 -I/usr/local/include   -D_THREAD_SAFE -D_REENTRANT -I/usr/local/include -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include/glib-2.0 -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2   -D_REENTRANT -I/usr/local/include/glib-2.0   -I/usr/local/include   -I/usr/local/include/ -I/usr/local/include/glib-2.0   -I/usr/local/include    -D_STAND_ALONE_ -O2 -pipe -fno-strict-aliasing -fopenmp  -L/usr/local/lib -pthread -o nikon-curve nikon_curve-nikon_curve.o -L/usr/local/lib -lexiv2   -pthread -L/usr/local/lib -lgthread-2.0 -lglib-2.0   -L/usr/local/lib -llcms   -L/usr/local/lib/ -L/usr/local/lib -llensfun -lglib-2.0   -L/usr/local/lib -lpng -lz -lm     -ltiff -ljpeg -lbz2 -lz -lm  -lintl 
/usr/local/lib/libexiv2.so: undefined reference to `std::__detail::_List_node_base::swap(std::__detail::_List_node_base&, std::__detail::_List_node_base&)@GLIBCXX_3.4.15'
/usr/local/lib/libexiv2.so: undefined reference to `std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, std::__detail::_List_node_base*)@GLIBCXX_3.4.15'
/usr/local/lib/libexiv2.so: undefined reference to `std::__detail::_List_node_base::_M_unhook()@GLIBCXX_3.4.15'
/usr/local/lib/libexiv2.so: undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)@GLIBCXX_3.4.15'
/usr/local/lib/libexiv2.so: undefined reference to `std::ctype<char>::_M_widen_init() const@GLIBCXX_3.4.11'

>How-To-Repeat:
With gcc46 installed and the CC, CXX, CPP variables pointing to gcc46

cd /usr/ports/graphics/ufraw
make install
>Fix:
When creating the nikon-curve app, the Makefile calls gcc46 which does not automatically include the libstdc++.so library causing the undefined symbols.  By calling g++46 instead, libstdc++.so is included in the link resolving the symbols.

Patch attached with submission follows:

--- Makefile.in.orig	2012-01-15 08:13:07.000000000 -0700
+++ Makefile.in	2012-01-15 08:14:38.000000000 -0700
@@ -126,8 +126,6 @@
 @MAKE_EXTRAS_TRUE@	nikon_curve-nikon_curve.$(OBJEXT)
 nikon_curve_OBJECTS = $(am_nikon_curve_OBJECTS)
 @MAKE_EXTRAS_TRUE@nikon_curve_DEPENDENCIES = $(am__DEPENDENCIES_1)
-nikon_curve_LINK = $(CCLD) $(nikon_curve_CFLAGS) $(CFLAGS) \
-	$(nikon_curve_LDFLAGS) $(LDFLAGS) -o $@
 ufraw_SOURCES = ufraw.c
 ufraw_OBJECTS = ufraw.$(OBJEXT)
 ufraw_LDADD = $(LDADD)
@@ -491,6 +489,7 @@
 @MAKE_EXTRAS_TRUE@nikon_curve_CFLAGS = $(UFRAW_CPPFLAGS) -D_STAND_ALONE_
 @MAKE_EXTRAS_TRUE@nikon_curve_LDFLAGS = @CONSOLE@
 @MAKE_EXTRAS_TRUE@nikon_curve_LDADD = $(UFRAW_LDADD)
+@MAKE_EXTRAS_TRUE@nikon_curve_LINK = $(CXXLINK) @CONSOLE@
 all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
@@ -709,7 +708,7 @@
 	$(AM_V_CXXLD)$(dcraw_LINK) $(dcraw_OBJECTS) $(dcraw_LDADD) $(LIBS)
 nikon-curve$(EXEEXT): $(nikon_curve_OBJECTS) $(nikon_curve_DEPENDENCIES) 
 	@rm -f nikon-curve$(EXEEXT)
-	$(AM_V_CCLD)$(nikon_curve_LINK) $(nikon_curve_OBJECTS) $(nikon_curve_LDADD) $(LIBS)
+	$(AM_V_GEN)$(nikon_curve_LINK) $(nikon_curve_OBJECTS) $(nikon_curve_LDADD) $(LIBS)
 ufraw$(EXEEXT): $(ufraw_OBJECTS) $(ufraw_DEPENDENCIES) 
 	@rm -f ufraw$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(ufraw_OBJECTS) $(ufraw_LDADD) $(LIBS)


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201151526.q0FFQnaN003741>