(This post is a revision of this one for Solaris 64bits, and in accordance with new source code versions).
It is possible to get LZO, OpenVPN and TUN under Solaris, compiling the source code.
Because of some compatibility issues, it is not as easy as it can be thought.
You can follow those steps to get openvpn executable under Solaris:
- ensure GNU gcc and make are installed
pkg install SUNWgcc
- download the LZO source code and uncompress it under [LZO_DIRECTORY],
- download the TUN source code and uncompress it under [TUN_DIRECTORY],
- download the openVPN source code and uncompress it under [OPENVPN_DIRECTORY],
- update the path for all needed tools (gcc, gmake, install, ar ...) to be available
- compile LZO
- configure TUN
- edit solaris/Makefile to add options as followed
CFLAGS = -m64 -mcmodel=kernel -mno-red-zone -ffreestanding $(DEFS) -O2 -Wall -D_KERNEL -I.
- compile TUN (ignore the error "Warning: 64-bit version of driver found at /usr/kernel/drv/tun")
- move the created tun file (to be regarded as 64bits)
mv /usr/kernel/drv/tun /usr/kernel/drv/amd64/
- load it
devfsadm -i tun
- compile OpenVPN
./configure --with-lzo-lib=/usr/local/lib --with-lzo-headers=/usr/local/include --prefix=/usr
It is now possible to use LZO, OpenVPN and TUN under Solaris.