New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #30561 (closed defect: fixed)

Opened 22 months ago

Last modified 19 months ago

nmap @5.51 build fails on OSX 10.7 Lion - error: conflicting types for 'getnameinfo'

Reported by: kevin@… Owned by: dluke@…
Priority: Normal Milestone:
Component: ports Version: 2.0.1
Keywords: Cc: opendarwin.org@…, brandono@…, ak@…, msy@…
Port: nmap

Description (last modified by ryandesign@…) (diff)

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

main.log (16.6 KB) - added by kevin@… 22 months ago.
main.log

Change History

Changed 22 months ago by kevin@…

main.log

comment:1 Changed 22 months ago by kevin@…

  • Cc kevin@… added

Cc Me!

comment:2 Changed 22 months ago by ryandesign@…

  • Owner changed from macports-tickets@… to opendarwin.org@…
  • Cc dluke@… added; kevin@… removed
  • Description modified (diff)
  • Milestone MacPorts 2.0.2 deleted

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 22 months ago by dluke@…

  • Owner changed from opendarwin.org@… to dluke@…
  • Status changed from new to 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 22 months ago by dluke@…

  • Status changed from assigned to closed
  • Resolution set to worksforme

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 22 months ago by kevin@…

  • Status changed from closed to reopened
  • Resolution worksforme deleted

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 22 months ago by dluke@…

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 22 months 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 22 months ago by dluke@…

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 22 months 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 22 months ago by dluke@…

  • Status changed from reopened to closed
  • Resolution set to worksforme

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 21 months ago by msavory@…

  • Status changed from closed to reopened
  • Resolution worksforme deleted

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 21 months ago by jmr@…

  • Cc opendarwin.org@… added; dluke@… removed

comment:13 Changed 20 months ago by brandono@…

  • Cc brandono@… added

Cc Me!

comment:14 Changed 20 months 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 20 months 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
open nbase/nbase_ipv6.h and wipe out the conditional code for #if !HAVE_GETNAMEINFO
!HAVE_GETADDRINFO, then for #if !HAVE_GETNAMEINFO, and finally for #if !HAVE_GETADDRINFO

comment:16 Changed 20 months 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:17 Changed 19 months ago by ak@…

  • Cc ak@… added

Cc Me!

comment:18 Changed 19 months ago by msy@…

I get the same error with the release version of XCode 4.2 (4D199) on Lion, FYI.

comment:19 Changed 19 months ago by msy@…

  • Cc msy@… added

Cc Me!

comment:20 Changed 19 months ago by dluke@…

  • Status changed from reopened to closed
  • Resolution set to fixed

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 19 months ago by msy@…

I can also confirm that the port does build properly now. Thanks!

Note: See TracTickets for help on using tickets.