Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libassuan/libksba: build error against libgpg-error #19880

Closed
feckert opened this issue Nov 11, 2022 · 2 comments · Fixed by #19932
Closed

libassuan/libksba: build error against libgpg-error #19880

feckert opened this issue Nov 11, 2022 · 2 comments · Fixed by #19932

Comments

@feckert
Copy link
Member

feckert commented Nov 11, 2022

Maintainer: @neheb
Environment: x86_64, APU3, latest openwrt build

Description:
Since the following commit I have build error for the libs libksba and libassuan. I have remove the your commit I get an build error for libgcrypt.

libksba:

...
checking for cc for build... gcc
checking if gcc supports -Wpointer-arith... yes
checking if gcc supports -Wno-pointer-sign... yes
checking whether the visibility attribute is supported... yes
checking for broken visibility attribute... no
checking for broken alias attribute... no
checking if gcc supports -fvisibility=hidden... yes
checking for gpg-error-config... /home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt/staging_dir/target-x86_64_musl/host/bin/gpg-error-config
checking for gpgrt-config... /home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt/staging_dir/target-x86_64_musl/host/bin/gpgrt-config
./configure: line 14388: test: : integer expression expected
./configure: line 14391: test: : integer expression expected
checking for GPG Error - version >= 1.8... no
configure: error: libgpg-error is needed.
                See ftp://ftp.gnupg.org/gcrypt/libgpg-error/ .
make[3]: *** [Makefile:75: /home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt/build_dir/target-x86_64_musl/libksba-1.6.2/.configured_68b329da9893e34099c7d8ad5cb9c940] Error 1

libassuan:

...
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking for sys/socket.h... yes
checking for socklen_t... yes
checking for struct cmsghdr.cmsg_len... yes
checking for gpg-error-config... /home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt/staging_dir/target-x86_64_musl/host/bin/gpg-error-config
checking for gpgrt-config... /home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt/staging_dir/target-x86_64_musl/host/bin/gpgrt-config
./configure: line 14281: test: : integer expression expected
./configure: line 14284: test: : integer expression expected
checking for GPG Error - version >= 1.17... no
configure: error: libgpg-error was not found
make[3]: *** [Makefile:77: /home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt/build_dir/target-x86_64_musl/libassuan-2.5.5/.configured_68b329da9893e34099c7d8ad5cb9c940] Error 1

libgcrypt:

....
checking whether ARMv8 Crypto Extension support is requested... yes
checking whether PPC crypto support is requested... yes
checking whether a -O flag munging is requested... yes
checking whether a instrumentation (-fprofile, -fsanitize) munging is requested... yes
checking whether to enable AMD64 as(1) feature detection... yes
checking for gpg-error-config... /home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt/staging_dir/target-x86_64_musl/usr/bin/gpg-error-config
checking for gpgrt-config... /home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt/staging_dir/target-x86_64_musl/host/bin/gpgrt-config
./configure: line 14658: /home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt/staging_dir/target-x86_64_musl/usr/bin/gpg-error-config: No such file or directory
./configure: line 14670: test: : integer expression expected
./configure: line 14673: test: : integer expression expected
checking for GPG Error - version >= 1.27... no
configure: error: libgpg-error is needed.
                See ftp://ftp.gnupg.org/gcrypt/libgpg-error/ .
make[2]: *** [Makefile:75: /home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt/build_dir/target-x86_64_musl/libgcrypt-1.10.1/.configured_68b329da9893e34099c7d8ad5cb9c940] Error 1
make[2]: Leaving directory '/home/feckert/workspace/openwrt/LDM-master-x86_64/build/feeds/packages/libs/libgcrypt'
time: package/feeds/packages/libgcrypt/compile#1.50#0.39#1.72
    ERROR: package/feeds/packages/libgcrypt failed to build.
make[1]: *** [package/Makefile:116: package/feeds/packages/libgcrypt/compile] Error 1
make[1]: Leaving directory '/home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt'
make: *** [/home/feckert/workspace/openwrt/LDM-master-x86_64/build/openwrt/include/toplevel.mk:231: package/feeds/packages/libgcrypt/compile] Error 

@hnyman
Copy link
Contributor

hnyman commented Nov 12, 2022

Related discussions in #19828 and #19832
Cc @neheb @flyn-org

flyn-org added a commit to flyn-org/packages that referenced this issue Nov 18, 2022
Packages like libassuan and libksba would not compile after updating
libgpg-error to 1.46. This was because gpg-error.m4 (and thus the affected
packages' configure scripts) relies on gpgrt-config, which in turn needs
access to gpg-error.pc. This modifies the libgpg-error build process to
copy gpg-error.pc to OpenWrt's staging directory, so that it is available
for subsequent dependent package builds.

Fixes: openwrt#19880

Signed-off-by: W. Michael Petullo <mike@flyn.org>
flyn-org added a commit to flyn-org/packages that referenced this issue Nov 18, 2022
Packages like libassuan and libksba would not compile after updating
libgpg-error to 1.46. This was because gpg-error.m4 (and thus the affected
packages' configure scripts) relies on gpgrt-config, which in turn needs
access to gpg-error.pc. This modifies the libgpg-error build process to
copy gpg-error.pc to OpenWrt's staging directory, so that it is available
for subsequent dependent package builds.

Fixes: openwrt#19880

Signed-off-by: W. Michael Petullo <mike@flyn.org>
@egorenar
Copy link
Contributor

egorenar commented Nov 19, 2022

And i'm facing this problem:

/usr/lib64/libgpg-error.so: file not recognized: file format not recognized

For some reason, libksba tries to link the host library.

make[6]: Entering directory '/home/egorenar/Repositories/openwrt-rel/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/libksba-1.6.2/src'
/bin/sh ../libtool  --tag=CC   --mode=link arm-openwrt-linux-muslgnueabi-gcc   -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -fmacro-prefix-map=/home/egorenar/Repositories/openwrt-rel/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/libksba-1.6.2=libksba-1.6.2 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wpointer-arith -Wno-pointer-sign -fvisibility=hidden    -Wl,--version-script=./libksba.vers -version-info 22:2:14  -L/home/egorenar/Repositories/openwrt-rel/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-11.3.0_musl_eabi/usr/lib -L/home/egorenar/Repositories/openwrt-rel/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-11.3.0_musl_eabi/lib -znow -zrelro  -o libksba.la -rpath /usr/lib visibility.lo reader.lo writer.lo asn1-parse.lo asn1-func.lo asn1-func2.lo ber-help.lo ber-decoder.lo der-encoder.lo der-builder.lo cert.lo cms.lo cms-parser.lo crl.lo certreq.lo ocsp.lo keyinfo.lo oid.lo name.lo dn.lo time.lo version.lo util.lo asn1-tables.lo   -L/usr/lib64 -lgpg-error
OpenWrt-libtool: link: arm-openwrt-linux-muslgnueabi-gcc -shared  -fPIC -DPIC  .libs/visibility.o .libs/reader.o .libs/writer.o .libs/asn1-parse.o .libs/asn1-func.o .libs/asn1-func2.o .libs/ber-help.o .libs/ber-decoder.o .libs/der-encoder.o .libs/der-builder.o .libs/cert.o .libs/cms.o .libs/cms-parser.o .libs/crl.o .libs/certreq.o .libs/ocsp.o .libs/keyinfo.o .libs/oid.o .libs/name.o .libs/dn.o .libs/time.o .libs/version.o .libs/util.o .libs/asn1-tables.o   -L/home/egorenar/Repositories/openwrt-rel/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-11.3.0_musl_eabi/usr/lib -L/home/egorenar/Repositories/openwrt-rel/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-11.3.0_musl_eabi/lib -L/usr/lib64 -lgpg-error  -Os -mfloat-abi=hard -fstack-protector -Wl,-z -Wl,now -Wl,-z -Wl,relro -Wl,--version-script=./libksba.vers   -Wl,-soname -Wl,libksba.so.8 -o .libs/libksba.so.8.14.2
/usr/lib64/libgpg-error.so: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
make[6]: *** [Makefile:571: libksba.la] Error 1

This is the reason:

-L/usr/lib64 -lgpg-error

And this is the problem detected during configuration:

checking for gpg-error-config... /home/egorenar/Repositories/openwrt-rel/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/host/bin/gpg-error-config
checking for gpgrt-config... /usr/bin/gpgrt-config
configure: Use gpgrt-config with /usr/lib as gpg-error-config
checking for GPG Error - version >= 1.8... yes (1.45)
configure: WARNING:
***
*** The config script "/usr/bin/gpgrt-config --libdir=/usr/lib gpg-error" was
*** built for x86_64-unknown-linux-gnu and thus may not match the
*** used host arm-openwrt-linux-gnu.
*** You may want to use the configure option --with-libgpg-error-prefix
*** to specify a matching config script or use $SYSROOT.
***
checking for an ANSI C-conforming const... yes

egorenar added a commit to egorenar/openwrt-packages that referenced this issue Nov 19, 2022
Packages like libassuan and libksba would not compile after updating
libgpg-error to 1.46. This was because gpg-error.m4 (and thus the affected
packages' configure scripts) relies on gpgrt-config, which in turn needs
access to gpg-error.pc. This modifies the libgpg-error build process to
copy gpg-error.pc to OpenWrt's staging directory, so that it is available
for subsequent dependent package builds.

Fixes: openwrt#19880

Signed-off-by: W. Michael Petullo <mike@flyn.org>
Signed-off-by: Alexander Egorenkov <egorenar-dev@posteo.net>
1582130940 pushed a commit to 1582130940/OpenWrt-Lean-Packages that referenced this issue Nov 19, 2022
Packages like libassuan and libksba would not compile after updating
libgpg-error to 1.46. This was because gpg-error.m4 (and thus the affected
packages' configure scripts) relies on gpgrt-config, which in turn needs
access to gpg-error.pc. This modifies the libgpg-error build process to
copy gpg-error.pc to OpenWrt's staging directory, so that it is available
for subsequent dependent package builds.

Fixes: openwrt/packages#19880

Signed-off-by: W. Michael Petullo <mike@flyn.org>
BKPepe pushed a commit that referenced this issue Dec 3, 2022
Packages like libassuan and libksba would not compile after updating
libgpg-error to 1.46. This was because gpg-error.m4 (and thus the affected
packages' configure scripts) relies on gpgrt-config, which in turn needs
access to gpg-error.pc. This modifies the libgpg-error build process to
copy gpg-error.pc to OpenWrt's staging directory, so that it is available
for subsequent dependent package builds.

Fixes: #19880

Signed-off-by: W. Michael Petullo <mike@flyn.org>
(cherry picked from commit a93e026)
stokito pushed a commit to stokito/packages that referenced this issue Dec 6, 2022
Packages like libassuan and libksba would not compile after updating
libgpg-error to 1.46. This was because gpg-error.m4 (and thus the affected
packages' configure scripts) relies on gpgrt-config, which in turn needs
access to gpg-error.pc. This modifies the libgpg-error build process to
copy gpg-error.pc to OpenWrt's staging directory, so that it is available
for subsequent dependent package builds.

Fixes: openwrt#19880

Signed-off-by: W. Michael Petullo <mike@flyn.org>
SibrenVasse pushed a commit to SibrenVasse/packages that referenced this issue Feb 26, 2023
Packages like libassuan and libksba would not compile after updating
libgpg-error to 1.46. This was because gpg-error.m4 (and thus the affected
packages' configure scripts) relies on gpgrt-config, which in turn needs
access to gpg-error.pc. This modifies the libgpg-error build process to
copy gpg-error.pc to OpenWrt's staging directory, so that it is available
for subsequent dependent package builds.

Fixes: openwrt#19880

Signed-off-by: W. Michael Petullo <mike@flyn.org>
(cherry picked from commit a93e026)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants