[MacPorts] #35770: gcc ports should not include a C++ runtime

MacPorts noreply at macports.org
Tue Sep 11 11:41:49 PDT 2012


#35770: gcc ports should not include a C++ runtime
--------------------------------------------------+------------------------
  Reporter:  jeremyhu@…                           |      Owner:  jeremyhu@…
      Type:  defect                               |     Status:  reopened
  Priority:  Normal                               |  Milestone:
 Component:  ports                                |    Version:  2.1.2
Resolution:                                       |   Keywords:  libstdc++
      Port:  gcc43 gcc44 gcc45 gcc46 gcc47 gcc48  |
--------------------------------------------------+------------------------

Comment (by angelo.graziosi@…):

 Indeed!!! I don't understand why an user should install a new version of
 GCC (4.5,6,7) if, at the end, what it really will use, the true engine,
 will be an older version... :-(

 On different GNU Linux distributions and Cygwin I have multiple version of
 GCC and each uses its own runtime libraries.

 Ciao, Angelo.

 Replying to [comment:19 help@…]:
 > You misunderstood me, I didn't say gcc46 failed to build, I said
 building _with_ it is broken.
 > Here's simple example:
 >
 > test.cpp:
 > {{{
 > #include <iostream>
 > #include <vector>
 >
 > int main()
 > {
 >   std::vector<int> a;
 >   a.push_back(2);
 >   for(int i=0; i < a.size(); i++)
 >     std::cout << a[i] << std::endl;
 > }
 > }}}
 > running '''g++-mp-4.6 -O1 test.cpp''' gives this output:
 > {{{
 > Undefined symbols for architecture x86_64:
 >   "std::ctype<char>::_M_widen_init() const", referenced from:
 >       _main in cc5ncHdO.o
 > ld: symbol(s) not found for architecture x86_64
 > collect2: ld returned 1 exit status
 > }}}
 > Optimization levels -O2 and -O3 fail too.
 >
 > This is not a separate bug, as I said just removing dylib isn't enough,
 you have to make sure that compiler uses C++ headers that actually match
 the library version you want it to link against.

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


More information about the macports-tickets mailing list