You are not logged in.

#1 2012-08-09 22:05:52

gigal
Member
Registered: 2012-08-09
Posts: 3

[SOLVED] self written PKGBUIILD does not work

Hi Folks,

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>-binutils
- cross-<arch>-gcc-core (only needed to build cross-newlib)
- cross-<arch>-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.

Best regards,
gigal

Last edited by gigal (2012-08-12 15:14:43)

Offline

#2 2012-08-09 23:59:26

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,452
Website

Re: [SOLVED] self written PKGBUIILD does not work

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".


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#3 2012-08-10 19:17:14

gigal
Member
Registered: 2012-08-09
Posts: 3

Re: [SOLVED] self written PKGBUIILD does not work

Hi Trilby,

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.

Best regards,
gigal

Edit: changed url to the correct file

Last edited by gigal (2012-08-10 22:41:36)

Offline

#4 2012-08-11 01:01:57

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,452
Website

Re: [SOLVED] self written PKGBUIILD does not work

gigal,

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.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#5 2012-08-12 15:12:59

gigal
Member
Registered: 2012-08-09
Posts: 3

Re: [SOLVED] self written PKGBUIILD does not work

Hi Trilby,

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.

Best regards,
Gerald

Offline

Board footer

Powered by FluxBB