Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 03-22-2010, 05:54 PM   #1
Senior Member
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.1
Posts: 1,255

Rep: Reputation: 188Reputation: 188
Can't compile tolua++ in slackware64-current

I'm trying to compile tolua++ so that i can use lua in conky 1.7.2, however I am running into a problem. tolua++ defaults to looking for lua 5.0 libraries and I have lua 5.1 installed since that is what conky requires. According to the README tolua++ can use lua-5.1 but I not sure how to configure tulua++ to use those libraries since it uses scons. Here is a what the README says...

Compiling for lua 5.1

Starting from version 1.0.8pre1, tolua++ can be compiled with both lua 5.0 and
5.1. Both versions will output the same code, and the C API (tolua++.h) is the

The build system is not yet ready to detect/decide when to compile for 5.1,
the easiest way right now is to add a file called '' on the root of
the package, with the following:


CCFLAGS = ['-I/usr/local/include/lua5.1', '-O2', '-ansi']
LIBPATH = ['/usr/local/lib']
LIBS = ['lua5.1', 'dl', 'm']
tolua_bin = 'tolua++5.1'
tolua_lib = 'tolua++5.1'
TOLUAPP = 'tolua++5.1'

## END

This will build the binary as 'tolua++5.1' and the library as 'libtolua++5.1.a'
(taken from tolua_bin and tolua_lib), and take the lua headers and libraries
from /usr/local/include/lua5.1 and /usr/local/lib. It will also link with
'-llua5.1'. Modify the parameters acording to your system.

I have ready but I still get this error during compile.

cc -o bin/tolua++_bootstrap src/bin/tolua.o src/bin/toluabind_default.o lib/libtolua++_static.a -Llib -llua50 -llualib50 -ldl -lm
/usr/lib64/gcc/x86_64-slackware-linux/4.4.3/../../../../x86_64-slackware-linux/bin/ld: cannot find -llua50
collect2: ld returned 1 exit status

Any help us appreciated thanks.
Old 03-23-2010, 08:04 AM   #2
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2015, Slack14.1 DebJessie, + 50+ other Linux OS, for test only.
Posts: 15,619

Rep: Reputation: 2990Reputation: 2990Reputation: 2990Reputation: 2990Reputation: 2990Reputation: 2990Reputation: 2990Reputation: 2990Reputation: 2990Reputation: 2990Reputation: 2990
cd tolua++-1.0.93/
grep -n lua50 ./*
> > , line 7, 8, 21
Line 7 is not the important one, but can be edited,
if the headers have an unusual location.
Line 8 : not used.

Line 21 : Please edit to ..
LIBS = ['lua', 'dl', 'm']

Will work, when your library name is : ( liblua.a ? )
e.g. > >

'lualib' is not present in Lua version 5.1.x .

There may be some hints in this thread, for compiling
Conky 1.7.2 with lua

Last edited by knudfl; 03-23-2010 at 08:17 AM.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I make PyQt4 slackbuild compile in Slackware64 <current>...? Alexvader Slackware 9 12-30-2009 07:45 AM
Slackware64-Current from USB? THCsphere Slackware - Installation 1 11-29-2009 03:36 AM
Updating from Slackware64-current to Slackware64 13. glore2002 Slackware 4 08-28-2009 06:50 PM
Slackware64-current on a second HD. glore2002 Slackware 7 08-23-2009 11:38 AM
help install slackware64-current christyler2009 Slackware 2 06-26-2009 11:31 AM

All times are GMT -5. The time now is 07:13 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration