You are not logged in.

#1 2013-01-09 02:25:15

diffyQ
Member
From: dc
Registered: 2006-08-29
Posts: 13

[solved] apophenia: make succeeds, makepkg fails

Hello! I tried to write a PKGBUILD for a statistics library called apophenia (http://apophenia.info/). I can './configure && make' in the source directory without any problems, but when I run makepkg the build fails with the following error:

...
  CC     apop_tests.lo
  CC     apop_model_transform.lo
  CC     apop_update.lo
  CC     asprintf.lo
In file included from /usr/include/stdio.h:937:0,
                 from asprintf.c:34:
asprintf.c: In function 'asprintf':
/usr/include/bits/stdio2.h:207:1: error: inlining failed in call to always_inline 'vasprintf': function not inlinable
asprintf.c:248:10: error: called from here
make[2]: *** [asprintf.lo] Error 1
make[2]: Leaving directory `/home/joshua/ABS/apophenia/src/apophenia-0.99'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/joshua/ABS/apophenia/src/apophenia-0.99'
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

Note that the library author included the file asprintf.c in the source, but an arch system should already have this in stdlib or something, right? Anyway, here is the PKGBUILD. I'm compiling on an x86_64 machine, by the way.

pkgname=apophenia
pkgver=0.99
pkgrel=1
pkgdesc="An open statistical library"
url="http://apophenia.info"
arch=('x86_64' 'i686')
license=('GPLv2' 'custom:apop_license')
depends=('gsl' 'lapack')
optdepends=('sqlite')
makedepends=()
conflicts=()
replaces=()
backup=()
install=
source=("https://github.com/downloads/b-k/Apophenia/${pkgname}-${pkgver}-03_Dec_12.tgz")
md5sums=('5f23bb2e40b1bdf6e9b63e419cd896bc')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -Dm644 COPYING2 "$pkgdir/usr/share/licenses/$pkgname/apop_license"
}

Any ideas?

Last edited by diffyQ (2013-01-09 04:08:03)

Offline

#2 2013-01-09 02:53:33

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,097
Website

Re: [solved] apophenia: make succeeds, makepkg fails

makepkg imports CFLAGS and LDFLAGS from /etc/makepkg.conf. That's the difference.

Offline

#3 2013-01-09 03:05:13

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 438

Re: [solved] apophenia: make succeeds, makepkg fails

The easiest workaround is to add

options=('!buildflags')

Offline

#4 2013-01-09 04:07:40

diffyQ
Member
From: dc
Registered: 2006-08-29
Posts: 13

Re: [solved] apophenia: make succeeds, makepkg fails

Thanks, '!buildflags' did the trick.  I'll have to figure out which option was causing the problem.

Last edited by diffyQ (2013-01-09 04:08:24)

Offline

Board footer

Powered by FluxBB