Opened 19 years ago

Closed 18 years ago

#7515 closed defect (fixed)

BUG: Problems with building nmap

Reported by: soeren_wonderbra@… Owned by: opendarwin.org@…
Priority: Normal Milestone:
Component: ports Version: 1.2
Keywords: Cc: danielluke (Daniel J. Luke), sean@…, markd@…
Port:

Description

Hi,

when trying to build nmap i get the following errors:

g++ -c -Ilibdnet-stripped/include -Ilibpcre -no-cpp-precomp -g -O2 -Wall -fno-strict-aliasing -I/opt/local/include -Inbase -Insock/include -DHAVE_CONFIG_H -DNMAP_VERSION=\"4.01\" -DNMAP_NAME=\"Nmap\" -DNMAP_URL=\"http://www.insecure.org/nmap/\" -DNMAP_PLATFORM=\"powerpc-apple-darwin8.5.0\" -DNMAPDATADIR=\"/opt/local/share/nmap\" main.cc -o main.o /opt/local/include/getopt.h:115: error: declaration of C function 'int getopt()' conflicts with /usr/include/unistd.h:422: error: previous declaration 'int getopt(int, char* const*, const char*)' here make: * [main.o] Error 1

Warning: the following items did not execute (for nmap): com.apple.build Error: /opt/local/bin/port: Status 1 encountered during processing.

Can somebody help? The machine is an ibook G4 (ppc) running 10.4.5 and xcode 2.2.1.

Greetings Soeren

Attachments (1)

nmap-logfile (44.2 KB) - added by soeren_wonderbra@… 19 years ago.
Logfile of port -d build nmap

Download all attachments as: .zip

Change History (10)

Changed 19 years ago by soeren_wonderbra@…

Attachment: nmap-logfile added

Logfile of port -d build nmap

comment:1 Changed 19 years ago by blb@…

Cc: dluke@… added
Owner: changed from darwinports-bugs@… to opendarwin.org@…

Assigning to maintainers.

comment:2 Changed 19 years ago by opendarwin.org@…

Status: newassigned

Looks like "/opt/local/include/getopt.h" is conflicting, can you provide the output of:

port provides /opt/local/include/getopt.h

comment:3 Changed 19 years ago by soeren_wonderbra@…

(In reply to comment #3)

That is gnugetopt...

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

This is odd... the configure test for getopt.h usability should be including unistd.h as well ...

comment:5 Changed 19 years ago by mww@…

Summary: Problems with building nmapBUG: Problems with building nmap

comment:6 Changed 19 years ago by markd@…

Cc: markd@… added

Nmap 4.03 was just committed. Can you see if it fixes the problem?

comment:7 Changed 19 years ago by dev.mem@…

nmap 4.03, Revision 1, net/nmap (Variants: gtk2, no_ssl, no_pcre)

is still doing:

g++ -c -Ilibdnet-stripped/include -I/opt/local/include -no-cpp-precomp -g -O2 -Wall -fno-strict-aliasing -I/opt/local/include -Inbase -Insock/include -DHAVE_CONFIG_H -DNMAP_VERSION=\"4.03\" -DNMAP_NAME=\"Nmap\" -DNMAP_URL=\"http://www.insecure.org/nmap/\" -DNMAP_PLATFORM=\"i386-apple-darwin8.6.1\" -DNMAPDATADIR=\"/opt/local/share/nmap\" main.cc -o main.o /opt/local/include/getopt.h:115: error: declaration of C function 'int getopt()' conflicts with /usr/include/unistd.h:422: error: previous declaration 'int getopt(int, char* const*, const char*)' here make: * [main.o] Error 1

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

Cc: sean@… added

I think that this is really a bug with gnugetopt.

unistd.h defines getopt like this: int getopt(int, char * const [], const char *);

gnugetopt defines getopt like this: extern int getopt ();

It looks like gnugetopt might need to have it's configure set HAVE_DECL_GETOPT to 1 so that things work the way they should.

comment:9 Changed 18 years ago by markd@…

Resolution: fixed
Status: assignedclosed

The gnugetopt port is now at revision 1 and should fix this conflict. Please update gnugetopt and retry it. Reopen this bug if there is still a problem.

Note: See TracTickets for help on using tickets.