Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed Poco library on my Arch64 system using AUR. Sources were downloaded, compiled and the package succesfully installed. But now I need to patch the PKGBUILD so that I can compile 32-bit version of the library and install it next to the 64-bit version.

This is the original PKGBUILD:

# Maintainer: Robert Knauer 
# Contributor: Rodrigo Grumiche Silva 
# Contributor: nozog
# Contributor: davidhjelm
# Contributor: Ray Kohler 
# Contributor: Nathan Owe 

pkgdesc="C++ class libraries for network-centric, portable applications, complete edition"
arch=('i686' 'x86_64')
depends=('unixodbc' 'libmysqlclient' 'openssl')
makedepends=('gcc' 'make' 'unixodbc' 'libmysqlclient' 'openssl' 'chrpath')

  cd "${srcdir}/${pkgname}-${pkgver}-all"
  ./configure --prefix=/usr --no-samples --no-tests
  make ODBCLIBDIR="/usr/lib"

  cd "${srcdir}/${pkgname}-${pkgver}-all"
  make ODBCLIBDIR="/usr/lib" DESTDIR="${pkgdir}" install
  install -Dm644 'LICENSE' "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  # remove rpath information from binaries
  chrpath -d "${pkgdir}/usr/bin/cpspc"
  chrpath -d "${pkgdir}/usr/bin/cpspcd"
  chrpath -d "${pkgdir}/usr/bin/f2cpspd"
  chrpath -d "${pkgdir}/usr/bin/f2cpsp"
  # remove debugging libraries
  rm "${pkgdir}/usr/lib/libPoco"*"d.so"*

The first thing I tried was to take a look at another lib32-* AUR package, but I failed even to add the -m32 flag.

share|improve this question

You need to,

  1. Change package name to lib32-XX

  2. place a export CFLAGS="-m32" prior to make or ./configure (In this case would be the build() function

  3. And you need to alter the installation path, to /usr/lib32, in this case it "could" be all occurrence of ODBCLIBDIR="/usr/lib", worth a try

And examine the contents of pkg before install anything, see if it's right.

share|improve this answer
From some reason CFLAGS (and CXXFLAGS, CPPFLAGS, LDFLAGS) are ignored. I found a --cflags switch in configure script, but this adds -m32 only in compilation phase, not in the linker. -Wl,-m32 does not help. – Dadam Feb 20 '13 at 11:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.