php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13636 configure doesn't find librecode
Submitted: 2001-10-10 23:23 UTC Modified: 2001-11-10 04:31 UTC
From: arne at dome dot net dot tw Assigned:
Status: Not a bug Package: Recode related
PHP Version: 4.0.6 OS: FreeBSD 4.1-RELEASE
Private report: No CVE-ID: None
 [2001-10-10 23:23 UTC] arne at dome dot net dot tw
recode is installed from ports in /usr/local/

contents of /usr/local/lib:
librecode.a
librecode.so
librecode.so.3

contents of /usr/local/include:
recode.h
recodext.h

./configure --with-recode --with-mysql --with-apache=../apache_1.3.20 --with-gd --enable-track-vars

says:

[...]
checking for recode support... yes
configure: error: I cannot link librecode (-L/usr/local/lib -lrecode). Is it installed?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-11 13:30 UTC] sniper@php.net
Check config.log for possible error why the linking 
failed. It's not likely to be recode which fails here.

--Jani

 [2001-10-11 21:01 UTC] arne at dome dot net dot tw
config.log says:

[...]
configure:44401: checking for recode support
configure:44483: gcc -o conftest -g -O2  -DSUPPORT_UTF8  -L/usr/local/lib conftest.c -lgd -lcrypt -lm  -lrecode 1>&5
/usr/local/lib/librecode.so: undefined reference to `error'
configure: failed program was:
#line 44472 "configure"
#include "confdefs.h"

char *program_name;

int main() {

recode_format_table();

; return 0; }

what does this mean?
 [2001-10-31 19:31 UTC] sniper@php.net
What does 'ldd librecode.so' output?
What version of recode is this?
How was it compiled?

--Jani

 [2001-11-01 03:32 UTC] arne at dome dot net dot tw
ldd librecode.so says:

librecode.so:
ldd: librecode.so: Exec format error
librecode.so: exit status 1

recode is version 3.6 compiled from the FreeBSD ports directory.

Using recode from the command line works properly.

Meanwhile I updated the OS to FreeBSD 4.4-STABLE.
 [2001-11-02 02:42 UTC] sniper@php.net
Seems like there is something wrong with the shared lib.
Try removing those librecode.so and librecode.so.2 files
and try to configure PHP again.

--Jani

 [2001-11-05 20:58 UTC] arne at dome dot net dot tw
Ok, I tried it this way:
I removed the libraries as requested and tried to configure php again -> same error like before

Then I tried to compile recode from source (this time without the ports patches) again, but it failed. Then used the ports directory to recompile recode successfully.
Then I configured php again -> same error.

BTW: the librarues are librecode.so and librecode.so.3, not librecode.so.2.
I also tried to make a symbolic link to the library with the suffix '2', but no success...
 [2001-11-10 04:31 UTC] sniper@php.net
There is something wrong with your install of recode 
libraries and this is not support forum for FreeBSD so
ask them for help on this part. PHP's configure can not
do anything if your system is broken.

 [2003-03-10 04:58 UTC] mbr at freebsd dot org
I have a fix for this. Please look at:

http://people.freebsd.org/~mbr/patches/patch-php+recode.diff

This is a librecode problem, not a PHP problem.

Martin
 [2003-06-15 16:46 UTC] php_public at macfreek dot nl
Just letting you know I've got the same problem, with 
Mac OS X (10.2.6), PHP 4.3.2 and Recode 3.6 (3.6-6, 
installed using fink). The error I got in config.log:

ld: Undefined symbols: _error
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Nov 30 07:03:33 2021 UTC