How can i compile on Arch

  • powderpowder1000
    27th Mar 2016 Member 0 Permalink

    none of these packages are on arch

     

    libsdl1.2-dev

    libbz2-dev

    zlib1g-dev

    liblua5.1.0-dev

    libfftw3-dev

     

    and build-essential is alredy included as base-devel so i dont need to worry about that

    Edited once by powderpowder1000. Last: 27th Mar 2016
  • jacob1
    27th Mar 2016 Developer 0 Permalink
    @powderpowder1000 (View Post)
    You're going to have to figure it out on your own, i'm not really familiar with arch ...

    I tried doing some searches, but I don't see any development libraries. You need the development libraries / headers for lua 5.1, sdl 1.2, fftw3f, and bz2/zlib but those are more standard.
  • mniip
    29th Mar 2016 Developer 0 Permalink
    @jacob1 (View Post)
    Looking at the file list, the package *already* includes the development files. I'm not familiar with arch either but I'm going to guess that there are no development libraries there, all packages already include the headers and static linking archives.
  • jacob2
    29th Mar 2016 Member 0 Permalink
    @mniip (View Post)
    That is what I thought too but I wasn't sure. I figured someone who uses arch would know.
  • jenn4
    30th Mar 2016 Member 0 Permalink
    @powderpowder1000 (View Post)

    How to build <project> from git on Arch linux


    TL;DR:


    # pacman -S scons sdl fftw lua lua52
    $ scons

    Step 1: Clone the repository:


    $ git clone <repository clone url>

    For example
    $ git clone https://github.com/simtr/The-Powder-Toy.git

    Note: you need to install git first.
    # pacman -S git
    should do.

    Step 2: Try to build the project


    Navigate into the directory you just cloned
    $ cd <repository name>

    For example
    $ cd The-Powder-Toy

    Compile the project.
    $ make; make install

    TPT is a little different.
    $ scons

    Step 3: Install missing depencies


    Now you probably were missing some libraries. That's what causes all the errors you got. Search 'arch <error>' on google for each error you get. Install all those packages you are hinted at, until everything works. Repeat until the project compiles.
    With TPT, you are probably missing a lot of stuff, starting from scons. (I will now give output from the command also, only the relevant lines. This makes my job easier.)
    # pacman -S scons
    $ scons
    ...
    SDL development library not found or not installed
    # pacman -S sdl
    $ scons
    ...
    Checking for C library lua... no
    # pacman -S lua
    $ scons
    ...
    fftw3f development library not found or not installed
    # pacman -S fftw
    $ scons
    ...
    scons: building terminated because of errors.
    strip: 'build/powder64': No such file
    # pacman -S lua52
    $ scons
    Step 4: Running the program
    Find the compiled binaries and run them. For TPT:
    $ cd build
    $ ./power64

    And there you have it, a succesfully built project from git, on Arch linux.
    Edited 2 times by jenn4. Last: 31st Mar 2016
  • jacob2
    30th Mar 2016 Member 0 Permalink
    @jenn4 (View Post)
    Is arch using lua 5.2? --lua52 should work. If it uses 5.3 they might still have 5.2 available. You can also get luajit and use --luajit
  • jenn4
    30th Mar 2016 Member 0 Permalink
    @jacob2 (View Post)
    5.3. You could
    $ downgrade lua
    , but that might not be a good idea if you want to use lua for other stuff. Of course, building TPT in a chroot of its own will work, if you are willing to go through the trouble.
  • jacob1
    31st Mar 2016 Developer 0 Permalink
    @jenn4 (View Post)
    It looks like they have the necessary packages, in the search I posted above there are packages called "lua51" and "lua52", either works. There's also a "luajit" package in another repo.
  • jenn4
    31st Mar 2016 Member 0 Permalink
    @jacob1 (View Post)
    Oh that's great. I'll update my earlier post.