Manjaro linux ruby jupyter notebook integration: gem fails

Hello,

I am using manjaro. I am trying to use jupyter notebook with ruby kernel. I have found several directions about how to configure jupyter notebook but gem installs fails.

Following site ruby-jupyter notebook integration provides good directions. However, in arch/manjaro I had difficulty to understand which packages to install and in my system as described below, the gem installations gives errors.

I have installed zeromq package via manjaro package manager. But czmq was available in AUR at czmq-git, and I installed it. To the best of knowledge in arch/manjaro system, these are the only required things to install since packages are bundled with development files and development tools are readily available in the system (compiler, autoconf etc.)

The required gem packages are as far as I understand cztop, ffi-rmzq, rbczmq ve iruby

cztop and ffi-rmzq were installed without problem. However rbczmq compilation gives following error.
The header files pointed out in the end of the log are available at /usr/include in my system. So I really do not understand the error reported. I skipped the some parts since I exceeded the number character limits.

current directory: /home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq
/usr/bin/ruby -I /usr/lib/ruby/3.0.0 -r ./siteconf20211016-940382-x8b51o.rb extconf.rb
"./autogen.sh"

.
.
.
.
.
.

make[1]: Leaving directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/tests'
Making all in tools
make[1]: Entering directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/tools'
  CC       curve_keygen.o
  CCLD     curve_keygen
make[1]: Leaving directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/tools'
make[1]: Entering directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq'
Making install in src
make[1]: Entering directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/src'
make[2]: Entering directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/src'
 /usr/bin/mkdir -p '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/lib'
 /bin/sh ../libtool   --mode=install /usr/bin/install -c   libzmq.la '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/lib'
libtool: install: /usr/bin/install -c .libs/libzmq.so.3.1.0 /home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/lib/libzmq.so.3.1.0
libtool: install: (cd /home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/lib && { ln -s -f libzmq.so.3.1.0 libzmq.so.3 || { rm -f libzmq.so.3 && ln -s libzmq.so.3.1.0 libzmq.so.3; }; })
libtool: install: (cd /home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/lib && { ln -s -f libzmq.so.3.1.0 libzmq.so || { rm -f libzmq.so && ln -s libzmq.so.3.1.0 libzmq.so; }; })
libtool: install: /usr/bin/install -c .libs/libzmq.lai /home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/lib/libzmq.la
libtool: install: /usr/bin/install -c .libs/libzmq.a /home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/lib/libzmq.a
libtool: install: chmod 644 /home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/lib/libzmq.a
libtool: install: ranlib /home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/lib/libzmq.a
libtool: finish: PATH="/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin:/home/user/.local/share/gem/ruby/3.0.0/bin:/home/user/lib/node.js/node_modules/.bin:/home/user/.pub-cache/bin:/home/user/bin:/home/user/src/taskwarrior/src:/sbin" ldconfig -n /home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /usr/bin/mkdir -p '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include'
 /usr/bin/install -c -m 644 ../include/zmq.h ../include/zmq_utils.h '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include'
 /usr/bin/mkdir -p '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/lib/pkgconfig'
 /usr/bin/install -c -m 644 libzmq.pc '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/lib/pkgconfig'
make[2]: Leaving directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/src'
make[1]: Leaving directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/src'
Making install in doc
make[1]: Entering directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/doc'
make[2]: Entering directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/doc'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Leaving directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/doc'
make[1]: Leaving directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/doc'
Making install in perf
make[1]: Entering directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/perf'
make[2]: Entering directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/perf'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/perf'
make[1]: Leaving directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/perf'
Making install in tests
make[1]: Entering directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/tests'
make[2]: Entering directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/tests'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/tests'
make[1]: Leaving directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/tests'
Making install in tools
make[1]: Entering directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/tools'
make[2]: Entering directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/tools'
 /usr/bin/mkdir -p '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/bin'
  /bin/sh ../libtool   --mode=install /usr/bin/install -c curve_keygen '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/bin'
libtool: install: /usr/bin/install -c .libs/curve_keygen /home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/bin/curve_keygen
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/tools'
make[1]: Leaving directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq/tools'
make[1]: Entering directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq'
make[2]: Entering directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq'
make[1]: Leaving directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/zeromq'
"./autogen.sh"
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I config --force -I config
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'.
libtoolize: copying file 'config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'config'.
libtoolize: copying file 'config/libtool.m4'
libtoolize: copying file 'config/ltoptions.m4'
libtoolize: copying file 'config/ltsugar.m4'
libtoolize: copying file 'config/ltversion.m4'
libtoolize: copying file 'config/lt~obsolete.m4'
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal -I config --force -I config
autoreconf: running: /usr/bin/autoconf --include=config --force
configure.ac:45: warning: The macro `AC_PROG_CC_C99' is obsolete.
configure.ac:45: You should run autoupdate.
./lib/autoconf/c.m4:1659: AC_PROG_CC_C99 is expanded from...
configure.ac:45: the top level
configure.ac:47: warning: The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
configure.ac:47: You should run autoupdate.
config/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:47: the top level
configure.ac:47: warning: AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
configure.ac:47: put the 'win32-dll' option into LT_INIT's first parameter.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
config/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:47: the top level
configure.ac:48: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:48: You should run autoupdate.
config/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:48: the top level
configure.ac:251: warning: The macro `AC_HEADER_STDC' is obsolete.
configure.ac:251: You should run autoupdate.
./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
configure.ac:251: the top level
configure.ac:268: warning: The macro `AC_HEADER_TIME' is obsolete.
configure.ac:268: You should run autoupdate.
./lib/autoconf/headers.m4:743: AC_HEADER_TIME is expanded from...
configure.ac:268: the top level
configure.ac:283: warning: The macro `AC_TYPE_SIGNAL' is obsolete.
configure.ac:283: You should run autoupdate.
./lib/autoconf/types.m4:776: AC_TYPE_SIGNAL is expanded from...
configure.ac:283: the top level
autoreconf: running: /usr/bin/autoheader --include=config --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:44: installing 'config/compile'
configure.ac:47: installing 'config/config.guess'
configure.ac:47: installing 'config/config.sub'
configure.ac:14: installing 'config/install-sh'
configure.ac:14: installing 'config/missing'
Makefile.am:24: warning: whitespace following trailing backslash
Makefile.am: installing './INSTALL'
addons/Makefile.am:3: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
addons/Makefile.am: installing 'config/depcomp'
src/Makefile.am:61: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
parallel-tests: installing 'config/test-driver'
autoreconf: Leaving directory '.'
"./configure LDFLAGS=-L/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/lib CFLAGS='-g -fPIC' --prefix=/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst --with-libzmq=/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst --disable-shared"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '3000' is supported by ustar format... yes
checking whether GID '3000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for sys/time.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for gawk... (cached) gawk
checking for pthread_create in -lpthread... yes
checking for zmq_init in -lzmq... yes
checking whether libzmq installation works... yes
checking for asciidoc... yes
checking for xmlto... no
configure: WARNING: You are building an unreleased version of libczmq and asciidoc or xmlto are not installed.
configure: WARNING: Documentation will not be built and manual pages will not be installed.
checking whether to build documentation... no
checking whether to install manpages... no
checking for sodium_init in -lsodium... yes
checking for egrep... (cached) /usr/bin/grep -E
checking for errno.h... yes
checking for arpa/inet.h... yes
checking for netinet/tcp.h... yes
checking for netinet/in.h... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for sys/socket.h... yes
checking for sys/time.h... (cached) yes
checking for unistd.h... (cached) yes
checking for limits.h... yes
checking for ifaddrs.h... yes
checking for net/if.h... yes
checking for net/if_media.h... no
checking for linux/wireless.h... yes
checking for _Bool... yes
checking for stdbool.h that conforms to C99... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking for ssize_t... yes
checking for uint32_t... yes
checking for working volatile... yes
checking return type of signal handlers... void
checking for perror... yes
checking for gettimeofday... yes
checking for memset... no
checking for getifaddrs... yes
checking for freeifaddrs... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating src/libczmq.pc
config.status: creating addons/Makefile
config.status: creating src/platform.h
config.status: executing depfiles commands
config.status: executing libtool commands
"make all && make install"
Making all in src
make[1]: Entering directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/czmq/src'
make  all-am
make[2]: Entering directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/czmq/src'
gcc -DHAVE_CONFIG_H -I. -I../include  -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE  -g -I/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT czmq_selftest.o -MD -MP -MF .deps/czmq_selftest.Tpo -c -o czmq_selftest.o czmq_selftest.c
mv -f .deps/czmq_selftest.Tpo .deps/czmq_selftest.Po
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include  -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE  -g -I/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zauth.lo -MD -MP -MF .deps/zauth.Tpo -c -o zauth.lo zauth.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zauth.lo -MD -MP -MF .deps/zauth.Tpo -c zauth.c -o zauth.o
mv -f .deps/zauth.Tpo .deps/zauth.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include  -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE  -g -I/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zbeacon.lo -MD -MP -MF .deps/zbeacon.Tpo -c -o zbeacon.lo zbeacon.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zbeacon.lo -MD -MP -MF .deps/zbeacon.Tpo -c zbeacon.c -o zbeacon.o
mv -f .deps/zbeacon.Tpo .deps/zbeacon.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include  -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE  -g -I/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zcert.lo -MD -MP -MF .deps/zcert.Tpo -c -o zcert.lo zcert.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zcert.lo -MD -MP -MF .deps/zcert.Tpo -c zcert.c -o zcert.o
mv -f .deps/zcert.Tpo .deps/zcert.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include  -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE  -g -I/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zcertstore.lo -MD -MP -MF .deps/zcertstore.Tpo -c -o zcertstore.lo zcertstore.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zcertstore.lo -MD -MP -MF .deps/zcertstore.Tpo -c zcertstore.c -o zcertstore.o
mv -f .deps/zcertstore.Tpo .deps/zcertstore.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include  -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE  -g -I/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zchunk.lo -MD -MP -MF .deps/zchunk.Tpo -c -o zchunk.lo zchunk.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zchunk.lo -MD -MP -MF .deps/zchunk.Tpo -c zchunk.c -o zchunk.o
mv -f .deps/zchunk.Tpo .deps/zchunk.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include  -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE  -g -I/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zclock.lo -MD -MP -MF .deps/zclock.Tpo -c -o zclock.lo zclock.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zclock.lo -MD -MP -MF .deps/zclock.Tpo -c zclock.c -o zclock.o
mv -f .deps/zclock.Tpo .deps/zclock.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include  -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE  -g -I/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zconfig.lo -MD -MP -MF .deps/zconfig.Tpo -c -o zconfig.lo zconfig.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zconfig.lo -MD -MP -MF .deps/zconfig.Tpo -c zconfig.c -o zconfig.o
mv -f .deps/zconfig.Tpo .deps/zconfig.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include  -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE  -g -I/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zctx.lo -MD -MP -MF .deps/zctx.Tpo -c -o zctx.lo zctx.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zctx.lo -MD -MP -MF .deps/zctx.Tpo -c zctx.c -o zctx.o
mv -f .deps/zctx.Tpo .deps/zctx.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include  -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE  -g -I/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zdir.lo -MD -MP -MF .deps/zdir.Tpo -c -o zdir.lo zdir.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -pedantic -Werror -Wall -D_GNU_SOURCE -DLINUX -D_REENTRANT -D_THREAD_SAFE -g -I/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/rbczmq/dst/include -g -fPIC -MT zdir.lo -MD -MP -MF .deps/zdir.Tpo -c zdir.c -o zdir.o
zdir.c: In function ‘zdir_new’:
zdir.c:156:9: error: ‘readdir_r’ is deprecated [-Werror=deprecated-declarations]
  156 |         int rc = readdir_r (handle, entry, &result);
      |         ^~~
In file included from ../include/czmq_prelude.h:257,
                 from ../include/czmq.h:31,
                 from zdir.c:35:
/usr/include/dirent.h:183:12: note: declared here
  183 | extern int readdir_r (DIR *__restrict __dirp,
      |            ^~~~~~~~~
zdir.c:159:13: error: ‘readdir_r’ is deprecated [-Werror=deprecated-declarations]
  159 |             rc = readdir_r (handle, entry, &result);
      |             ^~
In file included from ../include/czmq_prelude.h:257,
                 from ../include/czmq.h:31,
                 from zdir.c:35:
/usr/include/dirent.h:183:12: note: declared here
  183 | extern int readdir_r (DIR *__restrict __dirp,
      |            ^~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:794: zdir.lo] Error 1
make[2]: Leaving directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/czmq/src'
make[1]: *** [Makefile:600: all] Error 2
make[1]: Leaving directory '/home/user/.local/share/gem/ruby/3.0.0/gems/rbczmq-1.7.9/ext/czmq/src'
make: *** [Makefile:415: all-recursive] Error 1
CZMQ compile error!
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/usr/bin/$(RUBY_BASE_NAME)
	--with-system-libs
	--without-system-libs
	--with-system-libs
	--without-system-libs

extconf failed, exit code 1

gem install iruby gives following error.

current directory: /home/user/.local/share/gem/ruby/3.0.0/gems/iruby-0.7.4/ext
rake RUBYARCHDIR\=/home/user/.local/share/gem/ruby/3.0.0/extensions/x86_64-linux/3.0.0/iruby-0.7.4 RUBYLIBDIR\=/home/user/.local/share/gem/ruby/3.0.0/extensions/x86_64-linux/3.0.0/iruby-0.7.4
rake failedNo such file or directory - rake

Any help much appreciated.

I think gem install rake will work.