Opened 11 years ago

Last modified 3 years ago

#41875 assigned defect

slirp @1.0.17: ror: second parameter of 'main' (argument array) must be of type 'char **'

Reported by: pengyu.ut@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: cooljeanius (Eric Gallager)
Port: slirp

Description

I get the following error when I install slirp. Does anybody know how to fix the problem? Thanks.

~$ sudo port install slirp
--->  Building slirp
Error: org.macports.build for port slirp returned: command execution failed
Please see the log file for port slirp for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_comms_slirp/slirp/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port slirp failed

Attachments (1)

slirp.log (61.0 KB) - added by pengyu.ut@… 11 years ago.
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_comms_slirp/slirp/main.log

Download all attachments as: .zip

Change History (5)

comment:1 Changed 11 years ago by larryv (Lawrence Velázquez)

Port: slirp added

Please clean, try again, and attach the complete main.log if it fails.

Changed 11 years ago by pengyu.ut@…

Attachment: slirp.log added

/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_comms_slirp/slirp/main.log

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

Owner: changed from macports-tickets@… to ryandesign@…
Status: newassigned
Summary: slirp installation errorslirp @1.0.17: ror: second parameter of 'main' (argument array) must be of type 'char **'

The log says:

:info:build ./main.p:1:5: error: second parameter of 'main' (argument array) must be of type 'char **'
:info:build int main _P((int, char));
:info:build     ^

In fact the first line of ./main.p after extracting the tarball is correct:

int main _P((int, char **));

However the first thing the build does is to regenerate the .p files using a perl script called mkpro, e.g.:

ccache /usr/bin/clang -E -I. -I. -DUSE_PPP -DUSE_MS_DNS  -DUSE_PPP -pipe -Os -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -arch x86_64 main.c | /opt/local/bin/perl ./mkpro > main.p.bak && mv -f main.p.bak main.p

After this, the first line of main.p is the incorrect version that the error mentions:

int main _P((int, char));

Debian noticed this problem too. They supposed that the mkpro perl script used to work, but that a recent version of perl broke it. On this hunch, since the default variant of the perl5 port is currently perl5_12, I reinstalled it with the perl5_8 variant, and mkpro succeeded and the build continued, though failing later on for other reasons.

Debian patched the Makefile to not run mkpro at all, since its purpose seems to be to regenerate the .p files, presumably to aid development, but slirp hasn't been under development for years. However there is a difference in the .p files before and after mkpro runs. I'll attach that diff here, then continue testing to see if this difference is important and to see if I can fix the later build failure.

comment:3 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:4 Changed 3 years ago by cooljeanius (Eric Gallager)

So, there are now additional errors when trying to build slirp besides this one... should I open a separate bug, or can we just reuse this one?

Note: See TracTickets for help on using tickets.