Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#31463 closed defect (fixed)

beanstalkd build failure in stdio.h, upstream fix available

Reported by: marcus@… Owned by: nick@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: haspatch Cc:
Port: beanstalkd

Description

When I try to install beanstalkd from latest macports on OS 10.7.1, I get this error:

:info:build make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_beanstalkd/beanstalkd/work/beanstalkd-1.4.6'
:info:build /Developer/usr/bin/llvm-gcc-4.2 -DHAVE_CONFIG_H -I.   -I/opt/local/include  -O2 -arch x86_64  -Wall -Werror -I/opt/local/include/libevent1 -c -o tube.o tube.c
:info:build In file included from /opt/local/include/event2/event.h:195,
:info:build                  from /opt/local/include/event.h:71,
:info:build                  from conn.h:23,
:info:build                  from prot.h:22,
:info:build                  from tube.c:25:
:info:build /usr/include/stdio.h:446: error: expected identifier or ‘(’ before ‘void’
:info:build /usr/include/stdio.h:446: error: expected ‘)’ before numeric constant
:info:build make[1]: *** [tube.o] Error 1
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_beanstalkd/beanstalkd/work/beanstalkd-1.4.6'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_beanstalkd/beanstalkd/work/beanstalkd-1.4.6'
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_beanstalkd/beanstalkd/work/beanstalkd-1.4.6" && /usr/bin/make -j8 -w all " returned error 2
:error:build Target org.macports.build returned: shell command failed (see log for details)
:debug:build Backtrace: shell command failed (see log for details)
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for beanstalkd): org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Log for beanstalkd is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_beanstalkd/beanstalkd/main.log

It looks like the error is in /usr/include/stdio.h rather than beanstalkd, however I've just rebuilt 538 ports (for Lion) without a single error, many of which will be using stdio.h, so I'm inclined to think it's how beanstalkd is using it.

I've seen an identical report from someone building beanstalkd via homebrew, suggesting it's down to beanstalk itself and not the build system.

Further searches led me to this discussion and an upstream fix in beanstalk, which I guess we don't have in macports. Can we have it please?

Attachments (1)

beanstalkd.diff (5.8 KB) - added by ryandesign (Ryan Carsten Schmidt) 13 years ago.
proposed patch

Download all attachments as: .zip

Change History (7)

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

Owner: changed from macports-tickets@… to nick@…

Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: beanstalkd.diff added

proposed patch

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

Keywords: haspatch added

comment:3 Changed 13 years ago by marcus@…

Thanks for the patch. I couldn't get it to patch cleanly using patch, but it sort-of worked with git apply. Even then, it created patch-dprint.diff at the same level as the Portfile instead of in the files folder, and failed to patch patch-configure.diff. I did this:

cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/sysutils/beanstalkd
wget http://trac.macports.org/raw-attachment/ticket/31463/beanstalkd.diff
git apply beanstalkd.diff

Is this the result of a clash between diff formats?

Once I'd fixed things manually, beanstalkd built and installed perfectly, so thanks for that.

comment:4 Changed 12 years ago by sky.31338@…

It must have been made with SVN, and the following command applies it pretty smoothly:

patch -p0 -i beanstalkd.diff

comment:5 Changed 12 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

comment:6 Changed 12 years ago by marcus@…

Thanks

Note: See TracTickets for help on using tickets.