Description of problem: - The upstram don't builds the .so lib - building the .so lib is done by a Mageia patch : "lua-5.1-dynlib.patch" - this patch uses also the .o file of the interactive interpreter "lua.o": it should not! - this .o file contains a main() function that is hidden when used with C, but when used with for example ocaml, this main() will take place instead of the code of our program Version-Release number of selected component (if applicable): - lua-5.1.4-10.mga2 How reproducible: - one can reproduce it always with a simple hello-world Steps to Reproduce: $ cat > test.ml <<EOF let () = print_endline "Hello" EOF $ ocamlopt -o test.opt test.ml $ ./test.opt Hello ### This is the expected output $ ocamlopt -o test.opt -cclib -llua test.ml $ ./test.opt Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio > ### Now our hello program is not exectuted anymore, ### instead we get a lua interactive interpreter, like with: $ lua Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio > How to fix: --- SOURCES/lua-5.1-dynlib.patch +++ SOURCES/lua-5.1-dynlib.patch @@ -22,7 +22,7 @@ $(RANLIB) $@ +$(LUA_SO): $(CORE_O) $(LIB_O) -+ gcc -Wl,-soname=liblua.so.$(V) -shared -o $@ $(MYLDFLAGS) $? $(LIBS) $(LUA_O) ++ gcc -Wl,-soname=liblua.so.$(V) -shared -o $@ $(MYLDFLAGS) $? $(LIBS) + rm -f liblua.so + ln -s $@ liblua.so +
There is now "lua-5.1.4-10.1.mga2" in core/updates_testing to validate ------------------------------------------------------- Suggested advisory: ------------------- This update addresses a bug due to a wrong build of liblua.so ------------------------------------------------------- Steps to reproduce: - install/update to update candidate - the steps that show how to reproduce the bug given in the bug-report should be fixed, and produce a correct hello-world test program that outputs "Hello" instead of starting a lua interactive interpreter
Assignee: bugsquad => qa-bugs
Before installing the update, noted that ocaml, lua, and lua-devel are all needed for the test. $ ./test.opt Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio > Used ctrl+c to exit. After installing the update, and rerunning the command ocamlopt -o test.opt -cclib -llua test.ml the hello program works again. Testing complete on i586/Mageia 2 for the srpm ocamlopt -o test.opt -cclib -llua test.ml
CC: (none) => davidwhodgins
Whiteboard: (none) => mga2-i586-OK
Repeated test described in Comment 2 on x86-64: - Before installing the update package, no "Hello" output when using the interactive interpreter - After installing the update, "Hello" is printed as output from ./test.opt as compiled by the interactive interpreter. Testing successfully done also on x86-64 Advisory: --------- Executables compiled with the interactive interpreter of lua do not create the expected output. This is due to a wrong build of liblua.so: the update corrects this issue. SRPM ---- lua-5.1.4-10.1.mga2.src.rpm Sysadmin: please push the package from updates_testing to updates
CC: (none) => juergen.harms, sysadmin-bugs
Keywords: (none) => validated_updateWhiteboard: mga2-i586-OK => mga2-i586-OK mga2-64-OK
Update pushed: https://wiki.mageia.org/en/Support/Advisories/MGAA-2012-0082
Status: NEW => RESOLVEDCC: (none) => tmbResolution: (none) => FIXED