Opened 5 years ago

Closed 5 years ago

#58876 closed defect (fixed)

ncurses-bootstrap fails to build as dependency on system with working libcxx environment

Reported by: grumpybozo (Bill Cole) Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: Cc: jmroot (Joshua Root)
Port: ncurses-bootstrap

Description

Snow Leopard (MacOS X 10.6.8/Darwin 10.8.0) MacPorts 2.5.4, selfupdate & clean all have been run.

port -d upgrade outdated ends like this:

--->  Configuring ncurses-bootstrap
DEBUG: Preferred compilers: macports-clang-8.0 macports-clang-6.0 macports-clang-5.0 macports-clang-3.9 macports-clang-3.4 gcc-4.2 apple-gcc-4.2 gcc-4.0
DEBUG: Using compiler 'MacPorts Clang 8.0'
DEBUG: elevating privileges for configure ccache: euid changed to 0, egid changed to 0.
DEBUG: dropping privileges: euid changed to 504, egid changed to 500.
DEBUG: Executing org.macports.configure (ncurses-bootstrap)
DEBUG: Environment: 
CC='ccache /opt/local/libexec/libcxx-bootstrap/bin/clang-mp-8.0'
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ncurses/ncurses-bootstrap/work/.CC_PRINT_OPTIONS'
CFLAGS='-pipe -Os -arch i386'
CPATH='/opt/local/libexec/libcxx-bootstrap/include'
CXX='ccache /opt/local/libexec/libcxx-bootstrap/bin/clang++-mp-8.0'
CXXFLAGS='-pipe -Os -stdlib=libstdc++ -arch i386'
CXXLIBS='-stdlib=libstdc++'
F77FLAGS='-m32'
F90FLAGS='-pipe -Os -m32'
FCFLAGS='-pipe -Os -m32'
FFLAGS='-pipe -Os'
INSTALL='/usr/bin/install -c'
LDFLAGS='-arch i386'
LIBRARY_PATH='/opt/local/libexec/libcxx-bootstrap/lib'
MACOSX_DEPLOYMENT_TARGET='10.6'
OBJC='ccache /opt/local/libexec/libcxx-bootstrap/bin/clang-mp-8.0'
OBJCFLAGS='-pipe -Os -arch i386'
OBJCXX='ccache /opt/local/libexec/libcxx-bootstrap/bin/clang++-mp-8.0'
OBJCXXFLAGS='-pipe -Os -stdlib=libstdc++ -arch i386'
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ncurses/ncurses-bootstrap/work/ncurses-6.1" && ./configure --prefix=/opt/local/libexec/libcxx-bootstrap --enable-widec --disable-lib-suffixes --enable-overwrite --with-shared --with-cxx-shared --without-debug --without-ada --with-manpage-format=normal --enable-pc-files --with-pkg-config-libdir="/opt/local/libexec/libcxx-bootstrap/lib/pkgconfig" --disable-mixed-case 
DEBUG: system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ncurses/ncurses-bootstrap/work/ncurses-6.1" && ./configure --prefix=/opt/local/libexec/libcxx-bootstrap --enable-widec --disable-lib-suffixes --enable-overwrite --with-shared --with-cxx-shared --without-debug --without-ada --with-manpage-format=normal --enable-pc-files --with-pkg-config-libdir="/opt/local/libexec/libcxx-bootstrap/lib/pkgconfig" --disable-mixed-case 
checking for egrep... grep -E
Configuring NCURSES 6.1 ABI 6 (Fri Aug 23 22:45:58 EDT 2019)
checking for package version... 6.0
checking for package patch date... 20180127
checking build system type... i386-apple-darwin10.8.0
checking host system type... i386-apple-darwin10.8.0
checking target system type... i386-apple-darwin10.8.0
Configuring for darwin10.8.0
checking for prefix... /opt/local/libexec/libcxx-bootstrap
checking for C compiler default output... configure: error: C compiler cannot create executables
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ncurses/ncurses-bootstrap/work/ncurses-6.1" && ./configure --prefix=/opt/local/libexec/libcxx-bootstrap --enable-widec --disable-lib-suffixes --enable-overwrite --with-shared --with-cxx-shared --without-debug --without-ada --with-manpage-format=normal --enable-pc-files --with-pkg-config-libdir="/opt/local/libexec/libcxx-bootstrap/lib/pkgconfig" --disable-mixed-case 
Exit code: 77
Error: Failed to configure ncurses-bootstrap, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ncurses/ncurses-bootstrap/work/ncurses-6.1/config.log
Error: Failed to configure ncurses-bootstrap: configure failure: command execution failed
DEBUG: Error code: NONE
DEBUG: Backtrace: configure failure: command execution failed
    while executing
"$procedure $targetname"
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ncurses/ncurses-bootstrap/main.log for details.
Error: Problem while installing ncurses-bootstrap
Error: Follow https://guide.macports.org/#project.tickets to report a bug.

Attachments (2)

main.log (204.0 KB) - added by grumpybozo (Bill Cole) 5 years ago.
log file of port upgrade attempt
config.log (5.2 KB) - added by grumpybozo (Bill Cole) 5 years ago.
config.log

Download all attachments as: .zip

Change History (15)

Changed 5 years ago by grumpybozo (Bill Cole)

Attachment: main.log added

log file of port upgrade attempt

comment:1 Changed 5 years ago by jmroot (Joshua Root)

Priority: HighNormal

Attach the config.log too please.

comment:2 Changed 5 years ago by jmroot (Joshua Root)

Are you sure you're using the current portfile? It should be blacklisting clang-8.0.

Changed 5 years ago by grumpybozo (Bill Cole)

Attachment: config.log added

config.log

comment:3 Changed 5 years ago by jmroot (Joshua Root)

ccache: error: execv of /opt/local/libexec/libcxx-bootstrap/bin/clang-mp-8.0 failed: No such file or directory

OK, that makes sense given that it's trying to use clang-8.0 and the prefix is being changed, the problem is just that it should be using the system gcc, not any macports-clang.

comment:4 Changed 5 years ago by jmroot (Joshua Root)

What does openssl dgst -sha1 `port file ncurses` say for you? For me it's 32c9b4102a1d83b49357f1cd98925ca79d623d8e.

comment:5 Changed 5 years ago by jmroot (Joshua Root)

With the right blacklisting I think the only other issue would be the compiler fallback list you have configured. I'd think it would work to set it to something like macports-clang-8.0 macports-clang-3.7 gcc-4.2 apple-gcc-4.2 macports-clang-3.4 so clang-3.4 is only used by things that can build with neither current clang nor the old Apple gcc. Put clangs 7.0 through 5.0 in there after 8.0 if you like, though it shouldn't make much difference in most cases. Clangs older than 5.0 are not recommended, but 3.7 has to be in there to build cmake and 3.4 to build libcxx.

comment:6 Changed 5 years ago by grumpybozo (Bill Cole)

My port file has the same hash. 'port sync' was run beforehand.

comment:7 Changed 5 years ago by jmroot (Joshua Root)

I can't explain the choice of compiler then. Can't reproduce it locally.

comment:8 Changed 5 years ago by grumpybozo (Bill Cole)

Where/how would I set a fallback compiler list?

comment:9 Changed 5 years ago by jmroot (Joshua Root)

It's default_compilers in macports.conf. It looks like LibcxxOnOlderSystems says to set it, but not to quite the same value as yours.

comment:10 Changed 5 years ago by jmroot (Joshua Root)

Here is what happens if I use your fallback list with MacPorts 2.5.4 on 10.6:

% port deps ncurses-bootstrap compiler.fallback="macports-clang-8.0 macports-clang-6.0 macports-clang-5.0 macports-clang-3.9 macports-clang-3.4 gcc-4.2 apple-gcc-4.2 gcc-4.0" cxx_stdlib=libc++
Full Name: ncurses-bootstrap @6.1_0
Build Dependencies:   clang-3.9

And here is what happens with the one I suggested in comment:5:

% port deps ncurses-bootstrap compiler.fallback="macports-clang-8.0 macports-clang-3.7 gcc-4.2 apple-gcc-4.2 macports-clang-3.4" cxx_stdlib=libc++ 
ncurses-bootstrap @6.1_0 has no dependencies.

comment:11 Changed 5 years ago by grumpybozo (Bill Cole)

It's not doing the same for me:

# port deps ncurses-bootstrap compiler.fallback="macports-clang-8.0 macports-clang-3.7 gcc-4.2 apple-gcc-4.2 macports-clang-3.4" cxx_stdlib=libc++ 
Full Name: ncurses-bootstrap @6.1_0
Build Dependencies:   clang-8.0

One thing that confuses me is that the configure step is setting prefix to /opt/local/libexec/libcxx-bootstrap, but that directory doesn't exist and never gets created. And the clang dependency port group looks in there for compilers that can't exist because the directory doesn't exist.

comment:12 Changed 5 years ago by jmroot (Joshua Root)

Ah, I see the problem - you have clang-8.0 installed already. That combined with the fact that compiler.fallback can't change dynamically in response to configure.cxx_stdlib changing (because it's set to a fixed value in macports.conf) causes the issue.

comment:13 Changed 5 years ago by jmroot (Joshua Root)

Owner: set to jmroot
Resolution: fixed
Status: newclosed

In e967bb1325decd8d0c05f2f37b27067f6d780eb3/macports-ports (master):

Fix building llibcxx bootstrap ports with 2.5.4

Changing configure.cxx_stdlib isn't sufficient to change the compiler
selection on MacPorts < 2.6.0, because users can be setting a fixed
default_compilers list in macports.conf if they followed the
LibcxxOnOlderSystems instructions.

Closes: #58876

Note: See TracTickets for help on using tickets.