You are not logged in.

#1 2013-03-04 08:56:09

dlin
Member
From: Taipei,Taiwan
Registered: 2005-09-21
Posts: 265

[SOLVED] why libarchive.so require libnettle.so on my embedded system

I try to build pacman based on other Linux distribution on my embedded system.
And I don't know why there is libnettle.so required.
So, I traced the PKGBUILD. And found it is occurs on libarchive 3.1.2.

On normal Arch Linux, there is no libnettle depends.

$ldd /usr/lib/libarchive.so | sort
	libacl.so.1 => /usr/lib/libacl.so.1 (0x00007f835211f000)
	libattr.so.1 => /usr/lib/libattr.so.1 (0x00007f8351f1a000)
	libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f835169a000)
	libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0x00007f8352328000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f83510d7000)
	libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f8350ed2000)
	libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f8351cef000)
	liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f83518ab000)
	liblzo2.so.2 => /usr/lib/liblzo2.so.2 (0x00007f8351ace000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f8350cb6000)
	libz.so.1 => /usr/lib/libz.so.1 (0x00007f8351484000)
	linux-vdso.so.1 (0x00007fffbb1f7000)
	/usr/lib64/ld-linux-x86-64.so.2 (0x00007f83529fe000)

On my embedded system linux, there is libnettle depends.

$ ldd pkg/usr/lib/libarchive.so |sort
        /lib/ld-linux.so.2 (0x52aac000)
        libacl.so.1 => /usr/lib/libacl.so.1 (0x29648000)
        libattr.so.1 => /usr/lib/libattr.so.1 (0x29660000)
        libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x29700000)
        libc.so.6 => /lib/libc.so.6 (0x29744000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0x29674000)
        liblzma.so.5 => /lib/liblzma.so.5 (0x296d0000)
        liblzo2.so.2 => /usr/lib/liblzo2.so.2 (0x296a4000)
        libnettle.so.4 => /usr/lib/libnettle.so.4 (0x2960c000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x29840000)
        libz.so => /usr/lib/libz.so (0x29720000)

 ldd /usr/lib/libssl.so|sort
        /lib/ld-linux.so.2 (0x52aac000)
        libc.so.6 => /lib/libc.so.6 (0x29798000)
        libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0x295cc000)
        libdl.so.2 => /lib/libdl.so.2 (0x29760000)
        libz.so => /usr/lib/libz.so (0x29774000)

I've rebuild my libarchive many times, but it always replace libcrypto by libnettle.  Any tip to correct or debug this problem?

Solution, added the following option to ./configure.
--without-nettle

Last edited by dlin (2013-03-04 13:51:17)


Running 4 ArchLinux including sh4twbox,server,notebook,desktop. my AUR packages

Offline

#2 2013-03-04 10:39:13

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] why libarchive.so require libnettle.so on my embedded system

no idea why it prefers libnettle over libcrypto, but you can tell libarchive NOT to use libnettle at all :

from ./configure --help, optional packages  :
--without-nettle        Don't build with crypto support from Nettle


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2013-03-04 12:22:19

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] why libarchive.so require libnettle.so on my embedded system

We build in clean chroots which don't have nettle present, so libarchive doesn't detect and link to nettle.

Offline

#4 2013-03-04 13:50:06

dlin
Member
From: Taipei,Taiwan
Registered: 2005-09-21
Posts: 265

Re: [SOLVED] why libarchive.so require libnettle.so on my embedded system

Thanks, this method works.  But, could I suggest the default PKGBUILD added this.  That make it always build the same config result even if I installed 'nettle'.

Lone_Wolf wrote:

no idea why it prefers libnettle over libcrypto, but you can tell libarchive NOT to use libnettle at all :

from ./configure --help, optional packages  :
--without-nettle        Don't build with crypto support from Nettle


Running 4 ArchLinux including sh4twbox,server,notebook,desktop. my AUR packages

Offline

#5 2013-03-05 02:56:38

dlin
Member
From: Taipei,Taiwan
Registered: 2005-09-21
Posts: 265

Re: [SOLVED] why libarchive.so require libnettle.so on my embedded system

falconindy wrote:

We build in clean chroots which don't have nettle present, so libarchive doesn't detect and link to nettle.

Could you please tell me what's 'clean chroots'?

Is there any script to make sure the 'clean chroot' process?

Does that mean the chroot environment:

1. pacman -Syu  base base-devel current repository (not test)
2. pacman -S any make depends
3. makepkg


Running 4 ArchLinux including sh4twbox,server,notebook,desktop. my AUR packages

Offline

#6 2013-03-05 03:12:02

dlin
Member
From: Taipei,Taiwan
Registered: 2005-09-21
Posts: 265

Re: [SOLVED] why libarchive.so require libnettle.so on my embedded system

Maybe this is the answer about clean chroot
https://wiki.archlinux.org/index.php/De … ean_Chroot


Running 4 ArchLinux including sh4twbox,server,notebook,desktop. my AUR packages

Offline

Board footer

Powered by FluxBB