[Dovecot] Compiling drac.c on a 64 bit system
I have just installed dovecot and want to set up the drac interface. However, when I compile drac.c I get the following link errors; anybody know what the right compile options are for a 64 bit system? I have a Gentoo Linux system using the amd64 architecture.
gcc -Wall -W -shared -fPIC -DHAVE_CONFIG_H -I$dovecot -I$dovecot/src/lib
drac.c -o drac.so -ldrac
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../lib64/libdrac.a(dracauth.o):
relocation R_X86_64_32S against `a local symbol' can not be used when making
a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../lib64/libdrac.a: could not
read symbols: Bad value
collect2: ld returned 1 exit status
TIA -Robin.
Robin Atwood.
"Ship me somewheres east of Suez, where the best is like the worst, Where there ain't no Ten Commandments an' a man can raise a thirst" from "Mandalay" by Rudyard Kipling
On 2007-10-05 17:48:51 +0700, Robin Atwood wrote:
I have just installed dovecot and want to set up the drac interface. However, when I compile drac.c I get the following link errors; anybody know what the right compile options are for a 64 bit system? I have a Gentoo Linux system using the amd64 architecture.
gcc -Wall -W -shared -fPIC -DHAVE_CONFIG_H -I$dovecot -I$dovecot/src/lib
drac.c -o drac.so -ldrac /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../lib64/libdrac.a(dracauth.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../lib64/libdrac.a: could not read symbols: Bad value collect2: ld returned 1 exit status
your libdrac is compiled without -fPIC -pic
darix
-- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org
On Friday 05 Oct 2007, Marcus Rueckert wrote:
On 2007-10-05 17:48:51 +0700, Robin Atwood wrote: your libdrac is compiled without -fPIC -pic
Thanks, that did the trick!
-Robin.
Robin Atwood.
"Ship me somewheres east of Suez, where the best is like the worst, Where there ain't no Ten Commandments an' a man can raise a thirst" from "Mandalay" by Rudyard Kipling
participants (2)
-
Marcus Rueckert
-
Robin Atwood