[MacPorts] #48627: ncurses @6.0_0 clang: error: linker command failed with exit code 1 (use -v to see invocation)
#48627: ncurses @6.0_0 clang: error: linker command failed with exit code 1 (use -v to see invocation) ----------------------+-------------------------------- Reporter: Damien@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Keywords: | Port: ncurses ----------------------+-------------------------------- 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
}}} -- Ticket URL: <https://trac.macports.org/ticket/48627> MacPorts <https://www.macports.org/> Ports system for OS X
#48627: ncurses @6.0_0 clang: error: undefined symbols -----------------------+------------------- Reporter: Damien@… | Owner: jmr@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: ncurses | -----------------------+------------------- Changes (by ionic@…): * owner: macports-tickets@… => jmr@… Comment: Please remember to CC the maintainer(s), if any, next time. -- Ticket URL: <https://trac.macports.org/ticket/48627#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#48627: ncurses @6.0_0 clang++: error: undefined symbols -----------------------+------------------- Reporter: Damien@… | Owner: jmr@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: lion Port: ncurses | -----------------------+------------------- Changes (by jmr@…): * keywords: => lion -- Ticket URL: <https://trac.macports.org/ticket/48627#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#48627: ncurses @6.0_0 clang++: error: undefined symbols -----------------------+------------------- Reporter: Damien@… | Owner: jmr@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: lion Port: ncurses | -----------------------+------------------- Comment (by 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? -- Ticket URL: <https://trac.macports.org/ticket/48627#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#48627: ncurses @6.0_0 clang++: error: undefined symbols -----------------------+------------------- Reporter: Damien@… | Owner: jmr@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: lion Port: ncurses | -----------------------+------------------- Comment (by jmr@…): Hmm, I see the problem. How is `-stdlib=libc++` sneaking in there? Could you attach the config.log? -- Ticket URL: <https://trac.macports.org/ticket/48627#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#48627: ncurses @6.0_0 clang++: error: undefined symbols -----------------------+------------------- Reporter: Damien@… | Owner: jmr@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: lion Port: ncurses | -----------------------+------------------- Comment (by Damien@…): Replying to [comment:3 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 [comment:4 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. -- Ticket URL: <https://trac.macports.org/ticket/48627#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
#48627: ncurses @6.0_0 clang++: error: undefined symbols -----------------------+------------------- Reporter: Damien@… | Owner: jmr@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: lion Port: ncurses | -----------------------+------------------- Comment (by Damien@…): For `-stdlib=libc++`, it is possibly related to this : https://trac.macports.org/wiki/LibcxxOnOlderSystems Quite some months ago, I add 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 }}} -- Ticket URL: <https://trac.macports.org/ticket/48627#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
#48627: ncurses @6.0_0 clang++: error: undefined symbols -----------------------+------------------- Reporter: Damien@… | Owner: jmr@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: lion Port: ncurses | -----------------------+------------------- Comment (by william@…): 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 … -- Ticket URL: <https://trac.macports.org/ticket/48627#comment:7> MacPorts <https://www.macports.org/> Ports system for OS X
#48627: ncurses @6.0_0 fails to build on Lion with cxx_stdlib=libc++ -----------------------+-------------------- Reporter: Damien@… | Owner: jmr@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: wontfix | Keywords: lion Port: ncurses | -----------------------+-------------------- Changes (by jmr@…): * status: new => closed * resolution: => wontfix Comment: 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 -- Ticket URL: <https://trac.macports.org/ticket/48627#comment:9> MacPorts <https://www.macports.org/> Ports system for OS X
#48627: ncurses @6.0_0 fails to build on Lion with cxx_stdlib=libc++ -----------------------+-------------------- Reporter: Damien@… | Owner: jmr@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: wontfix | Keywords: lion Port: ncurses | -----------------------+-------------------- Comment (by william@…): 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! -- Ticket URL: <https://trac.macports.org/ticket/48627#comment:10> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts