ports/164331: devel/protobuf cannot be compiled by gcc 4.6

Changming Sun snnn119 at gmail.com
Fri Jan 20 10:20:12 UTC 2012


>Number:         164331
>Category:       ports
>Synopsis:       devel/protobuf cannot be compiled by gcc 4.6
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 20 10:20:11 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Changming Sun
>Release:        FreeBSD 9.0
>Organization:
Tudou.com
>Environment:
FreeBSD mybsd.localdomain 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root at farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
devel/protobuf cannot be compiled by gcc 4.6
>How-To-Repeat:
add the following line to /etc/make.conf:
USE_GCC=4.6

Then, try to make it:
# cd /usr/ports/devel/protobuf
# make

It will be stopped at:

/bin/sh ../libtool --tag=CXX   --mode=link g++46 -D_THREAD_SAFE -pthread -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -O2 -pipe -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -D_THREAD_SAFE -pthread -Wl,-rpath=/usr/local/lib/gcc46 -o protoc main.o  libprotobuf.la libprotoc.la -lz 
libtool: link: g++46 -D_THREAD_SAFE -pthread -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -O2 -pipe -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -D_THREAD_SAFE -pthread -Wl,-rpath=/usr/local/lib/gcc46 -o .libs/protoc main.o  ./.libs/libprotobuf.so ./.libs/libprotoc.so /usr/ports/devel/protobuf/work/protobuf-2.4.1/src/.libs/libprotobuf.so -lz -pthread -Wl,-rpath -Wl,/usr/local/lib
/usr/local/bin/ld: .libs/protoc: hidden symbol `__dso_handle' in /usr/local/lib/gcc46/gcc/x86_64-portbld-freebsd9.0/4.6.3/crtbegin.o is referenced by DSO
/usr/local/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
gmake[2]: *** [protoc] Error 1
gmake[2]: Leaving directory `/usr/ports/devel/protobuf/work/protobuf-2.4.1/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/devel/protobuf/work/protobuf-2.4.1'
gmake: *** [all] Error 2
*** Error code 1

>Fix:
There is a minor patch in this port's Makefile:

post-patch:
        @${REINPLACE_CMD} -e 's|GREP "\\-L"|GREP "bin/ld"|g' ${WRKSRC}/configure

after removing that, all things work well. I don't know why.

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



More information about the freebsd-ports-bugs mailing list