Bug 193884
Summary: | Review Request: tolua++ - A tool to integrate C/C++ code with Lua | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ian Chapman <packages> |
Component: | Package Review | Assignee: | Hans de Goede <hdegoede> |
Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Package Reviews List <fedora-package-review> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | rawhide | CC: | hdegoede, moceap, tim |
Target Milestone: | --- | Flags: | gwync:
fedora-cvs+
|
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2006-06-05 00:37:08 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 163779, 193342 |
Description
Ian Chapman
2006-06-02 17:42:00 UTC
MUST: ===== * rpmlint output is: W: tolua++ no-soname /usr/lib64/libtolua++-5.1.so W: tolua++-devel no-documentation The no-soname warning must be fixed (see below) the other one is no problem * Package and spec file named appropriately * Packaged according to packaging guidelines * License (Freeware) ok, license file included (but see should fix) * spec file is legible and in Am. English. * Source matches upstream * Compiles and builds on devel-x86_64 * BR: ok * No locales * ldconfig properly run for shared libraries * Not relocatable * Package owns / or requires all dirs * No duplicate files & Permissions ok * %clean & macro usage OK * Contains code only * %doc does not affect runtime, and isn't large enough to warrent a sub package * -devel package as needed (see should fix though) * no gui -> no .desktop file required MUST fix: ========= * The rpmlint soname warning, you can fix this by adding: "LINKFLAGS="-Wl,-soname,lib%{solib}.so" Should fix: =========== * Replace "License: Freeware Style" with just "License: Freeware" * The tolua++ binary is a parser/compiler only used when building tolua++ using programs as such it belongs in the -devel subpackage IMHO. Remarks: ======== * "BuildRequires: lua-devel => 5.1" shouldn't that be: "BuildRequires: lua-devel >= 5.1" I'm surprised this even works? Thanks a lot, this should fix all those issues. Spec URL: http://dribble.org.uk/tolua++.spec SRPM URL: http://dribble.org.uk/tolua++-1.0.92-2.src.rpm Looks good, approved! One remark though, my soname fix also adds an ELF SONAME tag to the tolua++ executable. I don't think this can do harm and I don't know enough scons to fix it, so lets leave it this way for now. But this is not how things should be. In a future release it might be possible to patch the build process so scons doesn't actually link the executable but is handled outside of scons, although this sort of thing can get quite messy. Just noticed Hans, those link flags DO break tolua++. I'm currently investigating a fix, but it appears to be because the exe has the same 'soname' as the library. With those link flags, do an ldd on the tolua++ binary, you get: linux-gate.so.1 => (0x004df000) liblua-5.1.so => /usr/lib/liblua-5.1.so (0x0063c000) libdl.so.2 => /lib/libdl.so.2 (0x00111000) libm.so.6 => /lib/libm.so.6 (0x00115000) libc.so.6 => /lib/libc.so.6 (0x004fe000) /lib/ld-linux.so.2 (0x004e0000) Strange I thought, it isn't dynamically linked to libtolua++-5.1.so. Checking the build, it certainly does link it to this library so why isn't it showing. I checked the exe and if you try and do anything useful with it you get: tolua++: symbol lookup error: tolua++: undefined symbol: tolua_open which sort of confirms that ld isn't dynamically linking it. Now if you remove those LINK flags rebuild and do an ldd, you get: linux-gate.so.1 => (0x004df000) libtolua++-5.1.so => /usr/lib/libtolua++-5.1.so (0x00200000) liblua-5.1.so => /usr/lib/liblua-5.1.so (0x0067a000) libdl.so.2 => /lib/libdl.so.2 (0x00650000) libm.so.6 => /lib/libm.so.6 (0x00629000) libc.so.6 => /lib/libc.so.6 (0x004fe000) /lib/ld-linux.so.2 (0x004e0000) Notice, libtolua++-5.1.so shows this time? I think because ld is using the 'soname', it already discovers this 'soname' in the exe itself, so it assumes the appropriate library has been found and doesn't look any further. Without the LINK flags, neither the exe nor the library has an 'soname' so ld falls back to the library name, ie libtolua++-5.1.so and finds it. Somehow I need to get scons to use the soname for the library only. What do you think? (In reply to comment #5) > Somehow I need to get scons to use the soname for the library only. What do > you think? I agree, setting status back to FE-REVIEW in the mean time. This version applies an soname to the lib, whilst ensuring the binary doesn't get one. It's a somewhat ugly hack, calling gcc again after the main build, to compile the binary but the result is good. I've been sofar unable to patch the scons package to use separate flags for the lib and bin, whatever I do they both end up using the same flags :-). Perhaps this is acceptable enough (in the meantime). http://dribble.org.uk/tolua++.spec http://dribble.org.uk/tolua++-1.0.92-3.src.rpm Looks good, its only one line in the specfile, I've seen far worse hacks. Approving again. Package Change Request ====================== Package Name: tolua++ New Branches: el5 el6 Owners: timn I'm the Fedora maintainer and would like to import this package into RHEL because another package relies on it. Works fine on a local CentOS 5.4 machine. Git done (by process-git-requests). Package Change Request ====================== Package Name: tolua++ New Branches: epel7 Owners: moceap timn Git done (by process-git-requests). |