Compiling Love 2d

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
facetious factorial
Prole
Posts: 1
Joined: Sun Feb 08, 2015 12:58 am

Compiling Love 2d

Post by facetious factorial »

It says that I have no OpenGL, but I have had problems with the library file not being recognized in the standard library so I had to specify the path to the library .so file when working with OpenGL in the past. I should probably have it fixed, but is there some quick easy way to just reference the path to the OpenGL library?

Code: Select all

$ ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a ustar tar archive... gnutar
checking whether make supports nested variables... (cached) yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop
checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for a sed that does not truncate output... (cached) /bin/sed
checking for g++... g++
checking whether we are using the GNU Objective C++ compiler... no
checking whether g++ accepts -g... no
checking whether byte ordering is bigendian... no
checking whether g++ supports flag -std=c++0x... yes
checking whether g++ supports flag -std=c++11... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for SDL... yes
checking for lua... no
checking for lua... yes
checking for freetype2... yes
checking for openal... yes
checking for devil... yes
checking for libmodplug... yes
checking for vorbisfile... yes
checking for library containing sqrt... none required
checking for library containing PHYSFS_init... -lphysfs
checking for library containing glLoadIdentity... no
configure: error: LÖVE needs "OpenGL", please install "OpenGL" with development files and try again
MachineCode
Citizen
Posts: 70
Joined: Fri Jun 20, 2014 1:33 pm

Re: Compiling Love 2d

Post by MachineCode »

I was about to post a similar question. I have just booted up the new Raspberry Pi 2 and would very much like to try out love2d.

First I installed SDL2 based on this post - https://solarianprogrammer.com/2015/01/ ... ted-sdl-2/

I am not sure if the configuration is correct for love2d - he suggests this :-

../configure --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland --disable-video-x11 --disable-video-opengl

Next, I followed this post which Slime responded to

http://forum.stabyourself.net/viewtopic.php?t=4356

I got past all the issues with missing dependencies, sdl2.m4 being in the wrong directory, and finally ended up at the same place -

configure: error: LÖVE needs "OpenGL", please install "OpenGL" with development files and try again


Has anyone posted a working guide to get love2d installed successfully on the Raspberry pi?

What is not clear to me is how the OpenGL ES works with the X desktop. Does the SDL2 only support full screen on OpenGL ES? If so, does that work with X, or will running a love2d program on the RPi require a reboot (that is how ioquake and open arena work - they reboot without X)

BTW - the Raspberry Pi 2 performs really well, the 4 cores and big cache make a huge difference. Pygame projects are similar performance to a netbook with an Atom, although rotozoom is a bit slow until the libraries get recompiled with NEON simd enabled.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Compiling Love 2d

Post by bartbes »

facetious factorial wrote:It says that I have no OpenGL, but I have had problems with the library file not being recognized in the standard library so I had to specify the path to the library .so file when working with OpenGL in the past. I should probably have it fixed, but is there some quick easy way to just reference the path to the OpenGL library?
You could try specifying the path in the LDFLAGS environment variable, for instance, if it's installed in /usr/lib/opengl/libGL.so (made up, I hope no distro ever installs it as that), you'd call ./configure LDFLAGS=-L/usr/lib/opengl.
MachineCode wrote: First I installed SDL2 based on this post - https://solarianprogrammer.com/2015/01/ ... ted-sdl-2/
Last I checked the sdl2 package in the repos was already built correctly, but I'm not sure support has landed for the new pi 2.
MachineCode wrote: configure: error: LÖVE needs "OpenGL", please install "OpenGL" with development files and try again
Then you're either not using the branch slime suggested, or you don't have libGLESv2 and its development headers installed, or it's in a non-standard path as above.
MachineCode wrote: Has anyone posted a working guide to get love2d installed successfully on the Raspberry pi?
I never wrote a guide, but it's easy once you have the deps installed properly.
MachineCode wrote: What is not clear to me is how the OpenGL ES works with the X desktop. Does the SDL2 only support full screen on OpenGL ES? If so, does that work with X, or will running a love2d program on the RPi require a reboot (that is how ioquake and open arena work - they reboot without X)
I'm not sure either, I know it does work without X, and it may work with X as well, just.. try it. And if it doesn't, that doesn't mean it requires a reboot.
MachineCode
Citizen
Posts: 70
Joined: Fri Jun 20, 2014 1:33 pm

Re: Compiling Love 2d

Post by MachineCode »

OK .. thanks for that bartbes. It was the libGLESv2 dev package it wanted.

Now it went through and finished all the build - it took about 1 hour. When I type love in a terminal I get

Error: No available video device
stack traceback:
[C]: at 0xb6e912c8
[C]: in function 'require'
[string "boot.lua"]:332: in function <[string "boot.lua"]:244>
[C]: in function 'xpcall'

I am guessing that X on the Raspberry Pi does not yet accept accelerated graphics from SDL2. The chip has all the hardware in it to do compositing but getting it all to work requires Wayland. They have a new wm called Maynard in development which may provide the link so accelerated engines like love2d can work like on a PC graphics. Tomorrow I will try without X and see what it looks like.

The RPi comes with Minecraft preinstalled. That is accelerated in a window, but they are pulling some kind of trick. Once you click the START button, the minecraft window is locked in place and the mouse is captured in that box. You can't select other X windows or workspaces until you ESCAPE - which turns off the acceleration and releases the mouse.

Just out of interest, I did a simple comparison between LuaJit and Python for a loop inserting 1,000,000 random floats into a a table/dictionary.

Python 2.7 seconds
LuaJit 0.39 seconds

With ZeroBrane and accelerated graphics in an X window, love2d would be a fantastic development tool for the RPi 2.
MachineCode
Citizen
Posts: 70
Joined: Fri Jun 20, 2014 1:33 pm

Re: Compiling Love 2d

Post by MachineCode »

No luck with X closed down. Same error message, so I am guessing that SDL2 is not properly installed or configured.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Compiling Love 2d

Post by bartbes »

MachineCode wrote: I am guessing that X on the Raspberry Pi does not yet accept accelerated graphics from SDL2.
SDL2 has supported the VideoCore IV for ages, you just have to make sure the dev packages for it are installed and in the right place (/opt/vc) when building it. As I said, I'm fairly sure the raspbian package has this all sorted for you.

On a more administrative note, don't double-post.. and you've kind of hijacked this topic.
MachineCode
Citizen
Posts: 70
Joined: Fri Jun 20, 2014 1:33 pm

Re: Compiling Love 2d

Post by MachineCode »

Sorry about that - got a bit carried away. Apologies to the original poster.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 11 guests