Building stuff from source

I have a question. How are you supposed to successfully build packages from source nowadays?

I have an XMPP server (openfire) set up on a VM that I use as a messenger between me and others in my house, and I wanted to try another client for it called profanity (think irssi style) (I was using Spark up until now) … So the first way they suggest installing it is building from source. Figured I’d give it a shot…

So I git clone it, do ./configure … whole bunch of packages are missing, so I had to go through one by one and figure out what packages I needed. Then I did make, and that errored out because it couldn’t find one of the includes in one of the source code files… so after awhile I gave up and just did pacman -S profanity … and it installed perfectly the first time.

Seems like every time I try to build something from source, it’s broken somehow, I don’t know how people that can’t install from repo do it. I used to build ircd daemons from source all the time back in the 90s, and I don’t remember ever having issues… I wonder what changed?

1 Like

I don’t do it very often, but occasionally - and always run into missing libraries and stuff, e.g. couple years ago I tried to build Sayonara player for armhf, only to find out the developer didn’t support ANY 32 bit platforms (i.e. not armhf or i386).
So - a bit later, I decided to compile it to run on arm64, an RPi4 with 8 GB RAM, and it probably took me about 4 hours researching dependancies, before it would successfully compile (which also took hours), but got there in the end…
These days? If I want Sayonara on aarch64/arm64 Linux, I just run Ubuntu or Pop! and it’s a simple apt install sayonara…

I agree - it’s getting way more complex than it was years ago… and some applications don’t support “make”, I think they use something called “cmake” instead… If I remember, Sayonara uses cmake…

And I mentioned all the wasted hours I spent trying to get POVRay to compile on Solaris 10 Sparc in 2020, and gave up. The POVRay developers still call their Linux source code “UNIX” but it’s not UNIX and makes so many assumptions that it’s being done on Linux, that it proved impossible to get it compiled on actual UNIX, I had to hunt down obscure websites for vendor libraries for Sparc… And POVRay binaries are already in Debian, so I can just apt install it on Debian or Ubuntu… I might have had more success if I ran a BSD or OpenSolaris… But I wanted Solaris…

IDK, sometimes I just like to get into the spirit of old school UNIX and build some stuff from source. It’s a shame it’s gotten so dang complicated. lol

You saw the investigation of apt-build… it worked for a single package (i tried gimp)
but it failed miserably for apt-build world

I have had mixed success doing it by hand. Large apps are most difficult. Small apps which are almost standalone usually work.

Porting new software to a distro has all the same problems. If there are lots of dependencies expect trouble. Porting your own code is a lot easier than trying to understand someone elses code.

The best place to compile code is Gentoo. Portage really sorts out all the issues for you.
It doesnt mother you, it just highlights everything for you to deal with.

1 Like

Most distributions have a special “developer” meta-package, which installs all the basics you need.

Then, you’d need to figure out the dependencies of the package you want to build from source. Most of the time they’re mentioned in the readme or install textfiles. Install those dependencies, including the -dev packages of them.

After that you should be ready to build. Check your distribution for details.

You mean like the build-essentials in Debian?

1 Like

Yes, it’s named different from one distribution to the next.

I regularly install R from source. Finding the dependencies consists of running ./configure repeatedly and installing whatever it says is missing. Finding the package name which supplies a missing library or app is not always easy.

1 Like