You are not logged in.

#1 2024-10-13 14:12:47

b42
Member
Registered: 2023-07-20
Posts: 189

How to install an application from source?

I have recently ran into a weird problem. There a few applications I want to install but have no idea how to do it and the devs do not usually give the instructions on how to do that.

For example this:

https://tox.chat/download.html

I downloaded the application and extracted it using

tar xvf target.tar.xz

what do I do next in order to install this kind of application?

Offline

#2 2024-10-13 14:21:18

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

Re: How to install an application from source?

What actually did you download?  There are links there for downloading prebuilt static objects, or for a couple different sets of source code "for developers".

But broadly speaking, you'd write a PKGBUILD to make a package from it.  The steps that may go in the PKGBUILD are covered in our wiki.  Historically the configure / make / make install pattern was common, but now there are countless "build systems" used by different projects.  So you need to look at what build system the project actually uses by looking at the content of the tarball you downloaded.

EDIT: it seems both the toxcore and c-toxcore repos have INSTALL.md files with installation instructions.  So what are you missing?  Or what are you actually trying to build?

Last edited by Trilby (2024-10-13 14:22:33)


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

Offline

#3 2024-10-13 14:30:09

cryptearth
Member
Registered: 2024-02-03
Posts: 1,022

Re: How to install an application from source?

https://tox.chat/download.html -> click the WIKI link at the very top -> https://wiki.tox.chat/start -> 4th from left: "Compiling tuxcore" -> https://github.com/TokTok/c-toxcore/blo … INSTALL.md
also - at the very bottom of the install.md: arch already has a pre-build package in the extra repo: https://archlinux.org/packages/?q=toxcore

[main@main ~]$ sudo pacman -Ss toxcore
extra/toxcore 1:0.2.19-1
    Secure, configuration-free, P2P Skype replacement backend

sorry not sorry - and risking to fulfill the proper arch meme - but if you're not able to figure out such simple steps on your own by using google and describe your issue in simple plain english - arch is likely not the distribtuion for your lack of knowledge and skill

in addition: building from source should be done ONLY if there's no proper package - this is true for any linux distribution and software
litter your system with source builds not tracked by the systems package manager will bite you at some time in the past

Last edited by cryptearth (2024-10-13 14:32:58)

Offline

#4 2024-10-14 13:58:03

b42
Member
Registered: 2023-07-20
Posts: 189

Re: How to install an application from source?

Yes, every guide says do

configure
make
install

But things have changed and this does not work anymore. As for arch, in order to build a package like this from source one must follow AUR procedures, build PKGBUILD and then as usual AUR package do makepkg and pacman -U? Do I understand it right?

Offline

#5 2024-10-14 14:05:50

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

Re: How to install an application from source?

Nothing has changed, and nothing stopped working.  If a project uses autotools, the build commands of configure, make, make install will work.  To make a package for arch linux, you put these build commands in a PKGBUILD as outlined in the relevant wiki pages.  I'm really not sure what part of the process you are asking about: making a PKGBUILD or what build commands to put in it for this specific project?

While you're at it, it would help to address cryptearth's question(s): what are you actually trying to build?  Why are you not using the existing package?

Last edited by Trilby (2024-10-14 16:20:43)


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

Offline

#6 2024-10-14 15:56:51

seth
Member
Registered: 2012-09-03
Posts: 59,084

Re: How to install an application from source?

But things have changed and this does not work anymore.

Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855

Also https://bbs.archlinux.org/viewtopic.php?id=299735 - it's probably related to the overall tox decay and you get compiler errors?

Offline

#7 2024-10-14 16:40:45

b42
Member
Registered: 2023-07-20
Posts: 189

Re: How to install an application from source?

okay, so as far as I understand you have to look at the documentation the devs provide for every package you try to build from source.

While you're at it, it would help to address cryptearth's question(s): what are you actually trying to build?  Why are you not using the existing package?

I just want to understand the process itself of building the package from source and if it is not too difficult maybe learn how to do it. Just want to understand the internals of linux and computing in general.

Offline

#8 2024-10-14 18:02:48

cryptearth
Member
Registered: 2024-02-03
Posts: 1,022

Re: How to install an application from source?

https://www.linuxfromscratch.org/
did it recently - lessons learned: take advantage of a distributions package manager
learn how to build from scratch is something you really need to know as a dev yourself - if you're just a user you don't need to know how it works - use what others provide

Offline

#9 2024-10-14 18:27:18

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

Re: How to install an application from source?

b42 wrote:

okay, so as far as I understand you have to look at the documentation the devs

Pretty much, yes.  There are a wide range of build tools now.  As you package software you'll start to get to know the most frequently used ones, but as you can see from that (very incomplete) list there is quite a bit of variety.  But regardless of upstream's instructions, if you want to package something for arch linux, you still follow our wiki.  But there is no magical shortcut to knowledge and experience: you just have to learn and do.

Last edited by Trilby (2024-10-14 18:27:45)


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

Offline

#10 2024-10-15 08:54:51

b42
Member
Registered: 2023-07-20
Posts: 189

Re: How to install an application from source?

I just wanted to find out what the process is like, I used to think that you download the tarball, extract it, go into the dir and enter few commands (pretty much something like you download a package from AUR and install it manually), but now I see that every package has its own building procedure. Shortly speaking, I thought the process is standardized and I see now that it is not.

Offline

#11 2024-10-15 10:16:26

cryptearth
Member
Registered: 2024-02-03
Posts: 1,022

Re: How to install an application from source?

well - it is - but it differs between raw copy and intelligent package management:
of course you can LFS-style download source - build it as its dev instructs you - and copy the resulting binaries, configs and assets into thier respective target directories
or you take advantage of the systems package manager and let it keep track of installed stuff, its versions and dependencies
most base distributions offer user repos like AUR for Arch, OBS for suse, PPA for debian ... take advantage of it
unless you are a dev yourself and want to correctly provide pre-built packages as a normal ussr you don't meed to know details of the inner workings

Offline

#12 2024-10-15 12:46:54

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

Re: How to install an application from source?

Everyone wants there to be a single standardized way to build software.  And that's why everyone made one.


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

Offline

Board footer

Powered by FluxBB