1. Forum moved (you can use login and pass from old forum)
  2. Many discussions moved to the bugtracker

FreeBSD

Discussion in 'Ports' started by emc2, Nov 15, 2018.

  1. emc2

    emc2 New Member Programmer

    Joined:
    Nov 4, 2018
    Messages:
    1
    Likes Received:
    1
    Best Answers:
    0
    Posting to record progress on FreeBSD port. Should work on other BSDs as well.

    Initial work: compiles from source with some small modifications:
    • /usr/local/lib needs to be added to the library path
    • -fPIC needs to be added to CFLAGS and CXXFLAGS
    • Cannot build with glm installed from ports. Need to uninstall it, before building.
    Intro video plays, though some errors are reported and the colors get screwed up. Unfortunately, the game crashes immediately when trying to load the main menu.

    Example of errors during video:
    Code:
    libsmacker::palette_render(s,p,size) - ERROR: overflow, 0x40 attempt to copy 2 entries from 140 to 141
    GDB backtrace from core file:
    Code:
    Program terminated with signal SIGSEGV, Segmentation fault.
    #0  0x00000000004823f7 in OpenApoc::RGBImageLock::getData() ()
    [Current thread is 1 (LWP 100447)]
    (gdb) backtrace
    #0  0x00000000004823f7 in OpenApoc::RGBImageLock::getData() ()
    #1  0x0000000000469b0d in OpenApoc::Framework::displaySetIcon(std::__1::shared_ptr<OpenApoc::RGBImage>) ()
    #2  0x00000000007b01a1 in OpenApoc::LoadingScreen::begin() ()
    #3  0x00000000004862a5 in OpenApoc::StageStack::push(std::__1::shared_ptr<OpenApoc::Stage>) ()
    #4  0x000000000046786c in OpenApoc::Framework::run(std::__1::shared_ptr<OpenApoc::Stage>) ()
    #5  0x000000000044c41f in main ()
    Will look into it later, and I should probably figure out how to get it to produce a debug build.
    --- Post Merged, Nov 18, 2018, Original Post Date: Nov 15, 2018 ---
    Update:

    Silly me, the Framework.Data variable also needs to be set from the command line. On BSDs, I would recommend having a way to set this to default to /usr/local/share/OpenApoc, as this will likely be a port install eventually.

    The game runs when this is set, though of course there are some bugs, but I don't think these are unique to BSD.
     
    makus likes this.

Share This Page