Trouble compiling on rpi with scons

  • Rjonesy
    3rd Apr 2021 Member 0 Permalink

    Followed the wiki, got all the packages and git cloned powder toy, cd to the powder toy dir all no problems but when i run scons it fails because theres no sconstruct file "scons: *** No SConstruct file found." so i searched through the souce and i cant find one either. Im completely new to scons (and compiling on a pi in general), is there supposed to be a sconstruct file included with the source or am i supposed to write one myself? If i am supposed to write one myself does anyone have some useful info on where to start im just completely lost with this and cant seem to find any forums with a similar issue of missing scontruct file.

  • LBPHacker
    3rd Apr 2021 Developer 0 Permalink
    Unless you're compiling a stable version of the game (say, tag v95.0), the relevant compiling guide is this. Where did you even find the SCons one?
  • Rjonesy
    3rd Apr 2021 Member 0 Permalink

    https://powdertoy.co.uk/Wiki/W/Compiling_TPT%2B%2B_on_debian/ubuntu.html and multiple other powdertoy wiki pages and threads saying basically the same thing, i just assumed it was how it was supposed to be done. Ill try this guide and see how it goes, cheers

  • LBPHacker
    3rd Apr 2021 Developer 0 Permalink
    Yes I get that that page exists, what I'm interested in is how you got to it :P And I guess the others, if there are more.
    Edited once by LBPHacker. Last: 3rd Apr 2021
  • Rjonesy
    3rd Apr 2021 Member 0 Permalink

    That specifc link was from https://powdertoy.co.uk/Discussions/Thread/View.html?Thread=23039&PageNum=0#Message=306527 and the other guides where from just googling "compiling the powder toy on raspberry pi"

  • LBPHacker
    3rd Apr 2021 Developer 0 Permalink
    Ah, alright, thanks. I added a notice to that guide that redirects to the one I linked.

    And do tell how this goes for you; we have no record of anyone trying to build TPT with Meson on raspis yet. One thing that will definitely not work is building a static version with our prebuilt raspi libs, as this would require us to have prebuilt them (obviously). If raspi dev packages ship static versions though, you can try passing -Dstatic=system instead of -Dstatic=prebuilt, once you get that far.
    Edited once by LBPHacker. Last: 3rd Apr 2021
  • Rjonesy
    3rd Apr 2021 Member 0 Permalink

    Well i hit a roadblock, meson refuses to find luajit dispite installing any lua packages i could find:

    pkg-config --list-all|grep lua
    lua5.1-c++ Lua - Lua language engine
    lua53-c++ Lua - Lua language engine
    lua-5.3-c++ Lua - Lua language engine
    lua50 lua50 - The Lua 5.0 programming language
    lua53 Lua - Lua language engine
    lua51 Lua - Lua language engine
    lua5.1 Lua - Lua language engine
    lua5.3 Lua - Lua language engine
    lua-5.1 Lua - Lua language engine
    lua-5.3 Lua - Lua language engine
    lua51-c++ Lua - Lua language engine
    lualib50 lua50 - The Lua 5.0 programming language addon libraries
    lua5.3-c++ Lua - Lua language engine
    lua-5.1-c++ Lua - Lua language engine

     

    sudo apt-get install luajit

    Reading package lists... Done

    Building dependency tree       

    Reading state information... Done

    luajit is already the newest version (2.1.0~beta3+dfsg-5.1).

    The following packages were automatically installed and are no longer required:

      rtimucli squeak-vm

    Use 'sudo apt autoremove' to remove them.

    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

     

    meson build-debug

    The Meson build system

    Version: 0.52.1

    Source dir: /home/pi/The-Powder-Toy

    Build dir: /home/pi/The-Powder-Toy/build-debug

    Build type: native build

    Project name: the-powder-toy

    Project version: the.cake.is.a.lie

    C compiler for the host machine: cc (gcc 8.3.0 "cc (Raspbian 8.3.0-6+rpi1) 8.3.0")

    C linker for the host machine: GNU ld.bfd 2.31.1

    C++ compiler for the host machine: c++ (gcc 8.3.0 "c++ (Raspbian 8.3.0-6+rpi1) 8.3.0")

    C++ linker for the host machine: GNU ld.bfd 2.31.1

    Host machine cpu family: arm

    Host machine cpu: armv7l

    Program python3 found: YES (/usr/bin/python3)

    meson.build:35: WARNING: unsupported architecture: arm; you are on your own

    Found pkg-config: /usr/bin/pkg-config (0.29)

    Found CMake: /usr/bin/cmake (3.16.3)

    Run-time dependency luajit found: NO (tried pkgconfig and cmake)

     

    meson.build:110:1: ERROR: Dependency "luajit" not found, tried pkgconfig and cmake

     

    pkgconfig folder contains:

    lua50.pc

    lualib50.pc

     

    again all this is new to me so i cant tell if im missing something or doing something wrong

     
    Edited once by Rjonesy. Last: 3rd Apr 2021
  • LBPHacker
    3rd Apr 2021 Developer 0 Permalink
    I'm not at all familiar with Raspbian, but as far as I can tell, the packages the guide suggests installing exist on that distro. Have you tried those?
  • Rjonesy
    3rd Apr 2021 Member 0 Permalink

    neither am i to be honest linux in general is new to me my pc motherboard died the other day so while i wait ive been messing around with the pi, and yeah my bad, i missed the ver number and the dev tag and things also didnt want to work until i ran apt-get update. Its compiling now albeit very slowly, ill let you know how it goes. EDIT: Built fine and runs all good, cheers

    Edited once by Rjonesy. Last: 3rd Apr 2021
  • LBPHacker
    3rd Apr 2021 Developer 0 Permalink
    Coolio. Which Raspbian is this (cat /etc/os-release)? Would like to add it to the list of tested distros.