Problems when compiling the source

2006-06-20 Thread Martin Jespersen

Hello all.

I have an odd problem i hope you can help me with.

I've been compiling mysql from source for the past 10 years or so and 
just recently thought it mighjt be tiome to upgrade from the 3.23.58 i 
have, to a newer version.


I chose mysql 4.1.20 and went on to compile it.

A little info about my system:

My system is Linux kernel 2.6.16.20-1trsmp (Trustix Secure Linux 3.0) 
running on a P4 3GhZ (with 64bit extentions)with 1GB ram.


My gcc is:

Configured with: ../configure --prefix=/usr --libexecdir=/usr/lib 
--mandir=/usr/share/man --infodir=/usr/share/info --enable-shared 
--enable-threads=posix --disable-checking --disable-libunwind-exceptions 
--with-system-zlib --enable-__cxa_atexit --enable-languages=c,c++ 
--disable-libgcj --host=i586-trustix-linux

Thread model: posix
gcc version 3.4.4 (Trustix)

My ld is: GNU ld version 2.15

My configure options:

export CC=gcc
export CFLAGS=-O3 -fomit-frame-pointer -march=nocona -msse3
export CXX=gcc
export CXXFLAGS=-O3 -fomit-frame-pointer -felide-constructors 
-fno-exceptions -fno-rtti -march=nocona -msse3


./configure --prefix=/opt/.mysql-4.1.20 --enable-assembler 
--enable-thread-safe-client --enable-static=all --with-gnu-ld 
--with-mysqld-user=mysql --without-debug 
--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static 
--with-charset=latin1 --with-collation=latin1_danish_ci --without-innodb 
--with-lib-ccflags=-O3 -fomit-frame-pointer -march=nocona -msse3 
--with-comment


I get the same results if i configure without --with-lib-ccflags=-O3 
-fomit-frame-pointer -march=nocona -msse3 --with-comment


i do make and make install and nothing fails. I get a few warnings of 
the type:


../mysys/libmysys.a(my_tempnam.o)(.text+0x38): In function `my_tempnam':
: warning: the use of `tempnam' is dangerous, better use `mkstemp'
../mysys/libmysys.a(mf_pack.o)(.text+0x4ef): In function `unpack_dirname':
: warning: Using 'getpwnam' in statically linked applications requires 
at runtime the shared libraries from the glibc version used for linking

../mysys/libmysys.a(mf_pack.o)(.text+0x4f8): In function `unpack_dirname':
: warning: Using 'endpwent' in statically linked applications requires 
at runtime the shared libraries from the glibc version used for linking
/bin/sh ../libtool --preserve-dup-deps --tag=CC --mode=link gcc 
-DDBUG_OFF -O3 -fomit-frame-pointer -march=nocona -msse3-rdynamic 
-o perror  perror.o -all-static ../mysys/libmysys.a ../dbug/libdbug.a 
../strings/libmystrings.a -lpthread -lcrypt -lnsl -lm  -lpthread

../mysys/libmysys.a(mf_pack.o)(.text+0x4ef): In function `unpack_dirname':
: warning: Using 'getpwnam' in statically linked applications requires 
at runtime the shared libraries from the glibc version used for linking

../mysys/libmysys.a(mf_pack.o)(.text+0x4f8): In function `unpack_dirname':
: warning: Using 'endpwent' in statically linked applications requires 
at runtime the shared libraries from the glibc version used for linking


but nothing fatal.

now after i have done make install i do

ln -s /opt/.mysql-4.1.20 /opt/mysql
/opt/mysql/bin/mysql_install_db --user=mysql
cd /opt/mysql
chown -R root  *
chown -R mysql var
chgrp -R mysql *

And now the problems start.

The server runs fine, but the client doesn't work _at all_:

(root)/opt/.mysql-4.1.20/bin: ./mysql
bash: ./mysql: No such file or directory
(root)/opt/.mysql-4.1.20/bin: ./mysqladmin
bash: ./mysqladmin: No such file or directory
(root)/opt/.mysql-4.1.20/bin: ls
comp_err*   mysql_client_test*   mysql_setpermission* 
mysqld_multi*mysqltest*
isamchk*mysql_config*mysql_tableinfo* 
mysqld_safe* pack_isam*
isamlog*mysql_convert_table_format*  mysql_tzinfo_to_sql* 
mysqldump*   perror*
msql2mysql* mysql_create_system_tables*  mysql_waitpid* 
mysqldumpslow*   replace*
my_print_defaults*  mysql_explain_log*   mysql_zap* 
mysqlhotcopy*resolve_stack_dump*
myisam_ftdump*  mysql_find_rows* mysqlaccess* 
mysqlimport* resolveip*
myisamchk*  mysql_fix_extensions*mysqladmin* 
mysqlmanager*
myisamlog*  mysql_fix_privilege_tables*  mysqlbinlog* 
mysqlmanager-pwgen*
myisampack* mysql_install_db*mysqlbug* 
mysqlmanagerc*
mysql*  mysql_secure_installation*   mysqlcheck* 
mysqlshow*



Now

The files are there, but bash tells me they aren't? or is it the 
programs sending No such file or directory back to bash?


I am clueless as to what is going on...

Any hints would be appreciated.

Also, the manual hasn't updated anything about compiler options since 
the gcc 2.95.2 days... maybe it was about time to get some updated info 
about the mysql crews favorite compiletime options.



regards

Martin Jespersen







--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Problems when compiling the source

2006-06-20 Thread Chris White
On Tuesday 20 June 2006 12:02 pm, Martin Jespersen wrote:
 ./configure --prefix=/opt/.mysql-4.1.20 --enable-assembler
 --enable-thread-safe-client --enable-static=all --with-gnu-ld
 --with-mysqld-user=mysql --without-debug
 --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static
 --with-charset=latin1 --with-collation=latin1_danish_ci --without-innodb
 --with-lib-ccflags=-O3 -fomit-frame-pointer -march=nocona -msse3
 --with-comment

Try killing the --enable-static=all and --with-mysqld-ldflags part.  Looks 
like the code doesn't like it because of certain glibc functions:

 ../mysys/libmysys.a(mf_pack.o)(.text+0x4ef): In function `unpack_dirname':
 : warning: Using 'getpwnam' in statically linked applications requires

 at runtime the shared libraries from the glibc version used for linking

-- 
Chris White
PHP Programmer/DB Carrier
Interfuel

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Problems when compiling the source

2006-06-20 Thread Martin Jespersen
I thought of that, but i didn't think it'd be a problem since i do have 
thpse shared libraries for the application to use at runtime - and since 
the server runs just fine, i doubt that is what is causing the problem 
(tho it is definately worth trying). It seems to me that if this is 
truely the problem, then neither the server nor the client should be 
able to run. Since it is only the client that won't work (and i am still 
baffled by the error message when i try to run the client), i am lead 
to believe there is something else in play.


Chris White wrote:

On Tuesday 20 June 2006 12:02 pm, Martin Jespersen wrote:

./configure --prefix=/opt/.mysql-4.1.20 --enable-assembler
--enable-thread-safe-client --enable-static=all --with-gnu-ld
--with-mysqld-user=mysql --without-debug
--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static
--with-charset=latin1 --with-collation=latin1_danish_ci --without-innodb
--with-lib-ccflags=-O3 -fomit-frame-pointer -march=nocona -msse3
--with-comment


Try killing the --enable-static=all and --with-mysqld-ldflags part.  Looks 
like the code doesn't like it because of certain glibc functions:



../mysys/libmysys.a(mf_pack.o)(.text+0x4ef): In function `unpack_dirname':
: warning: Using 'getpwnam' in statically linked applications requires

at runtime the shared libraries from the glibc version used for linking




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]