Professional Web Applications Themes

#38868 [NEW]: GD extensions needs '-lm' linker flag - PHP Bugs

From: flconseil at yahoo dot fr Operating system: AIX 5.2 PHP version: 5.1.6 PHP Bug Type: Compile Failure Bug description: GD extensions needs '-lm' linker flag Description: ------------ Building PHP 5.1.6 on AIX 5.2. GD compiled in shared mode. gd.so is linked without the math library (-lm). Then, when loading the GD extension, we get an error for all the math functions it is using (sqrt(), ...). Workaround: after having built everything and before install : rm ext/gd/gd.so gmake LDFLAGS="$LDFLAGS -lm" and, now, it can be loaded. Reproduce code: --------------- ../configure --with-gd=shared and then loading gd. Expected result: ---------------- load ...

  1. #1

    Default #38868 [NEW]: GD extensions needs '-lm' linker flag

    From: flconseil at yahoo dot fr
    Operating system: AIX 5.2
    PHP version: 5.1.6
    PHP Bug Type: Compile Failure
    Bug description: GD extensions needs '-lm' linker flag

    Description:
    ------------
    Building PHP 5.1.6 on AIX 5.2. GD compiled in shared mode. gd.so is linked
    without the math library (-lm). Then, when loading the GD extension, we get
    an error for all the math functions it is using (sqrt(), ...).

    Workaround: after having built everything and before install :

    rm ext/gd/gd.so
    gmake LDFLAGS="$LDFLAGS -lm"

    and, now, it can be loaded.

    Reproduce code:
    ---------------
    ../configure --with-gd=shared
    and then loading gd.

    Expected result:
    ----------------
    load OK

    Actual result:
    --------------
    I don't have the exact messages but they are all about unsesolved symbols
    from the math library (there is at least sqrt()).

    --
    Edit bug report at [url]http://bugs.php.net/?id=38868&edit=1[/url]
    --
    Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=38868&r=trysnapshot44[/url]
    Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=38868&r=trysnapshot52[/url]
    Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=38868&r=trysnapshot60[/url]
    Fixed in CVS: [url]http://bugs.php.net/fix.php?id=38868&r=fixedcvs[/url]
    Fixed in release: [url]http://bugs.php.net/fix.php?id=38868&r=alreadyfixed[/url]
    Need backtrace: [url]http://bugs.php.net/fix.php?id=38868&r=needtrace[/url]
    Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=38868&r=needscript[/url]
    Try newer version: [url]http://bugs.php.net/fix.php?id=38868&r=oldversion[/url]
    Not developer issue: [url]http://bugs.php.net/fix.php?id=38868&r=support[/url]
    Expected behavior: [url]http://bugs.php.net/fix.php?id=38868&r=notwrong[/url]
    Not enough info: [url]http://bugs.php.net/fix.php?id=38868&r=notenoughinfo[/url]
    Submitted twice: [url]http://bugs.php.net/fix.php?id=38868&r=submittedtwice[/url]
    register_globals: [url]http://bugs.php.net/fix.php?id=38868&r=globals[/url]
    PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=38868&r=php3[/url]
    Daylight Savings: [url]http://bugs.php.net/fix.php?id=38868&r=dst[/url]
    IIS Stability: [url]http://bugs.php.net/fix.php?id=38868&r=isapi[/url]
    Install GNU Sed: [url]http://bugs.php.net/fix.php?id=38868&r=gnused[/url]
    Floating point limitations: [url]http://bugs.php.net/fix.php?id=38868&r=float[/url]
    No Zend Extensions: [url]http://bugs.php.net/fix.php?id=38868&r=nozend[/url]
    MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=38868&r=mysqlcfg[/url]
    flconseil at yahoo dot fr Guest

  2. #2

    Default #38868 [Opn->Fbk]: GD extensions needs '-lm' linker flag

    ID: 38868
    Updated by: [email]tony2001php.net[/email]
    Reported By: flconseil at yahoo dot fr
    -Status: Open
    +Status: Feedback
    Bug Type: Compile Failure
    Operating System: AIX 5.2
    PHP Version: 5.1.6
    New Comment:

    Can't reproduce on AIX 5.1.
    PHP itself is linked with libm, so it should not matter whether
    extension itself is linked or not.


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-09-18 16:00:04] flconseil at yahoo dot fr

    Description:
    ------------
    Building PHP 5.1.6 on AIX 5.2. GD compiled in shared mode. gd.so is
    linked without the math library (-lm). Then, when loading the GD
    extension, we get an error for all the math functions it is using
    (sqrt(), ...).

    Workaround: after having built everything and before install :

    rm ext/gd/gd.so
    gmake LDFLAGS="$LDFLAGS -lm"

    and, now, it can be loaded.

    Reproduce code:
    ---------------
    ../configure --with-gd=shared
    and then loading gd.

    Expected result:
    ----------------
    load OK

    Actual result:
    --------------
    I don't have the exact messages but they are all about unsesolved
    symbols from the math library (there is at least sqrt()).


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=38868&edit=1[/url]
    tony2001@php.net Guest

  3. #3

    Default #38868 [Fbk]: GD extensions needs '-lm' linker flag

    ID: 38868
    Updated by: [email]tony2001php.net[/email]
    Reported By: flconseil at yahoo dot fr
    Status: Feedback
    Bug Type: Compile Failure
    Operating System: AIX 5.2
    PHP Version: 5.1.6
    New Comment:

    make sure you're using GNU ld and GNU buildtools.


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-09-18 16:22:43] [email]tony2001php.net[/email]

    Can't reproduce on AIX 5.1.
    PHP itself is linked with libm, so it should not matter whether
    extension itself is linked or not.

    ------------------------------------------------------------------------

    [2006-09-18 16:00:04] flconseil at yahoo dot fr

    Description:
    ------------
    Building PHP 5.1.6 on AIX 5.2. GD compiled in shared mode. gd.so is
    linked without the math library (-lm). Then, when loading the GD
    extension, we get an error for all the math functions it is using
    (sqrt(), ...).

    Workaround: after having built everything and before install :

    rm ext/gd/gd.so
    gmake LDFLAGS="$LDFLAGS -lm"

    and, now, it can be loaded.

    Reproduce code:
    ---------------
    ../configure --with-gd=shared
    and then loading gd.

    Expected result:
    ----------------
    load OK

    Actual result:
    --------------
    I don't have the exact messages but they are all about unsesolved
    symbols from the math library (there is at least sqrt()).


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=38868&edit=1[/url]
    tony2001@php.net Guest

  4. #4

    Default #38868 [Fbk->Opn]: GD extensions needs '-lm' linker flag

    ID: 38868
    User updated by: flconseil at yahoo dot fr
    Reported By: flconseil at yahoo dot fr
    -Status: Feedback
    +Status: Open
    Bug Type: Compile Failure
    Operating System: AIX 5.2
    PHP Version: 5.1.6
    New Comment:

    Same problem with 5.1.2.

    Here are the exact error messages :

    PHP Warning: dl(): Unable to load dynamic library
    '/logi/http/php/lib/php/extensions/gd.so' - rtld: 0712-001 Symbol sqrt
    was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol atan2 was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol sin was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol cos was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol tan was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol floor was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    o in /logi/http/comp/util/.data/test.php on line 22

    Warning: dl(): Unable to load dynamic library
    '/logi/http/php/lib/php/extensions/gd.so' - rtld: 0712-001 Symbol sqrt
    was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol atan2 was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol sin was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol cos was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol tan was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol floor was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    o in /logi/http/comp/util/.data/test.php on line 22


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-09-18 16:29:42] [email]tony2001php.net[/email]

    make sure you're using GNU ld and GNU buildtools.

    ------------------------------------------------------------------------

    [2006-09-18 16:22:43] [email]tony2001php.net[/email]

    Can't reproduce on AIX 5.1.
    PHP itself is linked with libm, so it should not matter whether
    extension itself is linked or not.

    ------------------------------------------------------------------------

    [2006-09-18 16:00:04] flconseil at yahoo dot fr

    Description:
    ------------
    Building PHP 5.1.6 on AIX 5.2. GD compiled in shared mode. gd.so is
    linked without the math library (-lm). Then, when loading the GD
    extension, we get an error for all the math functions it is using
    (sqrt(), ...).

    Workaround: after having built everything and before install :

    rm ext/gd/gd.so
    gmake LDFLAGS="$LDFLAGS -lm"

    and, now, it can be loaded.

    Reproduce code:
    ---------------
    ../configure --with-gd=shared
    and then loading gd.

    Expected result:
    ----------------
    load OK

    Actual result:
    --------------
    I don't have the exact messages but they are all about unsesolved
    symbols from the math library (there is at least sqrt()).


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=38868&edit=1[/url]
    flconseil at yahoo dot fr Guest

  5. #5

    Default #38868 [Opn->Fbk]: GD extensions needs '-lm' linker flag

    ID: 38868
    Updated by: [email]tony2001php.net[/email]
    Reported By: flconseil at yahoo dot fr
    -Status: Open
    +Status: Feedback
    Bug Type: Compile Failure
    Operating System: AIX 5.2
    PHP Version: 5.1.6
    New Comment:

    Please read my previous comments.


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-09-18 16:43:11] flconseil at yahoo dot fr

    Same problem with 5.1.2.

    Here are the exact error messages :

    PHP Warning: dl(): Unable to load dynamic library
    '/logi/http/php/lib/php/extensions/gd.so' - rtld: 0712-001 Symbol sqrt
    was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol atan2 was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol sin was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol cos was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol tan was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol floor was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    o in /logi/http/comp/util/.data/test.php on line 22

    Warning: dl(): Unable to load dynamic library
    '/logi/http/php/lib/php/extensions/gd.so' - rtld: 0712-001 Symbol sqrt
    was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol atan2 was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol sin was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol cos was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol tan was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol floor was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    o in /logi/http/comp/util/.data/test.php on line 22

    ------------------------------------------------------------------------

    [2006-09-18 16:29:42] [email]tony2001php.net[/email]

    make sure you're using GNU ld and GNU buildtools.

    ------------------------------------------------------------------------

    [2006-09-18 16:22:43] [email]tony2001php.net[/email]

    Can't reproduce on AIX 5.1.
    PHP itself is linked with libm, so it should not matter whether
    extension itself is linked or not.

    ------------------------------------------------------------------------

    [2006-09-18 16:00:04] flconseil at yahoo dot fr

    Description:
    ------------
    Building PHP 5.1.6 on AIX 5.2. GD compiled in shared mode. gd.so is
    linked without the math library (-lm). Then, when loading the GD
    extension, we get an error for all the math functions it is using
    (sqrt(), ...).

    Workaround: after having built everything and before install :

    rm ext/gd/gd.so
    gmake LDFLAGS="$LDFLAGS -lm"

    and, now, it can be loaded.

    Reproduce code:
    ---------------
    ../configure --with-gd=shared
    and then loading gd.

    Expected result:
    ----------------
    load OK

    Actual result:
    --------------
    I don't have the exact messages but they are all about unsesolved
    symbols from the math library (there is at least sqrt()).


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=38868&edit=1[/url]
    tony2001@php.net Guest

  6. #6

    Default #38868 [Fbk->Opn]: GD extensions needs '-lm' linker flag

    ID: 38868
    User updated by: flconseil at yahoo dot fr
    Reported By: flconseil at yahoo dot fr
    -Status: Feedback
    +Status: Open
    Bug Type: Compile Failure
    Operating System: AIX 5.2
    PHP Version: 5.1.6
    New Comment:

    OK. I was using GNU make but not GNU ld. I am going to try it.


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-09-18 16:48:18] [email]tony2001php.net[/email]

    Please read my previous comments.

    ------------------------------------------------------------------------

    [2006-09-18 16:43:11] flconseil at yahoo dot fr

    Same problem with 5.1.2.

    Here are the exact error messages :

    PHP Warning: dl(): Unable to load dynamic library
    '/logi/http/php/lib/php/extensions/gd.so' - rtld: 0712-001 Symbol sqrt
    was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol atan2 was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol sin was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol cos was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol tan was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol floor was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    o in /logi/http/comp/util/.data/test.php on line 22

    Warning: dl(): Unable to load dynamic library
    '/logi/http/php/lib/php/extensions/gd.so' - rtld: 0712-001 Symbol sqrt
    was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol atan2 was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol sin was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol cos was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol tan was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol floor was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    o in /logi/http/comp/util/.data/test.php on line 22

    ------------------------------------------------------------------------

    [2006-09-18 16:29:42] [email]tony2001php.net[/email]

    make sure you're using GNU ld and GNU buildtools.

    ------------------------------------------------------------------------

    [2006-09-18 16:22:43] [email]tony2001php.net[/email]

    Can't reproduce on AIX 5.1.
    PHP itself is linked with libm, so it should not matter whether
    extension itself is linked or not.

    ------------------------------------------------------------------------

    [2006-09-18 16:00:04] flconseil at yahoo dot fr

    Description:
    ------------
    Building PHP 5.1.6 on AIX 5.2. GD compiled in shared mode. gd.so is
    linked without the math library (-lm). Then, when loading the GD
    extension, we get an error for all the math functions it is using
    (sqrt(), ...).

    Workaround: after having built everything and before install :

    rm ext/gd/gd.so
    gmake LDFLAGS="$LDFLAGS -lm"

    and, now, it can be loaded.

    Reproduce code:
    ---------------
    ../configure --with-gd=shared
    and then loading gd.

    Expected result:
    ----------------
    load OK

    Actual result:
    --------------
    I don't have the exact messages but they are all about unsesolved
    symbols from the math library (there is at least sqrt()).


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=38868&edit=1[/url]
    flconseil at yahoo dot fr Guest

  7. #7

    Default #38868 [Opn->Fbk]: GD extensions needs '-lm' linker flag

    ID: 38868
    Updated by: [email]tony2001php.net[/email]
    Reported By: flconseil at yahoo dot fr
    -Status: Open
    +Status: Feedback
    Bug Type: Compile Failure
    Operating System: AIX 5.2
    PHP Version: 5.1.6


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-09-18 16:51:32] flconseil at yahoo dot fr

    OK. I was using GNU make but not GNU ld. I am going to try it.

    ------------------------------------------------------------------------

    [2006-09-18 16:48:18] [email]tony2001php.net[/email]

    Please read my previous comments.

    ------------------------------------------------------------------------

    [2006-09-18 16:43:11] flconseil at yahoo dot fr

    Same problem with 5.1.2.

    Here are the exact error messages :

    PHP Warning: dl(): Unable to load dynamic library
    '/logi/http/php/lib/php/extensions/gd.so' - rtld: 0712-001 Symbol sqrt
    was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol atan2 was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol sin was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol cos was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol tan was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol floor was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    o in /logi/http/comp/util/.data/test.php on line 22

    Warning: dl(): Unable to load dynamic library
    '/logi/http/php/lib/php/extensions/gd.so' - rtld: 0712-001 Symbol sqrt
    was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol atan2 was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol sin was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol cos was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol tan was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol floor was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    o in /logi/http/comp/util/.data/test.php on line 22

    ------------------------------------------------------------------------

    [2006-09-18 16:29:42] [email]tony2001php.net[/email]

    make sure you're using GNU ld and GNU buildtools.

    ------------------------------------------------------------------------

    [2006-09-18 16:22:43] [email]tony2001php.net[/email]

    Can't reproduce on AIX 5.1.
    PHP itself is linked with libm, so it should not matter whether
    extension itself is linked or not.

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/38868[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=38868&edit=1[/url]
    tony2001@php.net Guest

  8. #8

    Default #38868 [Fbk->Opn]: GD extensions needs '-lm' linker flag

    ID: 38868
    User updated by: flconseil at yahoo dot fr
    Reported By: flconseil at yahoo dot fr
    -Status: Feedback
    +Status: Open
    Bug Type: Compile Failure
    Operating System: AIX 5.2
    PHP Version: 5.1.6
    New Comment:

    Sorry but, after fighting with GNU ld and gcc during 2 hours, I am
    giving up. Using GNU ld brings some new errors in the configure stage.
    I solved one by adding '-Wl,-rpath,/usr/lib' to LDFLAGS but, now, it is
    failing LDAP detection and I won't spend the night on it. Another reason
    why I am giving up is that ldap's configure refuses to generate dynamic
    libraries with GNU ld (saying that GNU ld is known not to generate
    correct dynamic libs on AIX). So, as I want to generate everything with
    the same linker, I will keep the AIX linker.

    But I think I know why we have unresolved references when loading gd.
    As you said, the PHP core is linked with GNU ld but, on AIX, if the
    linker does not detect any reference to a library, it does not keep it
    in the list of required libraries. In my configuration, as I have kept
    the core to the minimum, I don't have any reference from the core to
    libm and, when I run 'ldd' or 'dump -H' against 'php' or 'libphp5.so',
    the libm is not referenced.

    As, by default, gd is not linked with the libm, it does not have the
    reference and, finally, when it is loaded, the libm symbols cannot be
    resolved as this lib is not referenced anywhere in the installed
    files.

    That's why, as every other extension is linked against the libs it
    needs, I still think that gd should be linked explicitely with the
    libm.


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-09-18 16:51:32] flconseil at yahoo dot fr

    OK. I was using GNU make but not GNU ld. I am going to try it.

    ------------------------------------------------------------------------

    [2006-09-18 16:48:18] [email]tony2001php.net[/email]

    Please read my previous comments.

    ------------------------------------------------------------------------

    [2006-09-18 16:43:11] flconseil at yahoo dot fr

    Same problem with 5.1.2.

    Here are the exact error messages :

    PHP Warning: dl(): Unable to load dynamic library
    '/logi/http/php/lib/php/extensions/gd.so' - rtld: 0712-001 Symbol sqrt
    was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol atan2 was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol sin was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol cos was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol tan was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol floor was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    o in /logi/http/comp/util/.data/test.php on line 22

    Warning: dl(): Unable to load dynamic library
    '/logi/http/php/lib/php/extensions/gd.so' - rtld: 0712-001 Symbol sqrt
    was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol atan2 was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol sin was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol cos was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol tan was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol floor was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    o in /logi/http/comp/util/.data/test.php on line 22

    ------------------------------------------------------------------------

    [2006-09-18 16:29:42] [email]tony2001php.net[/email]

    make sure you're using GNU ld and GNU buildtools.

    ------------------------------------------------------------------------

    [2006-09-18 16:22:43] [email]tony2001php.net[/email]

    Can't reproduce on AIX 5.1.
    PHP itself is linked with libm, so it should not matter whether
    extension itself is linked or not.

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/38868[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=38868&edit=1[/url]
    flconseil at yahoo dot fr Guest

  9. #9

    Default #38868 [Opn->WFx]: GD extensions needs '-lm' linker flag

    ID: 38868
    Updated by: [email]tony2001php.net[/email]
    Reported By: flconseil at yahoo dot fr
    -Status: Open
    +Status: Wont fix
    Bug Type: Compile Failure
    Operating System: AIX 5.2
    PHP Version: 5.1.6
    New Comment:

    Sorry, we do not support AIX native linker.



    Previous Comments:
    ------------------------------------------------------------------------

    [2006-09-18 21:05:05] flconseil at yahoo dot fr

    Sorry but, after fighting with GNU ld and gcc during 2 hours, I am
    giving up. Using GNU ld brings some new errors in the configure stage.
    I solved one by adding '-Wl,-rpath,/usr/lib' to LDFLAGS but, now, it is
    failing LDAP detection and I won't spend the night on it. Another reason
    why I am giving up is that ldap's configure refuses to generate dynamic
    libraries with GNU ld (saying that GNU ld is known not to generate
    correct dynamic libs on AIX). So, as I want to generate everything with
    the same linker, I will keep the AIX linker.

    But I think I know why we have unresolved references when loading gd.
    As you said, the PHP core is linked with GNU ld but, on AIX, if the
    linker does not detect any reference to a library, it does not keep it
    in the list of required libraries. In my configuration, as I have kept
    the core to the minimum, I don't have any reference from the core to
    libm and, when I run 'ldd' or 'dump -H' against 'php' or 'libphp5.so',
    the libm is not referenced.

    As, by default, gd is not linked with the libm, it does not have the
    reference and, finally, when it is loaded, the libm symbols cannot be
    resolved as this lib is not referenced anywhere in the installed
    files.

    That's why, as every other extension is linked against the libs it
    needs, I still think that gd should be linked explicitely with the
    libm.

    ------------------------------------------------------------------------

    [2006-09-18 16:51:32] flconseil at yahoo dot fr

    OK. I was using GNU make but not GNU ld. I am going to try it.

    ------------------------------------------------------------------------

    [2006-09-18 16:48:18] [email]tony2001php.net[/email]

    Please read my previous comments.

    ------------------------------------------------------------------------

    [2006-09-18 16:43:11] flconseil at yahoo dot fr

    Same problem with 5.1.2.

    Here are the exact error messages :

    PHP Warning: dl(): Unable to load dynamic library
    '/logi/http/php/lib/php/extensions/gd.so' - rtld: 0712-001 Symbol sqrt
    was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol atan2 was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol sin was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol cos was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol tan was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol floor was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    o in /logi/http/comp/util/.data/test.php on line 22

    Warning: dl(): Unable to load dynamic library
    '/logi/http/php/lib/php/extensions/gd.so' - rtld: 0712-001 Symbol sqrt
    was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol atan2 was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol sin was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol cos was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol tan was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol floor was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    o in /logi/http/comp/util/.data/test.php on line 22

    ------------------------------------------------------------------------

    [2006-09-18 16:29:42] [email]tony2001php.net[/email]

    make sure you're using GNU ld and GNU buildtools.

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/38868[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=38868&edit=1[/url]
    tony2001@php.net Guest

  10. #10

    Default #38868 [WFx]: GD extensions needs '-lm' linker flag

    ID: 38868
    User updated by: flconseil at yahoo dot fr
    Reported By: flconseil at yahoo dot fr
    Status: Wont fix
    Bug Type: Compile Failure
    Operating System: AIX 5.2
    PHP Version: 5.1.6
    New Comment:

    Sorry to insist but I wanted to make it clear because I reference it in
    my (excellent :-) doent about building PHP on AIX
    ([url]http://www.tekwire.net/joomla/content/view/16/1/[/url]), and several people
    asked about this bug's status.

    While I generally agree with your decision of restricting the build
    environment you support, I must say that it is not the case for GNU ld.
    It is perfectly legitmate not to support native compilers but linkers
    are a more sensitive case and attempting to use only the GNU linker on
    systems like AIX or HP-UX has a number of side effects impossible to
    solve for non-expert people. Building Apache & PHP on these systems is
    already complex (especially PHP 4) and it is not worth the pain to add
    another difficulty to the task. For people used to their OS, using gcc
    is not a problem, but using the GNU linker is not natural and the
    switch is much less transparent.

    And there is still this message when compiling LDAP saying that it
    refuses to generate dynamic libs because GNU ld is supposed not to
    generate them properly on AIX. Do you consider it as a wrong assertion
    in LDAP's configure ? What's your advice about this ?

    Francois


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-09-18 21:17:23] [email]tony2001php.net[/email]

    Sorry, we do not support AIX native linker.


    ------------------------------------------------------------------------

    [2006-09-18 21:05:05] flconseil at yahoo dot fr

    Sorry but, after fighting with GNU ld and gcc during 2 hours, I am
    giving up. Using GNU ld brings some new errors in the configure stage.
    I solved one by adding '-Wl,-rpath,/usr/lib' to LDFLAGS but, now, it is
    failing LDAP detection and I won't spend the night on it. Another reason
    why I am giving up is that ldap's configure refuses to generate dynamic
    libraries with GNU ld (saying that GNU ld is known not to generate
    correct dynamic libs on AIX). So, as I want to generate everything with
    the same linker, I will keep the AIX linker.

    But I think I know why we have unresolved references when loading gd.
    As you said, the PHP core is linked with GNU ld but, on AIX, if the
    linker does not detect any reference to a library, it does not keep it
    in the list of required libraries. In my configuration, as I have kept
    the core to the minimum, I don't have any reference from the core to
    libm and, when I run 'ldd' or 'dump -H' against 'php' or 'libphp5.so',
    the libm is not referenced.

    As, by default, gd is not linked with the libm, it does not have the
    reference and, finally, when it is loaded, the libm symbols cannot be
    resolved as this lib is not referenced anywhere in the installed
    files.

    That's why, as every other extension is linked against the libs it
    needs, I still think that gd should be linked explicitely with the
    libm.

    ------------------------------------------------------------------------

    [2006-09-18 16:51:32] flconseil at yahoo dot fr

    OK. I was using GNU make but not GNU ld. I am going to try it.

    ------------------------------------------------------------------------

    [2006-09-18 16:48:18] [email]tony2001php.net[/email]

    Please read my previous comments.

    ------------------------------------------------------------------------

    [2006-09-18 16:43:11] flconseil at yahoo dot fr

    Same problem with 5.1.2.

    Here are the exact error messages :

    PHP Warning: dl(): Unable to load dynamic library
    '/logi/http/php/lib/php/extensions/gd.so' - rtld: 0712-001 Symbol sqrt
    was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol atan2 was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol sin was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol cos was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol tan was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol floor was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    o in /logi/http/comp/util/.data/test.php on line 22

    Warning: dl(): Unable to load dynamic library
    '/logi/http/php/lib/php/extensions/gd.so' - rtld: 0712-001 Symbol sqrt
    was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol atan2 was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol sin was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol cos was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol tan was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol floor was referenced
    from module /logi/http/php/lib/php/extensions/gd.so(), but a
    runtime definition
    o in /logi/http/comp/util/.data/test.php on line 22

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    [url]http://bugs.php.net/38868[/url]

    --
    Edit this bug report at [url]http://bugs.php.net/?id=38868&edit=1[/url]
    flconseil at yahoo dot fr Guest

Similar Threads

  1. Auto Linker with keyword search
    By workdasheddotcom@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 1
    Last Post: September 8th, 08:34 PM
  2. [PHP-DEV] Patch for Zend engine linker error
    By Vesselin Atanasov in forum PHP Development
    Replies: 2
    Last Post: August 6th, 07:35 AM
  3. Florida Flag==
    By David in forum Photography
    Replies: 0
    Last Post: July 16th, 11:23 AM
  4. #23383 [Asn->WFx]: linker commands *might* be wrong
    By msopacua@php.net in forum PHP Development
    Replies: 0
    Last Post: July 15th, 06:06 PM
  5. Optimization not working with xlc linker
    By Soichi Hayashi in forum AIX
    Replies: 0
    Last Post: July 14th, 06:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139