#48627 closed defect (wontfix)
ncurses @6.0_0 fails to build on Lion with cxx_stdlib=libc++
Reported by: | dClauzel (Damien Clauzel) | Owned by: | jmroot (Joshua Root) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.3 |
Keywords: | lion | Cc: | gallafent |
Port: | ncurses |
Description
Trying to upgrade ncurses from 5.9_2 to 6.0_0 on iMac6,1 running Mac OS X Server 10.7.5 (11G63)
echo '** adjusting tabset paths' ** adjusting tabset paths sed -f run_tic.sed ../misc/terminfo.src >terminfo.tmp make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ncurses/ncurses/work/ncurses-6.0/misc' cd c++ && /usr/bin/make DESTDIR="" RPATH_LIST="/opt/local/lib" all make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ncurses/ncurses/work/ncurses-6.0/c++' cp ./etip.h.in etip.h /bin/sh ./edit_cfg.sh ../include/ncurses_cfg.h etip.h substituting autoconf'd values from ../include/ncurses_cfg.h into etip.h ... CPP_HAS_PARAM_INIT 0 ... CPP_HAS_STATIC_CAST 1 ... ETIP_NEEDS_MATH_EXCEPTION 0 ... ETIP_NEEDS_MATH_H 0 ... HAVE_BUILTIN_H 0 ... HAVE_GPP_BUILTIN_H 0 ... HAVE_GXX_BUILTIN_H 0 ... HAVE_IOSTREAM 1 ... HAVE_TYPEINFO 1 ... HAVE_VALUES_H 0 ... IOSTREAM_NAMESPACE 1 /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../include -D_DARWIN_C_SOURCE -DNDEBUG -pipe -Os -arch x86_64 -arch i386 -stdlib=libc++ -dynamic -c ../c++/cursesf.cc -o ../obj_s/cursesf.o /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../include -D_DARWIN_C_SOURCE -DNDEBUG -pipe -Os -arch x86_64 -arch i386 -stdlib=libc++ -dynamic -c ../c++/cursesm.cc -o ../obj_s/cursesm.o /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../include -D_DARWIN_C_SOURCE -DNDEBUG -pipe -Os -arch x86_64 -arch i386 -stdlib=libc++ -dynamic -c ../c++/cursesw.cc -o ../obj_s/cursesw.o /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../include -D_DARWIN_C_SOURCE -DNDEBUG -pipe -Os -arch x86_64 -arch i386 -stdlib=libc++ -dynamic -c ../c++/cursespad.cc -o ../obj_s/cursespad.o /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../include -D_DARWIN_C_SOURCE -DNDEBUG -pipe -Os -arch x86_64 -arch i386 -stdlib=libc++ -dynamic -c ../c++/cursesp.cc -o ../obj_s/cursesp.o /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../include -D_DARWIN_C_SOURCE -DNDEBUG -pipe -Os -arch x86_64 -arch i386 -stdlib=libc++ -dynamic -c ../c++/cursslk.cc -o ../obj_s/cursslk.o /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../include -D_DARWIN_C_SOURCE -DNDEBUG -pipe -Os -arch x86_64 -arch i386 -stdlib=libc++ -dynamic -c ../c++/cursesapp.cc -o ../obj_s/cursesapp.o /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../include -D_DARWIN_C_SOURCE -DNDEBUG -pipe -Os -arch x86_64 -arch i386 -stdlib=libc++ -dynamic -c ../c++/cursesmain.cc -o ../obj_s/cursesmain.o /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../include -D_DARWIN_C_SOURCE -DNDEBUG -pipe -Os -arch x86_64 -arch i386 -stdlib=libc++ -c ../c++/cursesf.cc -o ../objects/cursesf.o /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../include -D_DARWIN_C_SOURCE -DNDEBUG -pipe -Os -arch x86_64 -arch i386 -stdlib=libc++ -c ../c++/cursesm.cc -o ../objects/cursesm.o /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../include -D_DARWIN_C_SOURCE -DNDEBUG -pipe -Os -arch x86_64 -arch i386 -stdlib=libc++ -c ../c++/cursesw.cc -o ../objects/cursesw.o /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../include -D_DARWIN_C_SOURCE -DNDEBUG -pipe -Os -arch x86_64 -arch i386 -stdlib=libc++ -c ../c++/cursespad.cc -o ../objects/cursespad.o /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../include -D_DARWIN_C_SOURCE -DNDEBUG -pipe -Os -arch x86_64 -arch i386 -stdlib=libc++ -c ../c++/cursesp.cc -o ../objects/cursesp.o /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../include -D_DARWIN_C_SOURCE -DNDEBUG -pipe -Os -arch x86_64 -arch i386 -stdlib=libc++ -c ../c++/cursslk.cc -o ../objects/cursslk.o /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../include -D_DARWIN_C_SOURCE -DNDEBUG -pipe -Os -arch x86_64 -arch i386 -stdlib=libc++ -c ../c++/cursesapp.cc -o ../objects/cursesapp.o /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../include -D_DARWIN_C_SOURCE -DNDEBUG -pipe -Os -arch x86_64 -arch i386 -stdlib=libc++ -c ../c++/cursesmain.cc -o ../objects/cursesmain.o compiling demo (obj_s) linking ../lib/libncurses++.6.dylib /usr/bin/clang++ -dynamiclib -install_name /opt/local/lib/`basename ../lib/libncurses++.6.dylib` -compatibility_version 6 -current_version 6 -o ../lib/libncurses++.6.dylib ../obj_s/cursesf.o ../obj_s/cursesm.o ../obj_s/cursesw.o ../obj_s/cursespad.o ../obj_s/cursesp.o ../obj_s/cursslk.o ../obj_s/cursesapp.o ../obj_s/cursesmain.o -L../lib -lform -lmenu -lpanel -lncurses -L../lib -lform -lmenu -lpanel -lncurses -arch x86_64 -arch i386 -Wl,-search_paths_first -lutil -lstdc++ Undefined symbols for architecture x86_64: "std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from: _main in cursesmain.o std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in cursesmain.o "std::__1::ios_base::getloc() const", referenced from: _main in cursesmain.o std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in cursesmain.o "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(unsigned long, char)", referenced from: std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > std::__1::__pad_and_output<char, std::__1::char_traits<char> >(std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >, char const*, char const*, char const*, std::__1::ios_base&, char) in cursesmain.o "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()", referenced from: std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > std::__1::__pad_and_output<char, std::__1::char_traits<char> >(std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >, char const*, char const*, char const*, std::__1::ios_base&, char) in cursesmain.o "std::__1::basic_ostream<char, std::__1::char_traits<char> >::put(char)", referenced from: _main in cursesmain.o "std::__1::basic_ostream<char, std::__1::char_traits<char> >::flush()", referenced from: _main in cursesmain.o "std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::sentry(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)", referenced from: std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in cursesmain.o "std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::~sentry()", referenced from: std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in cursesmain.o "std::__1::cerr", referenced from: _main in cursesmain.o "std::__1::ctype<char>::id", referenced from: _main in cursesmain.o std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in cursesmain.o "std::__1::locale::~locale()", referenced from: _main in cursesmain.o std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in cursesmain.o "std::__1::ios_base::__set_badbit_and_consider_rethrow()", referenced from: std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in cursesmain.o "std::__1::ios_base::clear(unsigned int)", referenced from: std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in cursesmain.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [../lib/libncurses++.6.dylib] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ncurses/ncurses/work/ncurses-6.0/c++' make: *** [all] Error 2 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ncurses/ncurses/work/ncurses-6.0' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ncurses/ncurses/work/ncurses-6.0" && /usr/bin/make -j2 -w all Exit code: 2 Error: org.macports.build for port ncurses returned: command execution failed DEBUG: Error code: CHILDSTATUS 53017 2 DEBUG: Backtrace: command execution failed while executing "system -nice 1 $fullcmdstring" ("eval" body line 1) invoked from within "eval system $notty $nice \$fullcmdstring" invoked from within "command_exec build" (procedure "portbuild::build_main" line 8) invoked from within "portbuild::build_main org.macports.build" ("eval" body line 1) invoked from within "eval $procedure $targetname" Warning: targets not executed for ncurses: org.macports.install org.macports.build org.macports.destroot Please see the log file for port ncurses for details: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ncurses/ncurses/main.log DEBUG: invalid command name "::ui_init" while executing "::ui_init any stdout" ("eval" body line 1) invoked from within "eval ::ui_init $priority $prefix $channels($priority) $args" ("uplevel" body line 2) invoked from within "uplevel 1 $body" Error: Unable to upgrade port: 1
Attachments (4)
Change History (14)
Changed 9 years ago by dClauzel (Damien Clauzel)
comment:1 Changed 9 years ago by Ionic (Mihai Moldovan)
Owner: | changed from macports-tickets@… to jmr@… |
---|---|
Summary: | ncurses @6.0_0 clang: error: linker command failed with exit code 1 (use -v to see invocation) → ncurses @6.0_0 clang: error: undefined symbols |
Please remember to CC the maintainer(s), if any, next time.
comment:2 Changed 9 years ago by jmroot (Joshua Root)
Keywords: | lion added |
---|---|
Summary: | ncurses @6.0_0 clang: error: undefined symbols → ncurses @6.0_0 clang++: error: undefined symbols |
comment:3 Changed 9 years ago by jmroot (Joshua Root)
Can’t reproduce in my Lion VM. What Xcode version are you using? And could you please check that you have installed the corresponding Command Line Tools?
comment:4 follow-up: 5 Changed 9 years ago by jmroot (Joshua Root)
Hmm, I see the problem. How is -stdlib=libc++
sneaking in there? Could you attach the config.log?
comment:5 Changed 9 years ago by dClauzel (Damien Clauzel)
Replying to jmr@…:
Can’t reproduce in my Lion VM. What Xcode version are you using? And could you please check that you have installed the corresponding Command Line Tools?
$ xcodebuild -version Xcode 4.6.3 Build version 4H1503
Replying to jmr@…:
Hmm, I see the problem. How is
-stdlib=libc++
sneaking in there? Could you attach the config.log?
Sure; I am attaching it to the ticket.
Changed 9 years ago by dClauzel (Damien Clauzel)
Attachment: | config.log added |
---|
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ncurses/ncurses/work/ncurses-6.0/config.log
comment:6 Changed 9 years ago by dClauzel (Damien Clauzel)
For -stdlib=libc++
, it is possibly related to this : https://trac.macports.org/wiki/LibcxxOnOlderSystems
Quite some months ago, I had to add this to /opt/local/etc/macports/macports.conf in order to be able to compile some ports:
cxx_stdlib libc++ buildfromsource always delete_la_files yes
comment:7 Changed 9 years ago by gallafent
I also see this on a fully updated Mac OS 10.10 system using Xcode 6.4:
$ xcodebuild -version Xcode 6.4 Build version 6E35b $ uname -a Darwin forth.lan 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
This therefore isn't just a problem on older systems. For what it's worth, I do also have the following lines in my macports.conf:
buildfromsource always macosx_deployment_target 10.8 configure.macosx_deployment_target 10.8 cxx_stdlib libc++ configure.cxx_stdlib libc++ cxxflags -std=c++14 configure.cxxflags -std=c++14 delete_la_files yes
I'll attach my config.log and main.log, for completeness. It appears that we're explicitly linking libstdc++ when building the demo, which is clearly wrong if we're trying to do a libc++ build … config parameters not making it sufficiently deep into ncurses' build? All the config test results saying that we /are/ using the GNU C Compiler, when in fact we're using clang, are a worrying signal too …
Changed 9 years ago by gallafent
Attachment: | main.2.log added |
---|
Main.log from Mac OS 10.10 / Xcode 6.4
Changed 9 years ago by gallafent
Attachment: | config.2.log added |
---|
Config.log from Mac OS 10.10 / Xcode 6.4
comment:9 Changed 9 years ago by jmroot (Joshua Root)
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Summary: | ncurses @6.0_0 clang++: error: undefined symbols → ncurses @6.0_0 fails to build on Lion with cxx_stdlib=libc++ |
Ah. That’s not a supported configuration at this point, so I’ll close this ticket. If you need it to work, you could report the issue upstream: http://invisible-island.net/ncurses/ncurses.faq.html#report_bugs
comment:10 Changed 9 years ago by gallafent
For what it's worth, there's a quick hack which will allow the port to build, which is to add the following fragment to the port's configure.diff:
@@ -19311,7 +19311,7 @@ cf_stdcpp_libname=stdcpp ;; (*) - cf_stdcpp_libname=stdc++ + cf_stdcpp_libname=c++ ;; esac echo "$as_me:19317: checking for library $cf_stdcpp_libname" >&5
As you can see, that overrides the existing forcing of linking libstdc++ with an equally invalid forcing of linking libc++ … which is of course fine for our needs :)
Clearly this should be fixed upstream. I'll post to ncurses' mailing list, linking this ticket!
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ncurses/ncurses/main.log