Opened 8 years ago

Closed 7 years ago

Last modified 5 years ago

#53995 closed defect (wontfix)

nmap @7.40 fails to build with libc++

Reported by: 1-61803 Owned by: danielluke (Daniel J. Luke)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), rlhamil@…, iEFdev
Port: nmap

Description


Attachments (2)

nmap_failed_main.log (189.2 KB) - added by 1-61803 8 years ago.
20180324_nmap_main.log (194.4 KB) - added by iEFdev 7 years ago.

Download all attachments as: .zip

Change History (17)

Changed 8 years ago by 1-61803

Attachment: nmap_failed_main.log added

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

This build system appears to have forgotten that the CXXFLAGS need to be passed not just when calling the C++ compiler as a compiler, but also when calling it as a linker to link C++ code.

comment:2 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to danielluke
Status: newassigned

comment:3 Changed 8 years ago by 1-61803

sudo port install nmap configure.cxxflags="-stdlib=libc++" configure.cxx="clang++ -stdlib=libc++" builds the port.

comment:4 Changed 8 years ago by danielluke (Daniel J. Luke)

Resolution: wontfix
Status: assignedclosed

As this only affects older versions of Mac OS X (that I do not have available to test on), I'd be happy to include a patch in the port, but will otherwise leave this un-fixed.

comment:5 Changed 8 years ago by 1-61803

I installed a newer compiler and changed runtime, see ticket:53994#comment:3. It built fine.

comment:6 in reply to:  4 ; Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign rlhamil@… added
Resolution: wontfix
Status: closedreopened

Replying to danielluke:

As this only affects older versions of Mac OS X (that I do not have available to test on), I'd be happy to include a patch in the port, but will otherwise leave this un-fixed.

You should have reported the problem to the developers. Richard has now done that.

Let's leave the ticket open until we fix it.

comment:7 in reply to:  6 Changed 7 years ago by danielluke (Daniel J. Luke)

You should have reported the problem to the developers. Richard has now done that.

"Should have" is perhaps a bit strong given the unsupported OS release the problem relates to.

Let's leave the ticket open until we fix it.

If you are working this, please take the ticket. You can assign it back to me or open a new one for me if you generate a patch.

comment:8 Changed 7 years ago by iEFdev

The upgrade failed, and when I searched, I found this ticket. Logs ended with same error.

Is this still a “wontfix”?


The command in comment:3 worked fine (but I used 'upgrade'). Didn't think I would need that, since I have the “LibcxxOnOlderSystems”-fix in my macports.conf.  

# Attaching my log, if that's helpful in any way.

Changed 7 years ago by iEFdev

Attachment: 20180324_nmap_main.log added

comment:9 Changed 7 years ago by iEFdev

Cc: iEFdev added

comment:10 in reply to:  8 ; Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to iEFdev:

Is this still a “wontfix”?

As far as I am concerned, no; it should still be fixed.

The command in comment:3 worked fine (but I used 'upgrade'). Didn't think I would need that, since I have the “LibcxxOnOlderSystems”-fix in my macports.conf.

You shouldn't need the workaround in comment:3, but you do, because the build system has a bug, and the portfile doesn't work around it. The -stdlib flag must be passed to every invocation of the C++ compiler, and for some files, this build system doesn't.

comment:11 in reply to:  10 Changed 7 years ago by iEFdev

Replying to ryandesign:

You shouldn't need the workaround in comment:3, but you do, because the build system has a bug, and the portfile doesn't work around it. The -stdlib flag must be passed to every invocation of the C++ compiler, and for some files, this build system doesn't.

Aah… I see. Thank you for the explaination.

comment:12 in reply to:  6 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign:

You should have reported the problem to the developers. Richard has now done that.

I don't remember what I was referring to here. I couldn't find a mailing list post or bug report so I filed a new one now: https://github.com/nmap/nmap/issues/1161

comment:13 Changed 7 years ago by danielluke (Daniel J. Luke)

Resolution: wontfix
Status: reopenedclosed

As per normal policy, this is a wontfix because I'm not volunteering to fix things on very old versions of Mac OS X. If someone supplies a patch that can be added to the port (or, better yet, works with upstream to fix the issue), then it will get fixed.

comment:14 Changed 7 years ago by kencu (Ken)

Although the reason this is happening is because the software build scripts are improperly written, the reason newer systems are not seeing it is that clang defaults to adding stdlib=libc++ on a build line if none is specified if the OS is 10.9 or greater, and stdlib=libstdc++ if the OS is 10.8 or less.

The proper fix is to fix the build system. This may never happen, as newer systems all work fine, so there is no incentive to fix it.

I have a proposal in to fix this issue for all older systems forever, on all such broken ports, that we are waiting to consider once we wholesale switch to libc++ <https://lists.macports.org/pipermail/macports-dev/2018-March/037589.html>.

comment:15 Changed 5 years ago by kencu (Ken)

In ed5913a3ac2c2f99f8e2e826c3eab80f08832d17/macports-ports (master):

nmap: add stdlib to LDFLAGS

fixes build with some build configurations
see #58837
see #53995

Note: See TracTickets for help on using tickets.