You are not logged in.

#1 2015-02-25 20:33:58

simendsjo
Member
Registered: 2012-09-27
Posts: 113

A binary dependencies should be added as package dependencies

Not sure if this is the correct subforum, but I wish to raise an issue I encounter quite often, at least with "latest" (git/mercurial) packages.

As developers we often have a lot of development libraries installed, but unless you're a developer for the given project, there's a chance you haven't got the required libraries.
If the packages isn't listed the build breaks. Often far along, and this might happen several times while you add one and one package.
I don't want to think about how bad this problem can be for a "regular" user.

I wrote a small script that uses ldd on binaries and cross reference them to pacman to see what packages are required.
Hopefully some package managers can improve the script and improve the current situation.

#!/usr/bin/bash
BIN=$(which $1)
LIBS=$(ldd $BIN)

for libstring in $LIBS; do
    if [[ $libstring =~ ^/.+\.so.+ ]]; then
        FILE=$BASH_REMATCH
        if [[ $(pacman -Qo $FILE) =~ ^/.+\.so.+\ is\ owned\ by\ (.+)\ .+$ ]]; then
            package=${BASH_REMATCH[1]}
            echo $package
        fi
    fi
done

Usage:

$ required-packages nvim | sort | uniq
glibc
libtermkey
libuv
msgpack-git-neovim
unibilium

Offline

#2 2015-02-25 22:43:28

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: A binary dependencies should be added as package dependencies

Are you building in clean chroot?

Offline

#3 2015-02-25 22:47:29

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,561

Re: A binary dependencies should be added as package dependencies

Offline

#4 2015-02-26 07:27:35

simendsjo
Member
Registered: 2012-09-27
Posts: 113

Re: A binary dependencies should be added as package dependencies

Nice. Should be promoted visibly for package maintainers. I encounter this issue way too often.

Offline

#5 2015-02-26 07:28:21

simendsjo
Member
Registered: 2012-09-27
Posts: 113

Re: A binary dependencies should be added as package dependencies

karol wrote:

Are you building in clean chroot?

No. What are you thinking of?

Offline

#6 2015-02-26 08:22:07

anatolik
Developer
Registered: 2012-09-27
Posts: 458

Re: A binary dependencies should be added as package dependencies

Namcap tool can scan a package and inform if some dependencies are missed https://wiki.archlinux.org/index.php/Na … pendencies


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

#7 2015-02-26 08:24:05

anatolik
Developer
Registered: 2012-09-27
Posts: 458

Re: A binary dependencies should be added as package dependencies

simendsjo wrote:
karol wrote:

Are you building in clean chroot?

No. What are you thinking of?

https://wiki.archlinux.org/index.php/De … ean_Chroot

This helper might be useful as well
https://github.com/graysky2/clean-chroot-manager


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

#8 2015-02-26 08:43:50

simendsjo
Member
Registered: 2012-09-27
Posts: 113

Re: A binary dependencies should be added as package dependencies

anatolik wrote:
simendsjo wrote:
karol wrote:

Are you building in clean chroot?

No. What are you thinking of?

https://wiki.archlinux.org/index.php/De … ean_Chroot

This helper might be useful as well
https://github.com/graysky2/clean-chroot-manager

I see. The infrastructure and documentation is in place, but not all maintainers are using best practices.
Guess this is a "solved" issue then.

Offline

#9 2015-02-26 11:32:25

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,868
Website

Re: A binary dependencies should be added as package dependencies

If you encounter missing dependencies in official packages, you should file a bug report.

For AUR packages, you can request that a dependency be added in the comments, but for non-essential deps (i.e. things that a greedy configure script detects if they're there, but doesn't moan if they're not), it's up to the maintainer if they want to add them or not. You are free to maintain a local version of the PKGBUILD with all the dependencies under the sun if that suits you, of course.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB