#30561 closed defect (fixed)
nmap @5.51 build fails on OSX 10.7 Lion - error: conflicting types for 'getnameinfo'
Reported by: | kevin@… | Owned by: | danielluke (Daniel J. Luke) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.0.1 |
Keywords: | Cc: | opendarwin.org@…, brandono@…, axet (Alexey Kuznetsov), msy@… | |
Port: | nmap |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
Port install of nmap @5.51 fails on OSX 10.7 Lion.
$ sudo port install nmap ---> Computing dependencies for nmap ---> Building nmap Error: Target org.macports.build returned: shell command failed (see log for details) Log for nmap is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_nmap/nmap/main.log Error: Status 1 encountered during processing. To report a bug, see <http://guide.macports.org/#project.tickets>
Base error is:
error: conflicting types for 'getnameinfo'
Attached is the main.log for this build.
Attachments (1)
Change History (22)
Changed 13 years ago by kevin@…
comment:2 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | dluke@… added; kevin@… removed |
---|---|
Description: | modified (diff) |
Milestone: | MacPorts 2.0.2 |
Owner: | changed from macports-tickets@… to opendarwin.org@… |
Please use WikiFormatting and preview before submitting. As reporter, you do not need to Cc yourself. Please do however Cc the port's maintainer(s). The Milestone field is not used for port tickets.
comment:3 Changed 13 years ago by danielluke (Daniel J. Luke)
Owner: | changed from opendarwin.org@… to dluke@… |
---|---|
Status: | new → assigned |
can you please clean and build again (and attach the main.log) if it fails?
sudo port clean --all nmap sudo port -dv install nmap
comment:4 Changed 13 years ago by danielluke (Daniel J. Luke)
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
In fact, I just successfully built on Lion, so it's almost certainly an issue with your setup. Either you had a partial compile that just needs to be cleaned, or you perhaps need to instal Xcode 4.
comment:5 Changed 13 years ago by kevin@…
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
I just cleaned and rebuilt as instructed above, and had the same error.
I am running on a clean Lion installation and I have Xcode 4.2 installed (for iOS 5.0 beta 4).
My new main.log looks identical to the first one attached to the ticket, as the error is still referring to conflicting types defined.
comment:6 Changed 13 years ago by danielluke (Daniel J. Luke)
The new main.log cannot be identical (since the one you uploaded includes skipped phases), at the very least, it should have additional output from running nmap's configure script(s). Please attach it, as requested.
comment:7 Changed 13 years ago by corndogcomputers@…
I am having the exact same issue, but I would like to add that I too have Xcode 4.2 and iOS 5 SDK beta 4 (Lion).
comment:8 Changed 13 years ago by danielluke (Daniel J. Luke)
My working configuration has Xcode 4.1 installed. So if this is an Xcode 4.2 issue, someone with access to it will probably have to supply a patch to fix it.
comment:9 Changed 13 years ago by corndogcomputers@…
I can verify that the issue is related to Xcode 4.2 beta. I uninstalled Xcode 4.2 beta and downgraded to XCode 4.1 and nmap compiled just fine.
comment:10 Changed 13 years ago by danielluke (Daniel J. Luke)
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
If someone with Xcode 4.2 beta wants to figure it out and get a patch that works, I'd be happy to include it. Otherwise I'm going to close this.
comment:11 Changed 13 years ago by mike-savory
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
I have the same issue here. You may also be able to reproduce in Xcode 4.1 by setting clang as the compiler instead of llvm-gcc .
comment:12 Changed 13 years ago by jmroot (Joshua Root)
Cc: | opendarwin.org@… added; dluke@… removed |
---|
comment:14 Changed 13 years ago by dave.whitla@…
Exactly the same issue here using Xcode 4.2. I should add that at this time GCC has been deprecated in the OSX toolchain in favour of LLVM so LLVM3 really should be considered our compiler target.
comment:15 Changed 13 years ago by michele.noberasco@…
For those who are on a hurry and need a quick n dirty solution, do the following:
- open nbase/getnameinfo.c and wipe out getnameinfo method implementation
!HAVE_GETADDRINFO, then for #if !HAVE_GETNAMEINFO, and finally for #if !HAVE_GETADDRINFO |
comment:16 Changed 13 years ago by michele.noberasco@…
For a clean solution / patch, it would be necessary to go and check where HAVE_GETNAMEINFO and HAVE_GETADDRINFO are controlled. However, compiling of getnameinfo method implementation didn't seem conditional to me.
comment:18 Changed 13 years ago by msy@…
I get the same error with the release version of XCode 4.2 (4D199) on Lion, FYI.
comment:20 Changed 13 years ago by danielluke (Daniel J. Luke)
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
The configure tests for getaddrinfo and getnameinfo are mildly broken - and Xcode 4.2 doesn't like them, which causes the build to fail.
The Portfile now does a quick fix to nbase/configure and the build works for me (r85928).
comment:21 Changed 13 years ago by msy@…
I can also confirm that the port does build properly now. Thanks!
main.log