New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #35593 (new defect)

Opened 11 months ago

Last modified 11 months ago

gcc47 @4.7.1, Revision 2 -- Undefined symbols from standard library

Reported by: rob.patro@… Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc:
Port: gcc47

Description

The simple attached file reproduces the error. It should be built with

g++-mp-4.7 -std=c++11 test.cpp

it produces the following linking error:

Undefined symbols for architecture x86_64:
  "std::regex_token_iterator<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, char, std::regex_traits<char> >::regex_token_iterator(__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::basic_regex<char, std::regex_traits<char> > const&, int, std::bitset<11ul>)", referenced from:
      _main in cccDMjnE.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status

The problem does not appear under the system's default clang++ compiler. The regex symbols are part of the standard library and should be present and properly linked with the test code.

Attachments

test.cpp (834 bytes) - added by rob.patro@… 11 months ago.

Change History

Changed 11 months ago by rob.patro@…

comment:1 Changed 11 months ago by ryandesign@…

  • Owner changed from macports-tickets@… to mww@…
  • Priority changed from High to Normal
  • Port set to gcc47
Note: See TracTickets for help on using tickets.