List:General Discussion« Previous MessageNext Message »
From:jillian Date:November 1 2002 5:30pm
Subject:Possible bug when compiling MySQL using on Solaris 2.6
View as plain text  

We are running MySQL 3.23.53 on Solaris 2.6. There seems to be a problem
with MySQL finding A plain vanilla installation (using ./configure 
with no extra arguments) results in make carping and then exiting. We thought
we had a sort of workaround in passing the following arguments to ./configure
(using tcsh):

env LDFLAGS="-L/usr/local/lib -R/usr/local/lib" ./configure
--with-client-ldflags="-R/usr/local/lib -L/usr/local/lib"
--with-mysqld-ldflags="-R/usr/local/lib -L/usr/local/lib"

Before running make, we set LDFLAGS again:

env LDFLAGS="-L/usr/local/lib -R/usr/local/lib" make

Ommitting this step resulted in MySQL compiling and installing; however,
trying to connect to the database using DBI failed as could not 
be found. This was remedied by explicitly setting the environment as above.

Running ldd in the mysql/lib/mysql directory produced the following

 ldd /usr/local/mysql/lib/mysql/ =>       (file not found)              =>        /usr/lib/                      =>   /usr/lib/             =>     /usr/lib/ =>     /usr/lib/ =>    /usr/lib/ =>    /usr/lib/

This behaviour was finally corrected by editing the Makefile in the
libmysql installation subdirectory as follows:

LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@

was changed to 

LINK = env LD_RUN_PATH=/usr/local/lib $(LIBTOOL) --mode=link

Adding LD_RUN_PATH seems to have solved the problem once and for all.

The problem first occurred when trying to install MySQL 3.23.51; our previous version 
(3.23.41) was just fine.


Attempt to install MySQL on Solaris 2.6 using without taking one or more of the
aforementioned steps.


See above.

>Submitter-Id:	<submitter ID>
>Originator: Jillian-Beth Stamos-Kaschke

>Organization: < Germany GmbH>
>MySQL support: [none| email support | extended email support ]
>Synopsis:	<Installation probs when using on Solaris>
>Category:	mysql
>Release:	mysql-3.23.53 (Source distribution)

System: SunOS segfault 5.6 Generic_105181-33 sun4u sparc SUNW,Ultra-Enterprise
Architecture: sun4

Some paths:  /usr/local/bin/perl /usr/local/bin/make /usr/local/bin/gmake
GCC: Reading specs from
gcc version 2.95.3 20010315 (release)
Compilation info: CC='gcc'  CFLAGS=''  CXX='g++'  CXXFLAGS=''  LDFLAGS='-L/usr/local/lib
-rw-r--r--   1 bin      bin      1621560 Sep 10 00:37 /lib/libc.a
lrwxrwxrwx   1 root     root          11 Jun  9  2000 /lib/ -> ./
-rwxr-xr-x   1 bin      bin      1025548 Sep 10 00:37 /lib/
-rw-r--r--   1 bin      bin      1621560 Sep 10 00:37 /usr/lib/libc.a
lrwxrwxrwx   1 root     root          11 Jun  9  2000 /usr/lib/ -> ./
-rwxr-xr-x   1 bin      bin      1025548 Sep 10 00:37 /usr/lib/
Configure command: ./configure --prefix=/usr/local/mysql-3.23.53
'--with-client-ldflags=-R/usr/local/lib -L/usr/local/lib'
'--with-mysqld-ldflags=-R/usr/local/lib -L/usr/local/lib' 'LDFLAGS=-L/usr/local/lib
Perl: This is perl, version 5.005_02 built for sun4-solaris
Possible bug when compiling MySQL using on Solaris 2.6jillian1 Nov