Bug 164331 - devel/protobuf cannot be compiled by gcc 4.6
Summary: devel/protobuf cannot be compiled by gcc 4.6
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Vanilla I. Shu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-20 10:20 UTC by Charming Sun
Modified: 2012-01-20 13:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charming Sun 2012-01-20 10:20:11 UTC
devel/protobuf cannot be compiled by gcc 4.6

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.
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
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-01-20 10:20:21 UTC
Responsible Changed
From-To: freebsd-ports-bugs->vanilla

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2012-01-20 13:09:29 UTC
vanilla     2012-01-20 13:09:16 UTC

  FreeBSD ports repository

  Modified files:
    devel/protobuf       Makefile 
  Log:
  Fix build with gcc46.
  
  PR:             ports/164331
  Submitted by:   Changming Sun <snnn119@gmail.com>
  
  Revision  Changes    Path
  1.12      +0 -3      ports/devel/protobuf/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Vanilla I. Shu freebsd_committer freebsd_triage 2012-01-20 13:09:35 UTC
State Changed
From-To: open->closed

Committed, thanks.