Bug 146353

Summary: can't link programs with libopenobex.so
Product: [Fedora] Fedora Reporter: Sergey Khvatov <xbatob>
Component: openobexAssignee: Harald Hoyer <harald>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: bnocera, dmitry
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-27 12:34:44 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:
Attachments:
Description Flags
Test program
none
patch which fixes broken `obex.sym' file... none

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...