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

MacPorts noreply at macports.org
Tue Sep 11 11:24:00 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  |
--------------------------------------------------+------------------------
Changes (by help@…):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 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:19>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list