Actualmente, la versión de zeromq utilizada por el servidor es 4.1.2 y hay un error:
Recurso no disponible temporalmente (src/signaler.cpp:282)
Si actualiza directamente la versión de zeromq, puede causar problemas de incompatibilidad y otras excepciones del programa que dependen de zmq. Así que decidí parchearlo yo mismo en 4.1.2.
Hay dos tipos de parches:
- https://github.com/zeromq/libzmq/pull/1584/files
- https://github.com/zeromq/libzmq/pull/1595/files
Entorno del compilador
yum install -y git build-essential libtool autoconf automake pkg-config unzip libkrb5-dev gcc-c++ gcc
Comience a descargar el código fuente y compilar
git clone https://github.com/zeromq/zeromq4-1.git
cd zeromq4-1
git checkout v4.1.2
wget https://raw.githubusercontent.com/pijyoi/libzmq/596d6e5b1c2d060b2b5b09d01f7ebd207041791d/src/mailbox.cpp -O mailbox.cpp --no-check-certificate
wget https://raw.githubusercontent.com/pijyoi/libzmq/596d6e5b1c2d060b2b5b09d01f7ebd207041791d/src/signaler.cpp -O signaler.cpp --no-check-certificate
wget https://raw.githubusercontent.com/pijyoi/libzmq/596d6e5b1c2d060b2b5b09d01f7ebd207041791d/src/signaler.hpp -O signaler.hpp --no-check-certificate
sh autogen.sh
./configure
make
Se produce el siguiente error
No package 'libsodium' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables sodium_CFLAGS
and sodium_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
make: *** [config.status] 错误 1
Falta una biblioteca libsodium
requiere compilación adicional
cd /tmp && git clone git://github.com/jedisct1/libsodium.git && cd libsodium && git checkout e2a30a && ./autogen.sh && ./configure --prefix=/usr/ && make check && make install && ldconfig
Hay un nuevo error
autoreconf: running: aclocal --force -I m4
configure.ac:1: error: Autoconf version 2.65 or higher is required
configure.ac:1: the top level
autom4te: /usr/bin/m4 failed with exit status: 63
aclocal: autom4te failed with exit status: 63
autoreconf: aclocal failed with exit status: 63
Necesita compilar autoconf versión 2.65 o superior
wget ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
tar zxvf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure --prefix=/usr/
make && make install
Error al compilar zeromq
checking for sodium... configure: error: Package requirements (libsodium) were not met:
No package 'libsodium' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables sodium_CFLAGS
and sodium_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
El error anterior indica que zeromq no puede encontrar el libsodium que acabamos de compilar, y el archivo libsodium.pc debe agregarse a /usr/lib/pkgconfig
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: libsodium
Version: 0.4.3
Description: sodium library
Libs: -L${libdir} -lsodium
Cflags: -I${includedir}
Al mismo tiempo, debe agregar una línea en /etc/ld.so.conf: /usr/lib/
echo /usr/lib >>/etc/ld.so.conf
Después de los pasos anteriores, la compilación finalmente es exitosa. desgastado