[Slackbuilds-users] compiling php

B Watson yalhcru at gmail.com
Tue Sep 9 06:14:07 UTC 2014


On 9/8/14, Miguel De Anda <miguel at thedeanda.com> wrote:

I haven't compiled php in years, but:

> libtool: link: gcc -std=gnu99 -pthread -O2 -fPIC -o pico main.o utf8stub.o
> ../c-client/utf8.o  -L/usr/lib libpico.a osdep/libpicoosd.a
> ../pith/osdep/libpithosd.a ../pith/charconv/libpithcc.a /usr/lib/libldap.so
> /usr/lib/libsasl2.so -ldl -lncurses /usr/lib/liblber.so -lresolv -lssl
> -lcrypto -pthread
> /usr/lib/libldap.so: error adding symbols: File in wrong format

The -O2 -fPIC tells me you're compiling on x86_64... and the existence
of /usr/lib/libldap.so tells me you have multilib installed. The problem
is that you're building a 64-bit php, and it's trying to link a 32-bit
library, which won't and can't ever work.

Most likely you can get by with adding LDFLAGS="-L/usr/lib64" at the
front of the configure command (before the CFLAGS and CXXFLAGS that
should already be there).

If not, the more extreme measure is this:

mv /usr/lib /usr/lib.backup
./php.SlackBuild
mv /usr/lib.backup /usr/lib

If all else fails, build your package on a pure x86_64 host, without
multilib, and copy it over & install it on your multilib box.


More information about the SlackBuilds-users mailing list