buildgnupgconfigure

How to link libgpg-error installed in custom directory to build the libgcrypt


I'm attempting to compile libgcrypt 1.8.10. I encountered the following issue when attempting to create libgcrypt with the command

./configure:
>checking whether to enable AMD64 as(1) feature detection... yes
>checking for gpg-error-config... no
>checking for GPG Error - version >= 1.25... no
>
>configure: error: libgpg-error is needed.
>                See ftp://ftp.gnupg.org/gcrypt/libgpg-error/ .

So I built and installed 'libgpg-error-1.47' in the '/tmp/Abhiyjn/app' directory. It was installed successfully. I then attempted to create libgcrypt once more, but I continued to receive the same issue. After that, I attempted to build libgcrypt again, but received the same issue. I attempted to execute the configure script using options

./configure --prefix=/tmp/Abhiyjn/app/ LDFLAGS="-L/tmp/Abhiyjn/app/lib" CFLAGS="-I/tmp/Abhiyjn/app/include"

./configure --prefix=/tmp/Abhiyjn/app/ --with-libgpg-error-prefix="/tmp/Abhiyjn/app/lib/libgpg-error.so" CFLAGS="-I/tmp/Abhiyjn/app/include"

./configure --prefix=/tmp/Abhiyjn/app/ LDFLAGS=-L"/tmp/Abhiyjn/app/lib/pkgconfig/"

but none of it is working, How can properly link the libgpg-error which I installed in a custome directory


Solution

  • After encountering difficulties linking libgpg-error to build libgcrypt, I found a solution that worked for me. Here's what I did:

    Build and Install libgpg-error:

    Build libgcrypt with Linked libgpg-error:

    Build and Install libgcrypt: