Opened 3 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#70772 closed defect (fixed)

nmap @7.95 cannot compile on macOS 15 Sequoia

Reported by: SaintBol Owned by: ghosthound
Priority: Normal Milestone:
Component: ports Version: 2.10.1
Keywords: sequoia Cc: danielluke (Daniel J. Luke), ivanobom
Port: nmap

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Using Xcode clang compiler (Command Line Tools not present): cannot compile the port on macOS 15 Sequoia. Compiling with openssl installed.

Attached main.log

Error is a bit obscure («command failed»):

:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_nmap/nmap/work/nmap-7.95" && /usr/bin/make -j16 -w all 
:info:build Exit code: 2
:error:build Failed to build nmap: command execution failed
:debug:build Error code: CHILDSTATUS 29751 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build     (procedure "portbuild::build_main" line 10)
:debug:build     invoked from within
:debug:build "$procedure $targetname"

Therefore I tried manually in the build directory just after the error:

% cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_nmap/nmap/work/nmap-7.95"

% /usr/bin/make -w all
make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_nmap/nmap/work/nmap-7.95'
Compiling libnetutil
cd libnetutil && /Applications/Xcode.app/Contents/Developer/usr/bin/make
make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_nmap/nmap/work/nmap-7.95/libnetutil'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_nmap/nmap/work/nmap-7.95/libnetutil'
Compiling liblinear
make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_nmap/nmap/work/nmap-7.95/liblinear'
make[1]: `liblinear.a' is up to date.
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_nmap/nmap/work/nmap-7.95/liblinear'
Compiling libpcre
make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_nmap/nmap/work/nmap-7.95/libpcre'
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_nmap/nmap/work/nmap-7.95/libpcre/missing' aclocal-1.16 -I m4
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_nmap/nmap/work/nmap-7.95/libpcre/missing: line 81: aclocal-1.16: command not found
WARNING: 'aclocal-1.16' is missing on your system.
         You should only need it if you modified 'acinclude.m4' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'aclocal' program is part of the GNU Automake package:
         <https://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <https://www.gnu.org/software/autoconf>
         <https://www.gnu.org/software/m4/>
         <https://www.perl.org/>
make[1]: *** [aclocal.m4] Error 127
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_nmap/nmap/work/nmap-7.95/libpcre'
make: *** [build-pcre] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_nmap/nmap/work/nmap-7.95'

Automake and Autoconf are installed:

automake                       @1.17           devel/automake
autoconf                       @2.72           devel/autoconf

Attachments (1)

nmap-main.log (389.7 KB) - added by SaintBol 3 weeks ago.
mail.log

Download all attachments as: .zip

Change History (13)

Changed 3 weeks ago by SaintBol

Attachment: nmap-main.log added

mail.log

comment:1 Changed 3 weeks ago by SaintBol

It complains about aclocal-1.16 not being there, whereas aclocal-1.17 is actually there...

% port content automake | egrep 'aclocal-.*[0-9]{2}$'

/opt/local/bin/aclocal-1.17

Version 0, edited 3 weeks ago by SaintBol (next)

comment:2 Changed 3 weeks ago by danielluke (Daniel J. Luke)

FWIW, I just upgraded and build nmap locally without seeing this issue. I'll look some more once my normal set of installed ports finishes installing.

comment:3 Changed 3 weeks ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: sequoia added; Sequoia nmap removed

comment:4 in reply to:  description ; Changed 3 weeks ago by ryandesign (Ryan Carsten Schmidt)

Replying to SaintBol:

Therefore I tried manually in the build directory just after the error:

We don't recommend this as a troubleshooting step. Running commands in the MacPorts work directory manually omits the sandboxing, environment variables, and arguments that MacPorts uses, so your results from building manually are not necessarily applicable.

Automake and Autoconf are installed:

automake                       @1.17           devel/automake
autoconf                       @2.72           devel/autoconf

This looks like output from port list. port list doesn't do what you think it does; see wiki:FAQ#portlist. Use port installed instead.

Replying to SaintBol:

It complains about aclocal-1.16 not being there, whereas aclocal-1.17 is actually there...

% port content automake | egrep 'aclocal-.*[0-9]{2}$'
  /opt/local/bin/aclocal-1.17

Many ports look for specific versions of automake, such as 1.16 which was the latest version for a long time, and need to be patched when we update to a new version of automake, as we recently did in #70408. Before that, I fixed all the references to automake 1.16 I could find, but I didn't do nmap.

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

Like Daniel, I cannot reproduce this problem, but I am on macOS 12, and you are on macOS 15 which we already know has a number of problems.

comment:6 Changed 3 weeks ago by jmroot (Joshua Root)

Cc: danielluke ivanobom added
Owner: set to ghosthound
Status: newassigned

Has duplicate #70784.

comment:7 in reply to:  4 Changed 3 weeks ago by slewsys (Andrew L. Moore)

Replying to ryandesign:

Many ports look for specific versions of automake, such as 1.16 which was the latest version for a long time, and need to be patched when we update to a new version of automake, as we recently did in #70408. Before that, I fixed all the references to automake 1.16 I could find, but I didn't do nmap.

A strategy that works well for me is to exclude all generated files from the repository by putting them in .gitignore, and then providing a robust autogen.sh. I'm not sure if there's a way to implement this for an arbitrary port, though.

comment:8 Changed 3 weeks ago by danielluke (Daniel J. Luke)

I tried again and can't reproduce this - I also grep'd through the distfile and don't see where it would have hardcoded an older automake version. Is it possible that the original reporter had an build interrupted by their automake upgrade? (Maybe a partial build from a long time ago?).

I suspect that doing sudo port clean nmap && sudo port install nmap will fix it in that case.

comment:9 Changed 3 weeks ago by ivanobom

I just tried, but didn't works:

$ sudo port clean nmap && sudo port install nmap
--->  Cleaning nmap
--->  Computing dependencies for nmap
--->  Fetching archive for nmap
--->  Attempting to fetch nmap-7.95_0+pcre+ssl.darwin_24.arm64.tbz2 from https://packages.macports.org/nmap
--->  Attempting to fetch nmap-7.95_0+pcre+ssl.darwin_24.arm64.tbz2 from http://bos.us.packages.macports.org/nmap
--->  Attempting to fetch nmap-7.95_0+pcre+ssl.darwin_24.arm64.tbz2 from https://mirrors.mit.edu/macports/packages/nmap
--->  Fetching distfiles for nmap
--->  Verifying checksums for nmap
--->  Extracting nmap
--->  Applying patches to nmap
--->  Configuring nmap
Warning: Configuration logfiles contain indications of -Wimplicit-function-declaration; check that features were not accidentally disabled:
  strchr: found in nmap-7.95/config.log, nmap-7.95/nping/config.log
--->  Building nmap
Error: Failed to build nmap: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_nmap/nmap/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port nmap failed

comment:10 Changed 3 weeks ago by danielluke (Daniel J. Luke)

Oh, I see the problem now (this is where I once again bemoan the fact that trace mode isn't used by default). It works on my machine because I have pcre2 installed.

The nmap included libpcre wants a specific aclocal version - but our default +pcre build doesn't need that. However, nmap wants pcre2 now (and probably for some time) and not pcre. I'll get a revbump shortly.

I also think we shouldn't be setting +pcre+ssl variants and should just have them as the way the port comes, but I'll leave that until the next nmap version bump so we're not doing too many changes at once.

comment:11 Changed 3 weeks ago by danielluke (Daniel J. Luke)

Resolution: fixed
Status: assignedclosed

comment:12 Changed 3 weeks ago by ivanobom

I just tested again and I can confirm that the problem is solved. Thanks!

Note: See TracTickets for help on using tickets.