Opened 9 years ago

Closed 9 years ago

#50304 closed defect (fixed)

libcxx @3.7.0 +universal compile error on MacOS 10.6.8 - build failure

Reported by: cf-macports@… Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc:
Port: libcxx

Description

Trying to build libcxx @3.7.0 with mp-clang 3.8 on MacOS 10.6.8 and Xcode Version 3.2.6 (1761). I run into the following compilation error:

--->  Building libcxx
+ for FILE in '../src/*.cpp'
+ /opt/local/bin/clang++-mp-3.8 -c -g -Os -arch x86_64 -arch i386 -nostdinc++ -std=c++11 -U__STRICT_ANSI__ -I../include ../src/algorithm.cpp
In file included from ../src/algorithm.cpp:11:
lofwyr:files chris$ m ../include/random:1645:
../include/string:1938:44: error: 'basic_string<_CharT, _Traits, _Allocator>' is missing exception specification 'noexcept(is_nothrow_copy_constructible<allocator_type>::value)'
basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a)
                                           ^
../include/string:1326:40: note: previous declaration is here
    _LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a)
                                       ^
1 error generated.
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_libcxx/libcxx/work/libcxx-3.7.0.src/lib" && ./buildit all
Exit code: 1
Error: org.macports.build for port libcxx returned: command execution failed

As far as I can tell, the second declaration (line 1938) is missing the exception declaration from the first one (line 1326). Adding the declaration fixes the compilation issue and the port builds correctly. I attached diff files of the changes I made.

Attachments (2)

Portfile.diff (782 bytes) - added by cf-macports@… 9 years ago.
Changes to Portfile
0005-string-Fix-exception-declaration.patch (503 bytes) - added by cf-macports@… 9 years ago.
Adds missing exception declaration in include/string

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by cf-macports@…

Attachment: Portfile.diff added

Changes to Portfile

Changed 9 years ago by cf-macports@…

Adds missing exception declaration in include/string

comment:1 Changed 9 years ago by cf-macports@…

Cc: cf-macports@… added

Cc Me!

comment:2 Changed 9 years ago by mf2k (Frank Schima)

Cc: jeremyhu@… cf-macports@… removed
Owner: changed from macports-tickets@… to jeremyhu@…

As reporter, you do not need to Cc yourself.

comment:3 Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.