You are not logged in.

#1 2017-08-27 12:43:33

m_square
Member
From: Saarland, Germany
Registered: 2017-08-27
Posts: 16

Trying to learn how to compile against a specific lib

The Premise:
I'm trying to compile GIMP from latest source. It depends on latest versions of babl, gegl and mypaint.
I successfully compiled babl from source and installed it, now living in /usr/local/lib (Although I'm wondering that the 1.30 version I downloaded compiles to 1.29.1). When trying to compile gegl it complains about babl version being to old namely 1.24.

What I tried so far:
Obviously I tried to follow the tut on GIMP's website but they are just assuming that I have installed the dependencies. Well, that's what I'm after.
Since I'm new to compiling from source there was a lot of reading involed untill I stumbled upon an answer "passing the lib folder to ./autogen.sh". Obviously the thing I'm searching for. Anyways the author of that answer gracefully left out how to actually do that.
So I began googling and the best shot I have is to find out via

./configure --help

that I can set a path via BABL_PATH but how exactly?
I tried:

BABL_PATH=/usr/local/lib ./autogen.sh

and

./autogen.sh BABL_PATH=/usr/local/lib

both start the script but complain about version 1.24 of babl. Shouldn't they at least brag about version 1.29?

What I'm asking for:
I'd appreciate if anyone could explain how compiling against a specific lib works within a few sentences so I can go on with this little GIMP thingy. Also I'd be very thankfull for pointers to webadresses where I can learn about the subject. As google either gives me forum posts where the answers could be read as if theyr authors are assuming that the person asking already knows how to do what they want to know. Or I find fine and well crafted documentation on how to build my own librarys and autogen files. But well..

P.S.: I hope nobody will feel offended by my post. I am well aware (after) rereading it, that it has a sarcastic tone. But it helped me with my frustration.

Last edited by m_square (2017-08-27 12:48:19)

Offline

#2 2017-08-27 13:02:00

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,562

Re: Trying to learn how to compile against a specific lib

I don't have an answer for your question, but on arch linux compiling from source is normally done through a PKGBUILD.
You'd use the PKGBUILD from the repo as a starting point and adjust it to build a later version .

Check wiki on AUR, PKGBUILD , makepkg, Arch Build System if you want to go that route.


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

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2017-08-27 13:10:05

m_square
Member
From: Saarland, Germany
Registered: 2017-08-27
Posts: 16

Re: Trying to learn how to compile against a specific lib

Thanks @Lone_Wolf. You are right. I could go the AUR route but anyways there has to be a way to do it. Think about software that isn't available via AUR. Or how about s.th. I probably wrote on my one? Well that's music from the future. But the point is: There has to be a way and want to learn it. I simply fail in finding the right information.

EDIT: I checked AUR and it has versien 2.9.4 of gimp. I'm trying to compile 2.9.6

Last edited by m_square (2017-08-27 13:22:03)

Offline

#4 2017-08-27 13:35:31

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

Re: Trying to learn how to compile against a specific lib

EDIT: I checked AUR and it has versien 2.9.4 of gimp. I'm trying to compile 2.9.6

I'm going ta assume you're talking about the gimp-git package. Don't look at the version numbers for -git packages, they just indicate the last time the PKGBUILD needed to be changed. When you build them, -git packages will pull down the latest source, then generate a new version number based on that.

Bypassing the package manager and installing things to /usr/local is really a last resort -- it's quick, but it's dirty and fairly unmaintainable. Writing a PKGBUILD (or standing on the shoulders of giants and using somebody else's PKGBUILD, either as a base to work from, or as is) may take more time in the short run, but it makes your life much easier in the long run.


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

#5 2017-08-27 13:57:00

m_square
Member
From: Saarland, Germany
Registered: 2017-08-27
Posts: 16

Re: Trying to learn how to compile against a specific lib

@WorMZY: OOHHH, I see a light! Thank you, I totally got that AUR *-git concept wrong. I wasn't aware, that those packages are actually pulling the source. Thanks for clearing this for me. That indeed makes things much easier. Anyways I'm still interested in how it would work without AUR. Although this now has merely academic purpose.

Offline

#6 2017-08-28 11:17:33

m_square
Member
From: Saarland, Germany
Registered: 2017-08-27
Posts: 16

Re: Trying to learn how to compile against a specific lib

Ok, now there is the next problem. The AUR package wants to replace stable GIMP. From my research I get a lot of statements that one could and should change the install path of the package. Again this is mentioned a lot but nobody actual sees the necessity to tell you how to do it. I find nothing in pacman documention nor pkgbuild wiki- / manpage.
Please can anybody tell me where I can learn how to change the install path of a package?

Offline

#7 2017-08-28 11:32:10

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

Re: Trying to learn how to compile against a specific lib

To your first, and repeated question, using the PKGBUILD and learning how it would work without the PKGBUILD are not separate topics.  A PKGBUILD is just a recipe: it's a list of commands that will successfully build and install the software.  So how would you do this withouth a PKGBUILD: you'd run the commands that are listed in the build() and package() functions of the PKGBUILD (also the prepare() and others if they exist).  This will often include a configure command with various flags, a call to make and another to make install with some arguments passed.

You'll also see other build tools incluing cmake, qmake, python setup.py, and many others.  If you want to know "in general" then you need to know a bit about each of these.  If you want to know how to compile your own software, that depends on what build tools you use which is partially influenced by what language you wrote in.

Once you learn a bit about autotools (configure in particular) you'll have the answer to your last question: setting an installation prefix is typical option given to configure.  You can easily set it to install in /opt rather than /usr.


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

Offline

#8 2017-08-28 11:57:14

m_square
Member
From: Saarland, Germany
Registered: 2017-08-27
Posts: 16

Re: Trying to learn how to compile against a specific lib

Hi Trilby, thanks for your reply.
I am well aware, that pkgbuild is just a automated way of building from source. The thing is, that with this automated build I still had to replace what was installed with the new dependencies and still dont know how I could instruct the compiler to use another than the standard lib.
Anyways, I will try to learn about autotools so I can "easily" install the prog in another dir to test it.

Offline

#9 2017-08-28 13:34:22

Scorpick
Member
Registered: 2016-02-16
Posts: 23

Re: Trying to learn how to compile against a specific lib

Edit gimp-git and gegl-git PKGBUILDs to use babl-git package instead of babl.

Offline

#10 2017-08-28 13:48:48

m_square
Member
From: Saarland, Germany
Registered: 2017-08-27
Posts: 16

Re: Trying to learn how to compile against a specific lib

Hi Scorpick, thanks to you also.
But... You see... this is exactly what's driving me nuts. People answering with what was asked.
I know, that it can be done. That's why I asked how to do it. I am not am micrometer closer to a solution after your post.

EDIT: Further: I allready built the AUR Gimp-git I'm seeking a way to install it alongside stable GIMP.

Last edited by m_square (2017-08-28 13:50:56)

Offline

#11 2017-08-28 17:28:08

Scorpick
Member
Registered: 2016-02-16
Posts: 23

Re: Trying to learn how to compile against a specific lib

This might help: https://stackoverflow.com/questions/307 … -a-package
You must also remove provides and conflicts functions from PKGBUILDs if you want to install them alongside stable ones (to different location of course).

Offline

Board footer

Powered by FluxBB