Problem building R package that depands in libsodium

I am trying to build the package “sodium” for R, which depends on libsodium. I have installed a bundle that includes libsodium, but it still fails.

james@Q35~ $ sudo swupd search-file libsodium
Password: 
Downloading all Clear Linux manifests
 [100%]

Searching for 'libsodium'

Bundle Remmina (62 MB to install)
        /usr/share/package-licenses/libsodium/LICENSE
        /usr/lib64/libsodium.so.23.2.0
        /usr/lib64/libsodium.so.23

Bundle keepassxc [installed] (1757 MB on system)
        /usr/share/package-licenses/libsodium/LICENSE
        /usr/lib64/libsodium.so.23.2.0
        /usr/lib64/libsodium.so.23

There is no .pc file for sodium in /usr/lib64/pkgconfig, should there be?

In R:

> install.packages("sodium")
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://rweb.crmda.ku.edu/cran/src/contrib/sodium_1.1.tar.gz'
Content type 'application/x-gzip' length 489760 bytes (478 KB)
==================================================
downloaded 478 KB

* installing *source* package ‘sodium’ ...
** package ‘sodium’ successfully unpacked and MD5 sums checked
** using staged installation
Package libsodium was not found in the pkg-config search path.
Perhaps you should add the directory containing `libsodium.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libsodium' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lsodium
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libsodium was not found. Try installing:
 * deb: libsodium-dev (Debian, Ubuntu, etc)
 * rpm: libsodium-devel (Fedora, EPEL)
 * csw: libsodium_dev (Solaris)
 * brew: libsodium (OSX)
If libsodium is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libsodium.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'

Looks like the dev portion of that package isn’t in Clear Linux yet. Adding devpkg-libsodium, should be in a release early next week.

2 Likes