Building a clean chroot with pkg

Hey, can somebody help me how to build a clean chroot and what that actually means? I tried to find information about that via google but I'm still not sure if I get it right.
So my actual problem is the following: I want to install the matlab AUR package but it always fail to build the gcc5 package. Then I read here that it should be built using a clean chroot to avoid errors. So I downloaded the PKGBUILD-file for gcc5 from that website and tried to build it using the devtools package (I installed that via pacman). I tried to build it following this Link. So I executed the command stable-x86_64-build -c in the download folder where the PKGBUILD-file is. This than took a long time to build (no errors where displayed). Afterwards I can't see gcc5 installed in pacman. Is there anything else I am missing? When I now try to execute makepkgin this folder it tells me ==> ERROR: A package has already been built. (use -f to overwrite) so it seems to be build correctly, am I right?

Thanks in advance!
Felix

correction in the title

For building packages there is buildpkg from the manjaro-tools-pkg package, it conflicts with devtools

That's ok

Because the package has been built but not installed

AFAIK For building more then one package not present in the repository you have to make a list with the packages in the right order; in /etc/manjaro-tools/pkg.list.d/<name>.list


Why from USB install stick? this is not how to recover grub

1 Like

You can also shorten the build by using an archived gcc5 binary.

1 Like

To build a package in a clean chroot, you can use buildpkg, which is part of manjaro-tools-pkg.

Make sure you have the folder, with the PKGBUILD, like ~/foo/PKGBUILD.
Then you can build the foo package with:
buildpkg -c -p foo

This will create a package in /var/cache/manjaro-tools/pkg/x86_64/ named something like foo-1.0-x86_64.pkg.tar.xz, which has been built in a clean chroot.

3 Likes

Plus you can edit /etc/manjaro-tools/manjaro-tools.conf to customise the output directories.

1 Like

Thanks a lot to all of you! What I confused is building a package and actually installing one. Just double-clicking on the built package installed it and everything worked fine. I will try to read through these topics more closely so I don't do the same mistake again.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by