This keeps coming up.  So far (in my reading of this list since spring,
and searches on Google), 

  * everyone who has reported this was using the precompiled binary of gcc
  (either 2.95.2 or 2.95.3) from Sunfreeware to build MySQL for Solaris 8
  sparc.

  * No one has spoken up to report success with this combination.

  * No one who built gcc from source has reported this problem.

Unless a new piece of information comes in, it seems clear to me that
configure doesn't like sunfreeware's pre-compiled copy of gcc for Solaris
8 sparc.  It would be nice if someone from MySQL would tell us just what
configure is doing when it declares sunfreeware's gcc a cross-compiler,
and could confirm whether this is a configure problem or a gcc problem.

That said, I recommend you build gcc from source.  Sunfreeware's
pre-compiled binary of gcc 2.95.3 works perfectly to compile gcc 2.95.3
from source.  Once you've compiled and installed gcc from source, you
should find that MySQL builds cleanly with the command recommended in the
manual <http://www.mysql.com/doc/S/o/Solaris.html>:

  CC=gcc CFLAGS="-O3" \
  CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" \
  ./configure --prefix=/usr/local/mysql --with-low-memory --enable-assembler

This worked for me on an E450 running Solaris 8.  My path begins with: 

  /usr/local/bin:/usr/ccs/bin

(gcc is in /usr/local/bin, in my case).

Don't bother with LD_LIBRARY_PATH unless you need it for something
specific.  

Michael

On Fri, 30 Nov 2001, George Horvath wrote:

> This didn't seem to make it to the list the first time so let's try
> again.  BTW is anybody else receiving each mail twice from the list?
> 
> I am getting the same error message "configure: error: cannot run test
> program while cross compiling".  I think this a simple PATH issue
> where basic functions such as sprintf are not found.  I was able to
> compile mysql on solaris 7 without any problems but having trouble
> compiling ANYTHING on solaris 8 therefore it doesn't look like a mysql
> issue. Everything seems to fail with basic C functions not being
> found.
> 
> I tried various things to solve this with no avail:
> 
> 1 moving the path to gcc in front of /usr/ccs/bin thinking it may be a
> conflict between the two compilers.
> 
> 2 set LD_LIBRARY_PATH to various things.
> 
> 3 make LD_LIBRARY_PATH part of PATH in hopes it would help configure
> find what it's looking for.
> 
> I'm doing this on a new Netra X1 box with the pre installed Solaris 8
> version on top of which I installed gcc-2.95.3-sol8-sparc-local and
> make-3.79.1-sol8-sparc-local builds.  I'm thinking of compiling gcc
> with the native compiler but I don't know where to tell configure
> which compiler to use (I attempted this by trying to change $PATH) and
> I don't want to uninstall the native one before I have success with
> gcc.
> 
> The development packages installed are: SUNWarc SUNWbtool SUNWhea
> SUNWsprot SUNWlibm. Is something missing here?
> 
> It would be helpful to hear from someone who has successfully compiled
> on solaris8 or how to modify configure.
> 
> Sorry about the lengthy post but I wanted to include all pertinent
> info. I'm cross posting this to both mysql lists to reach a wider
> audience. Thanks in advance.
> 
> George
> 
> P.S. The solaris8 build of mysql works fine.
> 
> Robert Alexander wrote:
> > 
> > http://www.mysql.com/doc/S/o/Solaris.html
> > 
> > Why not just download the binary from the MySQL site?  http://www.mysql.com
> > 
> > HTH,
> > 
> > /Rob
> > 
> > At 06:03 -0800 2001/11/14, Geoff Reed wrote:
> > >I've been banging my head against the wall for 2 days over this :(  I have the 
>3.23.40 source and i'm trying to get it to compile.
> > >
> > > I'm running Sun Solaris 8 Sparc on a Ultra 1-170E with 128 MB ram and ~ 27 gig 
>HD space.
> > >
> > > GCC 2.95.3, freshly compiled and functioning well.
> > >
> > > the ./configure script gets to ...
> > >checking return type of sprintf        configure: error: cannot run test program 
>while cross compiling
> > >
> > > pouf - that's all she wrote - :(
> > >
> > > I'd like to compile a fresh install since the binary distro available on 
>mysql.org does not have all the directories it is supposed to...  after moving a 
>handful
> of things around i was finally able to get it to work....
> > 
> > --
> > Robert Alexander, Alpha Geek, Workmate.ca
> > WWW Database Applications and Web Hosting
> > http://www.workmate.ca       416-823-6599
> > mailto:[EMAIL PROTECTED]
> > 
> > "Life's unfair - but root password helps!"
> > _______________________________________________
> > 
> > To unsubscribe yourself from this list please go to 
>http://www.mysql.org/mailman/listinfo/support and read the unsubscription information.
> > 
> >  support mailing list
> > [EMAIL PROTECTED]
> > http://www.mysql.org/mailman/listinfo/support
> 
> -- 
> George Horvath                              
> Scotia Capital Markets                     
> ISS - Technology Application Group        
> Tel: 416-945-4204
> Fax: 416-945-4002
> E-mail: [EMAIL PROTECTED]
> _______________________________________________
> 
> To unsubscribe yourself from this list please go to 
>http://www.mysql.org/mailman/listinfo/support and read the unsubscription
> information.
> 
> 
>  support mailing list
> [EMAIL PROTECTED]
> http://www.mysql.org/mailman/listinfo/support
> 
> 
> -- 
> George Horvath                              
> Scotia Capital Markets                     
> ISS - Technology Application Group        
> Tel: 416-945-4204
> Fax: 416-945-4002
> E-mail: [EMAIL PROTECTED]
> 

Michael Stassen
University Information Technology Services
Indiana University Bloomington
[EMAIL PROTECTED]


---------------------------------------------------------------------
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

Reply via email to