[Dovecot] Compiling drac.c on a 64 bit system

Marcus Rueckert darix at opensu.se
Fri Oct 5 14:45:13 EEST 2007


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


More information about the dovecot mailing list