5 Compilación (1)

Ahora vamos a compilar.

ingresamos a la carpeta ser_ims…..y ejecutamos el siguiente comando:

cd ser_ims….
make install-libs all

Si no hay problemas (falten librerías o alguna aplicación como Java no funciona) debería terminar todo sin mensajes de error. Note que un WARNING no es un error así que mantenga la calma si no ve error.

Una foto del proceso terminado.

Pero antes…un error….en la compilación:

…………-DHAVE_TIMEGM -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKARROUND -DHAVE_SELECT -I/usr/local/include -I/usr/local/include/mysql -I/usr/local/mysql/include -I/usr/include/mysql

-c row.c -o row.o row.c:33:25: fatal error: mysql/mysql.h: No such file or directorycompilation terminated.
make[1]: *** [row.o] Error 1
make[1]: Leaving directory `/opt/OpenIMSCore/ser_ims/modules/mysql’
make: *** [modules] Error 1

En este caso nos falta la librería mysql.h así que la buscamos en internet, la instalamos y vemos como sigue nuestra compilación.

[root@localhost ser_ims]# clear
[root@localhost ser_ims]# rpm -qa | grep mysql-devel*
[root@localhost ser_ims]# yum install mysql-devel*
Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package mysql-devel.i686 0:5.5.18-1.fc16 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================
Package Arch Version Repository Size
===============================================================================================
Installing:
mysql-devel i686 5.5.18-1.fc16 updates 168 k

Transaction Summary
===============================================================================================
Install 1 Package

Este es el paquete que nos faltaba y lo bajé con yum. Usted hágalo de la forma más simple que pueda…o sea, take it easy.

Veamos si ahora terminamos de compilar este módulo.

…….-DSER_VER=2001000 -DCFG_DIR='”/usr/local/etc/ser/”‘ -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP
-DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES
-DDBG_QM_MALLOC -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -ggdb
-DUSE_TLS -DTLS_HOOKS -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024
-DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD
-DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM
-DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKARROUND -DHAVE_SELECT -c lcr_mod.c
-o lcr_mod.o
In file included from ../../parser/msg_parser.h:54:0,
from ../../sr_module.h:47,
from lcr_mod.c:41:
../../parser/../ip_addr.h: In function âmatchnetâ:
../../parser/../ip_addr.h:196:6: warning: variable âretâ set but not used [-Wunused-but-set-variable]
In file included from lcr_mod.c:43:0:
../../ut.h: In function âstr2sâ:
../../ut.h:154:17: warning: variable âinitâ set but not used [-Wunused-but-set-variable]
gcc -fPIC -DPIC -g -O9 -funroll-loops -Wcast-align -minline-all-stringops -falign-loops -ftree-vectorize
-mtune=athlon64 -Wall -DNAME='”ser”‘ -DVERSION='”2.1.0-dev1 OpenIMSCore”‘ -DARCH='”i386″‘
-DOS=’linux_’ -DOS_QUOTED='”linux”‘ -DCOMPILER='”gcc 4.6.2″‘ -D__CPU_i386 -D__OS_linux
-DSER_VER=2001000 -DCFG_DIR='”/usr/local/etc/ser/”‘ -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP
-DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES
-DDBG_QM_MALLOC -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -ggdb -DUSE_TLS
-DTLS_HOOKS -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM
-DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL
-DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKARROUND
-DHAVE_SELECT -c lcr_rpc.c -o lcr_rpc.o
In file included from ../../parser/msg_parser.h:54:0,
from lcr_mod.h:37,
from lcr_rpc.c:28:
../../parser/../ip_addr.h: In function âmatchnetâ:
../../parser/../ip_addr.h:196:6: warning: variable âretâ set but not used [-Wunused-but-set-variable]
gcc -shared -Wl,-O2 -Wl,-E lcr_mod.o lcr_rpc.o -o lcr.so
make[1]: Leaving directory `/opt/OpenIMSCore/ser_ims/modules/lcr’
[root@localhost ser_ims]#

Y así termina la compilación de forma exitosa.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s