Pamac runs for 12+ hours for a simple AUR package

I have a media PC, which is Intel NUC 3150. I am using it for many years and apart from minor issues, it is running fine. I have Manjaro KDE installed with 5.10.89-1 (LTS).

I want to install “mame-git” rom AUR and originally I started the process via GUI. Left it running for 12 hours and still it wasn’t finish. Cancelled it, rebooted and tried again from console with pamac. Again the process if very slow, running already 5 hours.
I have installed that package before on this PC, again with Manjaro but I had to do a fresh install. It took minutes then.

htop shows all 4 cores in use with a 40-60% usage per core.
Disk is SSD and has no problems/bad sectors.

Any idea why this is happening or how to speed up the process?

Available in manjaro repos:

sudo pacman -S mame

What’s the message when you kill the process?

Instead of pamac, you could use another aur-helper like yay or paru. I’ve read here that pamac only uses one job. Yay/paru respect the options for makepkg and use parallel jobs.

Thank you. The reason I tried “mame-git” was because “mame” from official repo, does not work for me. So I had to check if the git version works.

It’s better if you troubleshoot why mame isn’t working for you rather than installing a AUR package that was last updated almost a year ago:

Report your issues here on the forum or here:

1 Like

I wouldn’t exactly define simple the mame as program

How are configured the number of make jobs (MAKEFLAGS=) in makepkg.conf? by default is 2

also is uses a quite a lot of ram for compiling

It took me 20 min to build (including download of 1,49 GiB of sources at 4.32 MiB/s) on 23 cores

It is a VCS pkgbuild that download and build the latest commit, not being updated is not a synonym of bad quality, also there aren’t complaints in the comments since the last update

That’s quite generic

That’s wrong, pamac uses the value defined in makepkg.conf

If you think pamac is the culprit - I suggest you use the proven makepkg.

Copy the file /etc/makepkg.conf to ~/.makepkg.conf

Edit the file and locate the line reading

#MAKEFLAGS="-j2"

Remove the comment # and change the number to the number of cores on your system and save the file. You can get the number of cores by executing

nproc

The process will take a lot of time - how long highly depends on your system specification

I looked up this NUC 3150 - and it uses a Celeron N3150 CPU - which is not very powerful so be prepared for long compiletime especially for the mentioned package which compiles more then 38000.drivers.

Intel® Celeron® Processor N3150.

On my system - with MAKEFLAGS="-j6" it took 1860.209s approx. 31m

System spec.
➜  ~ inxi -Cm
Memory:
  RAM: total: 62.68 GiB used: 2.84 GiB (4.5%)
  RAM Report:
    missing: Required tool dmidecode not installed. Check --recommends
CPU:
  Info: 8-core model: Intel Core i9-9900K bits: 64 type: MT MCP cache:
    L2: 2 MiB
  Speed (MHz): avg: 800 min/max: 800/5000 cores: 1: 800 2: 800 3: 800
    4: 800 5: 800 6: 800 7: 800 8: 800 9: 800 10: 800 11: 800 12: 800 13: 800
    14: 800 15: 800 16: 800

You may even need to change your /tmp to use the physical disk instead of the default tmpfs which - usually - is set to half your available ram.

I have added time to the below makepkg command - so you can measure how long it takes - when done it will print the result on screen.

sudo pacman -Syu base-devel time
git clone https://aur.archlinux.org/mame-git.git
cd mame-git
time makepkg -s
sudo pacman -U mame*.pkg.tar.xz

More important would be what processor is used.

Installation is not compiling. Are you aware about the difference?

The fastest procedure is to close all other apps and to follow @linux-aarhus suggestion.

Intel NUC 3150 uses Intel® Braswell N3150.

Yes I am. Part of the installation of AUR packages is the compilation of the package, and as I said I have done this before, as official “mame” wasn’t working.

Anyway, I did a cleanup of all packages I installed while trying to make it work, then I tried once more the official package and now it works.
Thank you all for the suggestions

ps. still a mystery though why it was taking so long, but I don’t have time to troubleshoot this anymore.

That was already explained. The solution was a proper installation of the repo package, I’ve marked the correct solution.