problem configuring PHP

Matthew Saltzman mjs at
Sun Sep 19 16:43:57 UTC 2004

On Sat, 18 Sep 2004, Jim Patterson wrote:

> I am trying to install Sablotron on my box.
> I have downloaded the src.rpm and have made the proper changes to
> php.spec.  Installed the js and js-devel rpm's
> and the sablotron rpm.  Whenever I try to compile php (rpmbuild -ba
> php.spec) I get the error:
> ------------------------------------------------------------------------------
> ext/iconv/iconv.o(.text+0x279):/usr/src/redhat/BUILD/php-4.3.2/ext/iconv/iconv.c:226:
> undefined reference to `libiconv'
> and
> /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../
> undefined reference to `JS_SetPrototype'
> ---------------------------------------------------------------------------------
> There are more warnings and errors than this,but I believe they are
> related to not be able to find the files which contain reference to this
> functions.
>  iconv was installed by configuring a tar, which installed it's library
> files in /usr/local/lib,
> I added /usr/local/lib to my file and ran ldconfig.   But  I
> still get this error.
> The second error, I believe, is caused by the compile not being able to
> find the source files which were installed with the js-devel*.rpm.  I
> believe I need to reconfigure something so that the compile has the
> option -ljs, and -I /usr/include/js but I do not know of a good method
> of doing this.  I would guess that there is a place to configure this in
> the source loaded with php-4.3.2.src.rpm.  Is there some simple method
> of doing this?

I had this issue.

In the spec file for the RPM, on the "LIBS=" line (around line 219, in
the case of the version of PHP that I was building) -> add "-ljs"
(making sure to separate the option from the other options by a space).

Report back how it works.

		Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu

More information about the users mailing list