[MacPorts] #36924: GCC-4.7.2 or ld(64) problem

MacPorts noreply at macports.org
Thu Nov 8 05:42:21 PST 2012


#36924: GCC-4.7.2 or ld(64) problem
-------------------------------+--------------------------------
 Reporter:  angelo.graziosi@…  |      Owner:  macports-tickets@…
     Type:  defect             |     Status:  new
 Priority:  Normal             |  Milestone:
Component:  ports              |    Version:  2.1.2
 Keywords:  gcc,ld             |       Port:  gcc47
-------------------------------+--------------------------------
 I have found a "duplicate symbol" error that seems to occurs only with
 gcc-4.7.2 from MacPorts.

 The simplest way to reproduce is to follow these steps (they take only few
 minutes):


 {{{
 1. mkdir work
 2. cd work
 3. wget http://warp.povusers.org/FunctionParser/fparser4.5.zip
 4. unzip fparser4.5.zip
 5. cd examples
 6. g++-mp-4.7 example.cc ../fparser.cc ../fpoptimizer.cc -o example.out
 }}}

 the result is a lot of:


 {{{
 duplicate symbol
 FunctionParserBase<double>::FunctionWrapper::FunctionWrapper() in:
     /var/folders/rn/j8bb78_n0mq1q0597prsldc00000gn/T//cctcdQVl.o
     /var/folders/rn/j8bb78_n0mq1q0597prsldc00000gn/T//ccXBMFPC.o
 duplicate symbol
 FunctionParserBase<double>::FunctionWrapper::FunctionWrapper() in:
 [...]
 }}}

 If I use clang++ (4.1 x86_64-apple-darwin11.4.2, Xcode 4.5.2) the above
 example builds and works fine without linker errors.

 The same (i.e. it buils and works) occurs on

 a. Cygwin with GCC 4.5.3, 4.8-snapshot
 b. GNU/Linux (K)Ubuntu 12.04 with GCC 4.6.3

 Ciao, Angelo.

-- 
Ticket URL: <https://trac.macports.org/ticket/36924>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list