Can't build love-0.9.1 with lua-5.2.4 from source on gentoo

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
User avatar
kastian
Prole
Posts: 3
Joined: Fri Jun 12, 2015 7:02 pm

Can't build love-0.9.1 with lua-5.2.4 from source on gentoo

Post by kastian »

Hello. There is a project which use love-0.9.1 and lua-5.2. There are
no them in official gentoo's repos so I've decided to build it from
source (in prefix of course). For prefix was used "/home/user/local/"

All sources was taken from official sites.

Firstly I've build lua.

Code: Select all

$ make linux
$ make install INSTALL_TOP=/home/user/local/
(lua haven't traditional --prefix, but INSTALL_TOP)

and add

Code: Select all

PATH="/home/user/local:${PATH}"
to .bashrc

check:

Code: Select all

$ lua -v
Lua 5.2.4  Copyright (C) 1994-2015 Lua.org, PUC-Rio
Seconly I've install dependencies from love's doc/readme

Code: Select all

media-libs/libsdl X opengl
media-libs/libsdl2 X opengl
media-libs/openal
media-libs/devil X mng opegl sdl tiff
media-libs/freetype
dev-games/physfs zip
media-libs/libmodplug
media-sound/mpg123
media-libs/libvorbis
And thirdly tried to build love. And there was the trouble.

With

Code: Select all

$ ./configure --prefix=/home/user/local/ --with-lua=lua --with-luaversion=""

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... gawk
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... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-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/x86_64-pc-linux-gnu/bin/ld
checking if the linker (/usr/x86_64-pc-linux-gnu/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 x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/x86_64-pc-linux-gnu/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... no
checking if : 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/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) 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/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64
checking if the linker (/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) 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/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) 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... no
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... -lGL
checking for library containing lua_pcall... no
configure: error: LÖVE needs "lua", please install "lua" with development files and try again

Similar result with :

Code: Select all

$ CPPFLAGS=-I/home/user/local/include/ CFLAGS=-I/home/user/local/include/ LDFLAGS=-L/home/user/local/lib/ ./configure --prefix=/home/user/local/ --with-lua=lua --with-luaversion=""
(Current machine is x86_64, but a pair of days ago this works well at i686)

But with

Code: Select all

$ lua_LIBS=-L/home/user/local/lib/ lua_CFLAGS=-I/home/user/local/include/ ./configure --prefix=/home/user/local/ --with-lua=lua --with-luaversion=""
./configure works fine

Code: Select all

checking for library containing sqrt... none required
checking for library containing PHYSFS_init... -lphysfs
checking for library containing glLoadIdentity... -lGL
checking for library containing lua_pcall... -L/home/user/local/lib/
checking for library containing mpg123_open_feed... -lmpg123
checking for library containing mpg123_seek_64... none required
checking for socklen_t... yes
checking for lua... lua
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating platform/unix/debian/control
config.status: creating platform/unix/debian/changelog
config.status: creating platform/unix/debian/rules
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
But fails during make

Code: Select all

make[3]: вход в каталог «/home/user/src/love-0.9.1/src»
/bin/sh ../libtool  --tag=CXX --tag=CXX  --mode=link g++  -g -O2 -std=c++11   -o love love.o  liblove.la -L/home/user/local/lib/ -lmpg123 -lGL -lphysfs

*** Warning: Linking the executable love against the loadable module
*** liblove.so is not portable!
libtool: link: g++ -g -O2 -std=c++11 -o .libs/love love.o  ./.libs/liblove.so -L/home/user/local/lib/ /usr/lib64/libmpg123.so -lGL -lphysfs -Wl,-rpath -Wl,/home/user/local/lib
love.o: In function `main':
/home/user/src/love-0.9.1/src/love.cpp:161: undefined reference to `luaL_newstate'
/home/user/src/love-0.9.1/src/love.cpp:162: undefined reference to `luaL_openlibs'
love.o: In function `love_preload':
/home/user/src/love-0.9.1/src/love.cpp:128: undefined reference to `lua_getglobal'
/home/user/src/love-0.9.1/src/love.cpp:129: undefined reference to `lua_getfield'
/home/user/src/love-0.9.1/src/love.cpp:130: undefined reference to `lua_pushcclosure'
/home/user/src/love-0.9.1/src/love.cpp:131: undefined reference to `lua_setfield'
/home/user/src/love-0.9.1/src/love.cpp:132: undefined reference to `lua_settop'
love.o: In function `main':
/home/user/src/love-0.9.1/src/love.cpp:169: undefined reference to `lua_createtable'
/home/user/src/love-0.9.1/src/love.cpp:173: undefined reference to `lua_pushstring'
/home/user/src/love-0.9.1/src/love.cpp:174: undefined reference to `lua_rawseti'
/home/user/src/love-0.9.1/src/love.cpp:177: undefined reference to `lua_pushstring'
/home/user/src/love-0.9.1/src/love.cpp:178: undefined reference to `lua_rawseti'
/home/user/src/love-0.9.1/src/love.cpp:182: undefined reference to `lua_pushstring'
/home/user/src/love-0.9.1/src/love.cpp:183: undefined reference to `lua_rawseti'
/home/user/src/love-0.9.1/src/love.cpp:186: undefined reference to `lua_setglobal'
/home/user/src/love-0.9.1/src/love.cpp:190: undefined reference to `lua_getglobal'
/home/user/src/love-0.9.1/src/love.cpp:191: undefined reference to `lua_pushstring'
/home/user/src/love-0.9.1/src/love.cpp:192: undefined reference to `lua_callk'
/home/user/src/love-0.9.1/src/love.cpp:198: undefined reference to `lua_pushboolean'
/home/user/src/love-0.9.1/src/love.cpp:199: undefined reference to `lua_setfield'
/home/user/src/love-0.9.1/src/love.cpp:203: undefined reference to `lua_settop'
/home/user/src/love-0.9.1/src/love.cpp:206: undefined reference to `lua_getglobal'
/home/user/src/love-0.9.1/src/love.cpp:207: undefined reference to `lua_pushstring'
/home/user/src/love-0.9.1/src/love.cpp:208: undefined reference to `lua_callk'
/home/user/src/love-0.9.1/src/love.cpp:211: undefined reference to `lua_callk'
/home/user/src/love-0.9.1/src/love.cpp:214: undefined reference to `lua_isnumber'
/home/user/src/love-0.9.1/src/love.cpp:217: undefined reference to `lua_close'
/home/user/src/love-0.9.1/src/love.cpp:215: undefined reference to `lua_tonumberx'
/home/user/src/love-0.9.1/src/love.cpp:161: undefined reference to `luaL_newstate'
/home/user/src/love-0.9.1/src/love.cpp:162: undefined reference to `luaL_openlibs'
love.o: In function `love_preload':
/home/user/src/love-0.9.1/src/love.cpp:128: undefined reference to `lua_getglobal'
/home/user/src/love-0.9.1/src/love.cpp:129: undefined reference to `lua_getfield'
/home/user/src/love-0.9.1/src/love.cpp:130: undefined reference to `lua_pushcclosure'
/home/user/src/love-0.9.1/src/love.cpp:131: undefined reference to `lua_setfield'
/home/user/src/love-0.9.1/src/love.cpp:132: undefined reference to `lua_settop'
love.o: In function `main':
/home/user/src/love-0.9.1/src/love.cpp:169: undefined reference to `lua_createtable'
/home/user/src/love-0.9.1/src/love.cpp:177: undefined reference to `lua_pushstring'
/home/user/src/love-0.9.1/src/love.cpp:178: undefined reference to `lua_rawseti'
/home/user/src/love-0.9.1/src/love.cpp:173: undefined reference to `lua_pushstring'
/home/user/src/love-0.9.1/src/love.cpp:174: undefined reference to `lua_rawseti'
./.libs/liblove.so: undefined reference to `lua_tolstring'
./.libs/liblove.so: undefined reference to `lua_type'
./.libs/liblove.so: undefined reference to `lua_pushnumber'
./.libs/liblove.so: undefined reference to `luaL_prepbuffsize'
./.libs/liblove.so: undefined reference to `luaL_argerror'
./.libs/liblove.so: undefined reference to `luaL_optinteger'
./.libs/liblove.so: undefined reference to `lua_rawgeti'
./.libs/liblove.so: undefined reference to `lua_pushlstring'
./.libs/liblove.so: undefined reference to `lua_toboolean'
./.libs/liblove.so: undefined reference to `luaL_openlib'
./.libs/liblove.so: undefined reference to `luaL_checklstring'
./.libs/liblove.so: undefined reference to `lua_error'
./.libs/liblove.so: undefined reference to `luaL_checktype'
./.libs/liblove.so: undefined reference to `luaL_optnumber'
./.libs/liblove.so: undefined reference to `lua_insert'
./.libs/liblove.so: undefined reference to `luaL_addstring'
./.libs/liblove.so: undefined reference to `luaL_optlstring'
./.libs/liblove.so: undefined reference to `lua_getmetatable'
./.libs/liblove.so: undefined reference to `lua_pushinteger'
./.libs/liblove.so: undefined reference to `lua_gettop'
./.libs/liblove.so: undefined reference to `lua_pushnil'
./.libs/liblove.so: undefined reference to `lua_pcallk'
./.libs/liblove.so: undefined reference to `lua_pushvalue'
./.libs/liblove.so: undefined reference to `lua_rawset'
./.libs/liblove.so: undefined reference to `lua_typename'
./.libs/liblove.so: undefined reference to `luaL_unref'
./.libs/liblove.so: undefined reference to `lua_newuserdata'
./.libs/liblove.so: undefined reference to `luaL_loadbufferx'
./.libs/liblove.so: undefined reference to `lua_rawget'
./.libs/liblove.so: undefined reference to `luaL_checkudata'
./.libs/liblove.so: undefined reference to `lua_tointegerx'
./.libs/liblove.so: undefined reference to `luaL_error'
./.libs/liblove.so: undefined reference to `luaL_getmetafield'
./.libs/liblove.so: undefined reference to `lua_pushfstring'
./.libs/liblove.so: undefined reference to `luaL_where'
./.libs/liblove.so: undefined reference to `lua_checkstack'
./.libs/liblove.so: undefined reference to `lua_pushlightuserdata'
./.libs/liblove.so: undefined reference to `luaL_newmetatable'
./.libs/liblove.so: undefined reference to `lua_settable'
./.libs/liblove.so: undefined reference to `lua_touserdata'
./.libs/liblove.so: undefined reference to `luaL_addlstring'
./.libs/liblove.so: undefined reference to `lua_pushvfstring'
./.libs/liblove.so: undefined reference to `lua_concat'
./.libs/liblove.so: undefined reference to `luaL_buffinit'
./.libs/liblove.so: undefined reference to `lua_isuserdata'
./.libs/liblove.so: undefined reference to `lua_isstring'
./.libs/liblove.so: undefined reference to `luaL_pushresult'
./.libs/liblove.so: undefined reference to `lua_next'
./.libs/liblove.so: undefined reference to `lua_replace'
./.libs/liblove.so: undefined reference to `lua_gettable'
./.libs/liblove.so: undefined reference to `lua_setmetatable'
./.libs/liblove.so: undefined reference to `luaL_checknumber'
./.libs/liblove.so: undefined reference to `luaL_ref'
./.libs/liblove.so: undefined reference to `lua_remove'
./.libs/liblove.so: undefined reference to `luaL_checkinteger'
./.libs/liblove.so: undefined reference to `lua_rawlen'
collect2: error: ld returned 1 exit status
Makefile:2770: ошибка выполнения рецепта для цели «love»
make[3]: *** [love] Ошибка 1
make[3]: выход из каталога «/home/user/src/love-0.9.1/src»
Makefile:3643: ошибка выполнения рецепта для цели «all-recursive»
make[2]: *** [all-recursive] Ошибка 1
make[2]: выход из каталога «/home/user/src/love-0.9.1/src»
Makefile:541: ошибка выполнения рецепта для цели «all-recursive»
make[1]: *** [all-recursive] Ошибка 1
make[1]: выход из каталога «/home/user/src/love-0.9.1»
Makefile:341: ошибка выполнения рецепта для цели «all»
make: *** [all] Ошибка 2
Couldn't you help me - is there a way to build specific love with specific lua in prefix?

Sorry for typos and/or mistakes.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Can't build love-0.9.1 with lua-5.2.4 from source on gen

Post by bartbes »

kastian wrote:

Code: Select all

$ ./configure --prefix=/home/user/local/ --with-lua=lua --with-luaversion=""
Well there's you problem, I never heard of this magical "" version. Try passing 5.2 as luaversion instead.
User avatar
kastian
Prole
Posts: 3
Joined: Fri Jun 12, 2015 7:02 pm

Re: Can't build love-0.9.1 with lua-5.2.4 from source on gen

Post by kastian »

bartbes wrote:Well there's you problem, I never heard of this magical "" version. Try passing 5.2 as luaversion instead.

Code: Select all

lua_LIBS=-L/home/user/user/lib/ lua_CFLAGS=-I/home/user/local/include/ ./configure --prefix=/home/user/local/ --with-lua=lua --with-luaversion=5.2
finishes successful but with

Code: Select all

...
checking for lua5.2... no
checking for lua... no
checking for lua... no
configure: WARNING: Did not find a lua executable, you may need to update the scripts manually if you change them
configure: creating ./config.status
config.status: creating Makefile
...
but make fails with the previous result

Code: Select all

...
libtool: link: ranlib .libs/liblove.a
libtool: link: rm -fr .libs/liblove.lax
libtool: link: ( cd ".libs" && rm -f "liblove.la" && ln -s "../liblove.la" "liblove.la" )
depbase=`echo love.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I. -I..  -I. -I./modules -I./libraries -I./libraries/enet/libenet/include  -D_FILE_OFFSET_BITS=64	-D_REENTRANT -I/usr/include/SDL2  -I/home/user/local/include/ -I/usr/include/freetype2 -I/usr/include/AL	   -g -O2 -std=c++11 -MT love.o -MD -MP -MF $depbase.Tpo -c -o love.o love.cpp &&\
mv -f $depbase.Tpo $depbase.Po
/bin/sh ../libtool  --tag=CXX --tag=CXX  --mode=link g++  -g -O2 -std=c++11   -o love love.o  liblove.la -L/home/user/user/lib/ -lmpg123 -lGL -lphysfs

*** Warning: Linking the executable love against the loadable module
*** liblove.so is not portable!
libtool: link: g++ -g -O2 -std=c++11 -o .libs/love love.o  ./.libs/liblove.so -L/home/user/user/lib/ /usr/lib64/libmpg123.so -lGL -lphysfs -Wl,-rpath -Wl,/home/user/local/lib
love.o: In function `main':
/home/user/src/love-0.9.1/src/love.cpp:161: undefined reference to `luaL_newstate'
/home/user/src/love-0.9.1/src/love.cpp:162: undefined reference to `luaL_openlibs'
love.o: In function `love_preload':
/home/user/src/love-0.9.1/src/love.cpp:128: undefined reference to `lua_getglobal'
/home/user/src/love-0.9.1/src/love.cpp:129: undefined reference to `lua_getfield'
/home/user/src/love-0.9.1/src/love.cpp:130: undefined reference to `lua_pushcclosure'
/home/user/src/love-0.9.1/src/love.cpp:131: undefined reference to `lua_setfield'
/home/user/src/love-0.9.1/src/love.cpp:132: undefined reference to `lua_settop'
love.o: In function `main':
/home/user/src/love-0.9.1/src/love.cpp:169: undefined reference to `lua_createtable'
/home/user/src/love-0.9.1/src/love.cpp:173: undefined reference to `lua_pushstring'
/home/user/src/love-0.9.1/src/love.cpp:174: undefined reference to `lua_rawseti'
/home/user/src/love-0.9.1/src/love.cpp:177: undefined reference to `lua_pushstring'
/home/user/src/love-0.9.1/src/love.cpp:178: undefined reference to `lua_rawseti'
/home/user/src/love-0.9.1/src/love.cpp:182: undefined reference to `lua_pushstring'
/home/user/src/love-0.9.1/src/love.cpp:183: undefined reference to `lua_rawseti'
/home/user/src/love-0.9.1/src/love.cpp:186: undefined reference to `lua_setglobal'
/home/user/src/love-0.9.1/src/love.cpp:190: undefined reference to `lua_getglobal'
/home/user/src/love-0.9.1/src/love.cpp:191: undefined reference to `lua_pushstring'
/home/user/src/love-0.9.1/src/love.cpp:192: undefined reference to `lua_callk'
/home/user/src/love-0.9.1/src/love.cpp:198: undefined reference to `lua_pushboolean'
/home/user/src/love-0.9.1/src/love.cpp:199: undefined reference to `lua_setfield'
/home/user/src/love-0.9.1/src/love.cpp:203: undefined reference to `lua_settop'
/home/user/src/love-0.9.1/src/love.cpp:206: undefined reference to `lua_getglobal'
/home/user/src/love-0.9.1/src/love.cpp:207: undefined reference to `lua_pushstring'
/home/user/src/love-0.9.1/src/love.cpp:208: undefined reference to `lua_callk'
/home/user/src/love-0.9.1/src/love.cpp:211: undefined reference to `lua_callk'
/home/user/src/love-0.9.1/src/love.cpp:214: undefined reference to `lua_isnumber'
/home/user/src/love-0.9.1/src/love.cpp:217: undefined reference to `lua_close'
/home/user/src/love-0.9.1/src/love.cpp:215: undefined reference to `lua_tonumberx'
/home/user/src/love-0.9.1/src/love.cpp:161: undefined reference to `luaL_newstate'
/home/user/src/love-0.9.1/src/love.cpp:162: undefined reference to `luaL_openlibs'
love.o: In function `love_preload':
/home/user/src/love-0.9.1/src/love.cpp:128: undefined reference to `lua_getglobal'
/home/user/src/love-0.9.1/src/love.cpp:129: undefined reference to `lua_getfield'
/home/user/src/love-0.9.1/src/love.cpp:130: undefined reference to `lua_pushcclosure'
/home/user/src/love-0.9.1/src/love.cpp:131: undefined reference to `lua_setfield'
/home/user/src/love-0.9.1/src/love.cpp:132: undefined reference to `lua_settop'
love.o: In function `main':
/home/user/src/love-0.9.1/src/love.cpp:169: undefined reference to `lua_createtable'
/home/user/src/love-0.9.1/src/love.cpp:177: undefined reference to `lua_pushstring'
/home/user/src/love-0.9.1/src/love.cpp:178: undefined reference to `lua_rawseti'
/home/user/src/love-0.9.1/src/love.cpp:173: undefined reference to `lua_pushstring'
/home/user/src/love-0.9.1/src/love.cpp:174: undefined reference to `lua_rawseti'
./.libs/liblove.so: undefined reference to `lua_tolstring'
./.libs/liblove.so: undefined reference to `lua_type'
./.libs/liblove.so: undefined reference to `lua_pushnumber'
./.libs/liblove.so: undefined reference to `luaL_prepbuffsize'
./.libs/liblove.so: undefined reference to `luaL_argerror'
./.libs/liblove.so: undefined reference to `luaL_optinteger'
./.libs/liblove.so: undefined reference to `lua_rawgeti'
./.libs/liblove.so: undefined reference to `lua_pushlstring'
./.libs/liblove.so: undefined reference to `lua_toboolean'
./.libs/liblove.so: undefined reference to `luaL_openlib'
./.libs/liblove.so: undefined reference to `luaL_checklstring'
./.libs/liblove.so: undefined reference to `lua_error'
./.libs/liblove.so: undefined reference to `luaL_checktype'
./.libs/liblove.so: undefined reference to `luaL_optnumber'
./.libs/liblove.so: undefined reference to `lua_insert'
./.libs/liblove.so: undefined reference to `luaL_addstring'
./.libs/liblove.so: undefined reference to `luaL_optlstring'
./.libs/liblove.so: undefined reference to `lua_getmetatable'
./.libs/liblove.so: undefined reference to `lua_pushinteger'
./.libs/liblove.so: undefined reference to `lua_gettop'
./.libs/liblove.so: undefined reference to `lua_pushnil'
./.libs/liblove.so: undefined reference to `lua_pcallk'
./.libs/liblove.so: undefined reference to `lua_pushvalue'
./.libs/liblove.so: undefined reference to `lua_rawset'
./.libs/liblove.so: undefined reference to `lua_typename'
./.libs/liblove.so: undefined reference to `luaL_unref'
./.libs/liblove.so: undefined reference to `lua_newuserdata'
./.libs/liblove.so: undefined reference to `luaL_loadbufferx'
./.libs/liblove.so: undefined reference to `lua_rawget'
./.libs/liblove.so: undefined reference to `luaL_checkudata'
./.libs/liblove.so: undefined reference to `lua_tointegerx'
./.libs/liblove.so: undefined reference to `luaL_error'
./.libs/liblove.so: undefined reference to `luaL_getmetafield'
./.libs/liblove.so: undefined reference to `lua_pushfstring'
./.libs/liblove.so: undefined reference to `luaL_where'
./.libs/liblove.so: undefined reference to `lua_checkstack'
./.libs/liblove.so: undefined reference to `lua_pushlightuserdata'
./.libs/liblove.so: undefined reference to `luaL_newmetatable'
./.libs/liblove.so: undefined reference to `lua_settable'
./.libs/liblove.so: undefined reference to `lua_touserdata'
./.libs/liblove.so: undefined reference to `luaL_addlstring'
./.libs/liblove.so: undefined reference to `lua_pushvfstring'
./.libs/liblove.so: undefined reference to `lua_concat'
./.libs/liblove.so: undefined reference to `luaL_buffinit'
./.libs/liblove.so: undefined reference to `lua_isuserdata'
./.libs/liblove.so: undefined reference to `lua_isstring'
./.libs/liblove.so: undefined reference to `luaL_pushresult'
./.libs/liblove.so: undefined reference to `lua_next'
./.libs/liblove.so: undefined reference to `lua_replace'
./.libs/liblove.so: undefined reference to `lua_gettable'
./.libs/liblove.so: undefined reference to `lua_setmetatable'
./.libs/liblove.so: undefined reference to `luaL_checknumber'
./.libs/liblove.so: undefined reference to `luaL_ref'
./.libs/liblove.so: undefined reference to `lua_remove'
./.libs/liblove.so: undefined reference to `luaL_checkinteger'
./.libs/liblove.so: undefined reference to `lua_rawlen'
collect2: error: ld returned 1 exit status
Makefile:2770: ошибка выполнения рецепта для цели «love»
make[3]: *** [love] Ошибка 1
make[3]: выход из каталога «/home/user/src/love-0.9.1/src»
Makefile:3643: ошибка выполнения рецепта для цели «all-recursive»
make[2]: *** [all-recursive] Ошибка 1
make[2]: выход из каталога «/home/user/src/love-0.9.1/src»
Makefile:541: ошибка выполнения рецепта для цели «all-recursive»
make[1]: *** [all-recursive] Ошибка 1
make[1]: выход из каталога «/home/user/src/love-0.9.1»
Makefile:341: ошибка выполнения рецепта для цели «all»
make: *** [all] Ошибка 2

I've delared --with-luaversion="" because (configure in love sources)

Code: Select all

# Check whether --with-luaversion was given.
if test "${with_luaversion+set}" = set; then :
  withval=$with_luaversion;
else
  with_luaversion=5.1
fi
so without it result is

Code: Select all

...
checking for lua5.1... no
checking for lua... no
checking for lua... no
configure: WARNING: Did not find a lua executable, you may need to update the scripts manually if you change them
configure: creating ./config.status
config.status: creating Makefile
...
But you're right it's really unneeded.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Can't build love-0.9.1 with lua-5.2.4 from source on gen

Post by bartbes »

kastian wrote:

Code: Select all

lua_LIBS=-L/home/user/user/lib/ lua_CFLAGS=-I/home/user/local/include/ ./configure --prefix=/home/user/local/ --with-lua=lua --with-luaversion=5.2
So the lua_LIBS variable should contain the link flag for the library, not a -L flag. It also seems unlikely that that particular path is correct. Maybe it should be like this?

Code: Select all

lua_LIBS="-L/home/user/local/lib -llua"
kastian wrote:

Code: Select all

# Check whether --with-luaversion was given.
if test "${with_luaversion+set}" = set; then :
  withval=$with_luaversion;
else
  with_luaversion=5.1
fi
Yes, that sets the default value to 5.1. But it needs an actual version to compile properly. "" is simply wrong, not unnecessary, wrong.
User avatar
kastian
Prole
Posts: 3
Joined: Fri Jun 12, 2015 7:02 pm

Re: Can't build love-0.9.1 with lua-5.2.4 from source on gen

Post by kastian »

bartbes wrote: So the lua_LIBS variable should contain the link flag for the library, not a -L flag. It also seems unlikely that that particular path is correct. Maybe it should be like this?

Code: Select all

lua_LIBS="-L/home/user/local/lib -llua"
YES! The vampire was buried right here.

Code: Select all

lua_LIBS="-L/home/user/local/lib/ -llua" lua_CFLAGS=-I/home/user/local/include/ ./configure --prefix=/home/user/local/
worked fine!

Thank you mery much for so fast and needed help! :awesome: :awesome: :awesome:
Post Reply

Who is online

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