tawalker
Posts: 183
Joined: Tue Jan 17, 2012 9:02 am
Contact: Website

Building AUR packages

Thu May 24, 2012 8:55 am

(I wondered if this might be a more appropriate question for the forum at the Arch Linux ARM site. However, I haven't registered there yet, so I'll probably do that later - in the meantime...)

Yesterday evening, I had my first try at building some simple AUR packages - the first ones were devmon and gkrellm-themes (both are not platform-dependent). These seemed to go to plan, until the end of the "makepkg" process, when I received an error message - I can't remember the exact wording, but it implied that the free memory had run out, and the package couldn't be built properly.

I was in an X session at the time, so shut it down and went to the console, thinking this might free up enough RAM; however, I still received the same message. Anyone know if the RasPi has enough memory for building even simple packages from the AUR? (I ended up building these two packages on another machine.)

Also, I'm trying to recreate the Fluxbox desktop on the Pi, that I use on my Eee 701SD netbook (running Arch/x86). I use a couple of old WindowMaker dockapps on the latter, and tried building a package of one of them (wmvolman) from the AUR.

I suppose I shouldn't be surprised that "makepkg" complained about the package script not being suitable for ARM... is there anything special I should be doing, to get the package to build on the Pi?

Alternatively: for software like these old WM dockapps, would I be better off simply compiling them from source? (For that matter, do you think they will even compile on ARM, as they were presumably coded for x86?)

Many thanks :)
---
Raspberry Pi Model 3B+ (2019) ("ayeka") - CentOS
Raspberry Pi Zero W (2018) ("mass") - Raspbian
Raspberry Pi Model B (1st-gen - 2012) ("ryo-ohki") - Arch Linux ARM
---

pepedog
Posts: 1043
Joined: Fri Oct 07, 2011 9:55 am

Re: Building AUR packages

Thu May 24, 2012 12:45 pm

Rule of thumb-
most things compile
Add a swap file (use only when you really need it when running off sd card, search http://archlinuxarm.org/forum/ for swapon)
makepkg -Acs to ignore arch setting
That's it
You could alternativly install and use yaourt to build and install
You could also rename the arm224start.elf file in /boot to start.elf to get extra 100Mb (must reboot after)

tawalker
Posts: 183
Joined: Tue Jan 17, 2012 9:02 am
Contact: Website

Re: Building AUR packages

Thu May 24, 2012 3:22 pm

@pepedog - thanks for these tips; I'll give them a try :D

[EDIT: This is the Arch Linux ARM wiki page on creating a swapfile and activating/deactivating it]
---
Raspberry Pi Model 3B+ (2019) ("ayeka") - CentOS
Raspberry Pi Zero W (2018) ("mass") - Raspbian
Raspberry Pi Model B (1st-gen - 2012) ("ryo-ohki") - Arch Linux ARM
---

pepedog
Posts: 1043
Joined: Fri Oct 07, 2011 9:55 am

Re: Building AUR packages

Thu May 24, 2012 3:32 pm

I hope you take note and use sparingly
Note: Putting a swap file on USB or SD flash media is a bad idea, as it may be written to many times, wearing out the drive's limited write cycles

tawalker
Posts: 183
Joined: Tue Jan 17, 2012 9:02 am
Contact: Website

Re: Building AUR packages

Thu May 24, 2012 3:39 pm

pepedog wrote:I hope you take note and use sparingly
Note: Putting a swap file on USB or SD flash media is a bad idea, as it may be written to many times, wearing out the drive's limited write cycles
Seeing as my other Arch machine is an Eee 701 netbook with an SSD (which therefore I have set up with 2GB RAM and no swapfile), you needn't worry about me missing this particular point ;)
---
Raspberry Pi Model 3B+ (2019) ("ayeka") - CentOS
Raspberry Pi Zero W (2018) ("mass") - Raspbian
Raspberry Pi Model B (1st-gen - 2012) ("ryo-ohki") - Arch Linux ARM
---

tawalker
Posts: 183
Joined: Tue Jan 17, 2012 9:02 am
Contact: Website

Re: Building AUR packages

Thu May 24, 2012 6:42 pm

Just trying the "swapfile" method to see if it helps :)

Come to think of it: how easy is it to "cross-compile" AUR packages? For instance: could I build an ARM6 package on my netbook (Arch/x86)?

Hopefully, enabling a swapfile during package-building will do the trick, though I'm not holding my breath...
---
Raspberry Pi Model 3B+ (2019) ("ayeka") - CentOS
Raspberry Pi Zero W (2018) ("mass") - Raspbian
Raspberry Pi Model B (1st-gen - 2012) ("ryo-ohki") - Arch Linux ARM
---

tawalker
Posts: 183
Joined: Tue Jan 17, 2012 9:02 am
Contact: Website

Re: Building AUR packages

Thu May 24, 2012 6:50 pm

Great news: the swapfile method (Arch/ARM wiki) worked (insofar as I built and installed my first AUR package - libdockapp - without errors).

Now building wmvolman - if I can actually get all these to run on an ARM machine, I'll be one happy Pi-man :D
---
Raspberry Pi Model 3B+ (2019) ("ayeka") - CentOS
Raspberry Pi Zero W (2018) ("mass") - Raspbian
Raspberry Pi Model B (1st-gen - 2012) ("ryo-ohki") - Arch Linux ARM
---

pepedog
Posts: 1043
Joined: Fri Oct 07, 2011 9:55 am

Re: Building AUR packages

Thu May 24, 2012 7:19 pm

arch is all arm5. There is a thread discussing merits of arm6 hf, they have the skill but need encouraging that there would be a benifit to it. Plus I'm the only one with a pi.
On http://archlinuxarm.org/ look at developers tab, shows how to build crosstools on x86, and distcc for compiling. It works, you appear to compile on the actual pi but donkey work farmed out

xebec
Posts: 3
Joined: Sat Jun 02, 2012 3:08 am

Re: Building AUR packages

Sat Jun 02, 2012 7:10 am

Yeah, I ran into something similar myself earlier today when building a package from the AUR - cant remember off hand what it was, might have been Toilet of all things.

anyways, it turned out that was the xz compression stage that was giving bother due to overzealous settings

if your error is something along the lines of

Code: Select all

xz (stdin) cannot allocate memory
then issuing

Code: Select all

    XZ_DEFAULTS=--memlimit=40%
    export XZ_DEFAULTS
before running makepkg will sort it out - I think we'll actually be seeing this popping up a bit in the future when building from AUR

captainreuben
Posts: 3
Joined: Thu Jun 07, 2012 4:06 pm

Re: Building AUR packages

Thu Jun 07, 2012 4:15 pm

xebec wrote:Yeah, I ran into something similar myself earlier today when building a package from the AUR - cant remember off hand what it was, might have been Toilet of all things.

anyways, it turned out that was the xz compression stage that was giving bother due to overzealous settings

if your error is something along the lines of

Code: Select all

xz (stdin) cannot allocate memory
then issuing

Code: Select all

    XZ_DEFAULTS=--memlimit=40%
    export XZ_DEFAULTS
before running makepkg will sort it out - I think we'll actually be seeing this popping up a bit in the future when building from AUR
That sorted my problem out. When I reboot it'll be gone though, right? Is there anyway to set a default for XZ permanently (preferably a config, but I guess setting ENV would be acceptable)?

Ta

captainreuben
Posts: 3
Joined: Thu Jun 07, 2012 4:06 pm

Re: Building AUR packages

Thu Jun 07, 2012 9:01 pm

Seems to have survived the reboot, so I can only assume we're good for now.

xebec
Posts: 3
Joined: Sat Jun 02, 2012 3:08 am

Re: Building AUR packages

Fri Jun 08, 2012 3:40 am

captainreuben wrote:Seems to have survived the reboot, so I can only assume we're good for now.
good stuff! - popping it in your .bash.rc or whatever should do the trick - details of it here

https://bbs.archlinux.org/viewtopic.php ... 76#p831476

Return to “Arch”