# Can't install mysql40-server on FreeBSD 8.2/amd64



## grihad (Jul 6, 2011)

Hello, guys. I just _must_ install the MySQL 4.0 server (latest in the ports is 4.0.27) on an amd64 8.2 machine, but somewhere towards the end of the build process I get:


```
libtool: link: c++ -DDBUG_OFF -O2 -pipe -march=athlon64 -fno-strict-aliasing -O2 -pipe -march=athlon64
 -fno-strict-aliasing -felide-constructors -fno-rtti -fno-exceptions -fno-implicit-templates
 -fno-exceptions -fno-rtti -DMYSQLD_NET_RETRY_COUNT=1000000 -o gen_lex_hash gen_lex_hash.o -pthread
 -pthread  ../isam/libnisam.a ../merge/libmerge.a ../myisam/libmyisam.a ../myisammrg/libmyisammrg.a
 ../heap/libheap.a ../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a
 ../strings/libmystrings.a -lz -lcrypt -lm -pthread
[B]gen_lex_hash.o: file not recognized: File truncated[/B]
*** Error code 1
1 error
*** Error code 2
1 error
*** Error code 1
1 error
*** Error code 2
1 error
*** Error code 1
1 error
*** Error code 2
1 error
*** Error code 1

Stop in /usr/ports/databases/mysql40-server.
```

Can I do something about it? It's not a problem to switch to i386 if this could be the reason. MySQL must be 4.0.x, though, because there are some important binaries that depend on libmysqlclient12 and cannot be rebuilt.


----------



## grihad (Jul 6, 2011)

Thanks, DutchDaemon, nice rules you have 

I've just successfully built mysql40-server on a 8.2/i386 test machine, so it must be amd64 that's causing problems. Did I forget to install some i386 compatibility packages? My kernel is basically GENERIC, so I do have this line:

```
options         COMPAT_FREEBSD32
```
Anything else I should install/configure?


----------



## grihad (Jul 6, 2011)

Noticed that the successful i386 box had this package installed:

```
compat6x-i386-6.4.604000.200810_3
```
So, after installing misc/compat64 I could finally build mysql40-server. After all, the problem wasn't 32/64-bit related, but rather OS version-related. Thanks for everybody's attention


----------

