You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to install freeswitch with mod_signalwire support on Ubuntu 22.04. When I go to build libks, I always fail.
Does this have to do with openssl version? If so, the cmake should have flagged the wrong version, I assume, which it did not.
========== Results from cmake . ===============
root@phoneNUC:$ cmake .
Platform is linux
Build type: Debug CXX Flags:
Install prefix: /usr
-- Found Git: /usr/bin/git (found version "2.34.1")
-- The C compiler identification is GNU 10.4.0
-- The CXX compiler identification is GNU 10.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
LibKS Version 1.8
Detecting last git tag to generate a Debian complian changelog.
Found last git tag: v1.8.2
Generating a changelog using commits since git tag: v1.8.2
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Looking for clock_getres in rt
-- Looking for clock_getres in rt - found
-- Looking for clock_nanosleep in rt
-- Looking for clock_nanosleep in rt - found
-- Looking for strftime in rt
-- Looking for strftime in rt - found
-- Looking for sched_setscheduler in c
-- Looking for sched_setscheduler in c - found
-- Looking for malloc in c
-- Looking for malloc in c - found
-- Looking for usleep in c
-- Looking for usleep in c - found
-- Looking for pthread_setschedparam
-- Looking for pthread_setschedparam - found
-- Looking for memmem
-- Looking for memmem - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for memory.h
-- Looking for memory.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for sched.h
-- Looking for sched.h - found
-- Looking for byteswap.h
-- Looking for byteswap.h - found
-- Looking for dirent.h
-- Looking for dirent.h - found
-- Found LibM: /usr/lib/x86_64-linux-gnu/libm.so
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Checking for module 'uuid'
-- Found uuid, version 2.37.2
Found UUID setup target at imported location: /usr/lib/x86_64-linux-gnu/libuuid.so
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "3.0.2")
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "3.0.2") found components: Crypto SSL
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
Compiler supports visibility
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/libks
========== Results from make ================
root@phoneNUC:$ make
[ 1%] Building C object CMakeFiles/ks.dir/src/include/cJSON/cJSON.c.o
[ 2%] Building C object CMakeFiles/ks.dir/src/include/cJSON/cJSON_Utils.c.o
[ 3%] Building C object CMakeFiles/ks.dir/src/ks.c.o
[ 4%] Building C object CMakeFiles/ks.dir/src/ks_acl.c.o
[ 5%] Building C object CMakeFiles/ks.dir/src/ks_base64.c.o
[ 7%] Building C object CMakeFiles/ks.dir/src/ks_buffer.c.o
[ 8%] Building C object CMakeFiles/ks.dir/src/ks_config.c.o
[ 9%] Building C object CMakeFiles/ks.dir/src/ks_debug.c.o
[ 10%] Building C object CMakeFiles/ks.dir/src/ks_dso.c.o
[ 11%] Building C object CMakeFiles/ks.dir/src/ks_env.c.o
[ 13%] Building C object CMakeFiles/ks.dir/src/ks_handle.c.o
[ 14%] Building C object CMakeFiles/ks.dir/src/ks_hash.c.o
[ 15%] Building C object CMakeFiles/ks.dir/src/ks_json.c.o
[ 16%] Building C object CMakeFiles/ks.dir/src/ks_json_check.c.o
[ 17%] Building C object CMakeFiles/ks.dir/src/ks_log.c.o
[ 19%] Building C object CMakeFiles/ks.dir/src/ks_metrics.c.o
[ 20%] Building C object CMakeFiles/ks.dir/src/ks_mutex.c.o
[ 21%] Building C object CMakeFiles/ks.dir/src/ks_pool.c.o
[ 22%] Building C object CMakeFiles/ks.dir/src/ks_printf.c.o
[ 23%] Building C object CMakeFiles/ks.dir/src/ks_q.c.o
[ 25%] Building C object CMakeFiles/ks.dir/src/ks_sb.c.o
[ 26%] Building C object CMakeFiles/ks.dir/src/ks_socket.c.o
[ 27%] Building C object CMakeFiles/ks.dir/src/ks_ssl.c.o
[ 28%] Building C object CMakeFiles/ks.dir/src/ks_string.c.o
[ 29%] Building C object CMakeFiles/ks.dir/src/ks_thread.c.o
[ 30%] Building C object CMakeFiles/ks.dir/src/ks_thread_pool.c.o
[ 32%] Building C object CMakeFiles/ks.dir/src/ks_throughput.c.o
[ 33%] Building C object CMakeFiles/ks.dir/src/ks_time.c.o
[ 34%] Building C object CMakeFiles/ks.dir/src/ks_utf8.c.o
[ 35%] Building C object CMakeFiles/ks.dir/src/ks_uuid.c.o
[ 36%] Building C object CMakeFiles/ks.dir/src/kws.c.o
[ 38%] Building C object CMakeFiles/ks.dir/src/simclist.c.o
/opt/libks/src/simclist.c: In function ‘ks_list_dump_filedescriptor’:
/opt/libks/src/simclist.c:95:57: warning: ‘write’ reading 8 bytes from a region of size 4 [-Wstringop-overflow=]
95 | if (write(fd, msgbuf, msglen) < 0) return -1;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/libks/src/simclist.c:1357:6: note: in expansion of macro ‘WRITE_ERRCHECK’
1357 | WRITE_ERRCHECK(fd, &bufsize, sizeof(ks_size_t));
| ^~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from /usr/include/x86_64-linux-gnu/sys/signal.h:1,
from /opt/libks/src/include/libks/ks_platform.h:94,
from /opt/libks/src/include/libks/ks.h:38,
from /opt/libks/src/simclist.c:23:
/usr/include/unistd.h:378:16: note: in a call to function ‘write’ declared with attribute ‘read_only (2, 3)’
378 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
| ^~~~~
/opt/libks/src/simclist.c:95:57: warning: ‘write’ reading 8 bytes from a region of size 4 [-Wstringop-overflow=]
95 | if (write(fd, msgbuf, msglen) < 0) return -1;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/libks/src/simclist.c:1382:6: note: in expansion of macro ‘WRITE_ERRCHECK’
1382 | WRITE_ERRCHECK(fd, &bufsize, sizeof(ks_size_t));
| ^~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from /usr/include/x86_64-linux-gnu/sys/signal.h:1,
from /opt/libks/src/include/libks/ks_platform.h:94,
from /opt/libks/src/include/libks/ks.h:38,
from /opt/libks/src/simclist.c:23:
/usr/include/unistd.h:378:16: note: in a call to function ‘write’ declared with attribute ‘read_only (2, 3)’
378 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
| ^~~~~
[ 39%] Linking C shared library libks.so
[ 39%] Built target ks
[ 40%] Building C object tests/CMakeFiles/testpools.dir/testpools.c.o
[ 41%] Building C object tests/CMakeFiles/testpools.dir/tap.c.o
[ 42%] Linking C executable testpools
/usr/bin/ld: ../libks.so.1: undefined reference to CRYPTO_mem_ctrl' /usr/bin/ld: ../libks.so.1: undefined reference to SSL_get_peer_certificate'
collect2: error: ld returned 1 exit status
make[2]: *** [tests/CMakeFiles/testpools.dir/build.make:116: tests/testpools] Error 1
make[1]: *** [CMakeFiles/Makefile2:185: tests/CMakeFiles/testpools.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
The text was updated successfully, but these errors were encountered:
wget -O - https://www.openssl.org/source/openssl-1.1.1u.tar.gz | tar zxf -
cd openssl-1.1.1u
./config --prefix=/usr/local
make
sudo make install_sw install_ssldirs
Then, after cmake . I did this:
find CMakeFiles/ -type f | xargs sed -i s/\\/usr\\/lib\\/x86_64-linux-gnu\\/libssl/\\/usr\\/local\\/lib\\/libssl/g
find CMakeFiles/ -type f | xargs sed -i s/\\/usr\\/lib\\/x86_64-linux-gnu\\/libcrypto/\\/usr\\/local\\/lib\\/libcrypto/g
sed -i s/\\/usr\\/lib\\/x86_64-linux-gnu\\/libssl/\\/usr\\/local\\/lib\\/libssl/g CMakeCache.txt
sed -i s/\\/usr\\/lib\\/x86_64-linux-gnu\\/libcrypto/\\/usr\\/local\\/lib\\/libcrypto/g CMakeCache.txt
Essentially replacing paths to libssl 3 to libssl 1.1. A bit hacky but works.
I am attempting to install freeswitch with mod_signalwire support on Ubuntu 22.04. When I go to build libks, I always fail.
Does this have to do with openssl version? If so, the cmake should have flagged the wrong version, I assume, which it did not.
========== Results from cmake . ===============
root@phoneNUC:$ cmake .
Platform is linux
Build type: Debug CXX Flags:
Install prefix: /usr
-- Found Git: /usr/bin/git (found version "2.34.1")
-- The C compiler identification is GNU 10.4.0
-- The CXX compiler identification is GNU 10.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
LibKS Version 1.8
Detecting last git tag to generate a Debian complian changelog.
Found last git tag: v1.8.2
Generating a changelog using commits since git tag: v1.8.2
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Looking for clock_getres in rt
-- Looking for clock_getres in rt - found
-- Looking for clock_nanosleep in rt
-- Looking for clock_nanosleep in rt - found
-- Looking for strftime in rt
-- Looking for strftime in rt - found
-- Looking for sched_setscheduler in c
-- Looking for sched_setscheduler in c - found
-- Looking for malloc in c
-- Looking for malloc in c - found
-- Looking for usleep in c
-- Looking for usleep in c - found
-- Looking for pthread_setschedparam
-- Looking for pthread_setschedparam - found
-- Looking for memmem
-- Looking for memmem - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for memory.h
-- Looking for memory.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for sched.h
-- Looking for sched.h - found
-- Looking for byteswap.h
-- Looking for byteswap.h - found
-- Looking for dirent.h
-- Looking for dirent.h - found
-- Found LibM: /usr/lib/x86_64-linux-gnu/libm.so
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Checking for module 'uuid'
-- Found uuid, version 2.37.2
Found UUID setup target at imported location: /usr/lib/x86_64-linux-gnu/libuuid.so
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "3.0.2")
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "3.0.2") found components: Crypto SSL
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
Compiler supports visibility
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/libks
========== Results from make ================
root@phoneNUC:$ make
[ 1%] Building C object CMakeFiles/ks.dir/src/include/cJSON/cJSON.c.o
[ 2%] Building C object CMakeFiles/ks.dir/src/include/cJSON/cJSON_Utils.c.o
[ 3%] Building C object CMakeFiles/ks.dir/src/ks.c.o
[ 4%] Building C object CMakeFiles/ks.dir/src/ks_acl.c.o
[ 5%] Building C object CMakeFiles/ks.dir/src/ks_base64.c.o
[ 7%] Building C object CMakeFiles/ks.dir/src/ks_buffer.c.o
[ 8%] Building C object CMakeFiles/ks.dir/src/ks_config.c.o
[ 9%] Building C object CMakeFiles/ks.dir/src/ks_debug.c.o
[ 10%] Building C object CMakeFiles/ks.dir/src/ks_dso.c.o
[ 11%] Building C object CMakeFiles/ks.dir/src/ks_env.c.o
[ 13%] Building C object CMakeFiles/ks.dir/src/ks_handle.c.o
[ 14%] Building C object CMakeFiles/ks.dir/src/ks_hash.c.o
[ 15%] Building C object CMakeFiles/ks.dir/src/ks_json.c.o
[ 16%] Building C object CMakeFiles/ks.dir/src/ks_json_check.c.o
[ 17%] Building C object CMakeFiles/ks.dir/src/ks_log.c.o
[ 19%] Building C object CMakeFiles/ks.dir/src/ks_metrics.c.o
[ 20%] Building C object CMakeFiles/ks.dir/src/ks_mutex.c.o
[ 21%] Building C object CMakeFiles/ks.dir/src/ks_pool.c.o
[ 22%] Building C object CMakeFiles/ks.dir/src/ks_printf.c.o
[ 23%] Building C object CMakeFiles/ks.dir/src/ks_q.c.o
[ 25%] Building C object CMakeFiles/ks.dir/src/ks_sb.c.o
[ 26%] Building C object CMakeFiles/ks.dir/src/ks_socket.c.o
[ 27%] Building C object CMakeFiles/ks.dir/src/ks_ssl.c.o
[ 28%] Building C object CMakeFiles/ks.dir/src/ks_string.c.o
[ 29%] Building C object CMakeFiles/ks.dir/src/ks_thread.c.o
[ 30%] Building C object CMakeFiles/ks.dir/src/ks_thread_pool.c.o
[ 32%] Building C object CMakeFiles/ks.dir/src/ks_throughput.c.o
[ 33%] Building C object CMakeFiles/ks.dir/src/ks_time.c.o
[ 34%] Building C object CMakeFiles/ks.dir/src/ks_utf8.c.o
[ 35%] Building C object CMakeFiles/ks.dir/src/ks_uuid.c.o
[ 36%] Building C object CMakeFiles/ks.dir/src/kws.c.o
[ 38%] Building C object CMakeFiles/ks.dir/src/simclist.c.o
/opt/libks/src/simclist.c: In function ‘ks_list_dump_filedescriptor’:
/opt/libks/src/simclist.c:95:57: warning: ‘write’ reading 8 bytes from a region of size 4 [-Wstringop-overflow=]
95 | if (write(fd, msgbuf, msglen) < 0) return -1;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/libks/src/simclist.c:1357:6: note: in expansion of macro ‘WRITE_ERRCHECK’
1357 | WRITE_ERRCHECK(fd, &bufsize, sizeof(ks_size_t));
| ^~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from /usr/include/x86_64-linux-gnu/sys/signal.h:1,
from /opt/libks/src/include/libks/ks_platform.h:94,
from /opt/libks/src/include/libks/ks.h:38,
from /opt/libks/src/simclist.c:23:
/usr/include/unistd.h:378:16: note: in a call to function ‘write’ declared with attribute ‘read_only (2, 3)’
378 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
| ^~~~~
/opt/libks/src/simclist.c:95:57: warning: ‘write’ reading 8 bytes from a region of size 4 [-Wstringop-overflow=]
95 | if (write(fd, msgbuf, msglen) < 0) return -1;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/libks/src/simclist.c:1382:6: note: in expansion of macro ‘WRITE_ERRCHECK’
1382 | WRITE_ERRCHECK(fd, &bufsize, sizeof(ks_size_t));
| ^~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from /usr/include/x86_64-linux-gnu/sys/signal.h:1,
from /opt/libks/src/include/libks/ks_platform.h:94,
from /opt/libks/src/include/libks/ks.h:38,
from /opt/libks/src/simclist.c:23:
/usr/include/unistd.h:378:16: note: in a call to function ‘write’ declared with attribute ‘read_only (2, 3)’
378 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
| ^~~~~
[ 39%] Linking C shared library libks.so
[ 39%] Built target ks
[ 40%] Building C object tests/CMakeFiles/testpools.dir/testpools.c.o
[ 41%] Building C object tests/CMakeFiles/testpools.dir/tap.c.o
[ 42%] Linking C executable testpools
/usr/bin/ld: ../libks.so.1: undefined reference to
CRYPTO_mem_ctrl' /usr/bin/ld: ../libks.so.1: undefined reference to
SSL_get_peer_certificate'collect2: error: ld returned 1 exit status
make[2]: *** [tests/CMakeFiles/testpools.dir/build.make:116: tests/testpools] Error 1
make[1]: *** [CMakeFiles/Makefile2:185: tests/CMakeFiles/testpools.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
The text was updated successfully, but these errors were encountered: