loosing my mind with ./configure and lua

*nix specific usage questions
vanderlay
Blank Cone
Blank Cone
Posts: 14
Joined: 30 Dec 2011 04:55

loosing my mind with ./configure and lua

Postby vanderlay » 02 Jan 2012 13:09

Hi All,

Please help me after trying to get a compile for 1.1.11/13 for three days on a deb amd86 squeeze.

I have lua compiled @
lua: /usr/local/bin/lua /usr/local/lib/lua

so I added via cmd
export PKG_CONFIG_PATH=/usr/local/lib/lua,/usr/local/bin/lua
then added to ./configure
--with-lua-path=/usr/local/lib/lua

it repotrs uknown --with-lua-path, does the rest of ./configure
I run make and it then says it cant find it????

HAVE MERCY .... HELP ME PLEASE
Art

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: loosing my mind with ./configure and lua

Postby Jean-Baptiste Kempf » 02 Jan 2012 14:34

Why not using lua from squeeze?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

mynameisjuanito
New Cone
New Cone
Posts: 8
Joined: 02 Jan 2012 10:58

Re: loosing my mind with ./configure and lua

Postby mynameisjuanito » 02 Jan 2012 16:15

It might be worth checking you have the lua dev files installed - I seem to remember that when I compiled lua, it did not install the headers, pc file, etc by default...

vanderlay
Blank Cone
Blank Cone
Posts: 14
Joined: 30 Dec 2011 04:55

Re: loosing my mind with ./configure and lua

Postby vanderlay » 02 Jan 2012 23:59

Thx for the the thoughts,

1. I did try with the defualt lua, howevere that failed saying not high enough version,
2. So then after reading some of the posts here tried to do an apt-get on lua & lua dev (tried a lot of combinations of liblua-dev but non were found). So I DL source from lua but found no dev files.

Can you explain how the reference to include source build files works? Like I said I have tried endless ways of using the --with-xxx-path= and all seem to fail. ie: I tried to include the ffmpeg compilled (xuggler) with --enable-ffmpeg and the ./configure returnes unknown option. tried --enable-ffmpeg=/home/....., --enable-ffmpeg-with=/home/..... , --enable-ffmpeg=/home/..... --with-ffmpeg-path=/home/....


What am I missing?

thx
Art

vanderlay
Blank Cone
Blank Cone
Posts: 14
Joined: 30 Dec 2011 04:55

Re: loosing my mind with ./configure and lua

Postby vanderlay » 03 Jan 2012 23:41

IS there anybody who can explain how to include a source directory :?:

mynameisjuanito
New Cone
New Cone
Posts: 8
Joined: 02 Jan 2012 10:58

Re: loosing my mind with ./configure and lua

Postby mynameisjuanito » 04 Jan 2012 06:28

Not an answer to your question I know, but why not compile and install lua separately and then compile vlc against it?

This worked fine for me with the latest stable vlc.

vanderlay
Blank Cone
Blank Cone
Posts: 14
Joined: 30 Dec 2011 04:55

Re: loosing my mind with ./configure and lua

Postby vanderlay » 04 Jan 2012 08:40

thx Juanito,

What ver of lua did you use?
I can find no liblua-dev packagae - can you advise where I may find one if that is the issue

my build order

lua
1. install lua from source
a. http://www.lua.org/ftp/#source
b. tar xvzf lua-5.2.0.tar.gz
c. cd lua-5.2.0
i. make linux
ii. make install
iii. checkinstall
d. confirm >> # lua
Lua 5.2.0 Copyright (C) 1994-2011 Lua.org, PUC-Rio

vlc 1.1.11
vlc-1.1.11.tar.bz2
./configure --enable-lua

vlc-config
lua)
cflags="${cflags} "
libs="${libs} -llua -ldl -lm"

make
ends in error
Making all in lua
make[5]: Entering directory `/home/x264/vlc-1.1.11/modules/misc/lua'
make all-am
make[6]: Entering directory `/home/x264/vlc-1.1.11/modules/misc/lua'
CC liblua_plugin_la-extension.lo
extension.c: In function 'GetMenuEntries':
extension.c:685: error: implicit declaration of function 'lua_objlen'
extension.c: In function 'GetLuaState':
extension.c:752: error: implicit declaration of function 'luaL_register'
make[6]: *** [liblua_plugin_la-extension.lo] Error 1
make[6]: Leaving directory `/home/x264/vlc-1.1.11/modules/misc/lua'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/home/x264/vlc-1.1.11/modules/misc/lua'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/x264/vlc-1.1.11/modules/misc'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/x264/vlc-1.1.11/modules/misc'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/x264/vlc-1.1.11/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/x264/vlc-1.1.11'
make: *** [all] Error 2

mynameisjuanito
New Cone
New Cone
Posts: 8
Joined: 02 Jan 2012 10:58

Re: loosing my mind with ./configure and lua

Postby mynameisjuanito » 04 Jan 2012 11:17

I used lua-5.1.4 - from my notes, it looks as though shared libs are not made by default and you need to edit the Makefile as per the patch below.

This might not be the case with lua-5.2, but here's the patch anyway

Code: Select all

------- start of patch --------- diff -ur lua-5.1.orig/src/Makefile lua-5.1/src/Makefile --- lua-5.1.orig/src/Makefile 2006-03-21 11:51:53.000000000 +0100 +++ lua-5.1/src/Makefile 2006-03-21 11:52:09.000000000 +0100 @@ -23,6 +23,7 @@ PLATS= aix ansi bsd generic linux macosx mingw posix solaris LUA_A= liblua.a +LUA_SO= liblua.so CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \ lundump.o lvm.o lzio.o @@ -36,7 +37,7 @@ LUAC_O= luac.o print.o ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) -ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) +ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T) ALL_A= $(LUA_A) default: $(PLAT) @@ -51,6 +52,10 @@ $(AR) $@ $? $(RANLIB) $@ +$(LUA_SO): $(CORE_O) $(LIB_O) + $(CC) -shared -ldl -Wl,-soname,liblua.so -o $@.5.1 $? $(MYLDFLAGS) + ln -s $@.5.1 $@ + $(LUA_T): $(LUA_O) $(LUA_A) $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) ----- end of patch ----
and add -fPIC to CFLAGS.

This probably also means the headers/pkgconfig file are not installed by default and you would need to copy the following from the compiled source to your file system:

Code: Select all

/usr/local/include/lauxlib.h /usr/local/include/lua.h /usr/local/include/lua.hpp /usr/local/include/luaconf.h /usr/local/include/lualib.h /usr/local/lib/pkgconfig/lua.pc

vanderlay
Blank Cone
Blank Cone
Posts: 14
Joined: 30 Dec 2011 04:55

Re: loosing my mind with ./configure and lua

Postby vanderlay » 04 Jan 2012 12:10

excellent I shall give it a try with your suggestions.

While I'm at it I would like to tweak the ./configure, what are the suggestions for --enable & --diable for a server with no gui

thx for your help and time
Art

vanderlay
Blank Cone
Blank Cone
Posts: 14
Joined: 30 Dec 2011 04:55

Re: loosing my mind with ./configure and lua

Postby vanderlay » 04 Jan 2012 12:54

hit a minor snag with the patch, I have never done this before so tried

Code: Select all

#patch -u Makefile makepatch patching file Makefile Hunk #1 FAILED at 23. Hunk #2 FAILED at 36. Hunk #3 FAILED at 51. patch unexpectedly ends in middle of line 3 out of 3 hunks FAILED -- saving rejects to file Makefile.rej patch unexpectedly ends in middle of line
I had a few malformed errors on the original copied code so indented to

Code: Select all

------- start of patch --------- diff -ur lua-5.1.orig/src/Makefile lua-5.1/src/Makefile --- lua-5.1.orig/src/Makefile 2006-03-21 11:51:53.000000000 +0100 +++ lua-5.1/src/Makefile 2006-03-21 11:52:09.000000000 +0100 @@ -23,6 +23,7 @@ PLATS= aix ansi bsd generic linux macosx mingw posix solaris LUA_A= liblua.a +LUA_SO= liblua.so CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \ lundump.o lvm.o lzio.o @@ -36,7 +37,7 @@ LUAC_O= luac.o print.o ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) -ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) +ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T) ALL_A= $(LUA_A) default: $(PLAT) @@ -51,6 +52,10 @@ $(AR) $@ $? $(RANLIB) $@ +$(LUA_SO): $(CORE_O) $(LIB_O) + $(CC) -shared -ldl -Wl,-soname,liblua.so -o $@.5.1 $? $(MYLDFLAGS) + ln -s $@.5.1 $@ + $(LUA_T): $(LUA_O) $(LUA_A) $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) ----- end of patch ----
rej file

Code: Select all

--- Makefile 2006-03-21 11:51:53.000000000 +0100 +++ Makefile 2006-03-21 11:52:09.000000000 +0100 @@ -23,6 +23,7 @@ PLATS= aix ansi bsd generic linux macosx mingw posix solaris LUA_A= liblua.a +LUA_SO= liblua.so CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \ lundump.o lvm.o lzio.o @@ -36,7 +37,7 @@ LUAC_O= luac.o print.o ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) -ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) +ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T) ALL_A= $(LUA_A) default: $(PLAT) @@ -51,6 +52,10 @@ $(AR) $@ $? $(RANLIB) $@ +$(LUA_SO): $(CORE_O) $(LIB_O) + $(CC) -shared -ldl -Wl,-soname,liblua.so -o $@.5.1 $? $(MYLDFLAGS) + ln -s $@.5.1 $@ + $(LUA_T): $(LUA_O) $(LUA_A) $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
any thoughts?

thx
Art

mynameisjuanito
New Cone
New Cone
Posts: 8
Joined: 02 Jan 2012 10:58

Re: loosing my mind with ./configure and lua

Postby mynameisjuanito » 04 Jan 2012 13:18

The changes are relatively small so maybe it would be easiest to make them manually with a text editor.

Otherwise something like "patch -Np1 -i patchfilename"?

vanderlay
Blank Cone
Blank Cone
Posts: 14
Joined: 30 Dec 2011 04:55

Re: loosing my mind with ./configure and lua

Postby vanderlay » 05 Jan 2012 09:11

looks like lua 5.2 wont fly so back to prev versions,
thx for your help on this, much appreciated

It now leaves me with anther small problem on telnet, but i'll start another thread on that....

thx
Art


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 4 guests