FiveM on FreeBSD


I’m trying to set up a development server on a FreeBSD box I have but, FiveM doesn’t want to start for some reason.

I’ve tried just extracting FiveM and running it but, I got a “command not found” error. I then installed mono which, then made another error spew out.

mono --version:

Mono JIT compiler version ( Tue Jun 26 02:19:24 UTC 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors.
        TLS:           __thread
        SIGSEGV:       altstack
        Notification:  kqueue
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        Interpreter:   yes
        LLVM:          supported, not enabled.
        GC:            sgen (concurrent by default)


ELF binary type "0" not known.
exec: /root/server/bins/alpine/opt/cfx-server/ Exec format error

Is there a way to get this to work on FreeBSD system by default or, would I have to compile the server source myself? If the latter, does anyone know how to do that?

It should be possible to use Linux ABI compatibility. Mono shouldn’t be required.

Thanks… I think I’ve done this right but, it still won’t boot :confused:


Id Refs Address            Size     Name
 1   89 0xffffffff80200000 2096000  kernel
 2    1 0xffffffff82625000 ffe44    ispfw.ko
 3    1 0xffffffff82725000 7f2a     freenas_sysctl.ko
 4    1 0xffffffff82811000 5bc7     fdescfs.ko
 5    1 0xffffffff82817000 84ab     ipmi.ko
 6    1 0xffffffff82820000 ef3      smbus.ko
 7    1 0xffffffff82821000 333889   vmm.ko
 8    1 0xffffffff82b55000 3105     nmdm.ko
 9    1 0xffffffff82b59000 101d0    geom_mirror.ko
10    1 0xffffffff82b6a000 46c7     geom_stripe.ko
11    1 0xffffffff82b6f000 fbab     geom_raid3.ko
12    1 0xffffffff82b7f000 16e56    geom_raid5.ko
13    1 0xffffffff82b96000 59c4     geom_gate.ko
14    1 0xffffffff82b9c000 4d68     geom_multipath.ko
15    1 0xffffffff82ba1000 83a      dtraceall.ko
16    9 0xffffffff82ba2000 41e20    dtrace.ko
17    1 0xffffffff82be4000 48f0     dtmalloc.ko
18    1 0xffffffff82be9000 5b51     dtnfscl.ko
19    1 0xffffffff82bef000 67fc     fbt.ko
20    1 0xffffffff82bf6000 58e8d    fasttrap.ko
21    1 0xffffffff82c4f000 1740     sdt.ko
22    1 0xffffffff82c51000 bf02     systrace.ko
23    1 0xffffffff82c5d000 c07f     systrace_freebsd32.ko
24    1 0xffffffff82c6a000 5453     profile.ko
25    1 0xffffffff82c70000 1bbd8    hwpmc.ko
26    1 0xffffffff82c8c000 d00e     t3_tom.ko
27    2 0xffffffff82c9a000 461b     toecore.ko
28    1 0xffffffff82c9f000 15e38    t4_tom.ko
29    1 0xffffffff82cb5000 294b     uhid.ko
30    1 0xffffffff82cb8000 42c1b    linux64.ko
31    2 0xffffffff82cfb000 79d1     linux_common.ko

However, I get a segmentation fault when trying to run the server after using brandelf -t Linux alpine/opt/cfx-server/ (I’m assuming that I need to rebrand this as it’s the first thing loaded in the shell script)

And when I unload the Linux64 kernel and use the normal Linux one I get

[email protected]:~/server # kldunload linux64
[email protected]:~/server # kldload linux
[email protected]:~/server/bins # bash ./
ELF binary type "3" not known.
./ line 8: /root/server/bins/alpine/opt/cfx-server/ cannot execute binary file: Exec format error
./ line 8: /root/server/bins/alpine/opt/cfx-server/ No error: 0

brandelf -l

known ELF types are: FreeBSD(9) Linux(3) Solaris(6) SVR4(0)

Even without “branding” it and re-installing it clean I get

[email protected]:~/server/bins # sh ./
ELF binary type "0" not known.
exec: /root/server/bins/alpine/opt/cfx-server/ Exec format error

did you ever figured it out?

i have the same problem

./ line 8: /root/server/bins/alpine/opt/cfx-server/ cannot execute binary file: Exec format error
./ line 8: /root/server/bins/alpine/opt/cfx-server/ No error: 0

No. I moved to Debian a while back.

This issue is still on. I am not able as well to install the server on FreeBSD 12.0.
The problem seems to be musl who has no support for FreeBSD, and they also have no planning so far to port it (as they answered on musl irc official channel).