Bug 477077 - linker of generic.so was not working, for dev with libtranslate-devel
Summary: linker of generic.so was not working, for dev with libtranslate-devel
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libtranslate
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Dmitry Butskoy
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-18 23:53 UTC by Caius Chance
Modified: 2008-12-30 23:41 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-12-30 23:41:40 UTC
Type: ---


Attachments (Terms of Use)
proposed patch, contributed by phuang (1.14 KB, patch)
2008-12-18 23:53 UTC, Caius Chance
no flags Details | Diff
Updated .spec file to rerun automake and friends (537 bytes, patch)
2008-12-21 09:30 UTC, Dwayne Bailey
no flags Details | Diff
Updates fix-modules patch (1.62 KB, patch)
2008-12-21 09:32 UTC, Dwayne Bailey
no flags Details | Diff

Description Caius Chance 2008-12-18 23:53:02 UTC
Created attachment 327392 [details]
proposed patch, contributed by phuang

Description of problem:
Develop with libtranslate-devel has complained that there is undefined symbols (libtranslate functions), from generic.so.

The problem might not be appearing if build with `pkg-config --libs --cflags libtranslate` on pure C sources, but it will happen when I wrap it with 'swig' and compile. e.g. wrap libtranslate into python with swig.

Version-Release number of selected component (if applicable):
0.99-15

How reproducible:
Always.

Steps to Reproduce:
1. Build something with libtranslate-devel. (pkg-config --libs --cflags libtranslate).
2. Run the binary.
3. Check results.
  
Actual results:
Undefined symbols, one of libtranslate functions.

Expected results:
All libtranslate functions could be used. 

Additional info:
'swig' is wrapper which wraps C sources to many other programming langs.
http://www.swig.org/

Comment 1 Fedora Update System 2008-12-19 14:12:19 UTC
libtranslate-0.99-16.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/libtranslate-0.99-16.fc10

Comment 2 Dwayne Bailey 2008-12-19 22:34:08 UTC
I'm not sure if this is related but I am using libtranslate in Python with ctypes and I get the following error:

(process:13241): libtranslate-WARNING **: unable to load module "/usr/lib/libtranslate/modules/generic.so": /usr/lib/libtranslate/modules/generic.so: undefined symbol: translate_ascii_strcase_equal

0.99-16 does not solve this problem.

You can replicate this with the following Python code:

from ctypes import *
import ctypes.util

lt = cdll.LoadLibrary(ctypes.util.find_library("translate"))
lt.translate_init.argtypes = [c_int]
lt.translate_init.restype = c_int

err = c_int()
if not lt.translate_init(err):
    print "Unable to initialise libtranslate: %s" % err

Comment 3 Fedora Update System 2008-12-21 08:47:05 UTC
libtranslate-0.99-16.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libtranslate'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2008-11504

Comment 4 Dwayne Bailey 2008-12-21 09:28:32 UTC
OK here is the problem and some patches to fix it.

1) With the change to Makefile.am we need to redo all of the things related to automake, with the current build Makefile.am doesn't filter down into Makefile.in, etc.  So the patch is not being built.
2) We need to build lintranslate.la before the subdirectory so SUBDIR = . modules solves that.

I build a local RPM and its solves my issues with ctypes.  Patches to follow.

Comment 5 Dwayne Bailey 2008-12-21 09:30:52 UTC
Created attachment 327565 [details]
Updated .spec file to rerun automake and friends

Comment 6 Dwayne Bailey 2008-12-21 09:32:04 UTC
Created attachment 327566 [details]
Updates fix-modules patch

Adds a change to src/Makefiles.am to ensure that we build src/ before subdirectories.

Comment 7 Caius Chance 2008-12-21 23:03:12 UTC
(In reply to comment #6)
Thanks a lot, Dwayne. Your reworked patch works.

Comment 8 Dmitry Butskoy 2008-12-22 14:43:20 UTC
It is needed to add BR libtool for F10 .

Unfortunately, under rawhide (F11) something goes wrong (libtool-related), see:
http://koji.fedoraproject.org/koji/getfile?taskID=1016034&name=build.log

Comment 9 Fedora Update System 2008-12-22 14:46:20 UTC
libtranslate-0.99-17.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/libtranslate-0.99-17.fc10

Comment 10 Dmitry Butskoy 2008-12-23 12:53:34 UTC
Well, under rawhide (F11) "libtoolize" also required before other autotools.

Comment 11 Fedora Update System 2008-12-24 18:47:30 UTC
libtranslate-0.99-17.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libtranslate'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2008-11774

Comment 12 Fedora Update System 2008-12-30 23:41:37 UTC
libtranslate-0.99-17.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.


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