Bug 6296 - upstram don't builds the .so lib, it is done by a Mageia patch, but this patch uses also the .o file of the interactive interpreter, it should not
Summary: upstram don't builds the .so lib, it is done by a Mageia patch, but this patc...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 2
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: mga2-i586-OK mga2-64-OK
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2012-06-02 18:02 CEST by Florent Monnier
Modified: 2012-06-20 21:35 CEST (History)
4 users (show)

See Also:
Source RPM: lua-5.1.4-10.mga2
CVE:
Status comment:


Attachments

Description Florent Monnier 2012-06-02 18:02:49 CEST
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
 +
Comment 1 Florent Monnier 2012-06-02 18:18:57 CEST
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
Florent Monnier 2012-06-02 18:20:53 CEST

Assignee: bugsquad => qa-bugs

Comment 2 Dave Hodgins 2012-06-06 06:09:12 CEST
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

claire robinson 2012-06-09 13:27:43 CEST

Whiteboard: (none) => mga2-i586-OK

Comment 3 Juergen Harms 2012-06-11 21:28:56 CEST
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

Manuel Hiebel 2012-06-11 21:33:38 CEST

Keywords: (none) => validated_update
Whiteboard: mga2-i586-OK => mga2-i586-OK mga2-64-OK

Comment 4 Thomas Backlund 2012-06-20 21:35:36 CEST
Update pushed:
https://wiki.mageia.org/en/Support/Advisories/MGAA-2012-0082

Status: NEW => RESOLVED
CC: (none) => tmb
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.