I'm new to arch linux and currently I'm trying to get a self build cross compiler running using my own set of PKGBUILD scripts. I'd like to build my toolchain with four packages:
- cross-<arch>-gcc-core (only needed to build cross-newlib)
- cross-<arch>-gcc (will replace gcc-core because this is only a stage1 build used to build newlib)
The first three PKGBUILDS including their buildscripts run without any problems and the resulting packages can be installed using pacman. The last one does not work. I've modified my PKBUILD for cross-<arch>-gcc to generate a bash script that can be used afterwards to compile the sources by hand. If I run this script inside the directory that will also be used for building by makepkg (of course after cleaning up all the makepkg things inside this directory) it works without any problems. But if I use makepkg and my PKGBUILD script it will not work.
My question is now: are there any differences inside the environment of makepkg an the users environment that my cause such problems?
There is also the possibility that I'm blind like a fish and have read over some important passages inside the documentation. If so, please give me a hint.
Last edited by gigal (2012-08-12 15:14:43)
My first thought is that it is a permissions/executable flag issue. This would be answered by whether you copied the script in question with "cp" or installed with "install".
But since you didn't show the PKGBUILD, or the script, or anything else that could be of use, my only option is to ask my magic eight ball ... *shake shake* ... it says "Try again later".
thank you for your help. It seems that there is no permission/executable problem existing. Therfore I have something for your magic eight ball ;-). You can get my PKGBUILDs here: http://www.tsvlahm.de/cmsmadesimple/upl … lds.tar.gz.
The first three mentioned packages will build - at least on my system.
The last one "cross-mips-gcc" will not. The third script generated by the PKGBUILD throws an error if it is executed by makepkg. If I execute it by myself it runs without any problem like described inside my first post.
Inside this package all my debug information is turned on. All packages are far from perfect. I just wanted to test how to play with PKGBUILDS an archlinux.
Edit: changed url to the correct file
Last edited by gigal (2012-08-10 22:41:36)
Thanks for the examples. Sorry if I assumed it was a simple issue ... most issues are. But these seem well written and nothing jumps out at me that would be of use.
To answer part of your initial question, one difference between the two situations (manually running the bash script vs. makepkg/pacman) is that makepkg/pacman runs the install scripts in a chroot environment.
thank you for your help. Finally I figured out what went wrong inside the last package. I had to remove some optimizations from my CFLAGS variable inside makepkg.conf. Therefore it was an environment issue. Without optimizations all runs as expected.