Home Forums Development Compiling

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #233

    How do you compile this? And is it possible to convert this to c#?
    I'm trying to compile this in Visual Studio 2014.

    #5594
    Bas Testerink
    Participant

    For future readers/compilers;

    In Ubuntu 16.04 for KeeperRL Alpha 20.1 I had to deviate a little from the Github instructions. I had to install:

    • libboost1.58-all-dev (instead of libboost1.56-all-dev)
    • llvm-3.5 (instead of llvm-3.4, newer versions are available, but I haven’t tested)
    • libcurl4-openssl-dev (was not listed)

    Then it compiled correctly with make -j 8 OPT=true RELEASE=true CLANG=true

    The Docker method gave me errors on missing packages, and after adding them, SDL2 library errors (maybe someone with Docker experience can look into that?).

    #6312
    Rodolphe
    Participant

    I can compile with the method of the previous post but when I launch keeper it clauses immediately. (same problem with docker, can’t find libraries in /usr/include !?)

    stacktrace.out :

    Caught SIGSEGV: Segmentation Fault
    Current time 1488824636, running time 0
    posix_print_stack_trace() à ??:?
    posix_signal_handler(int, siginfo_t*, void*) à ??:?
    ?? ??:0
    fail() à main.cpp:?
    ?? ??:0
    ?? ??:0
    ?? ??:0
    ?? ??:0
    ?? ??:0
    ?? ??:0
    makeDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) à ??:?
    keeperMain(boost::program_options::variables_map const&) à main.cpp:?
    main à ??:?
    ?? ??:0
    _start à ??:?

    KeeperRL alpha 21.2 – Ubuntu 16.10 – libboost 1.61 – clang 3.8

    Great game … would like to modify it a little !

    #6314

    You may want to run make with DBG=true (do make clean first).

    The makeDir function seems to crash with some versions of boost, I don’t know why. You may want to comment the body out (it’s in main.cpp).

    #6316
    Rodolphe
    Participant

    I downgrade to libboost 1.58 and everything works fine now. Much thanks.

    #7564
    disciple
    Participant

    Any help here? I installed all the dependencies, I’m on Mint 18.2.

    Using built-in specs.
    COLLECT_GCC=g++
    cat gen_version.sh >gen_version
    chmod a+x gen_version
    g++ -x c++-header stdafx.h -MMD -Wall -std=c++1y -Wno-sign-compare -Wno-unused-variable -Wno-shift-count-overflow -Wno-tautological-constant-out-of-range-compare -Wno-mismatched-tags -ftemplate-depth=512 -Werror -Wimplicit-fallthrough -g -I. -I./extern -o obj/stdafx.h.gch
    g++: error: unrecognized command line option ‘-Wimplicit-fallthrough’
    Makefile:116: recipe for target ‘obj/stdafx.h.gch’ failed
    make[1]: *** [obj/stdafx.h.gch] Error 1
    Makefile:110: recipe for target ‘all’ failed
    make: *** [all] Error 2

    #7566

    Try add RELEASE=true to the make command line.

    You’re probably compiling with gcc, and only clang can compile a debug build, so try installing one if you want a debug build. (the differences are small, you’ll just get some debug features that are mostly hidden anyway).

    #7568
    disciple
    Participant

    Thanks, tried a couple of things. Think what worked was this previous post:

    In Ubuntu 16.04 for KeeperRL Alpha 20.1 I had to deviate a little from the Github instructions. I had to install:

    libboost1.58-all-dev (instead of libboost1.56-all-dev)
    llvm-3.5 (instead of llvm-3.4, newer versions are available, but I haven’t tested)
    libcurl4-openssl-dev (was not listed)

    Then
    sudo update-alternatives –config cc
    sudo update-alternatives –config c++

    There are 2 choices for the alternative cc (providing /usr/bin/cc).

    Selection Path Priority Status
    ————————————————————
    0 /usr/bin/gcc 20 auto mode
    * 1 /usr/bin/clang 10 manual mode
    2 /usr/bin/gcc 20 manual mode

    Press <enter> to keep the current choice[*], or type selection number:

    Had to run gen_version.sh as version.h was missing.
    “Then it compiled correctly with make -j 8 OPT=true RELEASE=true CLANG=true”

    And run: keeper

    Hope that helps.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.