Opened 11 years ago

Closed 10 years ago

#40763 closed defect (fixed)

hping3 @20051105_1: build fails: expected parameter declarator

Reported by: rr@… Owned by: Gminfly
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: Cc: Schamschula (Marius Schamschula), kvanrhee@…, schnide (Joe Schnide), joao.netto@…, SickTeddyBear, macports@…
Port: hping3

Description (last modified by ryandesign (Ryan Carsten Schmidt))

sytrymb:~ root# port install hping3
--->  Computing dependencies for hping3
--->  Fetching archive for hping3
--->  Attempting to fetch hping3-20051105_1.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/hping3
--->  Attempting to fetch hping3-20051105_1.darwin_13.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/hping3
--->  Attempting to fetch hping3-20051105_1.darwin_13.x86_64.tbz2 from http://packages.macports.org/hping3
--->  Fetching distfiles for hping3
--->  Attempting to fetch hping3-20051105.tar.gz from http://lil.fr.distfiles.macports.org/hping3
--->  Verifying checksums for hping3
--->  Extracting hping3
--->  Applying patches to hping3
--->  Configuring hping3
--->  Building hping3
Error: org.macports.build for port hping3 returned: command execution failed
Please see the log file for port hping3 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_hping3/hping3/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port hping3 failed
:info:build make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_hping3/hping3/work/hping3-20051105'
:info:build gcc -c -O2 -Wall   -DUSE_TCL -g  main.c
:info:build gcc -c -O2 -Wall   -DUSE_TCL -g  getifname.c
:info:build gcc -c -O2 -Wall   -DUSE_TCL -g  getlhs.c
:info:build gcc -c -O2 -Wall   -DUSE_TCL -g  parseoptions.c
:info:build gcc -c -O2 -Wall   -DUSE_TCL -g  datafiller.c
:info:build gcc -c -O2 -Wall   -DUSE_TCL -g  datahandler.c
:info:build gcc -c -O2 -Wall   -DUSE_TCL -g  gethostname.c
:info:build gcc -c -O2 -Wall   -DUSE_TCL -g  binding.c
:info:build gethostname.c:21:8: error: expected parameter declarator
:info:build size_t strlcpy(char *dst, const char *src, size_t siz);
:info:build        ^

Attachments (5)

hping3 (25.5 KB) - added by rr@… 11 years ago.
Portfile-hping3.diff (948 bytes) - added by Schamschula (Marius Schamschula) 11 years ago.
patch-Makefile.in.diff (1.1 KB) - added by Schamschula (Marius Schamschula) 11 years ago.
patch-hping3-Portfile.diff (1.8 KB) - added by jul_bsd@… 10 years ago.
patch-gethostname.c.diff (673 bytes) - added by jul_bsd@… 10 years ago.

Download all attachments as: .zip

Change History (24)

Changed 11 years ago by rr@…

Attachment: hping3 added

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

Description: modified (diff)
Owner: changed from macports-tickets@… to pmq@…
Port: hping3 added
Summary: Error: Processing of port hping3 failedhping3 @20051105_1: build fails: expected parameter declarator

comment:2 Changed 11 years ago by tryn@…

I ran into this with Homebrew, and it has to do with the new/default secure strlcpy/strlcat functions.

One option is to dive into the source and make it properly secure. Considering it hasn't been updated for eight years, I went with the second options.

Append this to the CFLAGS: "-D_FORTIFY_SOURCE=0".

comment:3 in reply to:  2 Changed 11 years ago by sck-nogas (Scott C. Kennedy)

Replying to tryn@…:

I ran into this with Homebrew, and it has to do with the new/default secure strlcpy/strlcat functions.

One option is to dive into the source and make it properly secure. Considering it hasn't been updated for eight years, I went with the second options.

Append this to the CFLAGS: "-D_FORTIFY_SOURCE=0".

Did the same, it worked for me.

comment:4 in reply to:  2 ; Changed 11 years ago by kvanrhee@…

Replying to tryn@…:

I ran into this with Homebrew, and it has to do with the new/default secure strlcpy/strlcat functions.

One option is to dive into the source and make it properly secure. Considering it hasn't been updated for eight years, I went with the second options.

Append this to the CFLAGS: "-D_FORTIFY_SOURCE=0".

Can you explain how I do this? Or give me hint to the right direction so I can figure it out myself? Thanks!

comment:5 Changed 11 years ago by Schamschula (Marius Schamschula)

Cc: mschamschula@… added

Cc Me!

comment:6 Changed 11 years ago by kvanrhee@…

Cc: kvanrhee@… added

Cc Me!

comment:7 Changed 11 years ago by schnide (Joe Schnide)

Cc: jschnide@… added

Cc Me!

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

Has duplicate #41336.

comment:9 in reply to:  4 ; Changed 11 years ago by meg_lao@…

Replying to kvanrhee@…:

Replying to tryn@…:

I ran into this with Homebrew, and it has to do with the new/default secure strlcpy/strlcat functions.

One option is to dive into the source and make it properly secure. Considering it hasn't been updated for eight years, I went with the second options.

Append this to the CFLAGS: "-D_FORTIFY_SOURCE=0".

Can you explain how I do this? Or give me hint to the right direction so I can figure it out myself? Thanks!

I edited the file /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_net_hping3/hping3/work/Makefile and change line

CCOPT= -O2 -Wall -DUSE_TCL

to

CCOPT= -O2 -Wall -DUSE_TCL -D_FORTIFY_SOURCE=0

That works for me.

Version 0, edited 11 years ago by meg_lao@… (next)

comment:10 Changed 11 years ago by vincent.passaro@…

Is there a fix in the works for this ticket?

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

Cc: joao.netto@… added

Has duplicate #42417.

comment:12 Changed 11 years ago by SickTeddyBear

Cc: amcgee@… added

Cc Me!

comment:13 in reply to:  9 Changed 11 years ago by macports@…

Replying to meg_lao@…:

Replying to kvanrhee@…:

Replying to tryn@…:

I ran into this with Homebrew, and it has to do with the new/default secure strlcpy/strlcat functions.

One option is to dive into the source and make it properly secure. Considering it hasn't been updated for eight years, I went with the second options.

Append this to the CFLAGS: "-D_FORTIFY_SOURCE=0".

Can you explain how I do this? Or give me hint to the right direction so I can figure it out myself? Thanks!

I edited the file /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_net_hping3/hping3/work/Makefile and change line

 CCOPT= -O2 -Wall   -DUSE_TCL

to

 CCOPT= -O2 -Wall   -DUSE_TCL -D_FORTIFY_SOURCE=0

That works for me.

Could you please provide any hint as to how to proceed with the installation of hping3? The Makefile mentioned in your post does not exist after a (failed) build on my system. So I'd like to know how to apply the fix and proceed with the installation thereafter. Thanks in advance!

comment:14 Changed 11 years ago by macports@…

Cc: macports@… added

Cc Me!

comment:15 Changed 11 years ago by Schamschula (Marius Schamschula)

I revisited hping3 this morning: I've updated the Portfile (no change, but moved livecheck to bottom), and added -D_FORTIFY_SOURCE=0 to patch-Makefile.in.diff. Both are attached.

Changed 11 years ago by Schamschula (Marius Schamschula)

Attachment: Portfile-hping3.diff added

Changed 11 years ago by Schamschula (Marius Schamschula)

Attachment: patch-Makefile.in.diff added

comment:16 in reply to:  15 Changed 11 years ago by macports@…

Replying to mschamschula@…:

I revisited hping3 this morning: I've updated the Portfile (no change, but moved livecheck to bottom), and added -D_FORTIFY_SOURCE=0 to patch-Makefile.in.diff. Both are attached.

When are the patched files expected to be available in the MacPorts SVN?

comment:17 Changed 10 years ago by jul_bsd@…

here a better way without disabling security function (which kind of boo for a security tool), just enclose strlcpy as Mavericks as it (same bug than for snort #42531)

also:

  • add mode line
  • reverse the no_tcl (similar to no_x11 #39383)
  • compiler issue (#41347)
  • universal variant

Changed 10 years ago by jul_bsd@…

Attachment: patch-hping3-Portfile.diff added

Changed 10 years ago by jul_bsd@…

Attachment: patch-gethostname.c.diff added

comment:18 Changed 10 years ago by mf2k (Frank Schima)

Owner: changed from pmq@… to normen@…

Assigning to new maintainer.

comment:19 Changed 10 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

Appears to have been committed in r120992, r120993. (Not sure why a second ticket was opened.)

Note: See TracTickets for help on using tickets.