You are not logged in.
So I've recently decided that I want to give Lisp or Scheme a try. I eventually settled on Chicken Scheme because it seemed to fit better into the Linux ecosystem than Common Lisp or something like that. AFAICT, and I'm obviously not an expert, it seems like there is no sane way to distribute Common Lisp appliations in a Linuxy way. Feel free to correct me on that; I'd love to give Common Lisp a try!
Anyway, most of the chicken packaages on the AUR are unmaintained and broken, so that left me to pick up the ones I wanted to use. I've had some success, but this package in particular is giving me a headache.
# Maintainer: Aaron P <aaronbpaden@gmail.com>
# Contributer: Jim Pryor <profjim@jimpryor.net>
pkgname=chicken-locale
_pkgname=locale pkgver=0.6.9
pkgrel=1
pkgdesc="Chicken Scheme Egg: Provides locale operations"
arch=('i686' 'x86_64')
url="http://chicken.wiki.br/eggref/4/locale"
license=('BSD')
depends=('chicken>=4.5.0' 'chicken-regex' 'chicken-setup-helper' 'chicken-miscmacros' 'chicken-record-variants' 'chicken-synch' 'chicken-lookup-table')
options=(docs !libtool !emptydirs)
build() {
cd "$srcdir/"
chicken-install -r "${_pkgname}":"${pkgver}"
}
package() {
cd "$_pkgname"
chicken-install -p "$pkgdir/usr"
}This is the template I use for all the other packages I've taken (actually adapted from the AUR user perlawk). Most of the time, it works. In this case, it fails because while chicken-install can find .so files from chicken libraries, it can't find .scm files. This is actually solvable by doing tihs:
CHICKEN_INCLUDE_PATH=/usr/lib/chicken/7/ chicken-install -p "$pkgdir/usr"I don't particularly like hardcoding the path here, but it works. Only in this case, I only get a different error message that isn't so easily solvable. Apparently, some variable used in the setup script isn't recognized. One thing to note is this process works perfectly fine, without the environment change — as long as I run the commands manually.
I'm pretty sure these are two symptoms of how makepkg's changes to the environment conflict with chicken-install, but I'm not sure of the details or the best way to work around it. Any tips?
Last edited by AaronBP (2015-01-13 20:48:15)
Offline
Here's a trick which I use to sort out environment issues when building packages:
Before building the package with `makepkg`, run the following command, which lists and sorts the currently set environment variables into a file:
$ printenv | LC_ALL=C sort > env-outside.txtNext, temporarily add the following line, which does the same as above command (but writes to a different file of course) at the beginning of the `package()` function in your PKGBUILD *:
printenv | LC_ALL=C sort > "${srcdir}"/../env-inside.txtNow try to build your package with `makepkg` as usual.
Finally, do:
$ diff -u env-outside.txt env-inside.txtand you should get a listing of the difference between the two environments, which hopefully allows you to figure out why things aren't working as expected.
* Add the line right before any command which is causing trouble. Sometimes the env problem is caused by `export`ing a variable in the `build()` function and forgetting to also `export` it in the `package()` function.
Last edited by ackalker (2015-01-12 10:20:30)
Offline
Yeesh. PEBKAC — I was downloading an older version in the PKGBUILD than in my tests for some reason. Probably because I was relying on `sort` to sort a list of version numbers, which is apparently not useful.
Still, this is very useful advice. Thanks a lot. ![]()
Offline