Building LÖVE Arch linux
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 1
- Joined: Fri Dec 29, 2017 4:46 pm
Building LÖVE Arch linux
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
Re: Building LÖVE Arch linux
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?)
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?)
Re: Building LÖVE Arch linux
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:
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:
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.
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
Code: Select all
$ which love
/usr/bin/love
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
Re: Building LÖVE Arch linux
LIke the other comments said, you will need to run 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 Should work without issue on Manjaro. You can download the package manually from the Arch website.
Code: Select all
sudo make install
You can almost certainly use the Arch package and install it via
Code: Select all
sudo pacman -U /path/to/package.tar.xz
Re: Building LÖVE Arch linux
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
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: Building LÖVE Arch linux
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.
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.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 15 guests