Menu

#12 Cannot compile on 64-bit linux

open
None
5
2005-09-04
2004-05-07
No

I've not looked into this properly yet, I'm filing it
for reference and will come back to it shortly...

Trying to build from CVS on 64-bit linux (and maybe
other OSs?) fails because the linker assumes that if
the headers are in /usr/include/mysql the libs wwill be
in /usr/lib. On my 64-bit FC1 system the libs are in
/usr/lib64/

This must have been solved by other projects, so I'll
see how they did it.

For now I might have to install the 32bit libs...

Discussion

  • Jonathan Wakely

    Jonathan Wakely - 2004-05-07

    Logged In: YES
    user_id=426241

    Of course, manually setting LDFLAGS=-L/usr/lib64/mysql when
    running configure works too, but it'd be nice if this wasn't
    needed.

     
  • Murray Cumming

    Murray Cumming - 2004-05-07

    Logged In: YES
    user_id=6254

    Trying to build from CVS on 64-bit linux (and maybe
    other OSs?) fails because the linker assumes that if
    the headers are in /usr/include/mysql the libs wwill be
    in /usr/lib.

    It's not the linker that's assuming that - it's our
    mysqlcppapi configure.in that's assuming that. If the
    libraries are not in a location that can be easily guessed
    from the --with-mysql "prefix" value, then you need to add a
    --with-mysql-libs configure option to override it.

    Of course this would all be easier if MySQL installed a
    pkgconfig file, like mysqlcppapi does.

    > On my 64-bit FC1 system the libs are in
    > /usr/lib64/

    Yes, various distros put bits of MySQL in various randome
    places. I blame MySQL.

     
  • Jonathan Wakely

    Jonathan Wakely - 2005-09-03

    Logged In: YES
    user_id=426241

    I've committed a macro, AC_PATH_MYSQL, which finds the right
    paths.

    You can now configure with --with-mysql-config=FILE to use
    an installed mysql_config script.

     
  • Jonathan Wakely

    Jonathan Wakely - 2005-09-03
    • status: open --> closed-fixed
     
  • Jonathan Wakely

    Jonathan Wakely - 2005-09-04

    Logged In: YES
    user_id=426241

    Re-opening this bug as mysql_config doesn't really help.

    The version that comes with 3.23 RPMs from RedHat has broken
    output for --cflags (it has apostrophes in the path which
    have to be removed before it can be used)

    The version that comes with 4.1 RPMs from mysql.com includes
    unwanted args in --cflags (-g and -pipe) and gets confused
    about the libs, finding libs installed elsewhere on the
    system, this means the --include and --libs settings are
    incompatible, since it will pick up headers that don't match
    the libs. (This might be another consequence of the libs
    being in a dir called lib64)

    Thanks, MySQL, you muppets.

    Looks like I might have to avoid using mysql_config and just
    write the configury macro by hand. *sigh*

     
  • Jonathan Wakely

    Jonathan Wakely - 2005-09-04
    • status: closed-fixed --> open
     

Log in to post a comment.