# www-servers/cherokee: falla emerge (sol)

## koyo

Hola a todos.

Estoy tratando de instalar el servidor cherokee en su version 1.2.2, durante el proceso de instalación/compilación el siguiente error surge:

```
libtool: link:  x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC  .libs/validator_file.o .libs/validator_htdigest.o   -lcrypto -ldl  -O2 -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed   -Wl,-soname -Wl,libplugin_htdigest.so -Wl,-version-script -Wl,.libs/libplugin_htdigest.ver -o .libs/libplugin_htdigest.so

libtool: link: ( cd ".libs" && rm -f "libplugin_htdigest.la" && ln -s "../libplugin_htdigest.la" "libplugin_htdigest.la" )

libtool: compile:  x86_64-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -D_REENTRANT -O2 -pipe -c validator_file.c  -fPIC -DPIC -o .libs/libplugin_htpasswd_la-validator_file.o

libtool: compile:  x86_64-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -D_REENTRANT -O2 -pipe -c validator_htpasswd.c  -fPIC -DPIC -o .libs/libplugin_htpasswd_la-validator_htpasswd.o

libtool: link: /usr/bin/nm -B  .libs/libplugin_htpasswd_la-validator_file.o .libs/libplugin_htpasswd_la-validator_htpasswd.o   | sed -n -e 's/^.*[       ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[         ][      ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' | /bin/sed 's/.* //' | sort | uniq > .libs/libplugin_htpasswd.exp

libtool: link: /bin/grep -E -e "^[^_].*" ".libs/libplugin_htpasswd.exp" > ".libs/libplugin_htpasswd.expT"

libtool: link: mv -f ".libs/libplugin_htpasswd.expT" ".libs/libplugin_htpasswd.exp"

libtool: link: echo "{ global:" > .libs/libplugin_htpasswd.ver

libtool: link:  cat .libs/libplugin_htpasswd.exp | sed -e "s/\(.*\)/\1;/" >> .libs/libplugin_htpasswd.ver

libtool: link:  echo "local: *; };" >> .libs/libplugin_htpasswd.ver

libtool: link:  x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC  .libs/libplugin_htpasswd_la-validator_file.o .libs/libplugin_htpasswd_la-validator_htpasswd.o   -lcrypt -lcrypto -ldl  -O2 -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed   -Wl,-soname -Wl,libplugin_htpasswd.so -Wl,-version-script -Wl,.libs/libplugin_htpasswd.ver -o .libs/libplugin_htpasswd.so

/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../lib64/libcrypt.a(crypt-entry.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC

/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../lib64/libcrypt.a: could not read symbols: Bad value

collect2: ld returned 1 exit status

make[3]: *** [libplugin_htpasswd.la] Error 1

make[2]: *** [all] Error 2

make[1]: *** [all-recursive] Error 1

make: *** [all] Error 2

emake failed

 * ERROR: www-servers/cherokee-1.2.2 failed (compile phase):

 *   emake failed

 * 

 * Call stack:

 *     ebuild.sh, line  56:  Called src_compile

 *   environment, line 5883:  Called die

 * The specific snippet of code:

 *       emake || die "emake failed"

 * 

 * If you need support, post the output of 'emerge --info =www-servers/cherokee-1.2.2',

 * the complete build log and the output of 'emerge -pqv =www-servers/cherokee-1.2.2'.

 * The complete build log is located at '/var/tmp/portage/www-servers/cherokee-1.2.2/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/www-servers/cherokee-1.2.2/temp/environment'.

 * S: '/var/tmp/portage/www-servers/cherokee-1.2.2/work/cherokee-1.2.2'
```

La salida del comando emerge --info =www-servers/cherokee-1.2.2 es la siguiente:

```
libtool: link:  x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC  .libs/validator_file.o .libs/validator_htdigest.o   -lcrypto -ldl  -O2 -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed   -Wl,-soname -Wl,libplugin_htdigest.so -Wl,-version-script -Wl,.libs/libplugin_htdigest.ver -o .libs/libplugin_htdigest.so

libtool: link: ( cd ".libs" && rm -f "libplugin_htdigest.la" && ln -s "../libplugin_htdigest.la" "libplugin_htdigest.la" )

libtool: compile:  x86_64-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -D_REENTRANT -O2 -pipe -c validator_file.c  -fPIC -DPIC -o .libs/libplugin_htpasswd_la-validator_file.o

libtool: compile:  x86_64-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -D_REENTRANT -O2 -pipe -c validator_htpasswd.c  -fPIC -DPIC -o .libs/libplugin_htpasswd_la-validator_htpasswd.o

libtool: link: /usr/bin/nm -B  .libs/libplugin_htpasswd_la-validator_file.o .libs/libplugin_htpasswd_la-validator_htpasswd.o   | sed -n -e 's/^.*[       ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[         ][      ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' | /bin/sed 's/.* //' | sort | uniq > .libs/libplugin_htpasswd.exp

libtool: link: /bin/grep -E -e "^[^_].*" ".libs/libplugin_htpasswd.exp" > ".libs/libplugin_htpasswd.expT"

libtool: link: mv -f ".libs/libplugin_htpasswd.expT" ".libs/libplugin_htpasswd.exp"

libtool: link: echo "{ global:" > .libs/libplugin_htpasswd.ver

libtool: link:  cat .libs/libplugin_htpasswd.exp | sed -e "s/\(.*\)/\1;/" >> .libs/libplugin_htpasswd.ver

libtool: link:  echo "local: *; };" >> .libs/libplugin_htpasswd.ver

libtool: link:  x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC  .libs/libplugin_htpasswd_la-validator_file.o .libs/libplugin_htpasswd_la-validator_htpasswd.o   -lcrypt -lcrypto -ldl  -O2 -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed   -Wl,-soname -Wl,libplugin_htpasswd.so -Wl,-version-script -Wl,.libs/libplugin_htpasswd.ver -o .libs/libplugin_htpasswd.so

/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../lib64/libcrypt.a(crypt-entry.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC

/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../lib64/libcrypt.a: could not read symbols: Bad value

collect2: ld returned 1 exit status

make[3]: *** [libplugin_htpasswd.la] Error 1

make[2]: *** [all] Error 2

make[1]: *** [all-recursive] Error 1

make: *** [all] Error 2

emake failed

 * ERROR: www-servers/cherokee-1.2.2 failed (compile phase):

 *   emake failed

 * 

 * Call stack:

 *     ebuild.sh, line  56:  Called src_compile

 *   environment, line 5883:  Called die

 * The specific snippet of code:

 *       emake || die "emake failed"

 * 

 * If you need support, post the output of 'emerge --info =www-servers/cherokee-1.2.2',

 * the complete build log and the output of 'emerge -pqv =www-servers/cherokee-1.2.2'.

 * The complete build log is located at '/var/tmp/portage/www-servers/cherokee-1.2.2/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/www-servers/cherokee-1.2.2/temp/environment'.

 * S: '/var/tmp/portage/www-servers/cherokee-1.2.2/work/cherokee-1.2.2'
```

Hasta el momento he tratado reinstalando libtool, openssl y eliminado la compilación paralela poniendo -j1 en make.conf.

Si alguien me puede ayudar, muchas gracias.

----------

## Pablo S. Barrera

Esta enmascarado este paquete no? Al menos en amd64 lo esta.

Probaste de recompilar todas sus dependencias? 

Tal vez no sirva de nada pero se me ocurre eso.

Saludos!

----------

## Eleazar Anzola

Tu error no es mas que la falta de libcrypt.a que no esta bien compilada dice arriba que verifiques y 

```
recompile with -fPIC
```

```
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../lib64/libcrypt.a: could not read symbols: Bad value 

collect2: ld returned 1 exit status 

make[3]: *** [libplugin_htpasswd.la] Error 1 

make[2]: *** [all] Error 2 

make[1]: *** [all-recursive] Error 1 

make: *** [all] Error 2 

emake failed 
```

```
emerge uDvN world 
```

 y despues 

```
emerge lafilefixer
```

 y por ultimo 

```
lafilefixer --justfixit
```

espero te resuelva eso tu problema

----------

## koyo

Bueno he solucionado el problema.

No utilice el "-fPIC" ya que en algunos post y comentarios en el canal de IRC no lo recomiendan.

[*] Actualice al ultimo kernel gentoo-sources (estable)

[*] Recompile GLIBC/GCC

[*] Recompile libtool

[*] Recompile openssl

Esto soluciono mi problema con la instalacion del paquete cherokee, ya esta funcionando a la perfeccion (aunque ya he comenzado mi pelea con django y tratar que el servidor muestre las paginas)

Gracias a todos por su colaboracion.

----------

