Compile error on Debian Etch

56 views
Skip to first unread message

dave

unread,
Nov 5, 2009, 1:37:56 AM11/5/09
to beanstalk-talk
I've got a slightly retro production environment (debian etch) and
have hit a compile error as follows:

~/kr-beanstalkd-ee15c12# make
make all-am
make[1]: Entering directory `/root/kr-beanstalkd-ee15c12'
gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -Werror -I/usr/local/include
-c -o binlog.o binlog.c
cc1: warnings being treated as errors
binlog.c: In function ‘binlog_open’:
binlog.c:351: warning: implicit declaration of function
‘posix_fallocate’
make[1]: *** [binlog.o] Error 1
make[1]: Leaving directory `/root/kr-beanstalkd-ee15c12'
make: *** [all] Error 2

That said posix_fallocate is clearly present in /usr/include/fcntl.h
so I'm not sure why this is happening.

I also note that if I try using a different include path (to where I
know fcntl.h is located) I still get the same error:

~/kr-beanstalkd-ee15c12# gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -
Werror -I/usr/include -c -o binlog.o binlog.c
cc1: warnings being treated as errors
binlog.c: In function ‘binlog_open’:
binlog.c:351: warning: implicit declaration of function
‘posix_fallocate’

any ideas ?

Ryan Downing

unread,
Nov 17, 2009, 3:01:57 PM11/17/09
to beanstalk-talk
I'm having this same issue on RHEL 4 server. Were you able to find a
solution?

On Nov 4, 10:37 pm, dave <dave.l.harri...@gmail.com> wrote:
> I've got a slightly retro production environment (debian etch) and
> have hit a compile error as follows:
>
> ~/kr-beanstalkd-ee15c12# make
> make  all-am
> make[1]: Entering directory `/root/kr-beanstalkd-ee15c12'
> gcc -DHAVE_CONFIG_H -I.     -g -O2  -Wall -Werror -I/usr/local/include
> -c -o binlog.o binlog.c
> cc1: warnings being treated as errors
> binlog.c: In function ‘binlog_open’:
> binlog.c:351: warning: implicit declaration of function
> ‘posix_fallocate’
> make[1]: *** [binlog.o] Error 1
> make[1]: Leaving directory `/root/kr-beanstalkd-ee15c12'
> make: *** [all] Error 2
>
> That saidposix_fallocateis clearly present in /usr/include/fcntl.h

David Harrison

unread,
Nov 17, 2009, 11:47:25 PM11/17/09
to beansta...@googlegroups.com
I'm still looking into it.. however:

At the point of failure :

# make
make all-am
make[1]: Entering directory `/root/beanstalkd-1.4.2'
gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -Werror -I/usr/local/include
-c -o beanstalkd.o beanstalkd.c
gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -Werror -I/usr/local/include
-c -o binlog.o binlog.c
cc1: warnings being treated as errors
binlog.c: In function ‘binlog_open’:
binlog.c:351: warning: implicit declaration of function ‘posix_fallocate’
make[1]: *** [binlog.o] Error 1
make[1]: Leaving directory `/root/beanstalkd-1.4.2'
make: *** [all] Error 2

I note that the following can then be used to compile `binlog.o`:

# gcc -DHAVE_CONFIG_H -I. -g -O2 -I/usr/local/include -c -o binlog.o binlog.c

I can then run `make` again to complete the build successfully, and
the resulting beanstalkd _appears_ to work.

This comes with a massive 'watch out' and YMMV. While it seems like
the failure might be spurious, I'm not yet satisfied that the
resulting build is fully functional.

2009/11/18 Ryan Downing <ryan.p....@gmail.com>:
> --
>
> You received this message because you are subscribed to the Google Groups "beanstalk-talk" group.
> To post to this group, send email to beansta...@googlegroups.com.
> To unsubscribe from this group, send email to beanstalk-tal...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/beanstalk-talk?hl=.
>
>
>

Ryan Downing

unread,
Nov 18, 2009, 12:45:40 PM11/18/09
to beanstalk-talk
Hey Dave,

Thanks for the update. I went ahead and tried an install on one our
newer servers running RHEL 5 and everything worked fine so I'll likely
just upgrade the other server as it's something that's been on our
list to do anyhow. Good luck with this one!

On Nov 17, 8:47 pm, David Harrison <dave.l.harri...@gmail.com> wrote:
> I'm still looking into it.. however:
>
> At the point of failure :
>
> # make
> make  all-am
> make[1]: Entering directory `/root/beanstalkd-1.4.2'
> gcc -DHAVE_CONFIG_H -I.     -g -O2  -Wall -Werror -I/usr/local/include
> -c -o beanstalkd.o beanstalkd.c
> gcc -DHAVE_CONFIG_H -I.     -g -O2  -Wall -Werror -I/usr/local/include
> -c -o binlog.o binlog.c
> cc1: warnings being treated as errors
> binlog.c: In function ‘binlog_open’:
> binlog.c:351: warning: implicit declaration of function ‘posix_fallocate’
> make[1]: *** [binlog.o] Error 1
> make[1]: Leaving directory `/root/beanstalkd-1.4.2'
> make: *** [all] Error 2
>
> I note that the following can then be used to compile `binlog.o`:
>
> # gcc -DHAVE_CONFIG_H -I. -g -O2 -I/usr/local/include -c -o binlog.o binlog.c
>
> I can then run `make` again to complete the build successfully, and
> the resulting beanstalkd _appears_ to work.
>
> This comes with a massive 'watch out' and YMMV.  While it seems like
> the failure might be spurious, I'm not yet satisfied that the
> resulting build is fully functional.
>
> 2009/11/18 Ryan Downing <ryan.p.down...@gmail.com>:

Keith Rarick

unread,
Nov 28, 2009, 6:01:36 AM11/28/09
to beansta...@googlegroups.com
On Tue, Nov 17, 2009 at 8:47 PM, David Harrison
<dave.l....@gmail.com> wrote:
> I'm still looking into it.. however:
>
> At the point of failure :
> ...

This looks like maybe posix_fallocate is defined in a different header
file. Can you give me the #includes from "man posix_fallocate" on
Etch?

> I note that the following can then be used to compile `binlog.o`:
>
> # gcc -DHAVE_CONFIG_H -I. -g -O2 -I/usr/local/include -c -o binlog.o binlog.c

This is an okay workaround. Undeclared functions implicitly have a
return type of int, which happens to be correct here.

> I can then run `make` again to complete the build successfully, and
> the resulting beanstalkd _appears_ to work.
>
> This comes with a massive 'watch out' and YMMV.  While it seems like
> the failure might be spurious, I'm not yet satisfied that the
> resulting build is fully functional.

It is probably fine. You can test it with "make check", as long as
netcat feels like playing nice.

kr
Reply all
Reply to author
Forward
0 new messages