# [portage]error dev-libs/redland-1.0.17-r2 (Resuelto)

## Eleazar Anzola

Buenas y feliz año nuevo a todos,

Desde hace algun tiempo vengo presentando dificultad para actualizar mi sistema debido a este paquete que no deja continuar y del cual otros dependen para completar el emerge.

dejo aqui en code y ver si alguien ya ha solventado esta, ya he revisado en los diversos post que hacen mensión a redland y aplicado el parche que esta en este post pero sin lograr resolver.

```

f8.o rdf_query.o rdf_query_results.o rdf_query_rasqal.o rdf_serializer.o rdf_serializer_raptor.o rdf_log.o rdf_node_common.o rdf_statement_common.o rdf_node.o rdf_statement.o rdf_storage_list.o rdf_storage_hashes.o rdf_storage_trees.o rdf_storage_file.o rdf_digest_md5.o rdf_digest_sha1.o rdf_hash_bdb.o

libtool: link: x86_64-pc-linux-gnu-ranlib .libs/librdf.a

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

/bin/sh ../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.  -I/usr/include/mysql  -I/usr/include/db6.0 -I/usr/include/db6.0 -I/usr/include/raptor2  -I/usr/include/rasqal -I/usr/include/raptor2   -DREDLAND_MODULE_PATH="\""/usr/local/lib/redland:/usr/lib64/redland"\"" -DLIBRDF_INTERNAL=1 -march=core2 -O2 -pipe -c -o librdf_storage_mysql_la-rdf_storage_mysql.lo `test -f 'rdf_storage_mysql.c' || echo './'`rdf_storage_mysql.c

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/usr/include/mysql -I/usr/include/db6.0 -I/usr/include/db6.0 -I/usr/include/raptor2 -I/usr/include/rasqal -I/usr/include/raptor2 -DREDLAND_MODULE_PATH=\"/usr/local/lib/redland:/usr/lib64/redland\" -DLIBRDF_INTERNAL=1 -march=core2 -O2 -pipe -c rdf_storage_mysql.c  -fPIC -DPIC -o .libs/librdf_storage_mysql_la-rdf_storage_mysql.o

rdf_storage_mysql.c: In function 'librdf_storage_mysql_get_handle':

rdf_storage_mysql.c:450:5: error: unknown type name 'my_bool'; did you mean 'bool'?

  450 |     my_bool value=(context->reconnect) ? 1 : 0;

      |     ^~~~~~~

      |     bool

make[3]: *** [Makefile:886: librdf_storage_mysql_la-rdf_storage_mysql.lo] Error 1

make[3]: Leaving directory '/var/tmp/portage/dev-libs/redland-1.0.17-r2/work/redland-1.0.17/src'

make[2]: *** [Makefile:978: all-recursive] Error 1

make[2]: Leaving directory '/var/tmp/portage/dev-libs/redland-1.0.17-r2/work/redland-1.0.17/src'

make[1]: *** [Makefile:667: all] Error 2

make[1]: Leaving directory '/var/tmp/portage/dev-libs/redland-1.0.17-r2/work/redland-1.0.17/src'

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

 * ERROR: dev-libs/redland-1.0.17-r2::gentoo failed (compile phase):

 *   emake failed

 * 

 * If you need support, post the output of `emerge --info '=dev-libs/redland-1.0.17-r2::gentoo'`,

 * the complete build log and the output of `emerge -pqv '=dev-libs/redland-1.0.17-r2::gentoo'`.

 * The complete build log is located at '/var/tmp/portage/dev-libs/redland-1.0.17-r2/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/redland-1.0.17-r2/temp/environment'.

 * Working directory: '/var/tmp/portage/dev-libs/redland-1.0.17-r2/work/redland-1.0.17'

 * S: '/var/tmp/portage/dev-libs/redland-1.0.17-r2/work/redland-1.0.17'

>>> Failed to emerge dev-libs/redland-1.0.17-r2, Log file:

>>>  '/var/tmp/portage/dev-libs/redland-1.0.17-r2/temp/build.log'

 * Messages for package dev-lang/python-3.9.0_alpha2:

 * This is an early developer preview of Python 3.9.  New features

 * can still be added up to 2020-05-18.  It's not suitable for production

 * use, and it is not supported for Gentoo packages.

 * Messages for package dev-libs/redland-1.0.17-r2:

 * ERROR: dev-libs/redland-1.0.17-r2::gentoo failed (compile phase):

 *   emake failed

 * 

 * If you need support, post the output of `emerge --info '=dev-libs/redland-1.0.17-r2::gentoo'`,

 * the complete build log and the output of `emerge -pqv '=dev-libs/redland-1.0.17-r2::gentoo'`.

 * The complete build log is located at '/var/tmp/portage/dev-libs/redland-1.0.17-r2/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/redland-1.0.17-r2/temp/environment'.

 * Working directory: '/var/tmp/portage/dev-libs/redland-1.0.17-r2/work/redland-1.0.17'

 * S: '/var/tmp/portage/dev-libs/redland-1.0.17-r2/work/redland-1.0.17'

 * GNU info directory index is up-to-date.

```

Agradecido de antemano a cualquier nueva idea ó ayuda que pudieran brindar.

----------

## Eleazar Anzola

Resuelto el problema, al principio no habia entendido como crear el patch por lo que no cumplio con su función tal y como se esperaba. La explicación en el post antes mencionado es algo escueta y por lo que no fue bien interpretado por mi persona, solo hastsa haber visto la estructura de un patch dentro de la estructura de /etc/portage/patches fue que pude obtener los resultados esperados.

Aqui dejo la solución para los que tengan el mismo problema con redland

sudo mkdir /etc/portage/patches/dev-libs/redland-1.0.17-r2

sudo nano -w /etc/portage/patches/dev-libs/redland-1.0.17-r2/redland-1.0.17-r2.patch

```

--- a/src/rdf_storage_mysql.c

+++ b/src/rdf_storage_mysql.c

@@ -447,7 +447,7 @@

 

 #ifdef HAVE_MYSQL_OPT_RECONNECT

   if(1) {

-    my_bool value=(context->reconnect) ? 1 : 0;

+    char value=(context->reconnect) ? 1 : 0;

     mysql_options(connection->handle, MYSQL_OPT_RECONNECT, &value);

   }

 #endif 

```

----------

