Build problems on Solaris 7 and 8.

2001-10-26 Thread Jeff Wiegley, Ph.D.

The only useful question in this message is:

How do I pass -Wl,-R/usr/local/lib to everything while
configuring and compiling MySQL?

Please don't tell me about adding LD_LIBRARY_PATH to
my profile. That's just plain dumb when you should be
able to pass -R to the linker.

Everything else below here is just a rant about how
inferior the MySQL configure and build process is.

I find it impossible to believe the INSTALL-SOURCE file when it
says We use and develop the software ourselves primarily on
Sun Solaris (Versions 2.5 - 2.7) and SuSE Linux Version 7.x.

Get a stock Solaris x86 box. Install GCC and make from
sunfreeware.com like any sane administrator would do.
Get, compile and install the shared zlib libraries(let it compile
into the default /usr/local/lib ./configure --shared)

Now try to install and compile MySQL and watch it barf on
trying to find libz. I've got to add so much crap to CFLAGS, LDFLAGS
and CXXFLAGS before trying to configure MySQL that having an
automated build environment is basically useless.

The cross-compiler check is a real treat. Its always wrong and
you wind up having to compile c++ files with a C compiler and then
you wonder why you get unresolved symbols or other linking problems.
If you want it to be compiled by gcc write it in C, otherwise make
sure you check g++ correctly. The x86 GCC binaries on sunfreeware
are not crosscompilers, and even if they were it wouldn't matter;
I get the same problems after spending the day compiling GCC natively
on the box I'm trying to compile MySQL on.

Oh so maybe try Solaris 8... Get GCC 3.0.1 and try to build with
that and make...
gcc -DDEFAULT_CHARSET_HOME=\/usr\ -DDATADIR=\/home/mysql\ 
-DSHAREDIR=\/usr/share/mysql\ -DUNDEF_THREADS_HACK -DDONT_USE_RAID -I./../include 
-I../include -I./.. -I.. -I.. -O3 -DDBUG_OFF -O3 -DHAVE_CURSES_H 
-I/mnt/nfs/NTCSoftware/mysql/src/mysql-3.23.43/include -DHAVE_RWLOCK_T -c password.c  
-fPIC -DPIC -o .libs/password.lo
Assembler: password.c
 /var/tmp/ccn6BEfI.s, line 166 : Illegal mnemonic
 /var/tmp/ccn6BEfI.s, line 166 : Syntax error
 /var/tmp/ccn6BEfI.s, line 222 : Illegal mnemonic
 /var/tmp/ccn6BEfI.s, line 222 : Syntax error
 /var/tmp/ccn6BEfI.s, line 378 : Illegal mnemonic
 /var/tmp/ccn6BEfI.s, line 378 : Syntax error
 /var/tmp/ccn6BEfI.s, line 457 : Illegal mnemonic
 /var/tmp/ccn6BEfI.s, line 457 : Syntax error

yes I purposely left out any detailed information about my machine, my OS,
what I had for breakfast this morning...

Cause I've spent the last three days hunting down answers from
google groups and it doesn't take a genius to realize that
tons of people have problems building MySQL on Solaris. And there
is always some know-it-all that thinks -L and -I will fix all your
problems.

So I highly doubt anyone would have an accurate answer for me even
if I did include details. And the answers in the INSTALL-SOURCE file
are silly. Why should I have to mess up my filesystems by putting all
sorts of crazy symbolic links everywhere or rely on people to have
LD_LIBRARY_PATH set when I should be able to just as easily pass -R
(or other options) to the compiler and linker when they are doing their
job. Then mysql would work even if I moved the binaries to a different
machine that didn't have all the messy sym-links.

I am however suggesting that people take a closer look at the
configuration stage and get it right.

Is any of this cleanup in 4.0?

So that's my rant in a nutshell.

- Jeff



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Build problems on Solaris 7 and 8.

2001-10-26 Thread Alan W. Rateliff, II

On 26-Oct-01, Jeff Wiegley, Ph.D. said something totally profound about Build problems 
on Solaris 7 and 8. that made me ponder...

JWP The only useful question in this message is:
JWP 
JWP How do I pass -Wl,-R/usr/local/lib to everything while
JWP configuring and compiling MySQL?

CXXFLAGS?

JWP Please don't tell me about adding LD_LIBRARY_PATH to
JWP my profile. That's just plain dumb when you should be
JWP able to pass -R to the linker.

I don't touch my LD_LIBRARY_PATH variable in Solaris 7 or 8.

JWP I find it impossible to believe the INSTALL-SOURCE file when it
JWP says We use and develop the software ourselves primarily on
JWP Sun Solaris (Versions 2.5 - 2.7) and SuSE Linux Version 7.x.
JWP 
JWP Get a stock Solaris x86 box. Install GCC and make from
JWP sunfreeware.com like any sane administrator would do.
JWP Get, compile and install the shared zlib libraries(let it compile
JWP into the default /usr/local/lib ./configure --shared)
JWP 
JWP Now try to install and compile MySQL and watch it barf on
JWP trying to find libz. I've got to add so much crap to CFLAGS, LDFLAGS
JWP and CXXFLAGS before trying to configure MySQL that having an
JWP automated build environment is basically useless.

I agree that there's a good bit of additional things to do to get MySQL to
compile, but I am successful in getting it to compile under these conditions:

Vanilla Solaris 8 (Sparc or i86) installation
gcc, bison, flex packages from SunFreeWare
PATH=/usr/bin:/usr/sbin:/usr/local/bin:/usr/xpg4/bin:/usr/ccs/bin
Then compile using my mini-HOWTO
http://users.talstar.com/forager/MySQL-HOWTO.html

No muss, no fuss.

JWP Oh so maybe try Solaris 8... Get GCC 3.0.1 and try to build with that and
JWP make...
JWP gcc -DDEFAULT_CHARSET_HOME=\/usr\ -DDATADIR=\/home/mysql\
JWP -DSHAREDIR=\/usr/share/mysql\ -DUNDEF_THREADS_HACK -DDONT_USE_RAID
JWP -I./../include -I../include -I./.. -I.. -I.. -O3 -DDBUG_OFF -O3
JWP -DHAVE_CURSES_H -I/mnt/nfs/NTCSoftware/mysql/src/mysql-3.23.43/include
JWP -DHAVE_RWLOCK_T -c password.c -fPIC -DPIC -o .libs/password.lo Assembler:
JWP password.c
JWP /var/tmp/ccn6BEfI.s, line 166 : Illegal mnemonic
JWP /var/tmp/ccn6BEfI.s, line 166 : Syntax error
JWP /var/tmp/ccn6BEfI.s, line 222 : Illegal mnemonic
JWP /var/tmp/ccn6BEfI.s, line 222 : Syntax error
JWP /var/tmp/ccn6BEfI.s, line 378 : Illegal mnemonic
JWP /var/tmp/ccn6BEfI.s, line 378 : Syntax error
JWP /var/tmp/ccn6BEfI.s, line 457 : Illegal mnemonic
JWP /var/tmp/ccn6BEfI.s, line 457 : Syntax error

I found that gcc3.0.1 is giving me problems with a lot of programs, MySQL
included.  I've gone back to 2.95.3 for the time being.

But this list of errors above looks VERY familiar with the latest MySQL
release vs gcc3.0.1.

JWP So I highly doubt anyone would have an accurate answer for me even
JWP if I did include details. And the answers in the INSTALL-SOURCE file
JWP are silly. Why should I have to mess up my filesystems by putting all
JWP sorts of crazy symbolic links everywhere or rely on people to have
JWP LD_LIBRARY_PATH set when I should be able to just as easily pass -R
JWP (or other options) to the compiler and linker when they are doing their
JWP job. Then mysql would work even if I moved the binaries to a different
JWP machine that didn't have all the messy sym-links.

I think I read that file a long time ago.  I've compiled many many version
since then using my standard technique, and also by watching a listening to
the successes and failures of others on this list.

JWP I am however suggesting that people take a closer look at the
JWP configuration stage and get it right.

There are a good deal of things that could be fixed in the ./configure, I'll
grant that.

JWP So that's my rant in a nutshell.

I've had simliar ranting sessions while beating my desk.  Hope you do better
in the future.
-- 
   Alan W. Rateliff, II: YourVillage.com
  Assistant Systems Administrator  :   2700 Apalachee Pkwy
  [EMAIL PROTECTED]   :  Tallahassee, FL 32301
(850) 942-7021---
 [EMAIL PROTECTED]  http://support.yourvillage.com 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php