Building LÖVE Arch linux

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Pendergast
Prole
Posts: 1
Joined: Fri Dec 29, 2017 4:46 pm

Building LÖVE Arch linux

Post by Pendergast »

I'm new use to using manjaro linux and löve, i have dont know what to do after building löve from src. All the tutorial have used "love." command to run games, my bash displays error "command not found". Im able to execute "love" program from src file and have tried to do "hello world programs" to get somewhere but now im stuck. so what to do next? i have followed this tutorial : https://love2d.org/wiki/Building_LÖVE
User avatar
Tricky
Citizen
Posts: 75
Joined: Thu Dec 18, 2014 4:07 pm
Location: Breda, the Netherlands
Contact:

Re: Building LÖVE Arch linux

Post by Tricky »

So you compiled LÖVE from the actual source in Linux, right?
Well a quick read in the building tutorial (as I never did build Love myself from source) shows me that the love executable is now located in the src directory. Which is all nice and cool, but for Linux not a location it wants it to have.

Now Linux comes a bit with different rules depending on your distro and I never used Manjaro, but normally Linux (as all systems inspired by Unix) dumps nearly all executables in specifically set up directories for that, and uses an environment variable named PATH to have a list which directories to search through to find the application you asked for and runs it when its found. Now I'm a mac user myself, but as Mac uses a Unix architecture just like Linux things can work out a bit.

As I basically don't want to bug with these applications folders of a Unix system (on Mac a crapload of them are even blocked against writing, even with the sudo command) and also taking the sensibility of these folders in mind, I normally cheat a little. I've just created a folder named "~/bin" and I've set the PATH variable to include that folder in the searches. "PATH=$PATH:~/bin". Copying "love" to "~/bin" will then work, although you'll have to set PATH=$PATH manually each time you run the terminal. I must also note, this works for terminal apps on mac, but how this stunt works in Linux, I'm not sure.

I wanted to quickly look this up in the Linux I have installed in a VM, but Linux hates me. It always starts giving nonsensical errors when I need it most. If somebody knows which directory is best to put love in.... (A quick look in the unix prompt on mac appears to put to /usr/local/bin but is that the same in Linux?)
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: Building LÖVE Arch linux

Post by davisdude »

If I recall correctly, you also need to run "sudo make install" to install the built binaries into one of the locations in your PATH environment variable. To view your path, you can do:

Code: Select all

$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
Usually, custom installed binaries go in /usr/local/bin. After running "make install," you can check if the binary is found by running "which love". If the binary is installed correctly, you should get something like:

Code: Select all

$ which love
/usr/bin/love
Edit:

I did some digging, and it looks like the binary defaults to /usr/bin/love. I'll have to look into configuring it to go to /usr/local/bin.

Edit 2:

I couldn't figure out a way to easily change its install location. Maybe I'm just missing something really simple, but IMO it should be possible and should be in the README.

I tried modifying "platform/unix/configure.ac to "AC_PREFIX_DEFAULT([/usr/local])", which put the binary in that location. When I tried to run the binary, however, I got the error message "bash: /usr/bin/love: No such file or directory" so it seems like there's more to it.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
User avatar
Ensayia
Party member
Posts: 399
Joined: Sat Jun 12, 2010 7:57 pm

Re: Building LÖVE Arch linux

Post by Ensayia »

LIke the other comments said, you will need to run

Code: Select all

 sudo make install 
to install the binaries somewhere your system will know where to look for them.

You can almost certainly use the Arch package and install it via

Code: Select all

 sudo pacman -U /path/to/package.tar.xz 
Should work without issue on Manjaro. You can download the package manually from the Arch website.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Building LÖVE Arch linux

Post by Nixola »

You can just install it from the command line without having to build or download anything manually:

Code: Select all

sudo pacman -S love
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: Building LÖVE Arch linux

Post by s-ol »

Well if you actually ran "love." then it's because it needs to be "love ." (that space is very important).

On arch you usually dont need to compile from source by hand, you have PKGBUILDs to describe the build process and integrate the files with the system package manager.

You DO NOT want to "sudo make install" on a modern distro because that's going to leave the files in random places that you can't uninstall and that packages that depend on it won't know about.

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 5 guests