You are not logged in.

#1 2011-10-05 09:28:11

chronozphere
Member
Registered: 2011-06-18
Posts: 18

Compiling "development" packages without touching the originals

Hey Arch-users,

I'm still new to arch and so far I really like the OS!

I would like to learn a bit of C (I do have a lot of experience with other languages!) and I would like to try to modify existing libraries. This means I would have to download them and compile them from source and start making changes to them. However, I don't want them to interfere with the rest of my system. But I dont really know how to set this up in arch (or inside any other linux distro for that matter).

For example: I just tried to install muPDF (not via ABS, just make install) and I got permission errors. It occured to me that running it as root is not a solution and because the files will be placed in /usr/local it would likely interfere with the system.

So my questions are:

What is common-practice in Linux development when you want to have one "live" and one "development" version of the same package? Where to put them, how to install them?

And "should" I use ABS? In that case I would need a PKGBUILD file, which isn't available for every library.

Thanks!

Offline

#2 2011-10-05 11:28:59

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,094

Re: Compiling "development" packages without touching the originals

Either install to $HOME or start using makepkg. Else you will just be in a world of pain.
(or use a chroot/vm)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2011-10-05 12:46:58

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Compiling "development" packages without touching the originals

chronozphere wrote:

I would need a PKGBUILD file, which isn't available for every library.

Not sure what you mean here. Every package from the official repo is build from an available PKGBUILD and there's also AUR.

Post the errors you run into.

Offline

#4 2011-10-05 13:43:39

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Compiling "development" packages without touching the originals

chronozphere wrote:

one "live" and one "development" version

For libs, you can use LD_PRELOAD.

I'd run a separate Linux installation using e.g. virtualbox, so as not to run the risk of messing up the live system.

Offline

#5 2011-10-06 12:37:58

chronozphere
Member
Registered: 2011-06-18
Posts: 18

Re: Compiling "development" packages without touching the originals

Either install to $HOME or start using makepkg. Else you will just be in a world of pain.
(or use a chroot/vm)

I'm allready in a VM so I can mess things up. But I rather dont do that. I just need some advice on how to do things properly smile

For libs, you can use LD_PRELOAD.

That's quite interesting. I could probably put my software in a separate dir and temporarily add it to LD_PRELOAD. When done, just clear LD_PRELOAD and the system remains untouched. smile

Not sure what you mean here. Every package from the official repo is build from an available PKGBUILD and there's also AUR.

Well, I meant that there is not a PKGBUILD for every linux package. But the one I want to play with, muPDF, has it so I could use ABS. However, what should I do when there is no PKGBUILD? Just install using ./configure, make, make install?

I noticed that the makefile places the muPDF files inside /usr/local which is still empty on my system. Is it safe to install it there?
My PATH is:

/opt/maven/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/maven/bin:/usr/bin/core_perl

/usr/local/bin preceeds /usr/bin so if I decide to install more development versions of libraries there, I could potentially break things because AFAIK the PATH will be traversed in order when searching for a program or SO.

Offline

#6 2011-10-06 17:13:39

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 859
Website

Re: Compiling "development" packages without touching the originals

chronozphere wrote:

Well, I meant that there is not a PKGBUILD for every linux package. But the one I want to play with, muPDF, has it so I could use ABS. However, what should I do when there is no PKGBUILD? Just install using ./configure, make, make install?

Make a PKGBUILD.

Offline

#7 2011-10-06 17:40:31

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: Compiling "development" packages without touching the originals

tavianator wrote:
chronozphere wrote:

Well, I meant that there is not a PKGBUILD for every linux package. But the one I want to play with, muPDF, has it so I could use ABS. However, what should I do when there is no PKGBUILD? Just install using ./configure, make, make install?

Make a PKGBUILD.

And if it a package not in the repos or AUR, you can add it to the AUR, chronozphere!


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#8 2011-10-06 21:24:28

chronozphere
Member
Registered: 2011-06-18
Posts: 18

Re: Compiling "development" packages without touching the originals

Ok ok.. so no ./configure, make, make install on archlinux I suppose smile

I'll have a look at PKGBUILD then.

Offline

#9 2011-10-06 21:31:39

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Compiling "development" packages without touching the originals

chronozphere wrote:

Ok ok.. so no ./configure, make, make install on archlinux I suppose smile

I'll have a look at PKGBUILD then.

I suppose './configure && make' is fine, 'make install' is not ;P

Offline

Board footer

Powered by FluxBB