Compiling MySQL on OpenBSD

Compiling MySQL on OpenBSD

Post by pseudony » Tue, 08 Aug 2000 04:00:00



I would like to compile mysql under openbsd2.7 on a p2-300 with
96M of ram and and 125M of swap.  I've tried the
"--with-low-memory" option dozens of times and have even tried
256M ram and a full gig of swap...

Has anyone had any success .. and am I missing something?

Thanks in advance,

--pseudonym

-----------------------------------------------------------

Got questions?  Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com

 
 
 

Compiling MySQL on OpenBSD

Post by dana_boot » Wed, 09 Aug 2000 04:00:00


p: I would like to compile mysql under openbsd2.7 on a p2-300 with
p: 96M of ram and and 125M of swap.  I've tried the
p: "--with-low-memory" option dozens of times and have even tried
p: 256M ram and a full gig of swap...

p: Has anyone had any success .. and am I missing something?

At work, we use MySQL on a lesser computer that you're using. When you ran
the configure script, did you use "--with-mit-threads"? That's important, it
won't compile without.

--

-----

Tacoma, Wa., USA

key at pgpkeys.mit.edu:11371

 
 
 

Compiling MySQL on OpenBSD

Post by pseudony » Wed, 09 Aug 2000 04:00:00


Yes, I tried that.

OpenBSD2.7 and mysql=3.22.32
With p2-300 and 96M ram....
I've tried all of the following:
/configure --with-low-memory --with-mit-threads
/configure --with-low-memory --with-mit-threads=no
/configure --with-low-memory --with-mit-threads=yes
/configure --with-low-memory
/configure --with-mit-threads
/configure --with-mit-threads=yes
/configure --with-mit-threads=no
and just plain ... ./configure

Usually,upon a "make" I get
yacc.sql.cc: bison: out of virtual memory error.

The Mysql documentation says this commonly occurs but is
*supposedly* fixed with the "--with-low-memory" option.
Obviously, I tried that....

Its not that big a deal; I got the binary package of mysql to
work.  But this is wierd.  I wonder if it has anything to do with
the "top" memory issue that is being talked about.

-----------------------------------------------------------

Got questions?  Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com

 
 
 

Compiling MySQL on OpenBSD

Post by dana_boot » Thu, 10 Aug 2000 04:00:00


p: Usually,upon a "make" I get
p: yacc.sql.cc: bison: out of virtual memory error.

I've built several MySQL servers on OpenBSD 2.5, never a problem, and after
what you said, I tried it on a 2.7 system. I got the same error that you
did, Cyrix 200, 32mb ram, 150mb swap partition.

I did end up building and installing it successfully, here's how:

I ran ./configure with no switches. Next, I "make"ed until I got to the
error with sql_yacc.cc running the virtual memory out. (I use gmake, but it
shouldn't matter) At that point, I cd'd to the ./sql directory, and ran g++
from the command line, and compiled sql_yacc.cc using the same command line
that gmake had tried. g++ complained about the -03 switch, but compiled the
object. Then I dropped back down to the main make directory again and re-ran
gmake, and of course it just skipped over what objects it had already
compiled, and it made the rest. I didn't look through the Makefile....

Hope this helps.

--

-----

Tacoma, Wa., USA

key at pgpkeys.mit.edu:11371

 
 
 

Compiling MySQL on OpenBSD

Post by Peter Str?mbe » Thu, 10 Aug 2000 04:00:00



>...
>Usually,upon a "make" I get
>yacc.sql.cc: bison: out of virtual memory error.
>...

You have to increase your resource limits.

In sh/bash type (as root)
ulimit -d unlimited

In csh
limit datasize unlimited

then do make

Look at setrlimit(2)

--
Peter Str?mberg

 
 
 

Compiling MySQL on OpenBSD

Post by Janne Johansso » Thu, 10 Aug 2000 04:00:00



> Its not that big a deal; I got the binary package of mysql to
> work.  But this is wierd.  I wonder if it has anything to do with
> the "top" memory issue that is being talked about.

No. It's a "ulimit" issue.
man ulimit / man limit.

--
"Surfa inte p? internet - Var en del av v?gen." -Lars Aronsson Aug-94.

Http://www.it.kth.se/~jj

 
 
 

Compiling MySQL on OpenBSD

Post by pseudony » Sat, 12 Aug 2000 04:00:00


That *almost* seems to work. (ulimit -d unlimited) I don't get
the "out of virtual memory" error.  However, the hard drive is
very active for hours.  I haven't let it go for more than a 2
hours.  You think I should try to let it go for more?

-----------------------------------------------------------

Got questions?  Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com

 
 
 

Compiling MySQL on OpenBSD

Post by pseudony » Sat, 12 Aug 2000 04:00:00


Cool, Thanks!!! that got it!!! You have no idea how many times I
tried!

So, Here is what I did for anyone else interested in compiling
OpenBSD2.7 and the latest mysql-3.22.32
on a p2-300 with 64MB (or similar box)

To get rid of the "bison: sql_yacc.cc: out of virtual memory"
error.....

just do a plain configure. (don't bother with --with-low-memory
option)

/configure

then run

/make

After you get the usual "out of memory" error go into the sql
directory and run the same command as
make had run... (its long)
BUT omit the -O3 option.  After it compiles.. (hopefully) go back
up and finish the
/make

That should do it!!
Yea.

Btw, setting ulimit to unlimited just seemed to thrash the disk
for a long time while trying to compile sql_yacc.cc.



>p: That *almost* seems to work. (ulimit -d unlimited) I don't
get
>p: the "out of virtual memory" error.  However, the hard drive
is
>p: very active for hours.  I haven't let it go for more than a 2
>p: hours.  You think I should try to let it go for more?

>Go to the ./src directory and compile the sql_yacc.cc file using
the same
>command line that make tried to, except, leave out the

optimization option,

>-O3 or -O6 or whatever. It'll compile very quickly. Then go back
to the main
>make directory, and do a make. Since sql_yacc.cc is already
compiled, it'll
>skip it.

>--

>-----

>Tacoma, Wa., USA

>key at pgpkeys.mit.edu:11371

-----------------------------------------------------------

Got questions?  Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com

 
 
 

Compiling MySQL on OpenBSD

Post by dana_boot » Sun, 13 Aug 2000 04:00:00


p: That *almost* seems to work. (ulimit -d unlimited) I don't get
p: the "out of virtual memory" error.  However, the hard drive is
p: very active for hours.  I haven't let it go for more than a 2
p: hours.  You think I should try to let it go for more?

Go to the ./src directory and compile the sql_yacc.cc file using the same
command line that make tried to, except, leave out the optimization option,
-O3 or -O6 or whatever. It'll compile very quickly. Then go back to the main
make directory, and do a make. Since sql_yacc.cc is already compiled, it'll
skip it.

--

-----

Tacoma, Wa., USA

key at pgpkeys.mit.edu:11371

 
 
 

1. compiling mysql on openbsd 2.7

Hello ,

I am trying to install mysql on my computer but i got the following error
while i am making the src:
Anyone knows what this mean?

/my/gnu/lib/bison/bison.simple: In function `int yyparse()':
/my/gnu/lib/bison/bison.simple:692: virtual memory exhausted
*** Error code 1

Stop in /usr/mysql-3.22.32/sql (line 1137 of Makefile).
*** Error code 1

Stop in /usr/mysql-3.22.32/sql (line 349 of Makefile).
*** Error code 1

Stop in /usr/mysql-3.22.32 (line 237 of Makefile).
*** Error code 1

Stop in /usr/mysql-3.22.32 (line 365 of Makefile).

2. installing network card on Redhat 6.2

3. perl won't compile on OpenBSD-2.9 and OpenBSD-2.9-stable.

4. UnixWare 2.02 (Lost /usr/bin)

5. newby question about mysql on openbsd

6. help iptables firewall blocking apache proxy

7. MySQL binaries for OpenBSD 2.6?

8. can't start more xterm's

9. MySQL 4 for OpenBSD?

10. mysql and openbsd 2.9

11. How can i install mysql server 3.23 on openbsd 3.1 ?

12. OpenBSD 3.0 and MySQL 3.23.49 problem, please help?!

13. MySQL 3.23.38 on OpenBSD 2.8