Skip to contentSkip to conversation

package/git: use pkg-config to get ssl dependencies

PATCH New Fabrice Fontaine 3 participants 3 messages Mar 26, 2019 – Mar 28, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/git: use pkg-config to get ssl dependencies

On some architectures, atomic binutils are provided by the libatomic library from gcc. Linking with libatomic is therefore necessary, otherwise the build fails with:

/home/test/autobuild/run/instance-2/output/host/sparc-buildroot-linux-uclibc/sysroot/usr/lib/libssl.a(ssl_cert.o): In function `CRYPTO_DOWN_REF':
/home/test/autobuild/run/instance-2/output/build/libopenssl-1.1.1a/include/internal/refcount.h:50: undefined reference to `__atomic_fetch_sub_4'

This is often for example the case on sparcv8 32 bit.

To fix this issue, use pkg-config to retrieve openssl dependencies including atomic library, these dependencies must be passed to LIB_4_CRYPTO IN GIT_MAKE_OPTS

Fixes:
- http://autobuild.buildroot.org/results/3093897d14a854a7252b25b2fa1f8fdcbb26c9b7

---
 package/git/git.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/git/git.mk +2 -2
index 9b176d3661..aec30e3eb3 100644
@@ -12,9 +12,9 @@ GIT_LICENSE_FILES = COPYING LGPL-2.1
 GIT_DEPENDENCIES = zlib $(TARGET_NLS_DEPENDENCIES)
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
-GIT_DEPENDENCIES += openssl
+GIT_DEPENDENCIES += host-pkgconf openssl
 GIT_CONF_OPTS += --with-openssl
-GIT_CONF_ENV_LIBS += $(if $(BR2_STATIC_LIBS),-lz)
+GIT_MAKE_OPTS += LIB_4_CRYPTO="`$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`"
 else
 GIT_CONF_OPTS += --without-openssl
 endif
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 package/git: use pkg-config to get ssl dependencies

Quoted 13 lines · On Tue, 26 Mar 2019 18:27:04 +0100 Fabrice Fontaine…

On some architectures, atomic binutils are provided by the libatomic library from gcc. Linking with libatomic is therefore necessary, otherwise the build fails with:

/home/test/autobuild/run/instance-2/output/host/sparc-buildroot-linux-uclibc/sysroot/usr/lib/libssl.a(ssl_cert.o): In function `CRYPTO_DOWN_REF':
/home/test/autobuild/run/instance-2/output/build/libopenssl-1.1.1a/include/internal/refcount.h:50: undefined reference to `__atomic_fetch_sub_4'

This is often for example the case on sparcv8 32 bit.

To fix this issue, use pkg-config to retrieve openssl dependencies including atomic library, these dependencies must be passed to LIB_4_CRYPTO IN GIT_MAKE_OPTS

Quoted 7 lines

Fixes:
- http://autobuild.buildroot.org/results/3093897d14a854a7252b25b2fa1f8fdcbb26c9b7

---
 package/git/git.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 package/git: use pkg-config to get ssl dependencies

In reply to Fabrice Fontaine
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

On some architectures, atomic binutils are provided by the libatomic library from gcc. Linking with libatomic is therefore necessary, otherwise the build fails with:

/home/test/autobuild/run/instance-2/output/host/sparc-buildroot-linux-uclibc/sysroot/usr/lib/libssl.a(ssl_cert.o):
In function `CRYPTO_DOWN_REF':
/home/test/autobuild/run/instance-2/output/build/libopenssl-1.1.1a/include/internal/refcount.h:50:
undefined reference to `__atomic_fetch_sub_4'

This is often for example the case on sparcv8 32 bit.

Quoted 8 lines

To fix this issue, use pkg-config to retrieve openssl dependencies including atomic library, these dependencies must be passed to LIB_4_CRYPTO IN GIT_MAKE_OPTS

Fixes:
- http://autobuild.buildroot.org/results/3093897d14a854a7252b25b2fa1f8fdcbb26c9b7

Committed to 2018.02.x, 2018.11.x and 2019.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard