LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-22-2010, 05:54 PM   #1
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,683

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
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
same.

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 'custom.py' on the root of
the package, with the following:

## BEGIN custom.py

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 custom.py

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 custom.py 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
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
cd tolua++-1.0.93/
grep -n lua50 ./*
> > config_linux.py , 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.so ( liblua.a ? )
e.g. http://www.slacky.eu/ > >
http://repository.slacky.eu/slackwar...4-i486-5as.txz

'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
http://www.linuxquestions.org/questi...-found-795139/
.....

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


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:28 AM.

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