I just can’t compile Asterisk on my 64-bit Fedora Core 6. I don’t know what to do. Please help! I always get the same f’n error when I run “make”, and it never happened before. Read the error below:
… [CC] func_curl.c -> func_curl.o
[LD] func_curl.o -> func_curl.so
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../lib64/libidn.a(t
outf8.o): relocation R_X86_64_32 against `a local symbol' can not be used when m
aking a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../lib64/libidn.a: could not rea
d symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [func_curl.so] Error 1
make: *** [funcs] Error 2
Please help! What do I do? How do I get rid of this error? Why is it happening? Please help!
I just can’t compile Asterisk on my 64-bit Fedora Core 6. I don’t know what to do. Please help! I always get the same f’n error when I run “make”, and it never happened before. Read the error below:
… [CC] func_curl.c -> func_curl.o
[LD] func_curl.o -> func_curl.so
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../lib64/libidn.a(t
outf8.o): relocation R_X86_64_32 against `a local symbol' can not be used when m
aking a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../lib64/libidn.a: could not rea
d symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [func_curl.so] Error 1
make: *** [funcs] Error 2
Please help! What do I do? How do I get rid of this error? Why is it happening? Please help![/quote]
if you don’t need func_curl you can remove it from the makefiles so it does not get built… this problem happens to me when building on a hosted box but I never use curl so i just removed it
Hello,
Thank you for responding. According to what I have read on the Web about this error (nothing about Asterisk specifically, but seemingly a problem limited to 64-bit things), people say U have 2 set the variable CFLAGS=-fPIC in the Makefile, consistent with what this error is telling me to do. I have done several things to no avail. I put CFLAGS=-fPIC in the beginning of the Makefile where those kinds of options are specified. Apparently, the Makefile says to use ASTCFLAGS instead of CFLAGS, and I tried that, too. I’ve even tried setting CFLAGS=-fPIC and ASTCFLAGS=-fPIC as environment variables and running the configure script again and re-making, but that doesn’t fix it either.
Is there a specific place in the Makefile where I need to put this variable assignment? Why doesn’t it have any effect when I put it in?
What does the option -fPIC do, anyway? Do I have to sacrifice any 64-bit capability by using this option?
What does func_curl do? What are the disadvantages of removing it? Wouldn’t it undermine the functionality of Asterisk? Is there any way to still compile this successfully without sacrificing the functionality of Asterisk?
If possible, could you please modify the Asterisk 1.4.0 Makefile to have the necessary corrections, and upload it here in [code] tags? (Please just try to make it so I can use the -fPIC option without sacrificing func_curl.) I will try it out. If nothing else works, I guess I’ll try it without func_curl.
PLEAS HELP ME: (I’M USING FEDORA 3 AND ASTERISK 1.4)
MY ENGLISH ISN’T VERY WELL, BUT I GOING TO TRY TO EXPLAIN MY PROBLEM, I HAVE INSTALLED ZAPTEL BUT WHEN I INSTALL LIBPRI, IT PRINT THE FOLLOW:
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o copy_string.o copy_string.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o pri.o pri.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o q921.o q921.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o prisched.o prisched.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o q931.o q931.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o pri_facility.o pri_facility.c
BUT IT DON’T PRINT ERROR.
AND AFTER I INSTALLED ASTERISK 1.4 BUT IN THIS STEAP PRINT THE NEXT ERROR:
usr/bin/ld: no se puede encontrar -lidn
collect2: ld devolvi├│ el estado de salida 1
make[1]: *** [func_curl.so] Error 1
make: *** [funcs] Error 2
IF YOU KNOW WHAT IS THE PROBLEM PLEASE TELL ME, I NEED YOUR HELP PLEASE.
/////////////////////////////////////////////////////////////////////////////////////
(ESTOY USANDO FEDORA 3 Y ASTERISK 1.4)
AQUI PONGO MI PROBLEMA EN ESPAÑOL PORQUE MI INGLES NO ES MUY BUENO:
YA INSTALE ZAPTEL, Y CORRE BIEN O AL MENOS ESO CREO PERO AL INSTALLAR LIBPRI ME APARECE LO SIGUIENTE
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o copy_string.o copy_string.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o pri.o pri.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o q921.o q921.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o prisched.o prisched.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o q931.o q931.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o pri_facility.o pri_facility.c
NO APARECE NINGUN ERROR PERO TAMPOCO DICE QUE FUE INSTALADO SATISFACTORIAMENTE
LUEGO AL TRATAR DE INSTALAR ASTERISK ME APARECE EL SIGUIENTE ERROR:
usr/bin/ld: no se puede encontrar -lidn
collect2: ld devolvi├│ el estado de salida 1
make[1]: *** [func_curl.so] Error 1
make: *** [funcs] Error 2
PORFAVOR ALGUIEN QUE ME AYUDE YA LE BUSQUE PERO NO LE ENCUENTRO, PORFAVOR SI ALGUIEN SABE QUE PUEDE SER LE VOY A AGRADECER INFINITAMENTE QUE ME LO DIGA DE ANTEMANO GRACIAS.