You are not logged in.

#1 2011-10-13 14:22:47

raevin
Member
Registered: 2011-10-13
Posts: 5

PKGBUILD causing issues not present when manually installing

I'm currently working on a PKGBUILD for sinfo, and I can get it to compile and install just fine when I do it manually, but for some reason I get a weird error when I run it through makepkg:
../librpc/.libs/librpc.so: undefined reference to `ServerConnectorFactoryBase::~ServerConnectorFactoryBase()'
../librpc/.libs/librpc.so: undefined reference to `ServerConnectorFactoryBase::ServerConnectorFactoryBase()'

As far as I know, librpc isn't even needed for sinfo (at least, there's no statement of it anywhere on the homepage).  I've Google'd and looked here but haven't found any answers as to what is happening here.

Here's the PKGBUILD file I've created:

pkgname=sinfo
pkgver=0.0.43
pkgrel=1
pkgdesc="A monitoring tool for networked computers."
url="http://www.ant.uni-bremen.de/whomes/rinas/sinfo/"
source=(http://www.ant.uni-bremen.de/whomes/rinas/sinfo/download/${pkgname}-${pkgver}.tar.gz)
license=('GPL')
arch=('any')
depends=('boost' 'ncurses' 'asio')
md5sums=('f5d8e2e2eaa2dc07030793a303d815c0')
groups=()
optdepends=()
provides=()
makedepends=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
noextract=()

build() {
        cd "${srcdir}/${pkgname}-${pkgver}"
        ./configure --prefix=/usr --with-ncurses

        # Issue is here, with just "make"
        make
        make install

        # sinfo requires boost_signals-mt (multithreaded), which doesn't exist in Arch...
        ln -s /usr/lib/libboost_signals-mt.a /usr/lib/libboost_signals.a
}

Offline

#2 2011-10-13 14:32:19

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

Re: PKGBUILD causing issues not present when manually installing

makepkg pulls in flags from /etc/makepkg.conf. In this case, it's LDFLAGS which are causing a crappy Makefile to not link properly.

You can unset LDFLAGS entirely, or just add something like:

LDFLAGS=${LDFLAGS//-Wl,--as-needed}

before the ./configure call

Offline

#3 2011-10-13 14:50:11

raevin
Member
Registered: 2011-10-13
Posts: 5

Re: PKGBUILD causing issues not present when manually installing

falconindy wrote:

makepkg pulls in flags from /etc/makepkg.conf. In this case, it's LDFLAGS which are causing a crappy Makefile to not link properly.

You can unset LDFLAGS entirely, or just add something like:

LDFLAGS=${LDFLAGS//-Wl,--as-needed}

before the ./configure call

Thank you!

I ended up putting the following line above ./configure and it worked just fine:
LDFLAGS=

Now to hopefully have this approved in AUR...

Offline

#4 2011-10-13 20:29:37

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: PKGBUILD causing issues not present when manually installing

I left a comment on AUR comment page.

Offline

#5 2011-10-13 20:36:26

raevin
Member
Registered: 2011-10-13
Posts: 5

Re: PKGBUILD causing issues not present when manually installing

Stefan Husmann wrote:

I left a comment on AUR comment page.

As did I.

Offline

#6 2011-10-14 03:15:16

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: PKGBUILD causing issues not present when manually installing

The boost package provides multithreaded libs, but without a -mt in the name. So telling the build process to use  boost_signals instead of boost_signals-mt did the trick for me.

# Maintainer: Eric Hansen <ehansen at securityfor dot us>
pkgname=sinfo
pkgver=0.0.43
pkgrel=2
pkgdesc="A monitoring tool for networked computers."
url="http://www.ant.uni-bremen.de/whomes/rinas/sinfo/"
source=(http://www.ant.uni-bremen.de/whomes/rinas/sinfo/download/${pkgname}-${pkgver}.tar.gz)
md5sums=('f5d8e2e2eaa2dc07030793a303d815c0')
license=('GPL')
arch=('any')
depends=('boost' 'ncurses' 'asio')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  sed -i s+boost_signals-mt+boost_signals+ sinfo/Makefile.in
  sed -i s+boost_signals-mt+boost_signals+ sinfod/Makefile.in
  LDFLAGS=${LDFLAGS//-Wl,--as-needed} ./configure --prefix=/usr --with-ncurses
  make
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
	make DESTDIR="$pkgdir/" install
}

Offline

#7 2011-10-14 03:17:20

raevin
Member
Registered: 2011-10-13
Posts: 5

Re: PKGBUILD causing issues not present when manually installing

See the updated package I uploaded to AUR.

Offline

Board footer

Powered by FluxBB