Project

General

Profile

Actions

Bug #3066

closed

OSError in SConstruct on Alpine Linux

Added by elchenberg almost 4 years ago. Updated almost 4 years ago.

Status:
Fixed
Priority:
Normal
Category:
build_autotools
Target version:
ASK QUESTIONS IN Forums:
No

Description

Installing Lighttpd from source with SCons on Alpine Linux fails when SCons searches for the available Lua versions and Lua 5.4 is not installed:

Searching for lua: lua5.4 >= 5.0
Package lua5.4 was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua5.4.pc'
to the PKG_CONFIG_PATH environment variable
Package 'lua5.4', required by 'virtual:world', not found
AttributeError: 'OSError' object has no attribute 'message':
  File "/usr/local/src/lighttpd/SConstruct", line 586:
    if autoconf.CheckParseConfigForLib('LIBLUA', "pkg-config '" + lua_name + " >= 5.0' --cflags --libs"):
  File "/usr/local/src/lighttpd/SConstruct", line 150:
    if not self.CheckParseConfig(*args, **kw):
  File "/usr/local/src/lighttpd/SConstruct", line 144:
    print(e.message, file=sys.stderr)

You can use the attached Dockerfile to reproduce the error.

I don't know the cause of the OSError – I guess pkg-config behaves differently on Alpine Linux than on other operating systems – but with a simple patch (see attached sconstruct-oserror.patch) I was able to install Lighttpd successfully.

  • Lighttpd 1.4.58
  • SCons 3.1.2
  • Python 3.8.7
  • pkgconf 1.7.3
  • Alpine Linux 3.13
  • Lua 5.3
  • Docker 19.03.9

PS. Please feel free to use the patch.


Files

Dockerfile (544 Bytes) Dockerfile elchenberg, 2021-02-06 14:54
sconstruct-oserror.patch (250 Bytes) sconstruct-oserror.patch elchenberg, 2021-02-06 14:54
Actions #1

Updated by elchenberg almost 4 years ago

Sorry, I attached the Dockerfile that applies the patch. If you want to reproduce the error you need to remove or comment out lines 7-8.

#COPY sconstruct-oserror.patch sconstruct-oserror.patch
#RUN patch --strip=0 --input=sconstruct-oserror.patch
Actions #2

Updated by gstrauss almost 4 years ago

  • Category set to build_autotools
  • Status changed from New to Patch Pending
  • Target version changed from 1.4.x to 1.4.60

Thank you for the patch.

Actions #3

Updated by gstrauss almost 4 years ago

  • Status changed from Patch Pending to Fixed
Actions

Also available in: Atom