You are not logged in.

#1 2012-05-30 03:53:12

integer
Member
From: Toronto, Canada
Registered: 2011-08-22
Posts: 22
Website

Compile error inside build() but not "by hand"

Hi folks,

I'm writing a PKGBUILD for a program called bpmdj.
Everything compiles fine when I do configuration and make by hand,
but when using makepkg, compilation fails.

I've read through the docs, but perhaps I missed something.  Are
there some manner of differences in the environment that I should be
aware of?

Any suggestions would be welcome, the PKGBUILD is below.

Thanks.

pkgname=bpmdj
pkgver=4.2
pkgrel=1
pkgdesc="DJ tool and sophisticated song analyzer"
arch=('i686' 'x86_64')
url="http://bpmdj.yellowcouch.org/index.html"
license=('GPL')
depends=('fftw' 'qt' 'boost' 'mplayer' 'alsa-lib' 'jack')
source=(ftp://bpmdj.yellowcouch.org/bpmdj/$pkgname-v$pkgver-pl3.tar.bz2
        defines.arch)
md5sums=('e2590f2c6b2bd6074438faab9ca547e1'
         '0b968feaf39beb0302f8b95e7ade6a59')

build() {
  cd "$srcdir"
  
  cp ../defines.arch defines

  if [ "$CARCH" == x86_64 ]; then
    sed -i 's/32$/64/' defines
  fi  

  make
}

package() {
  cp -t "$pkgdir/usr/bin" bpmdj bpmplay bpmdj-raw
}

Offline

#2 2012-05-30 05:20:27

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: Compile error inside build() but not "by hand"

It would be helpful if you posted the error....

This should be changed:

cp ../defines.arch defines

to

cp $srcdir/defines.arch defines

Also, are you sure you are in the right directory? It is usual to:

cd "$srcdir"/$pkgname-$pkgver

Offline

#3 2012-05-30 11:14:57

integer
Member
From: Toronto, Canada
Registered: 2011-08-22
Posts: 22
Website

Re: Compile error inside build() but not "by hand"

Right, the build log is here:
http://pastebin.com/nE3iHh7p

and here's the defines file:
http://pastebin.com/5nQcZK0M


cp $srcdir/defines.arch defines

Got it!

As for the directory, yes, I'm in the right one.  The source tarball is one of those that dumps it's contents into the current working directory.

Last edited by integer (2012-05-30 11:37:22)

Offline

#4 2012-05-30 14:02:52

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Compile error inside build() but not "by hand"

In other packages i've found that there are some environmental differences between a user-terminal and makepkg build() .


The errors suggest that build() misses some header files , there appear 2 types :
undefined reference to `QString::free(QString::Data*)'

/home/sound/aur/maintain/bpmdj/bpmdj/src/signals.cpp:146: undefined reference to `fftw_malloc'


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2012-06-21 13:28:52

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 591

Re: Compile error inside build() but not "by hand"

In other packages i've found that there are some environmental differences between a user-terminal and makepkg build() .

Could you be a bit more specific here? I'm having exactly the same problem now: makepkg returns make errors, while make called by hand runs fine. Interesting is that the g++ call which fails in one case and runs in the other is identical for both cases! So there must be some defaults which aren't given over as flags explicitly and differ from each other...


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad L13 Yoga Gen2, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#6 2012-06-23 17:13:07

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Compile error inside build() but not "by hand"

the settings in makepg.conf are not used in a terminal, but are used by makepkg.
ex :
Since i have an dual quadcore system, i have 8 cores and have MAKEFLAGS="-j9" in makepkg.conf .
In a terminal environment the default seems to be -j1 .
I've encountered packages that build fine with -j1 , but fail with higher job settings.

For other differences, remember that makepkg uses fakeroot to build and in a user-terminal that is not used at all afaik.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB