Does "lua5.1_5.1.4.orig.tar.gz" provide the source packages (to compile) for both lua5.1 & liblua5.1-0-dev ?

Asked by kman

Does "lua5.1_5.1.4.orig.tar.gz" provide the source packages to compile for lua5.1 & liblua5.1-0-dev ?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu lua5.1 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
kman (kman-devnull) said :
#1

The main issue that i am having is - I have taken lua5.1_5.1.4.orig.tar.gz and compiled it. All is ok. But,when I run my application it complains saying ...

Error:
>> cannot find -llua5.1

So, I am presuming it is looking for a .so file - because when I make & install the "lua5.1_5.1.4.orig.tar.gz", it only generates "liblua.a"

Revision history for this message
Manfred Hampl (m-hampl) said :
#2

If you use only the <packagename>.orig.tar.gz without the <packagename>.debian.tar.gz file, you are missing all Ubuntu specific modifications of the package.

I assume that this is the case that your build process has put the liblua5.1.so file somewhere else, where the linker does not find it (probably below /opt)

What is the output of

uname -a
lsb_release -crid
sudo updatedb
locate liblua5.1

Revision history for this message
kman (kman-devnull) said :
#3

>> uname -a
Linux WR-IntelligentDevice 3.4.91-grsec-WR5.0.1.24_standard_IDP-XT_2.0.4 #3 SMP PREEMPT Mon Jul 20 11:54:40 BST 2015 i686 GNU/Linux
It is WindRiver linux m/c.

>> lsb_release -crid
command not found

>> locate liblua5.1
does not locate it.

 liblua5.1.so has not been generated. That is the main issue. Not that it is 'somewhere on the m/c'. I have tried all of the below packages - but none of the generate liblua5.1.so
1. lua-5.1
2. lua-5.1.4
3. lua-5.1.5

To double confirm - I have even, copied the liblua5.1.so to the WR m/c - /usr/local/lib, and the problem goes away.

Ideally if I could do "apt-get install lua5.1 liblua5.1-0-dev" on my WR m/c my problems would go away - but WR does not support apt-get or rpm. So, I have to compile from source.

So, if you can tell me the source package that can generate liblua5.1.so, that would be much appreciated.

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

This is a support area for Ubuntu. we cannot help with other operating systems.

Maybe you can find helpful information on the lua home page http://www.lua.org/

Revision history for this message
kman (kman-devnull) said :
#5

Oh! I must clarified in my earlier email.

This happens on UBUNTU as well. Here are my ubuntu m/c details.
>> Linux Latitude-E6500 3.13.0-32-generic #57~precise1-Ubuntu SMP Tue Jul 15 03:50:54 UTC 2014 i686 i686 i386 GNU/Linux

Here are the steps:
1. Don't use ""apt-get install lua5.1 liblua5.1-0-dev""
2. Take any of the below packages:
2.1. lua-5.1
2.2. lua-5.1.4
2.3. lua-5.1.5
3. Execute the below commands
    3.1 'make linux' & then 'make install' -OR - in a single step "make linux install"
4. You will find, that it does not generate "liblua5.1.so". It only generates "liblua.a"

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

Why do you want to build the package yourself if liblua5.1-0-dev contains the .so file?

Please repeat the commands

uname -a
lsb_release -crid
sudo updatedb
locate liblua5.1

on your Ubuntu system and copy/paste the output that we can see it.

Revision history for this message
kman (kman-devnull) said :
#7

>> Why do you want to build the package yourself if liblua5.1-0-dev contains the .so file?
I use my ubuntu as my development workstation for wr-linux. As as some of these packages need to be cross-compiled on ubuntu. But, more specifically in this package source (lua-5.1), even before moving on to cross-compiling, I am seeing the basic compiling the source on ubuntu doesn't generate liblua5.1.so -( which means - the same will happen when I cross compile for wr-linux). Hence, I need your assistance, in identifying the ubuntu source package for lua5.1 which generates liblua5.1.so. That is the root cause of the issue.

Details that you requested:
>> uname -a
Linux krish-Latitude-E6500 3.13.0-32-generic #57~precise1-Ubuntu SMP Tue Jul 15 03:50:54 UTC 2014 i686 i686 i386 GNU/Linux

>>>lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise

>> sudo updatedb
Done.

>> locate liblua5.1
No output - because I have deleted all the previous source packages that I had downloaded. As none of them were generating liblua5.1.so.

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

For compiling packages on Ubuntu, where the standard Ubuntu source, you better do not use 'make (target)', but use the Ubuntu/Debian tools like apt-get source and dpkg-buildpackage and similar programs.

These tools honor the <packagename>.debian.tar.gz file with the Debian/Ubuntu modification.
Most probably the instruction that liblua5.1.so(.0.0.0) has to be created, file is part of that addition.

(According to the man pages there is the possibility to use a command like "apt-get source --compile --host-architecture=arch", but I have never used something like that.)

Looking in the contents of the Ubuntu packages I see
in the package liblua5.1-0_*.deb
/usr/lib/i386-linux-gnu/liblua5.1.so.0.0.0 (the real file!)
/usr/lib/i386-linux-gnu/liblua5.1.so.0 as link to liblua5.1.so.0.0.0
and
in the package liblua5.1-0-dev_*.deb:
/usr/lib/i386-linux-gnu/liblua5.1.so as link to liblua5.1.so.0.0.0
(respectively /usr/lib/x86_64-linux-gnu/liblua5.1.so* for amd64 architecture or /usr/lib/arm-linux-gnueabihf/liblua5.1.so* for armhf, etc.)

The buildlog for the Ubuntu packages of lua5.1 source shows that the .so files are built from this source, so it must be some configuration problem or wrong compile command if these files are not built on your system.

Revision history for this message
kman (kman-devnull) said :
#9

I can see your point there.

But, you are kind of side stepping the issue... (let me explain..)

For example the package https://launchpad.net/ubuntu/+source/lua5.1/5.1.5-4 , allows you to download tar.gz file (lua5.1_5.1.5.orig.tar.gz).

README Text file clearly states how to build for linux systems. So, it states you have to use, 'make linux' . But when you use, that it doesn't generate .so file.

Can you please stay the course, and explain why the above doesn't work in first place, before taking another route ('apt-get'..)

Revision history for this message
Manfred Hampl (m-hampl) said :
#10

If you are using only the orig.tar.gz file but not the Ubuntu/Debian additions, then you have to ask the provider of the original source (I assume http://www.lua.org/ ) how to configure the build process that the .so file is provided.

I know that the Ubuntu additions modify among others Makefile, src/Makefile and /src/luaconf.h , and as far as I know the command executed during build on Ubuntu is "make debian_all"

Revision history for this message
kman (kman-devnull) said :
#11

>> I know that the Ubuntu additions modify among others Makefile, src/Makefile and /src/luaconf.h , and

Can you provide me with this package which has these Makefile changes, may be I will find something useful....

thanks!

Revision history for this message
Manfred Hampl (m-hampl) said :
#12

It is on the same page https://launchpad.net/ubuntu/+source/lua5.1/5.1.5-4 named lua5.1_5.1.5-4.debian.tar.gz, but it is handled by the Ubuntu packaging commands like apt-get:

I just tried on a test system the following commands:

mkdir src
cd src
sudo apt-get build-dep lua5.1
apt-get source --compile lua5.1

and I get among others the following files:
/home/test/src/lua5.1-5.1.5/src/.libs/liblua5.1.a
/home/test/src/lua5.1-5.1.5/src/.libs/liblua5.1.la
/home/test/src/lua5.1-5.1.5/src/.libs/liblua5.1.lai
/home/test/src/lua5.1-5.1.5/src/.libs/liblua5.1.so
/home/test/src/lua5.1-5.1.5/src/.libs/liblua5.1.so.0
/home/test/src/lua5.1-5.1.5/src/.libs/liblua5.1.so.0.0.0
/home/test/src/lua5.1-5.1.5/debian/tmp/usr/lib/i386-linux-gnu/liblua5.1.a
/home/test/src/lua5.1-5.1.5/debian/tmp/usr/lib/i386-linux-gnu/liblua5.1.la
/home/test/src/lua5.1-5.1.5/debian/tmp/usr/lib/i386-linux-gnu/liblua5.1.so
/home/test/src/lua5.1-5.1.5/debian/tmp/usr/lib/i386-linux-gnu/liblua5.1.so.0
/home/test/src/lua5.1-5.1.5/debian/tmp/usr/lib/i386-linux-gnu/liblua5.1.so.0.0.0

(remark, the apt-get build-dep command downloaded and installed 10 packages like debhelper and readline)

Can you help with this problem?

Provide an answer of your own, or ask kman for more information if necessary.

To post a message you must log in.