FreeBSD 10.2 Stable Server Setup Guide edited*3/17/16

KOSMOS
Posts: 67
Joined: Thu Jan 29, 2015 10:36 pm

Re: FreeBSD 10.2 Stable Server Setup Guide edited*3/17/16

Post by KOSMOS » Wed Mar 23, 2016 8:02 pm

O.o :D

Are you building zeromq from source? I keep getting an error with the zmq.hpp file. When I install zeromq from ports it does not install that file. I was pulling just the header file from git while it would build it worked fine minus gm commands. And I have added to many things on my server that use the @function to be able to not have that .I was planning to try to build from source next and just pull from git.

Any and all help would be greatly appreciated. I was about to give up on it for now, but you have re-sparked this for me. I really like FreeBSD after messing around with it for the past month. It allows complete control and honestly runs so smooth compared to just about everything else for servers.
whasf wrote:FreeBSD woo! The two VMs I have are quite old, but they're still chugging along..
uname -a
FreeBSD alicia.house.local 4.11-STABLE FreeBSD 4.11-STABLE #1: Tue Oct 4 10:26:02 EDT 2005 root@alicia.home.local:/usr/obj/usr/src/sys/ALICIA i386
6:25PM up 330 days, 15:27, 1 user, load averages: 0.00, 0.00, 0.00
uname -a
FreeBSD lucky.home.local 6.2-RELEASE FreeBSD 6.2-RELEASE #3: Wed Jul 25 13:40:08 EDT 2007 root@lucky.home.local:/usr/obj/usr/src/sys/LUCKY i386
6:17PM up 330 days, 15:13, 1 user, load averages: 0.00, 0.00, 0.00

User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Re: FreeBSD 10.2 Stable Server Setup Guide edited*3/17/16

Post by whasf » Sat Mar 26, 2016 12:51 pm

I haven't tried darkstar on FBSD, I run it on Windows. I was just excited to see someone trying to get it to run.
-- Whasf

KOSMOS
Posts: 67
Joined: Thu Jan 29, 2015 10:36 pm

Re: FreeBSD 10.2 Stable Server Setup Guide edited*3/17/16

Post by KOSMOS » Tue Apr 05, 2016 1:48 pm

whasf wrote:I haven't tried darkstar on FBSD, I run it on Windows. I was just excited to see someone trying to get it to run.
Sadly as of now I was not able to get it working correctly on FBSD. Was having too many issues with zeromq. Though I plan to keep trying for I have found it runs so much smoother when you build everything from source. Though I have got Darkstar working on Devuan which is a new branch of Linux. It still allows init freedom which was main reason I was trying to get this to work on FBSD. While I hope to eventually get to FBSD I will be using and testing regularly on Devuan.

Here is a link to the guide I made for building on Devuan if anyone is interested.

viewtopic.php?f=11&t=2990

isley
Posts: 2
Joined: Sun May 08, 2016 8:35 pm

Re: FreeBSD 10.2 Stable Server Setup Guide edited*3/17/16

Post by isley » Mon May 09, 2016 6:08 am

I was able to get this to build with little trouble, dsconnect and dssearch both work but dsgame immediately segfaults. Unfortunately I am not able to debug further as this is a little beyond my skillset for I am just a lowly sysadmin. Would anyone be willing to help me debug this? I can provide shell access.. I feel like with some very minor changes this would build and run out of the box on FreeBSD.

I'll detail what I did to get the compile to finish for anyone interested. It was quite simple.
First install dependancies as noted on the first page of the forum. Edit autogen.sh to point at bash or in my case just symlink /bin/bash to bash (I'm running this in a jail so I don't mind shititng all over the system)

Obviously FreeBSD uses clang by default and we want gcc5. After installing gcc5 I edited Makefile.am and added the following
CXX = g++5 -Wl,-rpath=/usr/local/lib/gcc5
CC = gcc5 -Wl,-rpath=/usr/local/lib/gcc5
CPP = cpp5 -Wl,-rpath=/usr/local/lib/gcc5
CFLAGS_ALL += -std=c++14 (seems to be required or you get some bullshit about chrono literals)

If you try to configure & build it now you'll get pretty far but in five or six places I get a stop because of "error: 'to_string' is not a member of 'std'"
A quick and random google search said that adding these
CFLAGS_ALL += -D_GLIBCXX_USE_C99
CFLAGS_ALL += -D_GLIBCXX_USE_C99_MATH
CFLAGS_ALL += -D_GLIBCXX_USE_C99_MATH_TR1

Fixes that issue.. I tossed those in there and it seems to work.. at this point it builds all the way.

Now if I execute dssearch or dsconnect it starts right up and everything looks good! My problem is that dsgame immediately core dumps and I'm pretty much stuck here..
:-( :-( :-( :-(

isley
Posts: 2
Joined: Sun May 08, 2016 8:35 pm

Re: FreeBSD 10.2 Stable Server Setup Guide edited*3/17/16

Post by isley » Tue May 10, 2016 2:05 pm

I got it to work.. finally.. Everything above is correct, I still don't quite know why it segfaults.. I don't see anything of real interest in the core dump but that's not really my forte. Now that I got it to work I could probably figure out exactly what the issue is but I think I'll just stick with my work around and be happy.

For some reason if you build dsgame statically linked it's fine. There are a few additional things to make this work. build libzmq4 from ports (don't use the precompiled binary) and remove pgm support, and add -lsodium when linking (I just tossed it in the makefile for LIBS=)

That's it, it works. I have no idea why it works statically and segfaults dynamically.. I assume maybe it's building against a correct library but when you go to run the binary it finds an older system lib first and uses that.. It only links to a few libs so I could probably figure it out if I just took a closer look one at a time but fuck it.. I'm happy with this.

Post Reply