Opened 13 years ago

Closed 13 years ago

#30960 closed defect (fixed)

nsping fails to build on Lion

Reported by: dyoung@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.1
Keywords: lion Cc: ryandesign (Ryan Carsten Schmidt)
Port: nsping

Description

main.log is attached.

$ sudo port -v install nsping
Password:
--->  Building nsping
make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_nsping/nsping/work/nsping-0.8'
cc -g  -DBIND_8_COMPAT  -c -o nsping.o nsping.c
In file included from nsping.c:13:
nsping.h:45: error: conflicting types for ‘dprintf’
/usr/include/stdio.h:446: error: previous declaration of ‘dprintf’ was here
nsping.c: In function ‘dns_packet’:
nsping.c:339: warning: format ‘%d’ expects type ‘int’, but argument 6 has type ‘long int’
nsping.c: At top level:
nsping.c:613: error: conflicting types for ‘dprintf’
/usr/include/stdio.h:446: error: previous declaration of ‘dprintf’ was here
make: *** [nsping.o] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_nsping/nsping/work/nsping-0.8'
shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_nsping/nsping/work/nsping-0.8" && /usr/bin/make -j4 -w " returned error 2
Error: Target org.macports.build returned: shell command failed (see log for details)
Warning: the following items did not execute (for nsping): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Log for nsping is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_nsping/nsping/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

Looks like the "dprintf" function in nsping.c is colliding with that of /usr/include/stdio.h, which wasn't there in 10.6

On 10.7:

$ grep -P 'int\tdprintf' /usr/include/stdio.h 
int	dprintf(int, const char * __restrict, ...) __DARWIN_LDBL_COMPAT(dprintf) __printflike(2, 3) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);

Attachments (1)

main.log (3.0 KB) - added by dyoung@… 13 years ago.
nsping main.log

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by dyoung@…

Attachment: main.log added

nsping main.log

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

Port: nsping added

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

Perhaps the steps mentioned here will help. They're for Linux but the first error they mention is the same as the one here.

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

And the second error they mention there, about needing to add -lresolv, is one we've already fixed in r83178.

comment:4 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Resolution: fixed
Status: newclosed

r84067 should resolve it; let me know if it does not.

Note: See TracTickets for help on using tickets.