Compile mods with scons

  • paxy97
    3rd Nov 2012 Member 0 Permalink

    I'm not sure if this is the right section, but If it's not can someone move it please.

     

    I have ubuntu 12.04 32bit (ubuntu is a linux os) and wanted to compile the distiller's mod from github. I've installed SCons to compile the new version, but when I run the "scons --lin" command I get an error message saying:

     

    pavle@pavle-gore:~/The-Powder-Toy$ scons --lin

    scons: *** No SConstruct file found.
    File "/usr/lib/scons/SCons/Script/Main.py", line 904, in _main

    Do I need to install some other libs or is it something else?

  • Simon
    3rd Nov 2012 Administrator 0 Permalink
    I don't think the distillers mod is based on TPT++ which uses scons.
  • boxmein
    3rd Nov 2012 Former Staff 0 Permalink
    @paxy97 (View Post)
    Nah, you seem to be in the wrong directory. Basically, what this means, the folder you're in does not have a file called "SConscript" which is a file that contains instructions on what to do.
    Enter this and give me the output: (This is what it'd look like ideally)
    pavle@pavle-gore: ~/The-Powder-Toy $ ls | grep SConscript
    SConscript

    pavle@pavle-gore: ~The-Powder-Toy $ ls
    3DSand
    build
    data
    Debug
    includes
    resources
    site_scons
    src
    tptlibrary
    Changelog.txt
    config.log
    generator.py
    LICENSE
    powder.pref
    README
    SConscript
    SConstruct

    ...

    Judging by the folder name, you also may even have the wrong Powder Toy repository. When you used Git to download the source, did you type something like
    git clone https://github.com/FacialTurd/PowderToypp/
    ?
  • jacob1
    3rd Nov 2012 Developer 0 Permalink
    Distillers mod does have a tpt++ repository (based off of mine), but it's 2 months old and he uses visual studio anyway.

    It will be converted to tpt++ sometime I think, but for now, you have to use the old way with the make command
  • paxy97
    7th Nov 2012 Member 0 Permalink

    Ok But when i use the make command this happens:

     

    pavle@Pavle:~/The-Powder-Toy$ make powder
    gcc -c -w -std=c99 -D_POSIX_C_SOURCE=200112L -DLUACONSOLE -DGRAVFFT -Iincludes/ -D_GNU_SOURCE -DINTERNAL -DLIN64 -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -march=native -DX86 -DX86_SSE3 -msse3 -o build/obj/air.powder.o src/air.c
    In file included from /usr/include/stdio.h:34:0,
                     from includes/misc.h:19,
                     from includes/powder.h:24,
                     from src/air.c:20:
    /usr/lib/gcc/x86_64-linux-gnu/4.6/include/stddef.h:212:23: error: conflicting types for ‘size_t’
    includes/SDL/SDL_config_minimal.h:38:22: note: previous declaration of ‘size_t’ was here
    make: *** [build/obj/air.powder.o] Error 1

  • jacksonmj
    9th Nov 2012 Developer 0 Permalink

    For some reason, that mod contains header files for windows versions of various libraries (SDL, Lua, pthread, etc). Delete those headers and try again.

     

    rm -r includes/SDL/ includes/bzlib.h includes/fftw3.h includes/lua5.1/ includes/pthread.h includes/regex.h includes/sched.h

    mkdir -p build/obj/elements

    make powder

     

     

    Edit: Or possibly "make powder-64-sse3", since from the "/usr/lib/gcc/x86_64-linux-gnu" in that error message, it looks like you're using a 64 bit OS.