Spherical forums

Sphere Development => Engine Development => Topic started by: N E O on September 18, 2016, 09:38:51 pm

Title: Sphere/MiniSphere on FreeBSD?
Post by: N E O on September 18, 2016, 09:38:51 pm
I just got FreeBSD 10.3 working on my Lenovo Thinkpad via GhostBSD+Mate installer. Please refresh my memory on what I'll need to get (Mini)Sphere compiled and running on this thing besides Allegro (which I'm getting via OctoPkg/`pkg install ...`), thanks!

I'll also try to update my personal MacBook Air build of MiniSphere to 4.2.0 this weekend. I'm a couple of weeks into my final full-time semester at college, so please forgive me for any delays in my response due to being busy.

edit: Turns out the allegro-devel is 5.0.9_4, so I'll probably have to build that from scratch too. +neo
Title: Re: Sphere/MiniSphere on FreeBSD?
Post by: Fat Cerberus on September 18, 2016, 11:22:58 pm
minisphere's external dependencies are Allegro (note: it should compile successfully against Allegro 5.0.x now, some features might be disabled though), libmng and zlib.  Duktape is included in the tarball and git repo.

I really need to get around to removing that libmng dependency, or at least make it optional.  It's only needed for Sphere 1.x animation API support, nothing in Sphere v2 uses it.
Title: Re: Sphere/MiniSphere on FreeBSD?
Post by: Flying Jester on September 18, 2016, 11:43:44 pm
I would check the ports tree version of Allegro, the ports tree usually has newer versions.

Of note, 'devel' on FreeBSD usually means 'bleeding edge', not 'development libraries and headers'

EDIT: If you do build Allegro from scratch, I would try to be sure to configure for actual OSS support rather than using ALSA emulation.
Title: Re: Sphere/MiniSphere on FreeBSD?
Post by: Fat Cerberus on September 19, 2016, 12:25:16 am

Of note, 'devel' on FreeBSD usually means 'bleeding edge', not 'development libraries and headers'


Weird that it would be Allegro 5.0.9, then.  That version is over 3 years old.
Title: Re: Sphere/MiniSphere on FreeBSD?
Post by: Flying Jester on September 20, 2016, 04:19:19 pm
That doesn't sound too ridiculous. I would, however, be surprised if the ports tree devel version was that old.
Title: Re: Sphere/MiniSphere on FreeBSD?
Post by: N E O on September 23, 2016, 11:42:25 pm
On freshports 'devel/allegro' AND pkg 'allegro' is 4.4.2_5, while 'devel/allegro-devel' / 'allegro-devel' is 5.0.9_whatever. I'm gonna try to build against the 5.0.9 and see what happens.

Update #1: I'm trying to build allegro 5.2.1.1 from scratch and CMake is complaining that libXcursor isn't found (more specifically, that the function XcursorImageCreate is not found), even though OctoPkg is clearly telling me I have version 1.1.14_3 and /usr/local/lib/libXcursor.so and .a clearly exist. Fk building from scratch, I'm gonna try 5.0.9.

Update #2: Compiling minisphere is complaining that for every #include <allegro5/allegro.h> line allegro.h is not found. Short of manually editing every single instance to point to the correct allegro.h, how can I solve this? Can I just symlink the existing allegro-devel headers to the appropriate location to make it work?
Title: Re: Sphere/MiniSphere on FreeBSD?
Post by: Fat Cerberus on September 24, 2016, 12:45:43 am
There's actually only a single location where allegro.h is included - in minisphere.h.  Compilers are too stupid to realize that though and complain every time the parent header is included.  So you should be good just changing it there.
Title: Re: Sphere/MiniSphere on FreeBSD?
Post by: N E O on October 04, 2016, 03:54:01 pm
Update: I added `-I/path/to/allegro/include` to every compilation line in the Makefile since that's why allegro5/allegro.h wasn't being found and get errors. I'm not on that laptop at the moment so I can't yet add the actual error message here, but I'll edit it in when I turn it on.
Title: Re: Sphere/MiniSphere on FreeBSD?
Post by: Fat Cerberus on December 04, 2016, 04:02:13 pm

Update: I added `-I/path/to/allegro/include` to every compilation line in the Makefile since that's why allegro5/allegro.h wasn't being found and get errors. I'm not on that laptop at the moment so I can't yet add the actual error message here, but I'll edit it in when I turn it on.


Did you ever find the cause of the build errors?