NLua/KeraLua

Fails to build

Closed this issue · 9 comments

After cloning and fetching submodules:

chris@zack:~/src/KeraLua$ ./autogen.sh
I am going to run ./configure with no arguments - if you wish
to pass any to it, please specify them on the ./autogen.sh command line.
Running aclocal -I .  ...
Running automake --gnu  ...
configure.ac:5: installing `./install-sh'
configure.ac:5: installing `./missing'
Makefile.include:69: programfilesdir multiply defined in condition TRUE ...
ConsoleTest/Makefile.am:92:   `Makefile.include' included from here
Makefile.include:65: ... `programfilesdir' previously defined here
ConsoleTest/Makefile.am:92:   `Makefile.include' included from here
Makefile.include:70: programfiles_DATA multiply defined in condition TRUE ...
ConsoleTest/Makefile.am:92:   `Makefile.include' included from here
Makefile.include:66: ... `programfiles_DATA' previously defined here
ConsoleTest/Makefile.am:92:   `Makefile.include' included from here
Makefile.include:69: programfilesdir multiply defined in condition TRUE ...
KeraLua.Tests/Makefile.am:92:   `Makefile.include' included from here
Makefile.include:65: ... `programfilesdir' previously defined here
KeraLua.Tests/Makefile.am:92:   `Makefile.include' included from here
Makefile.include:70: programfiles_DATA multiply defined in condition TRUE ...
KeraLua.Tests/Makefile.am:92:   `Makefile.include' included from here
Makefile.include:66: ... `programfiles_DATA' previously defined here
KeraLua.Tests/Makefile.am:92:   `Makefile.include' included from here
Makefile.include:69: programfilesdir multiply defined in condition TRUE ...
Makefile.am:13:   `KeraLua.make' included from here
KeraLua.make:69:   `Makefile.include' included from here
Makefile.include:65: ... `programfilesdir' previously defined here
Makefile.am:13:   `KeraLua.make' included from here
KeraLua.make:69:   `Makefile.include' included from here
Makefile.include:70: programfiles_DATA multiply defined in condition TRUE ...
Makefile.am:13:   `KeraLua.make' included from here
KeraLua.make:69:   `Makefile.include' included from here
Makefile.include:66: ... `programfiles_DATA' previously defined here
Makefile.am:13:   `KeraLua.make' included from here
KeraLua.make:69:   `Makefile.include' included from here
Running autoconf ...
Running ./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... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for pkg-config... /usr/bin/pkg-config
checking for gmcs... /opt/mono/bin/gmcs
configure: creating ./config.status
config.status: creating keralua.pc
config.status: creating KeraLua.Tests/keralua.tests.pc
config.status: creating KeraLua.Tests/Makefile
config.status: creating ConsoleTest/consoletest
config.status: creating ConsoleTest/Makefile
config.status: creating Makefile


chris@zack:~/src/KeraLua$ make
Making all in .
make[1]: Entering directory `/home/chris/src/KeraLua'
mkdir -p 'bin/Release'
cp 'keralua.pc' 'bin/Release//keralua.pc'
make[1]: Leaving directory `/home/chris/src/KeraLua'
Making all in KeraLua.Tests
make[1]: Entering directory `/home/chris/src/KeraLua/KeraLua.Tests'
mkdir -p '../tests'
cp 'keralua.tests.pc' '../tests//keralua.tests.pc'
mkdir -p '../tests'
cp '../lib/nunit/nunit.framework.dll' '../tests//nunit.framework.dll'
make[1]: *** No rule to make target `../bin/Release/KeraLua.dll', needed by `../tests//KeraLua.dll'.  Stop.
make[1]: Leaving directory `/home/chris/src/KeraLua/KeraLua.Tests'
make: *** [all-recursive] Error 1


chris@zack:~/src/KeraLua$ make -f Makefile.Linux
cd external/lua; mkdir linux; cd linux; cmake -DCMAKE_BUILD_TYPE=Release ..; cmake --build . --config Release
mkdir: cannot create directory `linux': File exists
-- Copying include dirs from  /home/chris/src/KeraLua/external/lua/include to /home/chris/src/KeraLua/external/lua/linux
CMake Error at CMakeLists.txt:183 (ADD_TEST):
  add_test given unknown argument:

    WORKING_DIRECTORY



CMake Error at CMakeLists.txt:187 (ADD_TEST):
  add_test given unknown argument:

    WORKING_DIRECTORY



CMake Error at CMakeLists.txt:191 (ADD_TEST):
  add_test given unknown argument:

    WORKING_DIRECTORY



CMake Error at CMakeLists.txt:195 (ADD_TEST):
  add_test given unknown argument:

    WORKING_DIRECTORY



CMake Error at CMakeLists.txt:199 (ADD_TEST):
  add_test given unknown argument:

    WORKING_DIRECTORY



CMake Error at CMakeLists.txt:203 (ADD_TEST):
  add_test given unknown argument:

    WORKING_DIRECTORY



CMake Error at CMakeLists.txt:207 (ADD_TEST):
  add_test given unknown argument:

    WORKING_DIRECTORY



CMake Error at CMakeLists.txt:211 (ADD_TEST):
  add_test given unknown argument:

    WORKING_DIRECTORY



CMake Error at CMakeLists.txt:215 (ADD_TEST):
  add_test given unknown argument:

    WORKING_DIRECTORY



CMake Error at CMakeLists.txt:219 (ADD_TEST):
  add_test given unknown argument:

    WORKING_DIRECTORY



CMake Error at CMakeLists.txt:223 (ADD_TEST):
  add_test given unknown argument:

    WORKING_DIRECTORY



CMake Error at CMakeLists.txt:227 (ADD_TEST):
  add_test given unknown argument:

    WORKING_DIRECTORY



CMake Error at CMakeLists.txt:231 (ADD_TEST):
  add_test given unknown argument:

    WORKING_DIRECTORY



-- Configuring incomplete, errors occurred!
make[1]: Entering directory `/home/chris/src/KeraLua/external/lua/linux'
make[1]: *** No targets specified and no makefile found.  Stop.
make[1]: Leaving directory `/home/chris/src/KeraLua/external/lua/linux'
make: *** [all] Error 2

@cdhowie I'm really sorry.

I am not using the the autogen. This was a contribution from @megax.
You don't need the autogen, you can build just typing make -f Makefile.Linux
https://github.com/NLua/NLua/blob/master/run_all.linux.sh

and remember you need CMake to build the Native Lua on Linux.

@viniciusjarina Umm... take a look at the last command run in my paste.

mkdir: cannot create directory `linux': File exists

Try to cleanup (clean -xfd) your previous build and run again :)

Yes, already done so. The mkdir error is not fatal, the following stream of cmake errors is what actually killed it. If I run git clean -fdx in KeraLua and all submodules the mkdir error goes away, but the errors from cmake about WORKING_DIRECTORY persist, and the build still fails.

(And even if that was the problem, surely the build system should be able to cope with an output directory that already exists!)

I agree with "(And even if that was the problem, surely the build system should be able to cope with an output directory that already exists!)"

But the CMake should be working. What is your CMake version on Linux? 🐧

If the CMake was not working the build would fail on Travis https://travis-ci.org/NLua/KeraLua/builds/7337221

chris@zack:~/src/KeraLua$ cmake --version
cmake version 2.8.2
chris@zack:~/src/KeraLua$ dpkg -l cmake
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                                  Version                                               Description
+++-=====================================================-=====================================================-==========================================================================================================================
ii  cmake                                                 2.8.2+dfsg.1-0+squeeze1                               a cross-platform, open-source make system

Apparently 2.8.2 doesn't support WORKING_DIRECTORY. I submitted a pull request against the relevant submodule (NLua/lua#1) and once that is accepted I will submit more pull requests to update the submodule references.