tolua++ problems with OS X Mavericks

Asked by Julio

I have updated to OS X 10.9.3 (Mavericks) and now I can't build stratagus anymore :(

I have updated my compiler and have been able to update all devel libraries except for one critical library: toluapp

I believe I will be able to successfully build stratagus as I have always done once I can get the tolua++ library working again, unfortunately I don't know enough overcome this hurdle.

Can anyone help?

-------
Here's the error I receive when trying to compile stratagus
[ 0%] Built target genversion
[ 1%] Generating tolua.cpp
/bin/sh: line 1: 22238 Segmentation fault: 11 /usr/local/bin/toluapp -L stratagus.lua -o /Network/Servers/server.private/NetworkUsers/julio/Development/Stratagus_Wargus/stratagus.8788/build/tolua.cpp stratagus.pkg
make[3]: *** [tolua.cpp] Error 139
make[2]: *** [CMakeFiles/stratagus.dir/all] Error 2
make[1]: *** [CMakeFiles/stratagus.dir/rule] Error 2
make: *** [stratagus] Error 2

-------
Before Mavericks I would use: sudo port install toluapp
but now I get errors:
---> Computing dependencies for toluapp
---> Building toluapp
Error: org.macports.build for port toluapp returned: command execution failed
Please see the log file for port toluapp for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_toluapp/toluapp/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port toluapp failed

-------
I have also tried compiling directly from: git clone https://github.com/LuaDist/toluapp.git
bug receive errors as well:
[ 14%] Building C object CMakeFiles/toluapp_lib.dir/src/lib/tolua_map.c.o
/Network/Servers/server.private/NetworkUsers/julio/Development/toluapp/src/lib/tolua_map.c:266:2: warning: implicit declaration
      of function 'lua_setfenv' is invalid in C99 [-Wimplicit-function-declaration]
        lua_setfenv(L, -2);
        ^
/Network/Servers/server.private/NetworkUsers/julio/Development/toluapp/src/lib/tolua_map.c:274:2: warning: implicit declaration
      of function 'lua_getfenv' is invalid in C99 [-Wimplicit-function-declaration]
        lua_getfenv(L, -1);
        ^
/Network/Servers/server.private/NetworkUsers/julio/Development/toluapp/src/lib/tolua_map.c:398:58: warning: passing
      'const char *' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
 if (tolua_newmetatable(L,ctype) && tolua_newmetatable(L,type))
                                                         ^~~~
/Network/Servers/server.private/NetworkUsers/julio/Development/toluapp/src/lib/tolua_map.c:28:52: note: passing argument to
      parameter 'name' here
static int tolua_newmetatable (lua_State* L, char* name)
                                                   ^
/Network/Servers/server.private/NetworkUsers/julio/Development/toluapp/src/lib/tolua_map.c:414:19: error: use of undeclared
      identifier 'LUA_GLOBALSINDEX'
         lua_pushvalue(L,LUA_GLOBALSINDEX);
                         ^
/Network/Servers/server.private/NetworkUsers/julio/Development/toluapp/src/lib/tolua_map.c:448:19: error: use of undeclared
      identifier 'LUA_GLOBALSINDEX'
                lua_pushvalue(L,LUA_GLOBALSINDEX);
                                ^

========================

Question information

Language:
English Edit question
Status:
Solved
For:
Stratagus Edit question
Assignee:
No assignee Edit question
Solved by:
Julio
Solved:
Last query:
Last reply:

This question was originally filed as bug #1323401.

Revision history for this message
Julio (artofwar) said :
#1

I have updated to OS X 10.9.3 (Mavericks) and now I can't build stratagus anymore :(

I have updated my compiler and have been able to update all devel libraries except for one critical library: toluapp

I believe I will be able to successfully build stratagus as I have always done once I can get the tolua++ library working again, unfortunately I don't know enough overcome this hurdle.

Can anyone help?

-------
Before Mavericks I would use: sudo port install toluapp
but now I get errors:
---> Computing dependencies for toluapp
---> Building toluapp
Error: org.macports.build for port toluapp returned: command execution failed
Please see the log file for port toluapp for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_toluapp/toluapp/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port toluapp failed

-------
I have also tried compiling directly from: git clone https://github.com/LuaDist/toluapp.git
bug receive errors as well:
[ 14%] Building C object CMakeFiles/toluapp_lib.dir/src/lib/tolua_map.c.o
/Network/Servers/server.private/NetworkUsers/julio/Development/toluapp/src/lib/tolua_map.c:266:2: warning: implicit declaration
      of function 'lua_setfenv' is invalid in C99 [-Wimplicit-function-declaration]
        lua_setfenv(L, -2);
        ^
/Network/Servers/server.private/NetworkUsers/julio/Development/toluapp/src/lib/tolua_map.c:274:2: warning: implicit declaration
      of function 'lua_getfenv' is invalid in C99 [-Wimplicit-function-declaration]
        lua_getfenv(L, -1);
        ^
/Network/Servers/server.private/NetworkUsers/julio/Development/toluapp/src/lib/tolua_map.c:398:58: warning: passing
      'const char *' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
 if (tolua_newmetatable(L,ctype) && tolua_newmetatable(L,type))
                                                         ^~~~
/Network/Servers/server.private/NetworkUsers/julio/Development/toluapp/src/lib/tolua_map.c:28:52: note: passing argument to
      parameter 'name' here
static int tolua_newmetatable (lua_State* L, char* name)
                                                   ^
/Network/Servers/server.private/NetworkUsers/julio/Development/toluapp/src/lib/tolua_map.c:414:19: error: use of undeclared
      identifier 'LUA_GLOBALSINDEX'
         lua_pushvalue(L,LUA_GLOBALSINDEX);
                         ^
/Network/Servers/server.private/NetworkUsers/julio/Development/toluapp/src/lib/tolua_map.c:448:19: error: use of undeclared
      identifier 'LUA_GLOBALSINDEX'
                lua_pushvalue(L,LUA_GLOBALSINDEX);
                                ^

========================

Revision history for this message
cybermind (iddqd-mail) said :
#2

toluapp supports only lua 5.1.x. Downgrade your lua library and try to compipe again

Revision history for this message
Julio (artofwar) said :
#3

No luck. When I activate lua 5.1.4_4 and then try to install toluapp it automatically upgrades me?!

I've even tried uninstalling 5.2.3_0 and it just reinstalls it.

Julios-iMac27:build julio$ port installed lua
The following ports are currently installed:
  lua @5.1.4_4 (active)
  lua @5.2.3_0

Julios-iMac27:build julio$ sudo port install toluapp
---> Fetching archive for lua
---> Attempting to fetch lua-5.2.3_0.darwin_13.x86_64.tbz2 from http://packages.macports.org/lua
---> Attempting to fetch lua-5.2.3_0.darwin_13.x86_64.tbz2.rmd160 from http://packages.macports.org/lua
---> Computing dependencies for lua
---> Uninstalling lua @5.2.3_0
---> Cleaning lua
---> Computing dependencies for lua
---> Installing lua @5.2.3_0
---> Deactivating lua @5.1.4_4
---> Cleaning lua
---> Activating lua @5.2.3_0
---> Cleaning lua
---> Computing dependencies for toluapp
---> Building toluapp
Error: org.macports.build for port toluapp returned: command execution failed
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port toluapp failed

Julios-iMac27:build julio$ port installed lua
The following ports are currently installed:
  lua @5.1.4_4
  lua @5.2.3_0 (active)

Revision history for this message
cybermind (iddqd-mail) said :
#4

What version of toluapp are you trying to install? Try using release version 1.0.9.3, at least I have no problems compiling it with lua 5.1.5

Revision history for this message
Julio (artofwar) said :
#5

That worked, thank you.