You are not logged in.

#1 2013-12-27 21:00:32

GloW_on_dub
Member
Registered: 2013-03-13
Posts: 391
Website

How to handle dependencies

I'm currently building a package for a nice game. wich is my first one, before putting it into aur.
The linux version being beta, there is no official dependencies list.
Yet ldd give me all info i need.
But i'm quite sure there is a lot of transitive dependencies inside the output of ldd, is there anyway to check that, better than wandering inside pacman -Qi ?
Also there is a lot of dependencies wich are so obvious they don't need to be specified i think (like linux, xorg...), but what is the rule to know wich dependecies is really needed?

Anyway, in that specific case :

[glow@GlowArch ~/aur/geminirue2/data/x86_64]$ ldd GeminiRue.bin.x86_64 
        linux-vdso.so.1 (0x00007fff197fe000)
        liballeg.so.4.4 => /home/glow/aur/geminirue2/data/x86_64/lib64/liballeg.so.4.4 (0x00007f6fc7029000)
        libtheoradec.so.1 => /home/glow/aur/geminirue2/data/x86_64/lib64/libtheoradec.so.1 (0x00007f6fc6e0e000)
        libogg.so.0 => /home/glow/aur/geminirue2/data/x86_64/lib64/libogg.so.0 (0x00007f6fc6c08000)
        libvorbis.so.0 => /home/glow/aur/geminirue2/data/x86_64/lib64/libvorbis.so.0 (0x00007f6fc69d9000)
        libvorbisfile.so.3 => /home/glow/aur/geminirue2/data/x86_64/lib64/libvorbisfile.so.3 (0x00007f6fc67d1000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f6fc652c000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f6fc6328000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f6fc610b000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f6fc5e08000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f6fc5a5e000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f6fc575a000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f6fc5544000)
        libSM.so.6 => /usr/lib/libSM.so.6 (0x00007f6fc533c000)
        libICE.so.6 => /usr/lib/libICE.so.6 (0x00007f6fc5120000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f6fc4de5000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f6fc4bd3000)
        libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x00007f6fc49c8000)
        libXpm.so.4 => /usr/lib/libXpm.so.4 (0x00007f6fc47b6000)
        libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0x00007f6fc45b0000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007f6fc439a000)
        libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f6fc418a000)
        libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f6fc3f55000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f6fc7329000)
        libuuid.so.1 => /usr/lib/libuuid.so.1 (0x00007f6fc3d50000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f6fc3b31000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007f6fc3927000)
        libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f6fc3721000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f6fc351d000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f6fc3317000)

The only dependencies wich ought to be included is, i think, freetype2, am i right ?

Thanks for help

Last edited by GloW_on_dub (2013-12-29 14:19:01)

Offline

#2 2013-12-27 21:06:08

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: How to handle dependencies

namcap will tell you a lot.

Offline

#3 2013-12-27 21:06:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,518
Website

Re: How to handle dependencies

GloW_on_dub wrote:

but what is the rule to know wich dependecies is really needed?

...

The only dependencies wich ought to be included is, i think, freetype2, am i right ?

Everything that is needed should be listed, unless it is in base or base-devel.  Plus any build-deps should be listed.  You can try building in a clean chroot to see what you need to add to be able to build and run it.  It will be a lot more than freetyp2.  I see libvorbis, libogg, and libx11 in there without even looking through the list.  These are dependencies, right?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2013-12-27 21:11:03

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: How to handle dependencies

Trilby wrote:

Everything that is needed should be listed, unless it is in base or base-devel.

Things in base-devel must be listed, too, that group isn't guaranteed at runtime. Even things in the base group can be listed to be nice for those not running the entire base group.

Offline

#5 2013-12-27 21:13:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,518
Website

Re: How to handle dependencies

While I agree it can be a good idea, it is not required as the wiki indicates that base-devel is a prerequisite to using AUR packages.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2013-12-27 21:18:43

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: How to handle dependencies

It's required to build, not required at run time

Offline

#7 2013-12-27 21:22:29

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,653
Website

Re: How to handle dependencies

Indeed. I believe that base-devel is just a prerequisite to building packages (so e.g. pkg-config needn't be included in the makedepends array), if the packages depends on base or base-devel packages to function, they should be included in the depends array, just like any other package (be they in core/, extra/, community/, multilib/ or the AUR).


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

#8 2013-12-27 23:30:39

GloW_on_dub
Member
Registered: 2013-03-13
Posts: 391
Website

Re: How to handle dependencies

First thx about namcap, i will use this to find dependencies too.
So i will put a complete depends array from namcap , thanks for info.

Edit : Thanks for your help, i have been able to create my first package.
Using pkgfile and pacgraph i have been able to extract the needed dependencies from the ldd output.
my depends array is actually : ('libvorbis' 'libtheora' 'libxpm' 'libxcursor' 'libxxf86vm' 'freetype2') .
I've tried to replace the provided liballeg, but it seems not to work (undefined symbol) with the one provided in allegro4 package.

Last edited by GloW_on_dub (2013-12-28 22:41:29)

Offline

Board footer

Powered by FluxBB