php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39122 configure fails on binay distributions
Submitted: 2006-10-10 23:29 UTC Modified: 2006-10-11 09:26 UTC
From: zaphod at tdl dot com Assigned:
Status: Not a bug Package: *Compile Issues
PHP Version: 5.1.6 OS: linux
Private report: No CVE-ID: None
 [2006-10-10 23:29 UTC] zaphod at tdl dot com
Description:
------------
configure fails on modern linux systems with binary distributions of mysql.  On such systems, all programs that linka gainst mysql librares also need to link aainst libmygcc, when built under gcc.



Reproduce code:
---------------
configure --with-mysql=/usr/local/mysql

yup that's it.

Expected result:
----------------
Expected result is for configure to complete.



Actual result:
--------------
Actual result is the following checks fail

checking for mysql_close in -l$MYSQL_LIBNAME
checking for mysql_error in -l$MYSQL_LIBNAME

They fail because configure won't link against libmygcc when linking against libmysqlclient

TO get past this, i need to do the following

Replace the line in both of those checks

LIBS="-l$MYSQL_LIBNAME  $LIBS "

with

LIBS="-l$MYSQL_LIBNAME  $LIBS -lmygcc"

Additionally i then have to append -lmygcc to MYSQL_LIBS and EXTRA_LIBS in the makefile AFTER configure completes to get a working build.

Knowing this, you should be able to make configure check for libmygcc, and link against that after testing to see if it's required.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-10 23:31 UTC] zaphod at tdl dot com
Description:
------------
configure fails on modern linux systems with binary distributions of mysql that use gcc.  On such systems, all programs that link against mysql librares also need to link against libmygcc when built under gcc.

Reproduce code:
---------------
configure --with-mysql=/usr/local/mysql

yup that's it.

Expected result:
----------------
Expected result is for configure to complete.

Actual result:
--------------
Actual result is the following checks fail

checking for mysql_close in -l$MYSQL_LIBNAME
Checking for mysql_error in -l$MYSQL_LIBNAME

They fail because configure won't link against libmygcc when linking against libmysqlclient in this circumstance.

To get past this, i need to do the following

Replace the line in both of those checks

LIBS="-l$MYSQL_LIBNAME  $LIBS "

with

LIBS="-l$MYSQL_LIBNAME  $LIBS -lmygcc"

Additionally i then have to append -lmygcc to MYSQL_LIBS and EXTRA_LIBS in the makefile AFTER configure completes to get a working build.

Knowing this, you should be able to make configure check for libmygcc, and link against that after testing to see if it's required.
 [2006-10-11 09:26 UTC] tony2001@php.net
Not PHP problem, please report it to MySQL people.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 05:01:28 2024 UTC