Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Dependency not found? (Read 1004 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] Dependency not found?

Hello! Linux newbie here

I was building GIMP, based on this https://wiki.gimp.org/wiki/Hacking:Building
It says to use Meson to build GIMP's dependencies, and eventually GIMP itself.

So, I download latest gegl (4.34)
and do this pretty much:
Code: [Select]
cd gegl
meson ~/gegl/_build
    --prefix=${GIMP_PREFIX}
    --buildtype=release
    -Db_lto=true

cd _build
ninja
ninja install

I type
Code: [Select]
pkg-config gegl-0.4 --modversion
and it outputs 0.4.34

Then I go to build GIMP
Code: [Select]
cd gimp
meson ~/gimp/_build
    --prefix=${GIMP_PREFIX}
    --buildtype=release
    -Db_lto=true

And I get this (attached image)

I can only assume it doesn't find the pkg, anyway here is the path it tries to find:
Code: [Select]
GIMP_PREFIX=${HOME}/gimp_prefix

# Used to detect the build dependencies
export PKG_CONFIG_PATH="${GIMP_PREFIX}/share/pkgconfig:${GIMP_PREFIX}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
# Assuming a 64-bit build. Remove otherwise.
export PKG_CONFIG_PATH="${GIMP_PREFIX}/lib64/pkgconfig:$PKG_CONFIG_PATH"

Again, I am a newbie, I am pretty much copy-pasting things, I don't know how path variables work, any help is appreciated <3

Re: Dependency not found?

Reply #1
But why not to install GIMP from the repositories? Or, if you wanna build it, there is an AUR package: https://aur.archlinux.org/packages/gimp-git/
When building packages from AUR, all necessary dependencies are pulled in automatically.

Re: Dependency not found?

Reply #2
Always stick to using the package manager or AUR helper.

If a package is not available in the repo's or AUR and you want to build it yourself do so by creating a PKGBUILD for it. It's often really trivial. There's good documentation and you can often start by just repurposing a simple PKGBUILD from another package. Or for simple / trivial programs don't install them in the system dirs. Run them from your home directory.

You'll keep a cleaner system that way.  In fact otherwise you will break your install sooner or later unless you REALLY know what you are doing.
The whole point of 'package management' is the system knowing exactly which packages, and their versions, are installed.
As soon as you step outside of this you have partially 'broken' your install.

 

Re: Dependency not found?

Reply #3
https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s09.html
It's quite safe to install non-packaged software under /usr/local or sometimes if appropriate /opt and often very useful too, for instance if you need an alternative version of something already installed as a package.
I wonder from the error if gegl is the right version the gimp build is looking for. But generally it's going to be a lot easier using makepkg and a PKGBUILD from the AUR, as hopefully all the right deps and conf are already in place. Even if you wanted to do your own build later, then trying it like that then studying the PKGBUILD is going to be a great help.

Re: Dependency not found?

Reply #4
https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s09.html
It's quite safe to install non-packaged software under /usr/local or sometimes if appropriate /opt and often very useful too, for instance if you need an alternative version of something already installed as a package.

It's safe if you know what you are doing. There are so many build systems these days that it's not always super easy to find where or how to set the installation prefix. Get that wrong and it can cause complications. Most build systems will happily overwrite on install. And most online 'cut and paste' guides will be into /usr/bin /usr/lib etc .

One off the beauties of pacman is the packaging system is really easy to learn compared to most distros. If you can figure out how to compile and install complex packages, with dependencies, you can figure out PKGBUILD's. And have them installed wherever you choose if you require multiple versions.
So I still think most people are better off staying within it most off the time.

You're not at all wrong  ;)
But PKGBUILD's make more sense to me.

Re: Dependency not found?

Reply #5
But why not to install GIMP from the repositories? Or, if you wanna build it, there is an AUR package: https://aur.archlinux.org/packages/gimp-git/
When building packages from AUR, all necessary dependencies are pulled in automatically.

I was used to pacman, but I found out I couldn't download the linked AUR package (gimp-git), so I used yay, which downloaded all dependencies for me

Attached image #1 is the result. AUR's gimp-git, like the gimp i was manually trying to build, requires gegl-0.4.34, which is the latest gegl, yet all I find from AUR is 0.4.32 (attached image #2)

On PKGBUILDs, I don't know anything about them. I have gegl-0.4.34 on my computer, I just need to somehow make my computer detect it (idk where its path installed is) and use it for building

Quote
It's safe if you know what you are doing.
I don't really know what I'm doing, hence I'm here to ask since I am a linux newbie. If I somehow make gegl-0.34 into a PKGBUILD and install it locally, it should work (if I did correctly grasp the concept of PKGBUILD)
Can you give me a pointer on how to achieve this, since I can't find gegl-0.4.34 on AUR?

Re: Dependency not found?

Reply #6
Quote
I can't find gegl-0.4.34 on AUR?

I am 95% sure you can get the required version by installing "aur/gegl-git" (the version on git packages tells you nothing, it should pull the latest commit)

The other solution would be to enable gremlins & testing repositories and install from there.

Re: Dependency not found?

Reply #7
I am 95% sure you can get the required version by installing "aur/gegl-git" (the version on git packages tells you nothing, it should pull the latest commit)

The other solution would be to enable gremlins & testing repositories and install from there.
It seems to work. It said 4.32, but mid-installation it updated to 4.35!
Original problem solved :)

Code: [Select]
yay gimp-git
This seems to build gimp, no gegl dependency issues!
Though, what I want is to change 1 line of code before building it. Ah well, can't stop it right now, I will wait. Though to confirm, all I need to do now is build with meson on the gimp-git cloned repo, correct?

Re: Dependency not found?

Reply #8
makepkg is used by aur helpers, used directly it allows finer grained control when changing things, see makepkg docs for more info if needed:
Code: [Select]
$ git clone https://aur.archlinux.org/gimp-git.git
$ cd gimp-git
$ makepkg -o
$ cd src/gimp
(make changes, you can also use git to checkout past stable version tags or commits etc. if you are working with a -git package)
$ cd ../..
$ makepkg -e
(might need to add "s" to makepkg flags for build deps)

Re: Dependency not found?

Reply #9
On PKGBUILDs, I don't know anything about them.

Every Arch / Artix package, whether on the AUR or in the repo's, starts from a PKGBUILD.
It's simply a list of instructions, which is used by makepkg, to compile and package a program.

You can find more about it here:
https://wiki.archlinux.org/title/Arch_Build_System

And here:
https://wiki.archlinux.org/title/Arch_User_Repository#Installing_and_upgrading_packages

The actual Arch recommended to way to install packages from the AUR is NOT to use an AUR helper but to manually retrieve the packages build files snapshot from AUR and build it with makepkg.

But hardly anybody does that generally. Including me.
We all use AUR helpers. As sometimes dependencies for AUR packages also come from the AUR. And an AUR helper automates all of that.

But the recommendation is (from the wiki):
Quote
Warning: AUR helpers are not supported by Arch Linux. You should become familiar with the manual build process in order to be prepared to troubleshoot problems.  

I'll note that the above links mention 'abs'
Well on Artix we have our own repos so for repo packages you should look here first:
https://gitea.artixlinux.org/explore/repos

If you plan on using Artix /Arch or derivatives, for the long term, it's very handy to learn about the build system imho.

Pleased you got it working  :)

Re: Dependency not found?

Reply #10
building it manually requires root access, but when I put root password through my user, it rejects it. Logging in from root user acc, and doing the installation, it worked but it doesnt appear to my normal user lol

Anyway, it seems like I will have to read on the PKGBUILD stuff and learn to make a build, shouldn't be hard given the sources above, I will ask for help if I fail on a seperate thread, but for now I will take a christmas break :P
I hope you do too :)