Compiling the source code

Newbe
Posts: 11
Joined: Fri Nov 27, 2009 10:29 am

Re: Trying to compile.

Post by Newbe »

Code: Select all

 qmake-qt4 src/src.pro 
/usr/lib64/qt4/bin/rcc: File does not exist 'src/mudlet_alpha.qrc'
is that what I was supposed to type? :P

because when I type qmake-qt4 without any arguments it acts as if I typed qmake-qt4 -h...
Last edited by Newbe on Fri Nov 27, 2009 11:44 am, edited 1 time in total.

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Trying to compile.

Post by Heiko »

You need to copy the original src.pro file to mudlet/src first because you changed its content.
Then change into mudlet/src and type qmake-qt4 in this directory.

Newbe
Posts: 11
Joined: Fri Nov 27, 2009 10:29 am

Re: Trying to compile.

Post by Newbe »

OH. I didn't know I had to be in src directory. ;)
Now it's compiling, no errors so far :D

//edit: Hurray! It compiled without errors and successfully connected to mud :))

Thanks for help!

redt
Posts: 36
Joined: Mon Jul 12, 2010 7:19 pm

Re: Trying to compile.

Post by redt »

Well, I'm still trying to compile the latest version of Mudlet for Lucid.

Got the latest source code from git and followed the Compile directions.

This is the error I got:
red@red-desktop:/mudlet$ sudo ./build.sh
[sudo] password for red:
2 coress found using them to build Mudlet\n
2 coress found using them to build Mudlet\n
J=2
make: *** No rule to make target `clean'. Stop.
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:70 (MESSAGE):
Could NOT find Lua51 (missing: LUA_LIBRARIES LUA_INCLUDE_DIR)
Call Stack (most recent call first):
/home/red/mudlet/cmake/FindLua51.cmake:60 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:162 (FIND_PACKAGE)


-- Configuring incomplete, errors occurred!
This is what I've got on my system:

lua5.1.4-5
liblua5.1-sql-sqlite3-2 v2.2.0
liblua5.1-rex-pcre-dev 2.4.0-1
liblua5.1-0 v.5.1.4-5
liblua5.1-rex-pcre0 v.2.4.0-1

Which additional package(s) do I still need... there are so many of them?

Or am I doing it all wrong?

When I looked at the option of using Qmake instead and followed the directions here, I got tons of errors:
red@red-desktop:~/mudlet/src$ qmake-qt4
red@red-desktop:~/mudlet/src$ make
/usr/bin/uic-qt4 ui/connection_profiles.ui -o ui_connection_profiles.h
/usr/bin/uic-qt4 ui/main_window.ui -o ui_main_window.h
/usr/bin/uic-qt4 ui/trigger_editor.ui -o ui_trigger_editor.h
/usr/bin/uic-qt4 ui/options_area_triggers.ui -o ui_options_area_triggers.h
/usr/bin/uic-qt4 ui/options_area_timers.ui -o ui_options_area_timers.h
/usr/bin/uic-qt4 ui/options_area_aliases.ui -o ui_options_area_aliases.h
/usr/bin/uic-qt4 ui/options_area_scripts.ui -o ui_options_area_scripts.h
/usr/bin/uic-qt4 ui/triggers_main_area.ui -o ui_triggers_main_area.h
/usr/bin/uic-qt4 ui/scripts_main_area.ui -o ui_scripts_main_area.h
/usr/bin/uic-qt4 ui/aliases_main_area.ui -o ui_aliases_main_area.h
/usr/bin/uic-qt4 ui/system_message_area.ui -o ui_system_message_area.h
/usr/bin/uic-qt4 ui/source_editor_area.ui -o ui_source_editor_area.h
/usr/bin/uic-qt4 ui/extended_search_area.ui -o ui_extended_search_area.h
/usr/bin/uic-qt4 ui/actions_main_area.ui -o ui_actions_main_area.h
/usr/bin/uic-qt4 ui/options_area_actions.ui -o ui_options_area_actions.h
/usr/bin/uic-qt4 ui/timers_main_area.ui -o ui_timers_main_area.h
/usr/bin/uic-qt4 ui/about_dialog.ui -o ui_about_dialog.h
/usr/bin/uic-qt4 ui/keybindings_main_area.ui -o ui_keybindings_main_area.h
/usr/bin/uic-qt4 ui/color_trigger.ui -o ui_color_trigger.h
/usr/bin/uic-qt4 ui/notes_editor.ui -o ui_notes_editor.h
/usr/bin/uic-qt4 ui/trigger_pattern_edit.ui -o ui_trigger_pattern_edit.h
/usr/bin/uic-qt4 ui/composer.ui -o ui_composer.h
/usr/bin/uic-qt4 ui/mapper.ui -o ui_mapper.h
/usr/bin/uic-qt4 ui/profile_preferences.ui -o ui_profile_preferences.h
g++ -c -pipe -O2 -O3 -w -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I/usr/include/lua5.1 -I/usr/X11R6/include -Itmp -I. -o tmp/TConsole.o TConsole.cpp
In file included from TConsole.h:36,
from TConsole.cpp:24:
ctelnet.h:29:18: error: zlib.h: No such file or directory
In file included from TriggerUnit.h:24,
from Host.h:36,
from TCommandLine.h:32,
from TConsole.h:37,
from TConsole.cpp:24:
TTrigger.h:40:18: error: pcre.h: No such file or directory
In file included from TScript.h:39,
from ScriptUnit.h:24,
from Host.h:38,
from TCommandLine.h:32,
from TConsole.h:37,
from TConsole.cpp:24:
TLuaInterpreter.h:34:21: error: lua.h: No such file or directory
TLuaInterpreter.h:35:24: error: lualib.h: No such file or directory
TLuaInterpreter.h:36:25: error: lauxlib.h: No such file or directory
In file included from TConsole.h:36,
from TConsole.cpp:24:
ctelnet.h:151: error: ‘z_stream’ does not name a type
In file included from TriggerUnit.h:24,
from Host.h:36,
from TCommandLine.h:32,
from TConsole.h:37,
from TConsole.cpp:24:
TTrigger.h:165: error: ‘pcre’ was not declared in this scope
TTrigger.h:165: error: template argument 2 is invalid
In file included from TScript.h:39,
from ScriptUnit.h:24,
from Host.h:38,
from TCommandLine.h:32,
from TConsole.h:37,
from TConsole.cpp:24:
TLuaInterpreter.h:114: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:115: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:116: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:117: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:118: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:119: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:120: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:121: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:122: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:123: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:124: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:125: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:126: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:127: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:128: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:129: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:131: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:132: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:133: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:134: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:135: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:136: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:137: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:138: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:139: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:140: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:141: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:142: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:143: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:144: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:145: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:146: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:147: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:148: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:149: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:150: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:151: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:152: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:153: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:154: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:155: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:156: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:157: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:158: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:159: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:160: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:161: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:162: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:163: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:164: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:165: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:166: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:167: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:168: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:169: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:170: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:171: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:172: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:173: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:174: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:175: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:176: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:177: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:178: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:179: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:180: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:181: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:182: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:183: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:184: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:185: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:186: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:187: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:188: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:189: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:190: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:191: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:192: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:193: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:194: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:195: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:196: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:197: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:198: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:199: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:200: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:201: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:202: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:203: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:204: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:205: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:206: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:207: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:208: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:209: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:210: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:211: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:212: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:213: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:214: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:215: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:216: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:217: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:218: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:219: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:220: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:221: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:222: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:223: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:224: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:225: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:226: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:227: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:228: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:229: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:230: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:231: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:232: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:233: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:234: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:235: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:236: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:237: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:238: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:239: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:240: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:241: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:242: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:243: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:244: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:245: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:246: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:247: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:248: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:249: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:250: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:253: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:254: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:255: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:256: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:257: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:258: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:259: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:260: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:261: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:262: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:263: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:264: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:265: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:266: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:267: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:268: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:269: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:270: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:271: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:272: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:273: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:274: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:275: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:276: error: ‘lua_State’ has not been declared
TLuaInterpreter.h:284: error: ‘lua_State’ was not declared in this scope
TLuaInterpreter.h:284: error: template argument 1 is invalid
TLuaInterpreter.h:284: error: template argument 3 is invalid
TLuaInterpreter.h:284: error: template argument 4 is invalid
In file included from TScript.h:39,
from ScriptUnit.h:24,
from Host.h:38,
from TCommandLine.h:32,
from TConsole.h:37,
from TConsole.cpp:24:
TLuaInterpreter.h:327: error: ISO C++ forbids declaration of ‘lua_State’ with no type
TLuaInterpreter.h:327: error: expected ‘;’ before ‘*’ token
TLuaInterpreter.h:328: error: ISO C++ forbids declaration of ‘lua_State’ with no type
TLuaInterpreter.h:328: error: expected ‘;’ before ‘*’ token
TLuaInterpreter.h:338: error: ISO C++ forbids declaration of ‘lua_State’ with no type
TLuaInterpreter.h:338: error: expected ‘;’ before ‘*’ token
TLuaInterpreter.h:339: error: ISO C++ forbids declaration of ‘lua_State’ with no type
TLuaInterpreter.h:339: error: expected ‘;’ before ‘*’ token
TLuaInterpreter.h:340: error: ISO C++ forbids declaration of ‘lua_State’ with no type
TLuaInterpreter.h:340: error: expected ‘;’ before ‘*’ token
TLuaInterpreter.h:341: error: ISO C++ forbids declaration of ‘lua_State’ with no type
TLuaInterpreter.h:341: error: expected ‘;’ before ‘*’ token
TLuaInterpreter.h:342: error: ISO C++ forbids declaration of ‘lua_State’ with no type
TLuaInterpreter.h:342: error: expected ‘;’ before ‘*’ token
In file included from AliasUnit.h:24,
from Host.h:39,
from TCommandLine.h:32,
from TConsole.h:37,
from TConsole.cpp:24:
TAlias.h:80: error: ISO C++ forbids declaration of ‘pcre’ with no type
TAlias.h:80: error: expected ‘;’ before ‘*’ token
make: *** [tmp/TConsole.o] Error 1
Here, I don't even know where to start.

User avatar
Vadi
Posts: 5050
Joined: Sat Mar 14, 2009 3:13 pm

Re: Trying to compile.

Post by Vadi »

You need lua-dev, pcre-dev packages to start with. Latest git also requires some version of libboost (don't recall which, but I posted here) and qt4 dev as well.

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Trying to compile.

Post by Heiko »

You cannot use cmake at the momement.
cd src
qmake
make
./mudlet

additional deps compared to previous versions:
- libboost-dev
- libyajl
- libqt4opengl-dev (this one will draw further opengl dependencies)

redt
Posts: 36
Joined: Mon Jul 12, 2010 7:19 pm

Re: Trying to compile.

Post by redt »

Thanks, almost there, I hope
red@red-desktop:/mudlet/src$ sudo qmake
red@red-desktop:/mudlet/src$ make
/usr/bin/uic-qt4 ui/connection_profiles.ui -o ui_connection_profiles.h
Could not create output file
make: *** [ui_connection_profiles.h] Error 1
red@red-desktop:/mudlet/src$
Looks like I'm still missing something.

Would the fact that I have Mudlet 1.1.0 already running have anything to do with it?

Also, I was just playing with QT Designer and it's pretty neat stuff

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Trying to compile.

Post by Heiko »

Don't use sudo qmake, just qmake as a regular user.
run this as root user:
chown -R red mudlet/src

redt
Posts: 36
Joined: Mon Jul 12, 2010 7:19 pm

Re: Trying to compile.

Post by redt »

Perfect! Thanks man!

Finally got it compiled.

Amazing how you can keep track of all those files and keep them all together.

This is getting to be an awesome Client with unparalleled support, that's for sure...

Thanks again

redt
Posts: 36
Joined: Mon Jul 12, 2010 7:19 pm

Lua syntax error

Post by redt »

Mudlet 1.2.0 kept on crushing on me in a frequency that made playing the game virtually impossible.

So I reinstalled v.1.1.0, so I can play the game.

Still want to clean up several issues rather than deleting them from the system.

First, I have this error in "Map" folder, script "init":
Lua syntax error:[string "---..."]:51:attempt to call global 'getMainConsoleWidth' (a nil value)
Script:
Code: [show] | [select all] lua
chatStartup()
mk_create_map()
send("config screenwidth 0")
send("config pagelength 250")
How would I fix this? Where would I start to look?

Post Reply