You are not logged in.

#1 2019-11-15 12:07:13

piomiq
Member
From: Warsaw, Poland
Registered: 2017-08-04
Posts: 16
Website

[SOLVED] Cannot build package due to libarchive reporting errors

Hi

I tried to build https://aur.archlinux.org/subtitlecomposer.git and creating package failed with two errors:

-> Generating .MTREE file...
Fatal Internal Error in libarchive: Out of memory
-> Compressing package...
bsdtar: Option --no-fflags is not supported

I used libarchive in the newest version, so: 3.4.0-3

$ bsdtar --version
bsdtar 3.1.2 - libarchive 3.1.2 - pigz 2.3 - mtar 1.1

I found that first errors has been fixed couple years ago, reported here: https://bugzilla.redhat.com/show_bug.cgi?id=1284162
About second error. This is not only issue related with this particular package, because I met the same error trying to build brave werbrowser - https://aur.archlinux.org/brave.git

Last edited by piomiq (2019-11-15 13:30:14)

Offline

#2 2019-11-15 12:15:06

ayekat
Member
Registered: 2011-01-17
Posts: 1,359
Website

Re: [SOLVED] Cannot build package due to libarchive reporting errors

piomiq wrote:

I used libarchive in the newest version, so: 3.4.0-3

$ bsdtar --version
bsdtar 3.1.2 - libarchive 3.1.2 - pigz 2.3 - mtar 1.1

The output of bsdtar --version there contradicts your claim…

--edit also, libarchive 3.1.2 was YEARS ago. Either you're running an ancient system there, or you've got another (unpackaged) installation of libarchive somewhere.

Last edited by ayekat (2019-11-15 12:17:03)


{,META,RE}PKGBUILDSpacman-hacks (includes makemetapkg and remakepkg) │ dotfiles

Offline

#3 2019-11-15 12:32:30

piomiq
Member
From: Warsaw, Poland
Registered: 2017-08-04
Posts: 16
Website

Re: [SOLVED] Cannot build package due to libarchive reporting errors

$ pacman -Q | grep libarchive
libarchive 3.4.0-3

$ bsdtar -h
bsdtar: manipulate archive files
First option must be a mode specifier:
-c Create  -r Add/Replace  -t List  -u Update  -x Extract
Common Options:
-b #  Use # 512-byte records per I/O block
-f <filename>  Location of archive (default /dev/st0)
-v    Verbose
-w    Interactive
Create: bsdtar -c [options] [<file> | <dir> | @<archive> | -C <dir> ]
<file>, <dir>  add these items to archive
-z, -j, -J, --lzma  Compress archive with gzip/bzip2/xz/lzma
--format {ustar|pax|cpio|shar}  Select archive format
--exclude <pattern>  Skip files that match pattern
-C <dir>  Change to <dir> before processing remaining files
@<archive>  Add entries from <archive> to output
List: bsdtar -t [options] [<patterns>]
<patterns>  If specified, list only entries that match/usr/local/bin
Extract: bsdtar -x [options] [<patterns>]
<patterns>  If specified, extract only entries that match
-k    Keep (don't overwrite) existing files
-m    Don't restore modification times
-O    Write entries to stdout, don't restore to disk
-p    Restore permissions (including ACLs, owner, file flags)
-Y    Multi-thread archiving and compression
bsdtar 3.1.2 - libarchive 3.1.2 - pigz 2.3 - mtar 1.1

And to be sure I downloaded package libarchive-3.4.0-3-x86_64.pkg.tar.xz and have installed it manually.

$ cd /usr/lib
$ pwd; ls -l | grep libarchive
/usr/lib
lrwxrwxrwx   1 root root        20 Nov 13 18:39 libarchive.so -> libarchive.so.13.4.0
lrwxrwxrwx   1 root root        20 Nov 13 18:39 libarchive.so.13 -> libarchive.so.13.4.0
-rwxr-xr-x   1 root root    771936 Nov 13 18:39 libarchive.so.13.4.0
$  cd ../bin
$ ls -l | grep bsdtar
-rwxr-xr-x 1 root root       71640 Nov 13 18:39 bsdtar

I think my system is up-to-date:

sudo pacman -Syu
[sudo] password for piotra:
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
multilib is up to date
fman is up to date
:: Starting full system upgrade...
warning: libarchive: local (3.4.0-3) is newer than core (3.4.0-2)
there is nothing to do

Last edited by piomiq (2019-11-15 12:47:45)

Offline

#4 2019-11-15 12:42:37

ayekat
Member
Registered: 2011-01-17
Posts: 1,359
Website

Re: [SOLVED] Cannot build package due to libarchive reporting errors

What's the output of this?

type bsdtar

{,META,RE}PKGBUILDSpacman-hacks (includes makemetapkg and remakepkg) │ dotfiles

Offline

#5 2019-11-15 12:48:15

piomiq
Member
From: Warsaw, Poland
Registered: 2017-08-04
Posts: 16
Website

Re: [SOLVED] Cannot build package due to libarchive reporting errors

Ok. I found another copy of bsdtar in /usr/local/bin. Probably some package installed it as dependency.
I rebuilt package (subtitlecomposer) with success.
Thanks for suggestions.

Last edited by piomiq (2019-11-15 12:49:05)

Offline

#6 2019-11-15 12:51:22

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,395
Website

Re: [SOLVED] Cannot build package due to libarchive reporting errors

bsdtar --version reports what version of libarchive bsdtar was built against (linked to) - so the fact that it doesn't match the installed version was precisely the problem.

piomiq wrote:

I found another copy of bsdtar in /usr/local/bin. Probably some package installed it as dependency

No, nothing from the repos would be installed in /usr/local/bin.  You installed it yourself (or ran some shady script as root that did it for/to you).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2019-11-15 12:58:32

piomiq
Member
From: Warsaw, Poland
Registered: 2017-08-04
Posts: 16
Website

Re: [SOLVED] Cannot build package due to libarchive reporting errors

No, nothing from the repos would be installed in /usr/local/bin.  You installed it yourself (or ran some shady script as root that did it for/to you).

I meant package from AUR. I don't remember where bsdtar came from.
Anyway issue solved. I'm not sure how to mark this topic as solved.

Last edited by piomiq (2019-11-15 12:58:44)

Offline

#8 2019-11-15 13:07:35

ayekat
Member
Registered: 2011-01-17
Posts: 1,359
Website

Re: [SOLVED] Cannot build package due to libarchive reporting errors

I meant package from AUR.

So check which package on your system owns that file:

pacman -Qo /usr/local/bin/bsdtar

Then again, packages should not install stuff in /usr/local (no matter whether they come from the AUR or not), and installing bsdtar like that specifically is also asking for trouble, since it's quite a core component used by pacman.
I'll second Trilby's guess that this might have been the work of some poor installation script.

You can mark a thread as solved by editing your first post and pre/appending "[SOLVED]" -- then again, I wouldn't consider this exactly solved yet. If I had random binaries lying around on my system, I would first try to find out where they came from, and why they were there, and what else is screwed up on my system.

Last edited by ayekat (2019-11-15 13:08:33)


{,META,RE}PKGBUILDSpacman-hacks (includes makemetapkg and remakepkg) │ dotfiles

Offline

#9 2019-11-15 13:28:27

piomiq
Member
From: Warsaw, Poland
Registered: 2017-08-04
Posts: 16
Website

Re: [SOLVED] Cannot build package due to libarchive reporting errors

$ pacman -Qo /usr/local/bin/bsdtar
error: No package owns /usr/local/bin/bsdtar

OK. Seems any package coming from AUR isn't guilty and the most likely this is my fault. Only don't remember when and why I made it. Maybe I tried to build some ancient package and forgot to clean up /usr/loca/bin directory.
Thanks again for suggestions and tips.

Offline

Board footer

Powered by FluxBB