[前][次][番号順一覧][スレッド一覧]

mysql:2295

From: <takeshi@xxxxxxxxxx>
Date: Mon, 24 Jul 2000 08:17:21 +0900
Subject: [mysql 02295] Re: Cannot build Msql-Mysql-modules-1.2214

At Mon, 24 Jul 2000 00:41:10 +0900,
Yasuhide OOMORI / 大森保英  <dasen@xxxxxxxxxx> wrote:

<cut>

> cc -c -I/usr/lib/perl5/site_perl/5.005/i386-linux/auto/DBI -I/usr/include/mysql -I../dbd -I/usr/lib/perl5/site_perl/5.005/i386-linux/auto/DBI -I/usr/lib/perl5/5.00503/i386-linux -Dbool=car -DHAS_BOOL -O2    -DVERSION=\"2.0414\" -DXS_VERSION=\"2.0414\" -fpic -I/usr/lib/perl5/5.00503/i386-linux/CORE -DDBD_MYSQL mysql.c
> Running Mkbootstrap for DBD::mysql ()
> cmod 644 mysql.bs
> LD_RUN_PATH="/usr/lib/mysql:/lib:/usr/lib/gcc-lib/i386-redat-linux/egcs-2.91.66" cc -o ../blib/arc/auto/DBD/mysql/mysql.so  -sared -L/usr/local/lib dbdimp.o mysql.o -L/usr/lib/mysql    -L/usr/lib/mysql -lmysqlclient -lm -L/usr/lib/gcc-lib/i386-redat-linux/egcs-2.91.66 -lgcc 


後に示されている ldd の結果から見ると、
-L/usr/lib/mysql -lmysqlclient -lm
の指定では、ライブラリが足りないです。
ldd の結果に示されているライブラリを追加します。
ldd の結果を見ると、
-lm -lz -lnsl -lcrypt を、mysql.so コンパイル時に追加しておけば
よいでしょう。
または、LD_RUN_PATH の指定に、/usr/lib も追加してみます。

備:
mysqlbug の結果を見ると、この MySQL は TcX のバイナリのようですが、
TcX バイナリの MySQL-devel-*.rpm は、
libmysqlclient.a を /usr/lib/mysql/ に配置し、
MySQL-shared-*.rpm では
libmysqlclient.so を /usr/lib/ に配置しています。
そのため、コンパイル時の指定には、
コンパイラが .so を見るのか、.a を見るのかを
少し注意する必要があります。

<cut>

> make[1]: Entering directory `/var/tmp/Msql-Mysql-modules-1.2214/mysql'
> PERL_DL_NONLAZY=1 /usr/bin/perl -I../blib/arc -I../blib/lib -I/usr/lib/perl5/5.00503/i386-linux -I/usr/lib/perl5/5.00503 -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
> t/00base............install_driver(mysql) failed: Can't load '../blib/arc/auto/DBD/mysql/mysql.so' for module DBD::mysql: ../blib/arc/auto/DBD/mysql/mysql.so: undefined symbol: uncompress at /usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm line 169.


mysql.so: undefined symbol: uncompress は、mysql.so を作成する際に、
zlib ライブラリ(-lz)がリンクされなかった事を示しています。


<cut>

> $ uname -a
> Linux localhost.localdomain 2.2.14-1vl6 #1 Tue Mar 14 09:55:12 JST 2000 i586 unknown
> $ ls -la /lib/libc*
> -rwxr-xr-x   1 root     root      4121755 Jan 15  2000 /lib/libc-2.1.2.so*
> lrwxrwxrwx   1 root     root           13 Jul  9 19:30 /lib/libc.so.6 -> libc-2.1.2.so*
> lrwxrwxrwx   1 root     root           17 Jul  9 19:31 /lib/libcom_err.so.2 -> libcom_err.so.2.0*
> -rwxr-xr-x   1 root     root         7889 Dec  4  1999 /lib/libcom_err.so.2.0*
> -rwxr-xr-x   1 root     root        64611 Jan 15  2000 /lib/libcrypt-2.1.2.so*
> lrwxrwxrwx   1 root     root           17 Jul  9 19:30 /lib/libcrypt.so.1 -> libcrypt-2.1.2.so*
> $ ls -la /lib/libpth*
> -rwxr-xr-x   1 root     root       249971 Jan 15  2000 /lib/libpthread-0.8.so*
> lrwxrwxrwx   1 root     root           17 Jul  9 19:30 /lib/libpthread.so.0 -> libpthread-0.8.so*
> $ cat /etc/ld.so.conf
> /usr/X11R6/lib
> /usr/kde/lib
> /usr/i486-linux-libc5/lib
> /usr/vine/lib
> /usr/lib/qt/lib
> 
> $ gcc --version
> egcs-2.91.66
> $ gcc -v
> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
> gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
> $ gcc -print-libgcc-file-name
> /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/libgcc.a

egcs-1.1.x は、MySQL 本体をコンパイルするとき少し不具合があるので、
できるなら gcc-2.95.2 以上を使用した方がいいでしょう

> $ gcc -print-search-dirs
> install: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/
> programs: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/:/usr/lib/gcc-lib/i386-redhat-linux/:/usr/lib/gcc/i386-redhat-linux/egcs-2.91.66/:/usr/lib/gcc/i386-redhat-linux/:/usr/i386-redhat-linux/bin/i386-redhat-linux/egcs-2.91.66/:/usr/i386-redhat-linux/bin/
> libraries: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/:/usr/lib/gcc/i386-redhat-linux/egcs-2.91.66/:/usr/i386-redhat-linux/lib/i386-redhat-linux/egcs-2.91.66/:/usr/i386-redhat-linux/lib/:/usr/lib/i386-redhat-linux/egcs-2.91.66/:/usr/lib/:/lib/i386-redhat-linux/egcs-2.91.66/:/lib/:/usr/lib/i386-redhat-linux/egcs-2.91.66/:/usr/lib/
> 
> $ perl -V
> Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
>   Platform:
>     osname=linux, osvers=2.2.5-15, archname=i386-linux
>     uname='linux venus.athome 2.2.5-15 #1 mon apr 19 23:00:46 edt 1999 i686 unknown '
>     hint=recommended, useposix=true, d_sigaction=define
>     usethreads=undef useperlio=undef d_sfio=undef
>   Compiler:
>     cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
>     cppflags='-Dbool=char -DHAS_BOOL'
>     ccflags ='-Dbool=char -DHAS_BOOL'
>     stdchar='char', d_stdstdio=undef, usevfork=false
>     intsize=4, longsize=4, ptrsize=4, doublesize=8
>     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
>     alignbytes=4, usemymalloc=n, prototype=define
>   Linker and Libraries:
>     ld='cc', ldflags =' -L/usr/local/lib'
>     libpth=/usr/local/lib /lib /usr/lib
>     libs=-lnsl -ldl -lm -lc -lposix -lcrypt
>     libc=, so=so, useshrplib=false, libperl=libperl.a
>   Dynamic Linking:
>     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
>     cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
> 
> 
> Characteristics of this binary (from libperl): 
>   Locally applied patches:
>         jperl5.005_03-990822.pat - end of week
>   Built under linux
>   Compiled at Aug 31 1999 01:02:57
>   @INC:
>     /usr/lib/perl5/5.00503/i386-linux
>     /usr/lib/perl5/5.00503
>     /usr/lib/perl5/site_perl/5.005/i386-linux
>     /usr/lib/perl5/site_perl/5.005
>     .
> 
> $ env | grep -i path
> PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/vine/bin:/usr/local/bin:/usr/kde/bin:/usr/lib/qt/bin:/home/yasuhide/bin
> $ env | grep -i library
> (出力なし)
> 
> $ mysqlbug
> 
> >Description:
> 	<precise description of the problem (multiple lines)>
> >How-To-Repeat:
> 	<code/input/activities to reproduce the problem (multiple lines)>
> >Fix:
> 	<how to correct or work around the problem, if known (multiple lines)>
> 
> >Submitter-Id:	<submitter ID>
> >Originator:	Yasuhide OOMORI
> >Organization:
>   大森保英 / かずさのすけ。
> >
> >MySQL support: [none | licence | email support | extended email support ]
> >Synopsis:	<synopsis of the problem (one line)>
> >Severity:	<[ non-critical | serious | critical ] (one line)>
> >Priority:	<[ low | medium | high ] (one line)>
> >Category:	mysql
> >Class:		<[ sw-bug | doc-bug | change-request | support ] (one line)>
> >Release:	mysql-3.23.21-beta (Official MySQL RPM)
> >Server: /usr/bin/mysqladmin  Ver 8.7 Distrib 3.23.21-beta, for pc-linux-gnu on i586
> TCX Datakonsult AB, by Monty
> 
> Server version		3.23.21-beta-log
> Protocol version	10
> Connection		Localhost via UNIX socket
> UNIX socket		/var/lib/mysql/mysql.sock
> Uptime:			12 hours 9 min 26 sec
> 
> Threads: 1  Questions: 104  Slow queries: 0  Opens: 16  Flush tables: 1  Open tables: 7 Queries per second avg: 0.002
> >Environment:
> 	<machine, os, target, libraries (multiple lines)>
> System: Linux localhost.localdomain 2.2.14-1vl6 #1 Tue Mar 14 09:55:12 JST 2000 i586 unknown
> Architecture: i586
> 
> Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
> GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
> gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
> Compilation info: CC='egcs'  CFLAGS=' -O6 -fomit-frame-pointer'  CXX='egcs'  CXXFLAGS=' -O6 -fomit-frame-pointer 	          -felide-constructors -fno-exceptions -fno-rtti'  LDFLAGS=''
> LIBC: 
> lrwxrwxrwx   1 root     root           13 Jul  9 19:30 /lib/libc.so.6 -> libc-2.1.2.so
> -rwxr-xr-x   1 root     root      4121755 Jan 15  2000 /lib/libc-2.1.2.so
> -rw-r--r--   1 root     root     20049174 Jan 15  2000 /usr/lib/libc.a
> -rw-r--r--   1 root     root          178 Jan 15  2000 /usr/lib/libc.so
> Configure command: ./configure  --disable-shared --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --enable-assembler --with-mysqld-user=mysql --with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/ --with-extra-charsets=complex --exec-prefix=/usr --libexecdir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var/lib/mysql --infodir=/usr/info --includedir=/usr/include --mandir=/usr/man '--with-comment=Official MySQL RPM'
> Perl: This is perl, version 5.005_03 built for i386-linux
> EUC version
> 
> $ ldd /usr/bin/mysql
>         not a dynamic executable
> $ ldd /usr/lib/libmysqlclient.so
>         libnsl.so.1 => /lib/libnsl.so.1 (0x2aada000)
>         libm.so.6 => /lib/libm.so.6 (0x2aaf1000)
>         libz.so.1 => /usr/lib/libz.so.1 (0x2ab0e000)
>         libcrypt.so.1 => /lib/libcrypt.so.1 (0x2ab1d000)
>         libpthread.so.0 => /lib/libpthread.so.0 (0x2ab4a000)
>         libc.so.6 => /lib/libc.so.6 (0x2ab5b000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x55555000)


# この report のように情報が多いと、予想が付きやすいです。
-- 
 村上 毅  takeshi@xxxxxxxxxx

[前][次][番号順一覧][スレッド一覧]

      2292 2000-07-24 00:41 [Yasuhide OOMORI / 大] Cannot build Msql-Mysql-modules-1.2214  
->    2295 2000-07-24 08:17 ┗[<takeshi@xxxxxxxxxx>]                                       
      2304 2000-07-25 00:17  ┣[Yasuhide OOMORI / 大]                                     
      2307 2000-07-25 12:22  ┃┗[<takeshi@xxxxxxxxxx>]                                   
      2315 2000-07-27 01:24  ┗[Yasuhide OOMORI / 大] gcc-2.95.2 (Re: Cannot build Msql-Mysql-modules-1.2214)
      2316 2000-07-27 08:37   ┗[<takeshi@xxxxxxxxxx>]                                   
      2318 2000-07-27 10:20    ┗[とみたまさひろ <tomm]