View Issue Details

IDProjectCategoryView StatusLast Update
0002161FSSCPBuild systempublic2010-05-19 04:56
Reportereigenlambda Assigned Toiss_mneur  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Summary0002161: Lua package wrong for pkg-config in configure.ac in current svn
DescriptionIn configure.ac:
dnl LUA
PKG_CHECK_MODULES([LUA], [lua >= 5.1.3])
D_CFLAGS=$D_CFLAGS" $LUA_CFLAGS"
FS2_LDFLAGS=$FS2_LDFLAGS" $LUA_LIBS"

This breaks on Ubuntu Karmic (9.10). The problem is it's looking in pkg-config for a 'lua' package, but in current Ubuntu (and probably Debian) pkg-config calls it 'lua5.1'. If you have an Ubuntu machine handy, try

$ pkg-config --modversion lua
$ pkg-config --modversion lua5.1

I suppose somewhere Debian has a policy that libraries or programming languages need to have pkg-config names like that, to facilitate having multiple versions at the same time.

To work around,
export LUA_CFLAGS=`pkg-config --cflags lua5.1`
export LUA_LIBS=`pkg-config --libs lua5.1`

Additionally, this webpage:
http://www.hard-light.net/wiki/index.php/Fs2_open_on_Linux/Installing_the_Development_Libraries
doesn't list liblua5.1-0-dev as a build-dep.
TagsNo tags attached.

Activities

2010-03-25 06:12

 

2161_fix.patch (532 bytes)   
Index: configure.ac
===================================================================
--- configure.ac	(revision 6028)
+++ configure.ac	(working copy)
@@ -397,7 +397,12 @@
 FS2_LDFLAGS=$FS2_LDFLAGS" $PNG_LIBS"
 
 dnl LUA
-PKG_CHECK_MODULES([LUA], [lua >= 5.1.3])
+## Checking for lua.pc and if that fails lua5.1.pc
+PKG_CHECK_MODULES(
+	[LUA],
+	[lua >= 5.1.3],
+	[], ## do nothing special
+	[PKG_CHECK_MODULES([LUA], [lua5.1 >= 5.1.3], [])])
 D_CFLAGS=$D_CFLAGS" $LUA_CFLAGS"
 FS2_LDFLAGS=$FS2_LDFLAGS" $LUA_LIBS"
2161_fix.patch (532 bytes)   

iss_mneur

2010-03-25 06:21

developer   ~0011830

I have attached a patch that will fix the issue on platforms that use either lua or lua5.1 in pkg-config.

Also have added liblua to the overview and the specific instructions for Ubuntu/Debian.

Goober5000

2010-03-31 05:32

administrator   ~0011845

Last edited: 2010-03-31 05:35

Patch added to SVN.

EDIT: But only trunk. It doesn't seem to match what's in 3.6.12.

iss_mneur

2010-03-31 14:45

developer   ~0011847

It is only trunk that has this issue because we are now using the platform lua package for trunk but 3.6.12 is still using the lua that is included in the repo.

chief1983

2010-03-31 15:04

administrator   ~0011848

Right I just remembered after posting in the forum thread, Taylor's changes for that weren't committed to 3.6.12, and probably shouldn't be. So just putting this in trunk is fine.

Goober5000

2010-05-19 04:56

administrator   ~0011975

Marking as fixed since patch has been committed.

Issue History

Date Modified Username Field Change
2010-03-24 06:26 eigenlambda New Issue
2010-03-24 06:26 eigenlambda Status new => assigned
2010-03-24 06:26 eigenlambda Assigned To => chief1983
2010-03-25 06:12 iss_mneur File Added: 2161_fix.patch
2010-03-25 06:21 iss_mneur Note Added: 0011830
2010-03-31 05:32 Goober5000 Note Added: 0011845
2010-03-31 05:35 Goober5000 Note Edited: 0011845
2010-03-31 14:45 iss_mneur Note Added: 0011847
2010-03-31 15:04 chief1983 Note Added: 0011848
2010-05-19 04:56 Goober5000 Note Added: 0011975
2010-05-19 04:56 Goober5000 Assigned To chief1983 => iss_mneur
2010-05-19 04:56 Goober5000 Status assigned => resolved
2010-05-19 04:56 Goober5000 Resolution open => fixed