PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : MySQL Library unter Ubuntu Karmic 9.10


RattuS
2010-02-14, 18:05:02
Hallo,

ich möchte über Ubuntu (x64) C-Code kompilieren, der u.a. auch die MySQL-Schnittstelle verwendet. Dazu habe ich Make/GCC und zLib/MySQL (Server/Client) installiert. Der MySQL-Server läuft einwandfrei, der Compiler ebenso. Einziges Problem: Sobald ich versuche via ./configure (--enable-64bit) das MySQL zu aktivieren, meckert er:
checking MySQL library (optional)... no
configure: disabling MySQL (optional)
Wo liegt diese Library bzw. warum findet er sie nicht?

Danke im voraus. Mit freundlichen Grüßen,
pogo

Sephiroth
2010-02-14, 18:15:56
du brauchst das mysql-devel package (heißt wohl bei ubuntu libmysql++-dev)

fezie
2010-02-14, 18:21:25
Wenn es ein reines C Programm ist reicht libmysqlclient-dev aus.
Die ++ Version ist für C++ Programme gedacht.
Da die aber von libmysqlclient-dev abhängt, verbrauchts im schlimmsten Fall nur etwas Festplattenplatz.

RattuS
2010-02-14, 18:26:38
Hab ich beides ebenfalls schon installiert. Funktioniert leider trotzdem nicht. :(

fezie
2010-02-14, 18:44:43
Dann schau mal in die config.log im selben Verzeichnis wo du ./configure aufrufst.

RattuS
2010-02-14, 18:56:30
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.61. Invocation command line was

$ ./configure --enable-64bit

## --------- ##
## Platform. ##
## --------- ##

hostname = Ubuntu-910-karmic-64-minimal
uname -m = x86_64
uname -r = 2.6.31-16-server
uname -s = Linux
uname -v = #53-Ubuntu SMP Tue Dec 8 05:08:02 UTC 2009

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1928: checking whether make sets $(MAKE)
configure:1949: result: yes
configure:2006: checking for gcc
configure:2022: found /usr/bin/gcc
configure:2033: result: gcc
configure:2271: checking for C compiler version
configure:2278: gcc --version >&5
gcc (Ubuntu 4.4.1-4ubuntu9) 4.4.1
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2281: $? = 0
configure:2288: gcc -v >&5
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.1-4ubuntu9' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9)
configure:2291: $? = 0
configure:2298: gcc -V >&5
gcc: '-V' option must have argument
configure:2301: $? = 1
configure:2324: checking for C compiler default output file name
configure:2351: gcc conftest.c >&5
configure:2354: $? = 0
configure:2392: result: a.out
configure:2409: checking whether the C compiler works
configure:2419: ./a.out
configure:2422: $? = 0
configure:2439: result: yes
configure:2446: checking whether we are cross compiling
configure:2448: result: no
configure:2451: checking for suffix of executables
configure:2458: gcc -o conftest conftest.c >&5
configure:2461: $? = 0
configure:2485: result:
configure:2491: checking for suffix of object files
configure:2517: gcc -c conftest.c >&5
configure:2520: $? = 0
configure:2543: result: o
configure:2547: checking whether we are using the GNU C compiler
configure:2576: gcc -c conftest.c >&5
configure:2582: $? = 0
configure:2599: result: yes
configure:2604: checking whether gcc accepts -g
configure:2634: gcc -c -g conftest.c >&5
configure:2640: $? = 0
configure:2739: result: yes
configure:2756: checking for gcc option to accept ISO C89
configure:2830: gcc -c -g -O2 conftest.c >&5
configure:2836: $? = 0
configure:2859: result: none needed
configure:2882: checking how to run the C preprocessor
configure:2922: gcc -E conftest.c
configure:2928: $? = 0
configure:2959: gcc -E conftest.c
conftest.c:8:28: error: ac_nonexistent.h: No such file or directory
configure:2965: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:2998: result: gcc -E
configure:3027: gcc -E conftest.c
configure:3033: $? = 0
configure:3064: gcc -E conftest.c
conftest.c:8:28: error: ac_nonexistent.h: No such file or directory
configure:3070: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:3121: checking for grep that handles long lines and -e
configure:3195: result: /bin/grep
configure:3200: checking for egrep
configure:3278: result: /bin/grep -E
configure:3283: checking for ANSI C header files
configure:3313: gcc -c -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -I../common conftest.c >&5
configure:3319: $? = 0
configure:3418: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -I../common conftest.c >&5
configure:3421: $? = 0
configure:3427: ./conftest
configure:3430: $? = 0
configure:3447: result: yes
configure:3471: checking for sys/types.h
configure:3492: gcc -c -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -I../common conftest.c >&5
configure:3498: $? = 0
configure:3514: result: yes
configure:3471: checking for sys/stat.h
configure:3492: gcc -c -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -I../common conftest.c >&5
configure:3498: $? = 0
configure:3514: result: yes
configure:3471: checking for stdlib.h
configure:3492: gcc -c -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -I../common conftest.c >&5
configure:3498: $? = 0
configure:3514: result: yes
configure:3471: checking for string.h
configure:3492: gcc -c -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -I../common conftest.c >&5
configure:3498: $? = 0
configure:3514: result: yes
configure:3471: checking for memory.h
configure:3492: gcc -c -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -I../common conftest.c >&5
configure:3498: $? = 0
configure:3514: result: yes
configure:3471: checking for strings.h
configure:3492: gcc -c -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -I../common conftest.c >&5
configure:3498: $? = 0
configure:3514: result: yes
configure:3471: checking for inttypes.h
configure:3492: gcc -c -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -I../common conftest.c >&5
configure:3498: $? = 0
configure:3514: result: yes
configure:3471: checking for stdint.h
configure:3492: gcc -c -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -I../common conftest.c >&5
configure:3498: $? = 0
configure:3514: result: yes
configure:3471: checking for unistd.h
configure:3492: gcc -c -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -I../common conftest.c >&5
configure:3498: $? = 0
configure:3514: result: yes
configure:3526: checking whether byte ordering is bigendian
configure:3559: gcc -c -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -I../common conftest.c >&5
configure:3565: $? = 0
configure:3597: gcc -c -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -I../common conftest.c >&5
conftest.c: In function 'main':
conftest.c:25: error: 'not' undeclared (first use in this function)
conftest.c:25: error: (Each undeclared identifier is reported only once
conftest.c:25: error: for each function it appears in.)
conftest.c:25: error: expected ';' before 'big'
configure:3603: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h. */
| #include <sys/types.h>
| #include <sys/param.h>
|
| int
| main ()
| {
| #if BYTE_ORDER != BIG_ENDIAN
| not big endian
| #endif
|
| ;
| return 0;
| }
configure:3743: result: no
configure:3760: checking whether pointers can be stored in ints (old code)
configure:3784: gcc -c -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -I../common conftest.c >&5
conftest.c:18: error: size of array 'test_array' is negative
configure:3790: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h. */
| static int test_array[((long int)sizeof(int)) == ((long int)sizeof(void*)) ? 1 : -1];
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3829: gcc -c -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -m32 -I../common conftest.c >&5
conftest.c:18: warning: 'test_array' defined but not used
configure:3835: $? = 0
configure:3851: result: yes (with -m32)
configure:3860: checking whether gcc supports -Wno-unused-parameter
configure:3873: gcc -c -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -m32 -Wno-unused-parameter -I../common conftest.c >&5
configure:3879: $? = 0
configure:3884: result: yes
configure:3901: checking whether gcc supports -Wno-pointer-sign
configure:3914: gcc -c -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -m32 -Wno-unused-parameter -Wno-pointer-sign -I../common conftest.c >&5
configure:3920: $? = 0
configure:3925: result: yes
configure:3942: checking whether gcc supports -Wno-switch
configure:3955: gcc -c -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -m32 -Wno-unused-parameter -Wno-pointer-sign -Wno-switch -I../common conftest.c >&5
configure:3961: $? = 0
configure:3966: result: yes
configure:3992: checking for setrlimit
configure:4048: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -m32 -Wno-unused-parameter -Wno-pointer-sign -Wno-switch -I../common -m32 conftest.c >&5
configure:4054: $? = 0
configure:4071: result: yes
configure:4541: checking for inflateEnd in -lz
configure:4576: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -m32 -Wno-unused-parameter -Wno-pointer-sign -Wno-switch -DHAVE_SETRLIMIT -I../common -I/usr/include -m32 -L/usr/lib conftest.c -lz >&5
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
configure:4582: $? = 0
configure:4600: result: yes
configure:4625: checking zlib.h usability
configure:4642: gcc -c -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -m32 -Wno-unused-parameter -Wno-pointer-sign -Wno-switch -DHAVE_SETRLIMIT -I../common -I/usr/include conftest.c >&5
configure:4648: $? = 0
configure:4662: result: yes
configure:4666: checking zlib.h presence
configure:4681: gcc -E -I../common -I/usr/include conftest.c
configure:4687: $? = 0
configure:4701: result: yes
configure:4729: checking for zlib.h
configure:4736: result: yes
configure:4755: checking for sqrt in -lm
configure:4790: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -m32 -Wno-unused-parameter -Wno-pointer-sign -Wno-switch -DHAVE_SETRLIMIT -I../common -I/usr/include -m32 -L/usr/lib conftest.c -lm -lz >&5
conftest.c:26: warning: conflicting types for built-in function 'sqrt'
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
configure:4796: $? = 0
configure:4814: result: yes
configure:4835: checking for clock_gettime in -lrt
configure:4870: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -m32 -Wno-unused-parameter -Wno-pointer-sign -Wno-switch -DHAVE_SETRLIMIT -I../common -I/usr/include -m32 -L/usr/lib conftest.c -lrt -lm -lz >&5
/usr/bin/ld: skipping incompatible /usr/lib/librt.so when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib/librt.a when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
configure:4876: $? = 0
configure:4894: result: yes
configure:4921: checking for mysql_config
configure:4939: found /usr/bin/mysql_config
configure:4952: result: /usr/bin/mysql_config
configure:4976: checking for mysql_init in -lmysqlclient
configure:5011: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -m32 -Wno-unused-parameter -Wno-pointer-sign -Wno-switch -DHAVE_SETRLIMIT -I../common -I/usr/include -I/usr/include/mysql -m32 -L/usr/lib -Wl,-Bsymbolic-functions -rdynamic -L/usr/lib/mysql -lmysqlclient conftest.c -lmysqlclient -lrt -lm -lz >&5
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.1/../../../libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.1/../../../libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
configure:5017: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_LIBZ 1
| #define HAVE_LIBM 1
| #define HAVE_LIBRT 1
| /* end confdefs.h. */
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char mysql_init ();
| int
| main ()
| {
| return mysql_init ();
| ;
| return 0;
| }
configure:5035: result: no
configure:5051: checking mysql.h usability
configure:5068: gcc -c -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -m32 -Wno-unused-parameter -Wno-pointer-sign -Wno-switch -DHAVE_SETRLIMIT -I../common -I/usr/include -I/usr/include/mysql conftest.c >&5
configure:5074: $? = 0
configure:5088: result: yes
configure:5092: checking mysql.h presence
configure:5107: gcc -E -I../common -I/usr/include -I/usr/include/mysql conftest.c
configure:5113: $? = 0
configure:5127: result: yes
configure:5155: checking for mysql.h
configure:5162: result: yes
configure:5176: checking MySQL library (optional)
configure:5182: result: no
configure:5189: disabling MySQL (optional)
configure:5216: checking for pcre_study in -lpcre
configure:5251: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -m32 -Wno-unused-parameter -Wno-pointer-sign -Wno-switch -DHAVE_SETRLIMIT -I../common -I/usr/include -m32 -L/usr/lib conftest.c -lpcre -lrt -lm -lz >&5
/usr/bin/ld: skipping incompatible /usr/lib/librt.so when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib/librt.a when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
configure:5257: $? = 0
configure:5275: result: yes
configure:5359: checking PCRE library (optional)
configure:5362: result: yes
configure:5386: checking host OS
configure:5389: result: Linux
configure:5414: checking for MinGW
configure:5425: result: no
configure:5562: creating ./config.status

## ---------------------- ##
## Running config.status. ##
## ---------------------- ##

This file was extended by config.status, which was
generated by GNU Autoconf 2.61. Invocation command line was

CONFIG_FILES =
CONFIG_HEADERS =
CONFIG_LINKS =
CONFIG_COMMANDS =
$ ./config.status

on Ubuntu-910-karmic-64-minimal

config.status:594: creating Makefile
config.status:594: creating src/common/Makefile
config.status:594: creating src/char/Makefile
config.status:594: creating src/login/Makefile
config.status:594: creating src/ladmin/Makefile
config.status:594: creating src/char_sql/Makefile
config.status:594: creating src/login_sql/Makefile
config.status:594: creating src/txt-converter/Makefile
config.status:594: creating src/map/Makefile
config.status:594: creating src/plugins/Makefile
config.status:594: creating src/tool/Makefile

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_c_bigendian=no
ac_cv_c_compiler_gnu=yes
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_func_setrlimit=yes
ac_cv_header_inttypes_h=yes
ac_cv_header_memory_h=yes
ac_cv_header_mysql_h=yes
ac_cv_header_stdc=yes
ac_cv_header_stdint_h=yes
ac_cv_header_stdlib_h=yes
ac_cv_header_string_h=yes
ac_cv_header_strings_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_header_sys_types_h=yes
ac_cv_header_unistd_h=yes
ac_cv_header_zlib_h=yes
ac_cv_lib_m_sqrt=yes
ac_cv_lib_mysqlclient_mysql_init=no
ac_cv_lib_pcre_pcre_study=yes
ac_cv_lib_rt_clock_gettime=yes
ac_cv_lib_z_inflateEnd=yes
ac_cv_objext=o
ac_cv_path_EGREP='/bin/grep -E'
ac_cv_path_GREP=/bin/grep
ac_cv_path_MYSQL_CONFIG_HOME=/usr/bin/mysql_config
ac_cv_prog_CPP='gcc -E'
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
ac_cv_prog_make_make_set=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

CC='gcc'
CFLAGS='-g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -m32 -Wno-unused-parameter -Wno-pointer-sign -Wno-switch -DHAVE_SETRLIMIT'
CPP='gcc -E'
CPPFLAGS=' -I../common -I/usr/include'
DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBZ=1 -DHAVE_LIBM=1 -DHAVE_LIBRT=1'
DLLEXT='.so'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='/bin/grep -E'
EXEEXT=''
GREP='/bin/grep'
HAVE_MYSQL=''
HAVE_PCRE='yes'
LDFLAGS=' -m32 -L/usr/lib'
LIBOBJS=''
LIBS='-lrt -lm -lz -ldl'
LTLIBOBJS=''
MYSQL_CFLAGS=''
MYSQL_CONFIG_HOME='/usr/bin/mysql_config'
MYSQL_LIBS=''
MYSQL_VERSION=''
OBJEXT='o'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PCRE_CFLAGS=''
PCRE_LIBS='-lpcre'
SET_MAKE=''
SHELL='/bin/bash'
ac_ct_CC='gcc'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='${prefix}'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_LIBZ 1
#define HAVE_LIBM 1
#define HAVE_LIBRT 1

configure: exit 0

fezie
2010-02-14, 19:01:38
Da -m32 bei den gcc Optionen verwendet wird brauchst du die 32bit Versionen von den ganzen Libraries.
Im Fall der zlib ist es zB. lib32z1-dev.
Die 32bit MySQL Client Library gibts nicht als Paket für amd64, musst also das i386 Paket manuell von packages.ubuntu.com ziehen und dann mit "dpkg-deb -x" extrahieren und die Library nach /usr/lib32 kopieren.
Und eventuell den libmysqlclient.so Symlink anlegen, sollte aber im -dev Paket enthalten sein.

RattuS
2010-02-14, 19:16:33
Er entpackt es mir nicht, weil er nicht weiß, welchen Befehl ich meine:
dbkg-deb -x mysql-client-5.1_5.1.37-1ubuntu5.1_i386.deb
No command 'dbkg-deb' found, did you mean:
Command 'dpkg-deb' from package 'dpkg' (main)
Command 'dpkg-deb' from package 'pkgbinarymangler' (main)
dbkg-deb: command not found

fezie
2010-02-14, 19:47:54
dpkg-deb mit p nicht mit b.

RattuS
2010-02-14, 19:59:23
Woher weiß ich jetzt, welche Libraries ich als 32-Bit brauche? Der MySQL-Client hat schon mal nichts genützt. :(

fezie
2010-02-14, 20:03:28
Die exakten Dateinamen stehen ja im log drin.
Nur mit dem Unterschied, dass der gcc eigentlich auch in /usr/lib32 suchen müsste wenn die Datei dort auch existiert.
Wie gesagt eventuell musst du eben auch den .so Symlink selbst anlegen.
Die normalen libfoo.so.<zahl(en)> akzeptiert der gcc nicht im Gegensatz zu den runtime Binaries.

Vielleicht bringts ja auch was ldconfig mal auszuführen.
Ansonsten sollte ein "export LDFLAGS="-L/usr/lib32"" helfen.

RattuS
2010-02-14, 20:05:12
Ich versteh nur Bahnhof. D:

fezie
2010-02-14, 20:07:22
configure:5011: gcc -o conftest -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -m32 -Wno-unused-parameter -Wno-pointer-sign -Wno-switch -DHAVE_SETRLIMIT -I../common -I/usr/include -I/usr/include/mysql -m32 -L/usr/lib -Wl,-Bsymbolic-functions -rdynamic -L/usr/lib/mysql -lmysqlclient conftest.c -lmysqlclient -lrt -lm -lz >&5
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.a when searching for -lmysqlclient


Auszug aus deinem Spoiler.
Und dort hast du den Dateinamen.
Außer eben dass du /usr/lib32 verwenden solltest

Und bei packages.ubuntu.com kannst du auch den Inhalt der Pakete durchsuchen, um eben den Paketnamen zu finden von einem Dateinamen.

fezie
2010-02-14, 20:09:12
Andere Alternative wär mit debootstrap einfach ein 32bit chroot zu erstellen und das ganze einfach komplett auf 32bit zu kompilieren.

RattuS
2010-02-14, 20:44:52
Das bringt irgendwie nichts, denn egal, ob ich den Pfad setze, er liest immer nur /usr/lib aus, was ja der 64-Bit-Variante entspricht.

./configure --enable-64bit --libdir=/usr/lib32

fezie
2010-02-14, 20:47:42
wie gesagt wenn dann LDFLAGS nutzen. Sollte eigentlich bei ./configure --help auch ganz unten erwähnt werden.

--libdir ist der Pfad wo die Libraries von deinem Programm bei einem "make install" installiert werden.

Erwähnt werden natürlich auch nur die inkompatiblen Libraries.
Und wie gesagt du musst sicherstellen dass libfoo.so existiert und nicht nur libfoo.so.0.1.2 etc.

RattuS
2010-02-14, 21:03:51
Ein Wunder ist geschehen! Nachdem ich die ganzen x86-Libs manuell kopiert habe und via export die Lib32 ändern konnte, funktioniert es jetzt endlich. Vielen Dank für deine ausführliche, man kann schon fast sagen betreuende Hilfe, fezie. :up:

fezie
2010-02-15, 12:09:34
Gern geschehen.
Aber komisch dass beim Ubuntu gcc /usr/lib32 nicht zum Standard Suchpfad gehört wie bei Debian.

Gast
2010-02-15, 12:45:22
Gern geschehen.
Aber komisch dass beim Ubuntu gcc /usr/lib32 nicht zum Standard Suchpfad gehört wie bei Debian.
eventuell kein multilib system?

RattuS
2010-02-16, 20:49:51
Das Kompilieren läuft zwar und der Ausgang ist scheinbar auch in Ordnung, Fehler zeigt mir make beim Kompilieren trotzdem noch:


/usr/bin/ld: skipping incompatible /usr/lib/librt.so when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib/librt.a when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl
/usr/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc


Welche Library könnte das noch sein? Bin über die Packages irgendwie nicht zum Ergebnis gekommen. Das zLib-Zeugs ist bereits als x86 drauf. :confused: