Raised This Month: $ Target: $400
 0% 

unable to compile amxmodx


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 08-14-2012 , 19:35   unable to compile amxmodx
Reply With Quote #1

i tried to compile amxmodx and got bunch of errors and warnings
Code:
root@server1:~/amxmodx-1.8.1/amxmodx# make
mkdir -p Release
make amxmodx
make[1]: Entering directory `/root/amxmodx-1.8.1/amxmodx'
gcc -I. -I../hlsdk-2.3-p3/multiplayer -I../hlsdk-2.3-p3/multiplayer/dlls -I../hlsdk-2.3-p3/multiplayer/engine -I../hlsdk-2.3-p3/multiplayer/game_shared -I../hlsdk-2.3-p3/multiplayer/game_shared -I../metamod-1.19/metamod -Lzlib -I../hlsdk-2.3-p3/multiplayer/common -O2 -fno-strict-aliasing -funroll-loops -s -fomit-frame-pointer -pipe -DNDEBUG  -fvisibility=hidden -fvisibility-inlines-hidden -march=i586 -DLINUX -DAMX_NOPROPLIST -Wall -Werror -DHAVE_STDINT_H -static-libgcc -fno-rtti -fno-exceptions -DPAWN_CELL_SIZE=32 -DJIT -DASM32 -m32 -o Release/meta_api.o -c meta_api.cpp
cc1plus: warnings being treated as errors
In file included from amxmodx.h:42,
                 from meta_api.cpp:40:
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:29: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:30: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:31: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:32: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:33: error: ignoring #pragma warning
In file included from ../metamod-1.19/metamod/sdk_util.h:55,
                 from ../metamod-1.19/metamod/dllapi.h:40,
                 from ../metamod-1.19/metamod/meta_api.h:40,
                 from amxmodx.h:43,
                 from meta_api.cpp:40:
../hlsdk-2.3-p3/multiplayer/dlls/util.h:249: error: 'typedef' was ignored in this declaration
In file included from ../metamod-1.19/metamod/dllapi.h:41,
                 from ../metamod-1.19/metamod/meta_api.h:40,
                 from amxmodx.h:43,
                 from meta_api.cpp:40:
../metamod-1.19/metamod/osdep.h: In function 'char* DLERROR()':
../metamod-1.19/metamod/osdep.h:141: error: deprecated conversion from string constant to 'char*'
In file included from ../metamod-1.19/metamod/dllapi.h:41,
                 from ../metamod-1.19/metamod/meta_api.h:40,
                 from amxmodx.h:43,
                 from meta_api.cpp:40:
../metamod-1.19/metamod/osdep.h: In function 'int THREAD_CREATE(THREAD_T*, void (*)())':
../metamod-1.19/metamod/osdep.h:297: error: deprecated conversion from string constant to 'char*'
../metamod-1.19/metamod/osdep.h:302: error: deprecated conversion from string constant to 'char*'
../metamod-1.19/metamod/osdep.h: In function 'int MUTEX_INIT(MUTEX_T*)':
../metamod-1.19/metamod/osdep.h:329: error: deprecated conversion from string constant to 'char*'
../metamod-1.19/metamod/osdep.h: In function 'int MUTEX_LOCK(MUTEX_T*)':
../metamod-1.19/metamod/osdep.h:336: error: deprecated conversion from string constant to 'char*'
../metamod-1.19/metamod/osdep.h: In function 'int MUTEX_UNLOCK(MUTEX_T*)':
../metamod-1.19/metamod/osdep.h:343: error: deprecated conversion from string constant to 'char*'
../metamod-1.19/metamod/osdep.h: In function 'int COND_INIT(COND_T*)':
../metamod-1.19/metamod/osdep.h:374: error: deprecated conversion from string constant to 'char*'
../metamod-1.19/metamod/osdep.h: In function 'int COND_WAIT(COND_T*, MUTEX_T*)':
../metamod-1.19/metamod/osdep.h:381: error: deprecated conversion from string constant to 'char*'
../metamod-1.19/metamod/osdep.h: In function 'int COND_SIGNAL(COND_T*)':
../metamod-1.19/metamod/osdep.h:388: error: deprecated conversion from string constant to 'char*'
In file included from amxmodx.h:61,
                 from meta_api.cpp:40:
CMisc.h: In constructor 'CCVar::CCVar(const char*, const char*, int, float)':
CMisc.h:53: error: deprecated conversion from string constant to 'char*'
meta_api.cpp: At global scope:
meta_api.cpp:67: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:67: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:67: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:67: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:67: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:67: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:67: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:140: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:140: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:141: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:141: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:142: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:142: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:143: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:143: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:144: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:144: error: deprecated conversion from string constant to 'char*'
meta_api.cpp: In function 'void BuildPluginFileList(const char*, CStack<String*>&)':
meta_api.cpp:202: error: deprecated conversion from string constant to 'char*'
meta_api.cpp: In function 'int C_PrecacheSound(char*)':
meta_api.cpp:285: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:286: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:287: error: deprecated conversion from string constant to 'char*'
meta_api.cpp: In function 'int C_Spawn(edict_t*)':
meta_api.cpp:366: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:367: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:461: error: deprecated conversion from string constant to 'char*'
meta_api.cpp: In function 'void C_ClientUserInfoChanged_Post(edict_t*, char*)':
meta_api.cpp:851: error: deprecated conversion from string constant to 'char*'
meta_api.cpp: In function 'int Meta_Attach(PLUG_LOADTIME, META_FUNCTIONS*, meta_globals_t*, gamedll_funcs_t*)':
meta_api.cpp:1440: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:1460: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:1462: error: deprecated conversion from string constant to 'char*'
meta_api.cpp:1466: error: deprecated conversion from string constant to 'char*'
make[1]: *** [Release/meta_api.o] Error 1
make[1]: Leaving directory `/root/amxmodx-1.8.1/amxmodx'
make: *** [all] Error 2
so i searched the forums for answers and found this Arkshines post:
Quote:
Try to add -Wno-write-strings or/and -Wno-deprecated. If not enough, try removing simply -Werror so the warning won't be count as error.
and the -Wno-write-strings part removed some errors, but thats it, removing -Werror makes it worse and -Wno-deprecated wont help
Code:
root@server1:~/amxmodx-1.8.1/amxmodx# make
mkdir -p Release
make amxmodx
make[1]: Entering directory `/root/amxmodx-1.8.1/amxmodx'
gcc -I. -I../hlsdk-2.3-p3/multiplayer -I../hlsdk-2.3-p3/multiplayer/dlls -I../hlsdk-2.3-p3/multiplayer/engine -I../hlsdk-2.3-p3/multiplayer/game_shared -I../hlsdk-2.3-p3/multiplayer/game_shared -I../metamod-1.19/metamod -Lzlib -I../hlsdk-2.3-p3/multiplayer/common -O2 -fno-strict-aliasing -funroll-loops -s -fomit-frame-pointer -pipe -DNDEBUG  -fvisibility=hidden -fvisibility-inlines-hidden -march=i586 -DLINUX -DAMX_NOPROPLIST -Wall -Werror -DHAVE_STDINT_H -static-libgcc -fno-rtti -fno-exceptions -Wno-write-strings -DPAWN_CELL_SIZE=32 -DJIT -DASM32 -m32 -o Release/meta_api.o -c meta_api.cpp
cc1plus: warnings being treated as errors
In file included from amxmodx.h:42,
                 from meta_api.cpp:40:
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:29: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:30: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:31: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:32: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:33: error: ignoring #pragma warning
In file included from ../metamod-1.19/metamod/sdk_util.h:55,
                 from ../metamod-1.19/metamod/dllapi.h:40,
                 from ../metamod-1.19/metamod/meta_api.h:40,
                 from amxmodx.h:43,
                 from meta_api.cpp:40:
../hlsdk-2.3-p3/multiplayer/dlls/util.h:249: error: 'typedef' was ignored in this declaration
make[1]: *** [Release/meta_api.o] Error 1
make[1]: Leaving directory `/root/amxmodx-1.8.1/amxmodx'
make: *** [all] Error 2
any ideas what could be wrong?
jimaway is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-15-2012 , 02:15   Re: unable to compile amxmodx
Reply With Quote #2

"cc1plus: warnings being treated as errors" ; it seems you did not add what I've said. Add them and show the output.
__________________
Arkshine is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 08-15-2012 , 05:32   Re: unable to compile amxmodx
Reply With Quote #3

heres the CFLAGS
Code:
CFLAGS += -DLINUX -DAMX_NOPROPLIST -Wall -Werror -DHAVE_STDINT_H -static-libgcc -fno-rtti -fno-exceptions -Wno-write-strings -Wno-deprecated
output:
Code:
make amxmodx
make[1]: Entering directory `/root/amxmodx-1.8.1/amxmodx'
gcc -I. -I../hlsdk-2.3-p3/multiplayer -I../hlsdk-2.3-p3/multiplayer/dlls -I../hlsdk-2.3-p3/multiplayer/engine -I../hlsdk-2.3-p3/multiplayer/game_shared -I../hlsdk-2.3-p3/multiplayer/game_shared -I../metamod-1.19/metamod -Lzlib -I../hlsdk-2.3-p3/multiplayer/common -O2 -fno-strict-aliasing -funroll-loops -s -fomit-frame-pointer -pipe -DNDEBUG  -fvisibility=hidden -fvisibility-inlines-hidden -march=i586 -DLINUX -DAMX_NOPROPLIST -Wall -Werror -DHAVE_STDINT_H -static-libgcc -fno-rtti -fno-exceptions -Wno-write-strings -Wno-deprecated -DPAWN_CELL_SIZE=32 -DJIT -DASM32 -m32 -o Release/meta_api.o -c meta_api.cpp
cc1plus: warnings being treated as errors
In file included from amxmodx.h:42,
                 from meta_api.cpp:40:
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:29: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:30: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:31: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:32: error: ignoring #pragma warning
../hlsdk-2.3-p3/multiplayer/dlls/extdll.h:33: error: ignoring #pragma warning
In file included from ../metamod-1.19/metamod/sdk_util.h:55,
                 from ../metamod-1.19/metamod/dllapi.h:40,
                 from ../metamod-1.19/metamod/meta_api.h:40,
                 from amxmodx.h:43,
                 from meta_api.cpp:40:
../hlsdk-2.3-p3/multiplayer/dlls/util.h:249: error: 'typedef' was ignored in this declaration
make[1]: *** [Release/meta_api.o] Error 1
make[1]: Leaving directory `/root/amxmodx-1.8.1/amxmodx'
make: *** [all] Error 2
like i said i did also try removing -Werror, but that made it worse (it spammed so much warnings and stuff in output that im even unable to copy that all) it did create an amxmodx_mm_i386.so at the end of those warnings, but its corrupted and wont load on a server

Last edited by jimaway; 08-15-2012 at 05:35.
jimaway is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-15-2012 , 05:44   Re: unable to compile amxmodx
Reply With Quote #4

Remove -Werror so. HLSDK has a lot of warnings you can ignore. If it compiles, it's fine.
__________________
Arkshine is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 08-15-2012 , 06:08   Re: unable to compile amxmodx
Reply With Quote #5

well its not file, the compiled .so file is 6KB smaller (i havent edited anything) than the one i could download from sourceforge and it will give bad load if put on a server

maybe im using wrong version of HLSDK? (im using hlsdk-2.3-p3)

Last edited by jimaway; 08-15-2012 at 06:10.
jimaway is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-15-2012 , 06:19   Re: unable to compile amxmodx
Reply With Quote #6

Size doesn't matter. You don't compile probably the same way and don't use the same compiler.

Attach your .so here.
__________________

Last edited by Arkshine; 08-15-2012 at 06:20.
Arkshine is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 08-15-2012 , 06:23   Re: unable to compile amxmodx
Reply With Quote #7

here it is:

edit: so you're saying it might be because im using gcc-4.4 not gcc-4.1?
Attached Files
File Type: so amxmodx_mm_i386.so (510.0 KB, 106 views)

Last edited by jimaway; 08-15-2012 at 06:26.
jimaway is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-15-2012 , 06:29   Re: unable to compile amxmodx
Reply With Quote #8

The .so has this error "undefined symbol: _Z9atcprintfIiiEjPT_jPKT0_P6tagAMXPiS7_"

It reminds me this thread : http://forums.alliedmods.net/showthread.php?t=169500, but I have not tried to investigate more, because it was compiling/running fine for me.
__________________
Arkshine is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 08-15-2012 , 07:44   Re: unable to compile amxmodx
Reply With Quote #9

i tried to compile it on windows now and i keep getting
Code:
./sclinux.h:52:3: error: #error "Can't figure computer byte order (__BYTE_ORDER macro not found)"
is it even possible to compile linux binarys on windows machine?

nvm found this: http://metamod-p.sourceforge.net/cro...for.linux.html
gonna try it out

Last edited by jimaway; 08-15-2012 at 07:54.
jimaway is offline
fanta110
Member
Join Date: May 2010
Old 08-24-2012 , 06:02   Re: unable to compile amxmodx
Reply With Quote #10

Don't want to make new thread so I will post here. I also have problem in compiling.
Here is error:
Code:
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
fanta110 is offline
Old 08-24-2012, 06:04
Arkshine
This message has been deleted by Arkshine. Reason: nvm
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:47.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode