Bug #3110


RPM build fails at

Added by QL over 2 years ago. Updated over 2 years ago.

Target version:


Forgive my non-existent Perl knowledge, but numerous attempts at getting 1.4.59 and 1.4.60 to compile as an RPM resulted in failure at the stage when fired. The error message includes 'Bareword "POSIX::WNOHANG" not allowed'
To cut the long story short, adding:
use warnings;
to near the top of the file resolves this.
To be complete, I made the change and re-created the source tarball, after which lighty compiles beautifully. I notice that this is also the cause of newer versions on the OpenSUSE Build Service also failing.

I am reporting this here, because it is possible or likely that this is a fearfully wrong hack, and there is a better way of doing this. But if it is acceptable, or if there is a better way of avoiding this compilation error, is it possible to change the file? I'm not confident of the validity of either how general this problem is (ie, is it only an OpenSUSE problem?) or the validity of the change I made, as I still use training wheels when compiling RPMs.


Actions #1

Updated by gstrauss over 2 years ago

  • Status changed from New to Patch Pending
  • Target version changed from 1.4.xx to 1.4.61

Fedora has no problem building RPMs for lighttpd 1.4.60 (or lighttpd 1.4.59).

Test packages for OpenSuse appear to be built for lighttpd 1.4.59:

Please try using POSIX::WNOHANG() (with parenthesis):

                require POSIX;
                if (0 != waitpid($child, POSIX::WNOHANG())) {

'require' is a runtime command in Perl and ought to have worked even with very old versions of Perl, but the POSIX module is special and may not have autovivified (resolved) WNOHANG.
perldoc -f require
perldoc -f waitpid

Actions #2

Updated by gstrauss over 2 years ago

  • Status changed from Patch Pending to Fixed
Actions #3

Updated by QL over 2 years ago

Thanks for this. I was aware of that openSUSE OBS option, but that was failing to build until recently. But the biggest issue is that that build only produces x86_64 packages, when I need aarm64, which is why was building it myself. I can see if I can find the changes the build owner used to get a successful job. Oh, and one big difference - the build repo at is for Debian and Ubuntu, not openSUSE, so that may make a difference. (The OBS service is not restricted to openSUSE packages).
Meanwhile, I made the change recommended, and the compile did indeed get further, but it resulted in another, different test error:

./core-condition.t .. Bareword "Fcntl::F_SETFD" not allowed while "strict subs" in use at line 216.

This was with 1.4.60. Again, apologies, as I feel rather pathetic, but I don't even know where to start trying to track that down in perl. OpenSUSE Leap 15.3 runs Perl 5.26.1. for info.

Actions #4

Updated by gstrauss over 2 years ago

Similar to the above, try Fcntl::F_SETFD()

Actions #5

Updated by QL over 2 years ago

Thanks for your patience, and again, it pains me that my knowledge of Perl is too little to understand this. I tried altering line 216 as suggested, but it still fails, but this time with a syntax error:

./core-condition.t .. syntax error at line 216, near ");" 

I then noticed the structure of the previous statement, and wondered whether the initial "fcntl" of line 216 needed to be capitalised. Unfortunately, this makes no difference. I have tried several variations of the lines below, but as I say, I have no clue what I'm doing. I realise this is almost certainly frustrating to a programmer, but that I am not.

require Fcntl;
Fcntl($SOCK, Fcntl::F_SETFD(); # clr FD_CLOEXEC


Actions #6

Updated by gstrauss over 2 years ago

Yeah, it is really painful to deal with this, too. You're being sloppy with your editing. Adding the (), it appears you deleted the last argument
What you posted: Fcntl($SOCK, Fcntl::F_SETFD(); # clr FD_CLOEXEC

-                       fcntl($SOCK, Fcntl::F_SETFD, 0); # clr FD_CLOEXEC
+                       fcntl($SOCK, Fcntl::F_SETFD(), 0); # clr FD_CLOEXEC

Actions #7

Updated by QL over 2 years ago

Thanks so much, that now compiles and generates an installable OpenSUSE rpm perfectly. Thanks, too, for your patience with one who has long not been able to get his head around perl.

Best wishes


Also available in: Atom