[OpenIndiana-discuss] Compiling tun driver for OpenVPN

Cyril Plisko cyril.plisko at mountall.com
Thu Jun 23 06:43:51 UTC 2011


On Thu, Jun 23, 2011 at 4:53 AM, Russ Price <rjp_sun at fubegra.net> wrote:
>
> Hi,
>
> I'm trying to compile the tun driver so that I can move OpenVPN from a Linux system to my OI box. However, I'm not having much luck.
>
> In order to get it to compile and link without errors, once I ran the configure script I had to change solaris/Makefile, as follows:
>
> * added -m64 to the CFLAGS variable

That is not enough, you need to add also -xmodel=kernel to CFLAGS
(assuming your are using Studio compilers, rather than gcc)

> * added -melf_x86_64 to the ld options
>
> I also changed DRV_DIR to /usr/kernel/drv/amd64 for good measure. Well, after compiling it, I tried to install it, and got:
>
>> Jun 22 20:44:20 castle genunix: [ID 286029 kern.notice] relocation error: R_AMD64_32:
>> Jun 22 20:44:20 castle genunix: [ID 720415 kern.notice] file /usr/kernel/drv/amd64/tun:
>> Jun 22 20:44:20 castle genunix: [ID 370954 kern.notice] symbol :
>> Jun 22 20:44:20 castle genunix: [ID 780480 kern.notice] value 0xfffffffff7dab2ca does not fit
>> Jun 22 20:44:20 castle genunix: [ID 286029 kern.notice] relocation error: R_AMD64_32:
>> Jun 22 20:44:20 castle genunix: [ID 720415 kern.notice] file /usr/kernel/drv/amd64/tun:
>> Jun 22 20:44:20 castle genunix: [ID 370954 kern.notice] symbol :
>> Jun 22 20:44:20 castle genunix: [ID 780480 kern.notice] value 0xfffffffff7dab2e8 does not fit
>> Jun 22 20:44:20 castle genunix: [ID 286029 kern.notice] relocation error: R_AMD64_32:
>> Jun 22 20:44:20 castle genunix: [ID 720415 kern.notice] file /usr/kernel/drv/amd64/tun:
>> Jun 22 20:44:20 castle genunix: [ID 370954 kern.notice] symbol :
>> Jun 22 20:44:20 castle genunix: [ID 780480 kern.notice] value 0xffffffffc047a560 does not fit
>> Jun 22 20:44:20 castle genunix: [ID 286029 kern.notice] relocation error: R_AMD64_32:
>> Jun 22 20:44:20 castle genunix: [ID 720415 kern.notice] file /usr/kernel/drv/amd64/tun:
>> Jun 22 20:44:20 castle genunix: [ID 370954 kern.notice] symbol :
>> Jun 22 20:44:20 castle genunix: [ID 780480 kern.notice] value 0xffffffffc047a560 does not fit
>> Jun 22 20:44:20 castle genunix: [ID 286029 kern.notice] relocation error: R_AMD64_32:
>> Jun 22 20:44:20 castle genunix: [ID 720415 kern.notice] file /usr/kernel/drv/amd64/tun:
>> Jun 22 20:44:20 castle genunix: [ID 370954 kern.notice] symbol :
>> Jun 22 20:44:20 castle genunix: [ID 780480 kern.notice] value 0xffffffffc047a560 does not fit
>> Jun 22 20:44:20 castle genunix: [ID 286029 kern.notice] relocation error: R_AMD64_32:
>> Jun 22 20:44:20 castle genunix: [ID 720415 kern.notice] file /usr/kernel/drv/amd64/tun:
>> Jun 22 20:44:20 castle genunix: [ID 370954 kern.notice] symbol :
>> Jun 22 20:44:20 castle genunix: [ID 780480 kern.notice] value 0xfffffffff7dab2d9 does not fit
>> Jun 22 20:44:20 castle genunix: [ID 286029 kern.notice] relocation error: R_AMD64_32:
>> Jun 22 20:44:20 castle genunix: [ID 720415 kern.notice] file /usr/kernel/drv/amd64/tun:
>> Jun 22 20:44:20 castle genunix: [ID 370954 kern.notice] symbol :
>> Jun 22 20:44:20 castle genunix: [ID 780480 kern.notice] value 0xfffffffff7dab2c6 does not fit
>> Jun 22 20:44:20 castle genunix: [ID 286029 kern.notice] relocation error: R_AMD64_32:
>> Jun 22 20:44:20 castle genunix: [ID 720415 kern.notice] file /usr/kernel/drv/amd64/tun:
>> Jun 22 20:44:20 castle genunix: [ID 370954 kern.notice] symbol :
>> Jun 22 20:44:20 castle genunix: [ID 780480 kern.notice] value 0xfffffffff7dab330 does not fit
>> Jun 22 20:44:20 castle genunix: [ID 286029 kern.notice] relocation error: R_AMD64_32:
>> Jun 22 20:44:20 castle genunix: [ID 720415 kern.notice] file /usr/kernel/drv/amd64/tun:
>> Jun 22 20:44:20 castle genunix: [ID 370954 kern.notice] symbol :
>> Jun 22 20:44:20 castle genunix: [ID 780480 kern.notice] value 0xffffffffc047a900 does not fit
>> Jun 22 20:44:20 castle genunix: [ID 286029 kern.notice] relocation error: R_AMD64_32:
>> Jun 22 20:44:20 castle genunix: [ID 720415 kern.notice] file /usr/kernel/drv/amd64/tun:
>> Jun 22 20:44:20 castle genunix: [ID 370954 kern.notice] symbol :
>> Jun 22 20:44:20 castle genunix: [ID 780480 kern.notice] value 0xffffffffc047a900 does not fit
>> Jun 22 20:44:20 castle genunix: [ID 286029 kern.notice] relocation error: R_AMD64_32:
>> Jun 22 20:44:20 castle genunix: [ID 720415 kern.notice] file /usr/kernel/drv/amd64/tun:
>> Jun 22 20:44:20 castle genunix: [ID 370954 kern.notice] symbol :
>> Jun 22 20:44:20 castle genunix: [ID 780480 kern.notice] value 0xfffffffff7daa3e0 does not fit
>> Jun 22 20:44:20 castle genunix: [ID 286029 kern.notice] relocation error: R_AMD64_32:
>> Jun 22 20:44:20 castle genunix: [ID 720415 kern.notice] file /usr/kernel/drv/amd64/tun:
>> Jun 22 20:44:20 castle genunix: [ID 370954 kern.notice] symbol :
>> Jun 22 20:44:20 castle genunix: [ID 780480 kern.notice] value 0xfffffffff7daa7e0 does not fit
>> Jun 22 20:44:20 castle genunix: [ID 286029 kern.notice] relocation error: R_AMD64_32:
>> Jun 22 20:44:20 castle genunix: [ID 720415 kern.notice] file /usr/kernel/drv/amd64/tun:
>> Jun 22 20:44:20 castle genunix: [ID 370954 kern.notice] symbol :
>> Jun 22 20:44:20 castle genunix: [ID 780480 kern.notice] value 0xfffffffff7daa750 does not fit
>> Jun 22 20:44:20 castle genunix: [ID 286029 kern.notice] relocation error: R_AMD64_32:
>> Jun 22 20:44:20 castle genunix: [ID 720415 kern.notice] file /usr/kernel/drv/amd64/tun:
>> Jun 22 20:44:20 castle genunix: [ID 370954 kern.notice] symbol :
>> Jun 22 20:44:20 castle genunix: [ID 780480 kern.notice] value 0xffffffffc047a7e0 does not fit
>> Jun 22 20:44:20 castle genunix: [ID 286029 kern.notice] relocation error: R_AMD64_32:
>> Jun 22 20:44:20 castle genunix: [ID 720415 kern.notice] file /usr/kernel/drv/amd64/tun:
>> Jun 22 20:44:20 castle genunix: [ID 370954 kern.notice] symbol :
>> Jun 22 20:44:20 castle genunix: [ID 780480 kern.notice] value 0xffffffffc047a848 does not fit
>> Jun 22 20:44:20 castle genunix: [ID 399259 kern.notice] do_relocations: /usr/kernel/drv/amd64/tun do_relocate failed
>> Jun 22 20:44:20 castle genunix: [ID 603676 kern.notice] tun error doing relocations
>
> This is on oi_148b (Illumos kernel), but I also had the same problems with the old oi_148. Obviously, I'm doing something wrong here, but I'm stumped.
>
>
> _______________________________________________
> OpenIndiana-discuss mailing list
> OpenIndiana-discuss at openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss



--
Regards,
        Cyril



More information about the OpenIndiana-discuss mailing list