Jusonex Posted December 22, 2011 Share Posted December 22, 2011 hey guys, I am trying to compile a module via makefile on Debian Lenny (x86). It works fine on windows, but on linux I always get this error: make: *** No rule to make target `/usr/lib/gcc/i686-pc-linux-gnu/4.2.2/include/stddef.h', needed by `CFunctions.o'. Stop." Are there any additional packages, which i need? Link to comment
x86 Posted December 23, 2011 Share Posted December 23, 2011 Have you compiled lua first ? Link to comment
Jusonex Posted December 23, 2011 Author Share Posted December 23, 2011 First I downloaded the Module SDK from https://wiki.multitheftauto.com/wiki/Modules Then I tried: make and got that error message (look at previous post). There isn't also a configure file, required for make?. On another debian lenny (x64), i got this message: make: *** No rule to make target `/usr/include/gnu/stubs-32.h', needed by `CFunctions.o'. Stop. I also tried to add all files to a Code::Blocks Project. First I got the compiler message that some header files are missing. After I put in the absolute path (include/ILuaModuleManager.h) and included 'string.h' instead of 'string' (ml_base.cpp), the library was successfully compiled. Then I loaded the module with the server and i got this message: MODULE: Unable to find modules/libml_svn.so (/home/mtasa/mta/mods/dea thmatch/modules/libml_svn.so: undefined symbol: lua_type)! I also uploaded the Code::Blocks Project including all files: http://gamer-search.dyndns.org/ml_svn.tar.gz edit: Have you compiled lua first ? Do I have to compile lua first? How? Isn't including lua.h and others headerfiles enough? Link to comment
x86 Posted December 23, 2011 Share Posted December 23, 2011 Hi, 1. mkdir ml_svn 2. cd ml_svn 3. wget http://www.greenhood.nl/download/ml_svn.zip 4. unzip ml_svn.zip 5. cd lib/lua51/ 6. make linux 7. make install 8. cd ../.. 9. make 10. cp ml_svn.so /home/your/mta/server/mods/deathmatch/modules/ I have tested compiling, please let me know if you have any problems. x86 Link to comment
Jusonex Posted December 24, 2011 Author Share Posted December 24, 2011 First of all, thank you. If i try to compile lua, i'll get the output that there's a dependency to readline. Because of that I downloaded readline from http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html (I tried 6.2&6.3), but if I now try to compile lua, i'll get this output: make[1]: Entering directory `/root/ml_svn/lib/lua51/src' make all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" make[2]: Entering directory `/root/ml_svn/lib/lua51/src' gcc -o lua lua.o liblua.a -lm -Wl,-E -ldl -lreadline -lhistory -lncurses /usr/bin/ld: cannot find -lreadline collect2: ld returned 1 exit status make[2]: *** [lua] Error 1 make[2]: Leaving directory `/root/ml_svn/lib/lua51/src' make[1]: *** [linux] Error 2 make[1]: Leaving directory `/root/ml_svn/lib/lua51/src' make: *** [linux] Error 2 I moved readline's source to /usr/local/include/readline/ and I also tried to compile readline and moved the compiled libraries to /usr/local/libs/, but the output is always the same. Link to comment
x86 Posted December 24, 2011 Share Posted December 24, 2011 Hi, Seems like you are missing some packages. Do this: apt-get install libreadline5-dev libncurses5-dev x86 Link to comment
Jusonex Posted December 24, 2011 Author Share Posted December 24, 2011 Okay, thank you very much. It works. Merry Christmas edit: it's maybe useful to add your "tutorial" to the wiki. Link to comment
x86 Posted December 24, 2011 Share Posted December 24, 2011 Glad to hear it works, merry christmas too x86 Link to comment
Gallardo9944 Posted December 9, 2014 Share Posted December 9, 2014 Hello. I'm trying to compile ml_base on Wheezy. This is what I'm getting after doing "make" in the module dir: gallardo@er-mta:~/ml_base$ make gcc -g -MD -Wall -I./ -m32 -c -o CFunctions.o CFunctions.cpp gcc -g -MD -Wall -I./ -m32 -c -o CThread.o CThread.cpp gcc -g -MD -Wall -I./ -m32 -c -o CThreadData.o CThreadData.cpp gcc -g -MD -Wall -I./ -m32 -c -o ml_base.o ml_base.cpp gcc -g -MD -Wall -I./ -m32 -fPIC -shared -Wl,-soname,ml_base.so.1,-R./ -o ml_base.so ./CFunctions.o ./CThread.o ./CThreadData.o ./ml_base.o -lpthread -lstdc++ -llua /usr/bin/ld: skipping incompatible /usr/local/lib/liblua.a when searching for -llua /usr/bin/ld: cannot find -llua Any solutions? Thanks. lua5.1 is installed, so are all the things for building default mta server Link to comment
Recommended Posts