[gnutls-devel] GnuTLS | error build gnutls and dependency non root (admin) user (#1486)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Tue Jun 6 22:52:50 CEST 2023



Andy Kimpe created an issue: https://gitlab.com/gnutls/gnutls/-/issues/1486



## Description of problem:

error build on no root (admin) acces

so it's impossible for me to install dependencies with dnf and so I have to compile gnutls and all it's dependencies in my $HOME

## Version of gnutls used:

libunistring 1.1

nettle 3.9

gnutls 3.8.0

## Distributor of gnutls (e.g., Ubuntu, Fedora, RHEL)

Fedora 38 no admin acces build gnutls and all dependency to $HOME directory


## How reproducible:

Steps to Reproduce:

```

#!/bin/bash
cd $HOME
rm -rf $HOME/ffmpeg_sources $HOME/ffmpeg_build $HOME/bin
mkdir -p $HOME/ffmpeg_sources
export PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"
export LD_LIBRARY_PATH="$HOME/ffmpeg_build/lib"
export LD_RUN_PATH="$HOME/ffmpeg_build/lib"
export LDFLAGS="-Wl,-rpath=$HOME/ffmpeg_build/lib"
export PATH="$PATH:$HOME/bin"
export HOGWEED_LIBS="$HOME/ffmpeg_build/lib"
export NETTLE_LIBS="$HOME/ffmpeg_build/lib"
export NETTLE_CFLAGS="-I$HOME/ffmpeg_build/include/"
export GMP_LIBS="$HOME/ffmpeg_build/lib"
sourcedown() {
	cd $HOME/ffmpeg_sources/
	rm -rf *
	wget $1
	tar -xvf $(find $HOME/ffmpeg_sources/ -type f)
	rm -f *.tar*
	cd $(ls)
}
sourcebuild() {
	make -j$(nproc)
	make install
}
sourcedown https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/nasm-2.16.01.tar.gz
./autogen.sh
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
sourcebuild
sourcedown https://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
sourcebuild
sourcedown http://artfiles.org/openssl.org/source/openssl-3.1.1.tar.gz
./config --prefix=$HOME/ffmpeg_build --openssldir=$HOME/ffmpeg_build
make -j$(nproc)
# install no doc
make install_sw 
make install_ssldirs
mv $HOME/ffmpeg_build/bin/c_rehash $HOME/bin/
mv $HOME/ffmpeg_build/bin/openssl $HOME/bin/
rm -rf $HOME/ffmpeg_build/target/bin/
cd $HOME/ffmpeg_sources/
rm -rf *
git clone --branch stable --depth 1 https://code.videolan.org/videolan/x264.git
cd x264
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin/" --enable-static
sourcebuild
cd /root/ffmpeg_sources/
rm -rf *
git clone --branch stable --depth 2 https://bitbucket.org/multicoreware/x265_git
cd /root/ffmpeg_sources/x265_git/build/linux
$CMAKE -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DBIN_INSTALL_DIR:PATH=$HOME/bin/ -DENABLE_SHARED:bool=off ../../source
sourcebuild
sourcedown https://github.com/mstorsjo/fdk-aac/archive/refs/tags/v2.0.2.tar.gz
autoreconf -fiv
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin/" --disable-shared
sourcebuild
sourcedown https://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin/" --disable-shared --enable-nasm
sourcebuild
sourcedown https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin/" --disable-shared
sourcebuild
cd /root/ffmpeg_sources/
rm -rf *
wget -O /root/ffmpeg_sources/libvpx-1.13.0.tar.gz https://chromium.googlesource.com/webm/libvpx/+archive/d6eb9696aa72473c1a11d34d928d35a3acc0c9a9.tar.gz
mkdir -p libvpx-1.13.0
cd /root/ffmpeg_sources/libvpx-1.13.0
tar -xvf /root/ffmpeg_sources/libvpx-1.13.0.tar.gz
./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm
sourcebuild
sourcedown https://ftp.gnu.org/gnu/nettle/nettle-3.9.tar.gz
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin/" --libdir="$HOME/ffmpeg_build/lib" --enable-shared --enable-fat --enable-mini-gmp
sourcebuild
sourcedown https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin/" --enable-static --enable-cxx
sourcebuild
sourcedown https://ftp.gnu.org/gnu/libtasn1/libtasn1-4.19.0.tar.gz
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin/" --enable-static
sourcebuild
sourcedown https://ftp.gnu.org/gnu/libunistring/libunistring-1.1.tar.gz
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin/" --enable-static
sourcebuild
sourcedown https://ftp.gnu.org/gnu/libidn/libidn2-2.3.4.tar.gz
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin/" --enable-static
sourcebuild
sourcedown https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/gnutls-3.8.0.tar.xz
./configure --prefix=$HOME/ffmpeg_build --bindir=$HOME/bin/ --libdir=$HOME/ffmpeg_build/lib \
--enable-gost --enable-sha1-support --disable-static --disable-openssl-compatibility \
--disable-non-suiteb-curves --without-tpm --with-tpm2 --enable-ktls \
--enable-libdane --without-zlib --without-brotli --without-zstd --disable-rpath


```

## Actual results:

```

configure: error: 
  ***
  *** Libunistring was not found. To use the included one, use --with-included-unistring

```

try with -with-included-unistring parameter

```

./configure --prefix=$HOME/ffmpeg_build --bindir=$HOME/bin/ --libdir=$HOME/ffmpeg_build/lib \
--enable-gost --enable-sha1-support --disable-static --disable-openssl-compatibility \
--disable-non-suiteb-curves --without-tpm --with-tpm2 --enable-ktls \
--enable-libdane --without-zlib --without-brotli --without-zstd --disable-rpath -with-included-unistring


```


## Expected results:

```

checking for nettle_rsa_sec_decrypt... no
configure: error: Nettle lacks the required rsa_sec_decrypt function


```





thank you in advance for your help also it would be good to indicate the solution in the readme of the project because you only indicate how to install the dependencies when you have admin rights but not when you don't have them

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/issues/1486
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20230606/3b5df34f/attachment.html>


More information about the Gnutls-devel mailing list