Bug 146353 - can't link programs with libopenobex.so
Summary: can't link programs with libopenobex.so
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: openobex
Version: 4
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Harald Hoyer
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-01-27 12:42 UTC by Sergey Khvatov
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-27 12:34:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Test program (731 bytes, text/plain)
2005-01-27 12:44 UTC, Sergey Khvatov
no flags Details
patch which fixes broken `obex.sym' file... (385 bytes, patch)
2005-02-09 17:23 UTC, Dmitry Butskoy
no flags Details | Diff

Description Sergey Khvatov 2005-01-27 12:42:31 UTC
Description of problem: 
 
No program can be linked with libopenobex.so. Some symbols from this 
library appeared undefined. Linking with static library is still 
possible.  
 
Version-Release number of selected component (if applicable): 
 
openobex-1.0.1-1 
 
How reproducible: 
 
Allways 
 
Steps to Reproduce: 
1. Compile and link the attached test  
   
Actual results: 
 
[xbatob@sagittarius oob]$ cc obexserver.c -lopenobex 
/tmp/ccN0zkLf.o(.text+0x6f): In function `main': 
: undefined reference to `btobex_accept' 
collect2: ld returned 1 exit status 
[xbatob@sagittarius oob]$ cc obexserver.c -static -lopenobex 
[xbatob@sagittarius oob]$  
 
Expected results: 
 
no errors both case 
 
Additional info: 
 
I had downloaded source archive from openobex.sourceforge.net, 
make rpm from it (the tarball contains valid spec file) and had it 
installed. Everything works OK

Comment 1 Sergey Khvatov 2005-01-27 12:44:42 UTC
Created attachment 110289 [details]
Test program

This program useless but valid.

Comment 2 Harald Hoyer 2005-01-27 13:22:31 UTC
only symbols from openobex-1.0.1/src/obex.sym should be exported as
the rule in openobex-1.0.1/src/Makefile.am states:
libopenobex_la_LDFLAGS = \
        -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
        -release $(LT_RELEASE) \
        -export-symbols $(top_srcdir)/src/obex.sym

This means, that the libtool in the tar.gz and the libtool we use to
build the package differ in this case.

This may be a bug in our libtool or the libtool openobex packages.
I don't know, but obex.sym does not seem to include bt_accept and this
was never needed by other packages which used openobex.

Comment 3 Sergey Khvatov 2005-01-27 13:58:14 UTC
Yes this symbol seems to be unneeded, but my program calls 
OBEX_ServerAccept which also doesn't exported. 

Comment 4 Dmitry Butskoy 2005-02-09 17:22:02 UTC
  The program `obexftp' (tool to access mobile phone "disks" by
ftp-like way) need `OBEX_ServerAccept' symbol for successful linkage.
IMHO, may be this symbol only is missing in `obex.sym'...

Comment 5 Dmitry Butskoy 2005-02-09 17:23:42 UTC
Created attachment 110882 [details]
patch which fixes broken `obex.sym' file...

  `obexftp' build is OK after it.

Comment 6 Harald Hoyer 2005-05-02 15:53:09 UTC
added OBEX_ServerAccept

Comment 7 Dmitry Butskoy 2005-05-11 13:26:30 UTC
 Cannot find updated package in rawhide.
 The old package (1.0.1-3, without changes) still exist in rawhide and FC3test3 ...

Comment 8 Bastien Nocera 2005-09-13 23:48:55 UTC
Reopening, the problem is still current with FC4.

Comment 9 Bastien Nocera 2005-09-13 23:51:29 UTC
$ strings /usr/lib/libopenobex.so | grep OBEX_ServerAccept
$ rpm -q openobex
openobex-1.0.1-3

And trying to compile obexftp:
/home/hadess/src/obexftp-0.10.7/apps/obexftpd.c:119: undefined reference to
`OBEX_ServerAccept'
collect2: ld returned 1 exit status
make: *** [obexftpd] Error 1


Comment 10 Bastien Nocera 2005-09-13 23:58:28 UTC
This was committed, but looks like it wasn't built for FC3 or FC4:
https://www.redhat.com/archives/fedora-cvs-commits/2005-May/msg00025.html

an rpmbuild --rebuild of the following package can fix it for the impatient:
http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/openobex-1.0.1-4.src.rpm

Comment 11 Harald Hoyer 2005-09-14 08:33:21 UTC
openobex-1.0.1-3.0.FC4.1 will soon appear in the testing channel...


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