2015-10-29 0:57 GMT+01:00 Arpita Biswas <arpita.biswas07(a)gmail.com>:
> Hi folks,
>
> I am trying to build qemu-0.15.x for serialICE by running build.sh script.
> However, it fails stating Lua 5.3 wasn't found as below :
>
> "Error Lua version >= 5.3 not found. Can't build QEMU with SerialICE
> support."
You need to do two things: 1) patch lua (see below, it basically
restores http://review.coreboot.org/#/c/8524/3/SerialICE/patches/lua-5.2.0-shared.di…
) 2) install the package libglib2.0-dev
diff -ur lua-5.3.1/Makefile lua-5.3.1-liblua.so/Makefile
--- lua-5.3.1/Makefile 2015-06-03 03:35:35.000000000 +0200
+++ lua-5.3.1-liblua.so/Makefile 2015-11-01 03:59:50.202802416 +0100
@@ -41,7 +41,7 @@
# What to install.
TO_BIN= lua luac
TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
-TO_LIB= liblua.a
+TO_LIB= liblua.a liblua.so
TO_MAN= lua.1 luac.1
# Lua version and release.
diff -ur lua-5.3.1/src/Makefile lua-5.3.1-liblua.so/src/Makefile
--- lua-5.3.1/src/Makefile 2015-05-27 13:10:11.000000000 +0200
+++ lua-5.3.1-liblua.so/src/Makefile 2015-11-01 04:08:52.175642358 +0100
@@ -7,7 +7,7 @@
PLAT= none
CC= gcc -std=gnu99
-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS)
+CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS) -fPIC
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
LIBS= -lm $(SYSLIBS) $(MYLIBS)
@@ -29,6 +29,7 @@
PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
LUA_A= liblua.a
+LUA_SO= liblua.so
CORE_O= lapi.o lcode.o lctype.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
@@ -43,7 +44,7 @@
LUAC_O= luac.o
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
+ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
ALL_A= $(LUA_A)
# Targets start here.
@@ -59,6 +60,9 @@
$(AR) $@ $(BASE_O)
$(RANLIB) $@
+$(LUA_SO): $(CORE_O) $(LIB_O)
+ $(CC) -o $@ -shared $? -lm -ldl
+
$(LUA_T): $(LUA_O) $(LUA_A)
$(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
>
> I am on Ubuntu 14.04. I downloaded lua5.3, built and installed it manually.
> I did not use apt-get for it, because the max it allowed was lua5.2 . As a
> result, qemu-0.15.x/configure cannot find the lua packages despite it being
> installed in /usr/local/bin.
/tmp/lua-5.3.1-liblua.so $ make linux
(cut for abbreviation)
/tmp/lua-5.3.1-liblua.so $ sudo make install
cd src && mkdir -p /usr/local/bin /usr/local/include /usr/local/lib
/usr/local/man/man1 /usr/local/share/lua/5.3 /usr/local/lib/lua/5.3
cd src && install -p -m 0755 lua luac /usr/local/bin
cd src && install -p -m 0644 lua.h luaconf.h lualib.h lauxlib.h
lua.hpp /usr/local/include
cd src && install -p -m 0644 liblua.a liblua.so /usr/local/lib
cd doc && install -p -m 0644 lua.1 luac.1 /usr/local/man/man1
>
> After reading previous posts, I added "--extra-ldflags="-lm" " to build.sh
> script. That also did not help.
>
> Can someone please suggest a way to get it working - like changing some
> path names / modifying the configure script ? I've a feeling build.sh isn't
> able to identify lua, despite it being in the right path.
All this will most likely work when you have
/etc/ld.so.conf.d/libc.conf (or another file with a line
'/usr/local/lib' in it) in place.
>
> Thanks,
> - Arpita
>
> _______________________________________________
> SerialICE mailing list
> SerialICE(a)serialice.com
> http://www.serialice.com/mailman/listinfo/serialice