Opened 5 years ago

Closed 5 years ago

#43654 closed defect (fixed)

tripwire @2.4.2.2: error: calling a private constructor of class 'std::__1::__wrap_iter<const char *>'

Reported by: khawk13@… Owned by: ryandesign (Ryan Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: MacPorts.ORG@…
Port: tripwire

Description (last modified by ryandesign (Ryan Schmidt))

Build fails with relevant information. Command to build is:

/opt/local/bin/port install tripwire

If I use the recommended build option "configure.compiler=llvm-gcc-4.2" then build fails in the config stage.

Relevant output from build is as follows:

:info:build displayencoder.cpp:831:27: error: calling a private constructor of class 'std::__1::__wrap_iter<const char *>'
:info:build                 TSTRING::const_iterator first(&ach[0]), last(&ach[1]);
:info:build                                         ^
:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iterator:1220:31: note: declared private here
:info:build     _LIBCPP_INLINE_VISIBILITY __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {}
:info:build                               ^
:info:build displayencoder.cpp:831:43: error: calling a private constructor of class 'std::__1::__wrap_iter<const char *>'
:info:build                 TSTRING::const_iterator first(&ach[0]), last(&ach[1]
);
:info:build                                                         ^
:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iterator:1220:31: note: declared private here
:info:build     _LIBCPP_INLINE_VISIBILITY __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {}
:info:build                               ^
:info:build 2 errors generated.
:info:build make[3]: *** [displayencoder.o] Error 1
:info:build make[3]: *** Waiting for unfinished jobs....
:info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_security_tripwire/tripwire/work/tripwire-2.4.2.2-src/src/core'
:info:build make[2]: *** [all-recursive] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_security_tripwire/tripwire/work/tripwire-2.4.2.2-src/src'

Attachments (1)

main.log (54.6 KB) - added by khawk13@… 5 years ago.
Output log

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by khawk13@…

Attachment: main.log added

Output log

comment:1 Changed 5 years ago by ryandesign (Ryan Schmidt)

Description: modified (diff)
Port: tripwire added
Summary: Tripwire 2.4.2.2 fails to build on Mavricks, error in build (build failure)tripwire @2.4.2.2: error: calling a private constructor of class 'std::__1::__wrap_iter<const char *>'

comment:2 Changed 5 years ago by MacPorts.ORG@…

Still having this problem with MacPorts 2.3.1, Mavericks 10.9.4

[...]
:info:build /usr/bin/clang++ -DHAVE_CONFIG_H             -I. -I. -I../.. -I..  -
I/opt/local/include -I/opt/local/include  -pipe -Os -arch x86_64 -c -o timebomb.
o timebomb.cpp:info:build displayencoder.cpp:831:27: error: calling a private constructor of c
lass 'std::__1::__wrap_iter<const char *>':info:build                 TSTRING::const_iterator first(&ach[0]), last(&ach[1]
);
:info:build                                         ^:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.x
ctoolchain/usr/bin/../lib/c++/v1/iterator:1220:31: note: declared private here:info:build     _LIBCPP_INLINE_VISIBILITY __wrap_iter(iterator_type __x) _NOEXCE
PT : __i(__x) {}
:info:build                               ^
:info:build displayencoder.cpp:831:43: error: calling a private constructor of c
lass 'std::__1::__wrap_iter<const char *>'
:info:build                 TSTRING::const_iterator first(&ach[0]), last(&ach[1]);
:info:build                                                         ^
:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.x
ctoolchain/usr/bin/../lib/c++/v1/iterator:1220:31: note: declared private here
:info:build     _LIBCPP_INLINE_VISIBILITY __wrap_iter(iterator_type __x) _NOEXCE
PT : __i(__x) {}:info:build                               ^:info:build 2 errors generated.
:info:build make[3]: *** [displayencoder.o] Error 1
:info:build make[3]: *** Waiting for unfinished jobs....

% /usr/bin/clang++ --version
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix

According to https://github.com/steakknife/tripwire/issues/1 this should fix it - adding

CXXFLAGS='-stdlib=libstdc++'

to "configure".

To fix:

% pwd
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/security/tripwire

% diff -u Portfile.dist Portfile
--- Portfile.dist       2013-09-19 00:30:33.000000000 -0700
+++ Portfile    2014-07-26 21:25:15.000000000 -0700
@@ -52,6 +52,7 @@
 }
 
 configure.args      --sysconfdir="${prefix}/etc/${name}"
+configure.cxx_stdlib  libstdc++
 
 # Installation locations
 set bindir          "${prefix}/sbin"
Last edited 5 years ago by ryandesign (Ryan Schmidt) (previous) (diff)

comment:3 Changed 5 years ago by ryandesign (Ryan Schmidt)

Cc: MacPorts.ORG@… added
Owner: changed from macports-tickets@… to ryandesign@…
Status: newassigned

comment:4 in reply to:  2 Changed 5 years ago by ryandesign (Ryan Schmidt)

Resolution: fixed
Status: assignedclosed

Replying to MacPorts.ORG@…:

According to https://github.com/steakknife/tripwire/issues/1 this should fix it - adding

CXXFLAGS='-stdlib=libstdc++'

to "configure".

Thanks. Added in r128249, though this is just a band-aid over the real problem that this code needs to be made compatible with libc++. I've asked the developer to do so.

Note: See TracTickets for help on using tickets.