[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#387464: marked as done (ftplib-dev: libftp.a can not be used on amd64)



Your message dated Sat, 16 Sep 2006 15:10:52 +0200
with message-id <20060916131051.GA13483@ouaza.com>
and subject line ftplib-dev: libftp.a can not be used on amd64
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: ftplib-dev
Version: 3.1-1-6
Severity: serious
Architecture: amd64 (x86_64)

I get error when compiling with libftp.a: (g++-4.1 -shared myftp.c -lftp -fPIC -o libmyftp.so)
/usr/bin/ld: libftp.a(ftplib.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

It makes package completely unusefull on amd64

---------------
kernel: linux-image-2.6.17-2-amd64 2.6.17-7
libc6: 2.3.6-15
---------------

Best Regards
Sergey Nivarov


--- End Message ---
--- Begin Message ---
On Thu, 14 Sep 2006, Sergey Nivarov wrote:
> Package: ftplib-dev
> Version: 3.1-1-6
> Severity: serious
> Architecture: amd64 (x86_64)
> 
> I get error when compiling with libftp.a: (g++-4.1 -shared myftp.c -lftp -fPIC -o libmyftp.so)
> /usr/bin/ld: libftp.a(ftplib.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
> 
> It makes package completely unusefull on amd64

I don't think that the package is at fault. The .o inside the .a are
effectively compiled without -fPIC as they should, so that one can
link them into an application.

Here you're compiling a shared library and you should not use the .a file
but rather link to the .so.

The command line above on a clean install, effectively link the package
with the so and it works well:
(sid) rhertzog@rivendell:~/tmp$ g++-4.1 -shared myftp.c -lftp -fPIC -o libmyftp.so
(sid) rhertzog@rivendell:~/tmp$ ldd libmyftp.so
        linux-gate.so.1 =>  (0xffffe000)
        libftp.so.3 => /usr/lib/libftp.so.3 (0xb7fbf000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7ee0000)
        libm.so.6 => /lib/tls/libm.so.6 (0xb7ebb000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7eb0000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb7d7e000)
        /lib/ld-linux.so.2 (0x80000000)

To reproduce the error message that you give one must link explicitely to
the .a:
# g++-4.1 -shared myftp.c /usr/lib/libftp.a -fPIC -o libmyftp.so
/usr/bin/ld: /usr/lib/libftp.a(ftplib.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

(Thanks to Sam Hocevar who made the test on amd64)

It's possible to you deleted the /usr/lib/libftp.so symlink or that you
modified it by error. However the amd64 package its fine.

Thus I'm closing this bug.

Cheers,
-- 
Raphaël Hertzog

Premier livre français sur Debian GNU/Linux :
http://www.ouaza.com/livre/admin-debian/

--- End Message ---

Reply to: