On arch linux with gcc 12.2.0, I am attempting to create a PKGBUILD so that I can put gcc4ti on the AUR. Running the installation script manually, I am able to install the software using a custom prefix. I am having problems executing the (slightly modified) install script from inside of the build
function in my PKGBUILD. Here is the relevant bash function:
build(){
cd "$pkgname/trunk/tigcc-linux/scripts"
./updatesrc
./package_src
cd ../gcc4ti-0.96b11/scripts
cp ../../../../../../Install.sh .
PREFIX_GCC4TI="$(realpath installation)" ./Install.sh
}
The function navigates to trunk/tigcc-linux/scripts
and executes updatescr
and package_src
as instructed. Then it navigates to trunk/tigcc-linux/gcc4ti-0.96b11/scripts
. It copies my modified installation script (in which I've copied the original installation script and only removed the input prompts) into the scripts directory. It runs the install script with a prefix indicating a directory in the scripts directory - so it should install tigcc to trunk/tigcc-linux/gcc4ti-0.96b11/scripts/installation
.
When running the build function, binutils compiles, but gcc fails to compile. The error is:
fatal error: gtype-desc.h: No such file or directory
After manually adding this file and trying again, I've seen that many more files are missing. The compilation succeeds, however, if inside of the build function I run the install script with sudo
, so I suspect it's a permissions problem. Note that I don't need to use sudo to manually use the installation script.
Unfortunately, since I don't know enough about makepkg
, I can't give the exact conditions required to reproduce this issue. Is there any reason why the install script should stop working inside of my build
function, or when run from makepkg in general?