Raised This Month: $32 Target: $400
 8% 

How to build amxx 183 with github?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VolodyaCS
Junior Member
Join Date: Oct 2017
Old 10-14-2017 , 05:52   How to build amxx 183 with github?
Reply With Quote #1

apt-get -y install g++ gcc lib32z1 lib32z1-dev libc6-dev-i386 libc6-i386 gcc-multilib g++-multilib

1.
Quote:
cd /tmp
wget https://raw.githubusercontent.com/al...eckout-deps.sh
bash checkout-deps.sh
cd amxmodx
mkdir build
cd build
python /tmp/amxmodx/configure.py --no-mysql
cd ..
ambuild build

Error build: error: unknown type name ‘off_t’
Ok. Reboot machine
reboot

2.
Quote:
cd /tmp
git clone https://github.com/alliedmodders/ambuild
git clone https://github.com/alliedmodders/metamod-hl1
git clone https://github.com/alliedmodders/hlsdk
git clone https://github.com/alliedmodders/amxmodx
cd ambuild
python setup.py install
cd ..
cd amxmodx
mkdir build
cd build
python /tmp/amxmodx/configure.py --no-mysql
cd ..
ambuild build

Error build: error: unknown type name ‘off_t’
Please, help compile

Last edited by VolodyaCS; 10-14-2017 at 05:53.
VolodyaCS is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 10-14-2017 , 06:03   Re: How to build amxx 183 with github?
Reply With Quote #2

It's like that since the UTF8 update and I think it's only a problem with GCC.
You can just #include <sys/types.h> in files that require off_t, that should fix it.

Last edited by klippy; 10-14-2017 at 06:04.
klippy is offline
VolodyaCS
Junior Member
Join Date: Oct 2017
Old 10-14-2017 , 06:23   Re: How to build amxx 183 with github?
Reply With Quote #3

Quote:
Originally Posted by KliPPy View Post
It's like that since the UTF8 update and I think it's only a problem with GCC.
You can just #include <sys/types.h> in files that require off_t, that should fix it.

did not help

Quote:
gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609

Quote:
/tmp/amxmodx/third_party/utf8rewind/utf8rewind.c: In function ‘utf8envlocale’:
/tmp/amxmodx/third_party/utf8rewind/utf8rewind.c:580:4: error: implicit declaration of function ‘strncasecmp’ [-Werror=implicit-function-declaration]
!strncasecmp(locale, _name, 5)
^
/tmp/amxmodx/third_party/utf8rewind/utf8rewind.c:589:6: note: in expansion of macro ‘UTF8_LOCALE_CHECK’
if (UTF8_LOCALE_CHECK("lt_lt", 1257, 775))
^
cc1: all warnings being treated as errors
i added #include <sys/types.h> in utf8rewind.h
VolodyaCS is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-14-2017 , 06:39   Re: How to build amxx 183 with github?
Reply With Quote #4

Just tried to compile with gcc 5.4 and it compiles fine for me.

Code:
/home/sdk/amxmodx/build# export CC=gcc; export CXX=g++ (was using clang before)
/home/sdk/amxmodx/build# python ../configure.py --enable-optimize
Checking CC compiler (vendor test gcc)... ['gcc', 'test.c', '-o', 'test']
found gcc version 5.4
Checking CXX compiler (vendor test gcc)... ['g++', 'test.cpp', '-o', 'testp']
found gcc version 5.4
/home/sdk/amxmodx/build# ambuild
[...]
Build succeeded.
__________________

Last edited by Arkshine; 10-14-2017 at 07:26.
Arkshine is offline
VolodyaCS
Junior Member
Join Date: Oct 2017
Old 10-14-2017 , 07:44   Re: How to build amxx 183 with github?
Reply With Quote #5

Arkshine,
Code:
root@History:/tmp/amxmodx# cd build
root@History:/tmp/amxmodx/build# export CC=gcc; export CXX=g++
root@History:/tmp/amxmodx/build# python ../configure.py --enable-optimize
Checking CC compiler (vendor test gcc)... ['gcc', 'test.c', '-o', 'test']
found gcc version 5.4
Checking CXX compiler (vendor test gcc)... ['g++', 'test.cpp', '-o', 'testp']
found gcc version 5.4
root@History:/tmp/amxmodx/build# ambuild
[create] mkdir -p modules/mysqlx
[create] mkdir -p modules/mysqlx/mysql_amxx_i386
Spawned taskmaster (pid: 2079)
Spawned worker (pid: 2085)
Spawned worker (pid: 2086)
Spawned worker (pid: 2084)
Spawned worker (pid: 2088)
Spawned worker (pid: 2087)
[2085] gcc -pipe -fno-strict-aliasing -Wall -Werror -Wno-uninitialized -Wno-unused -Wno-switch -Wno-format -Wno-format-security -m32 -fvisibility=hidden -Wno-narrowing -Wno-unused-result -Wno-error=sign-compare -Wno-parentheses -O2 -g3 -ggdb3 -std=c99 -DNDEBUG -D_LINUX -DPOSIX -DLINUX -DAMX_NOPROPLIST -DPAWN_CELL_SIZE=32 -DAMXMODX_BUILD -DAMXX_USE_VERSIONLIB -DAMXX_GENERATED_BUILD -DUTF8REWINDS_EXPORTS -I /tmp/amxmodx/build/includes -I /tmp/amxmodx/support/versionlib -I /tmp/amxmodx/public -I /tmp/amxmodx/public/sdk -I /tmp/amxmodx/public/amtl -I /tmp/amxmodx/public/amtl/amtl -I /tmp/amxmodx/public/memtools -I /tmp/amxmodx/third_party -I /tmp/amxmodx/third_party/hashing -I /tmp/amxmodx/third_party/zlib -I /tmp/amxmodx/third_party/utf8rewind -I /tmp/amxmodx/third_party/utf8rewind -H -c /tmp/amxmodx/third_party/utf8rewind/internal/streaming.c -o internal_streaming.o
In file included from /tmp/amxmodx/third_party/utf8rewind/internal/streaming.h:36:0,
                 from /tmp/amxmodx/third_party/utf8rewind/internal/streaming.c:26:
/tmp/amxmodx/third_party/utf8rewind/utf8rewind.h:1119:89: error: unknown type name ‘off_t’
 UTF8_API const char* utf8seek(const char* text, size_t textSize, const char* textStart, off_t offset, int direction);
                                                                                         ^
[2084] gcc -pipe -fno-strict-aliasing -Wall -Werror -Wno-uninitialized -Wno-unused -Wno-switch -Wno-format -Wno-format-security -m32 -fvisibility=hidden -Wno-narrowing -Wno-unused-result -Wno-error=sign-compare -Wno-parentheses -O2 -g3 -ggdb3 -std=c99 -DNDEBUG -D_LINUX -DPOSIX -DLINUX -DAMX_NOPROPLIST -DPAWN_CELL_SIZE=32 -DAMXMODX_BUILD -DAMXX_USE_VERSIONLIB -DAMXX_GENERATED_BUILD -DUTF8REWINDS_EXPORTS -I /tmp/amxmodx/build/includes -I /tmp/amxmodx/support/versionlib -I /tmp/amxmodx/public -I /tmp/amxmodx/public/sdk -I /tmp/amxmodx/public/amtl -I /tmp/amxmodx/public/amtl/amtl -I /tmp/amxmodx/public/memtools -I /tmp/amxmodx/third_party -I /tmp/amxmodx/third_party/hashing -I /tmp/amxmodx/third_party/zlib -I /tmp/amxmodx/third_party/utf8rewind -I /tmp/amxmodx/third_party/utf8rewind -H -c /tmp/amxmodx/third_party/utf8rewind/internal/decomposition.c -o internal_decomposition.o
In file included from /tmp/amxmodx/third_party/utf8rewind/internal/decomposition.h:36:0,
                 from /tmp/amxmodx/third_party/utf8rewind/internal/decomposition.c:26:
/tmp/amxmodx/third_party/utf8rewind/utf8rewind.h:1119:89: error: unknown type name ‘off_t’
 UTF8_API const char* utf8seek(const char* text, size_t textSize, const char* textStart, off_t offset, int direction);
                                                                                         ^
[2086] gcc -pipe -fno-strict-aliasing -Wall -Werror -Wno-uninitialized -Wno-unused -Wno-switch -Wno-format -Wno-format-security -m32 -fvisibility=hidden -Wno-narrowing -Wno-unused-result -Wno-error=sign-compare -Wno-parentheses -O2 -g3 -ggdb3 -std=c99 -DNDEBUG -D_LINUX -DPOSIX -DLINUX -DAMX_NOPROPLIST -DPAWN_CELL_SIZE=32 -DAMXMODX_BUILD -DAMXX_USE_VERSIONLIB -DAMXX_GENERATED_BUILD -DUTF8REWINDS_EXPORTS -I /tmp/amxmodx/build/includes -I /tmp/amxmodx/support/versionlib -I /tmp/amxmodx/public -I /tmp/amxmodx/public/sdk -I /tmp/amxmodx/public/amtl -I /tmp/amxmodx/public/amtl/amtl -I /tmp/amxmodx/public/memtools -I /tmp/amxmodx/third_party -I /tmp/amxmodx/third_party/hashing -I /tmp/amxmodx/third_party/zlib -I /tmp/amxmodx/third_party/utf8rewind -I /tmp/amxmodx/third_party/utf8rewind -H -c /tmp/amxmodx/third_party/utf8rewind/internal/seeking.c -o internal_seeking.o
In file included from /tmp/amxmodx/third_party/utf8rewind/internal/seeking.h:36:0,
                 from /tmp/amxmodx/third_party/utf8rewind/internal/seeking.c:26:
/tmp/amxmodx/third_party/utf8rewind/utf8rewind.h:1119:89: error: unknown type name ‘off_t’
 UTF8_API const char* utf8seek(const char* text, size_t textSize, const char* textStart, off_t offset, int direction);
                                                                                         ^
In file included from /tmp/amxmodx/third_party/utf8rewind/internal/seeking.c:26:0:
/tmp/amxmodx/third_party/utf8rewind/internal/seeking.h:38:88: error: unknown type name ‘off_t’
 const char* seeking_forward(const char* input, const char* inputEnd, size_t inputSize, off_t offset);
                                                                                        ^
/tmp/amxmodx/third_party/utf8rewind/internal/seeking.h:40:89: error: unknown type name ‘off_t’
 const char* seeking_rewind(const char* inputStart, const char* input, size_t inputSize, off_t offset);
                                                                                         ^
/tmp/amxmodx/third_party/utf8rewind/internal/seeking.c:30:88: error: unknown type name ‘off_t’
 const char* seeking_forward(const char* input, const char* inputEnd, size_t inputSize, off_t offset)
                                                                                        ^
/tmp/amxmodx/third_party/utf8rewind/internal/seeking.c:83:89: error: unknown type name ‘off_t’
 const char* seeking_rewind(const char* inputStart, const char* input, size_t inputSize, off_t offset)
                                                                                         ^
[2088] gcc -pipe -fno-strict-aliasing -Wall -Werror -Wno-uninitialized -Wno-unused -Wno-switch -Wno-format -Wno-format-security -m32 -fvisibility=hidden -Wno-narrowing -Wno-unused-result -Wno-error=sign-compare -Wno-parentheses -O2 -g3 -ggdb3 -std=c99 -DNDEBUG -D_LINUX -DPOSIX -DLINUX -DAMX_NOPROPLIST -DPAWN_CELL_SIZE=32 -DAMXMODX_BUILD -DAMXX_USE_VERSIONLIB -DAMXX_GENERATED_BUILD -DUTF8REWINDS_EXPORTS -I /tmp/amxmodx/build/includes -I /tmp/amxmodx/support/versionlib -I /tmp/amxmodx/public -I /tmp/amxmodx/public/sdk -I /tmp/amxmodx/public/amtl -I /tmp/amxmodx/public/amtl/amtl -I /tmp/amxmodx/public/memtools -I /tmp/amxmodx/third_party -I /tmp/amxmodx/third_party/hashing -I /tmp/amxmodx/third_party/zlib -I /tmp/amxmodx/third_party/utf8rewind -I /tmp/amxmodx/third_party/utf8rewind -H -c /tmp/amxmodx/third_party/utf8rewind/internal/database.c -o internal_database.o
In file included from /tmp/amxmodx/third_party/utf8rewind/internal/database.h:36:0,
                 from /tmp/amxmodx/third_party/utf8rewind/internal/database.c:26:
/tmp/amxmodx/third_party/utf8rewind/utf8rewind.h:1119:89: error: unknown type name ‘off_t’
 UTF8_API const char* utf8seek(const char* text, size_t textSize, const char* textStart, off_t offset, int direction);
                                                                                         ^
[2087] gcc -pipe -fno-strict-aliasing -Wall -Werror -Wno-uninitialized -Wno-unused -Wno-switch -Wno-format -Wno-format-security -m32 -fvisibility=hidden -Wno-narrowing -Wno-unused-result -Wno-error=sign-compare -Wno-parentheses -O2 -g3 -ggdb3 -std=c99 -DNDEBUG -D_LINUX -DPOSIX -DLINUX -DAMX_NOPROPLIST -DPAWN_CELL_SIZE=32 -DAMXMODX_BUILD -DAMXX_USE_VERSIONLIB -DAMXX_GENERATED_BUILD -DUTF8REWINDS_EXPORTS -I /tmp/amxmodx/build/includes -I /tmp/amxmodx/support/versionlib -I /tmp/amxmodx/public -I /tmp/amxmodx/public/sdk -I /tmp/amxmodx/public/amtl -I /tmp/amxmodx/public/amtl/amtl -I /tmp/amxmodx/public/memtools -I /tmp/amxmodx/third_party -I /tmp/amxmodx/third_party/hashing -I /tmp/amxmodx/third_party/zlib -I /tmp/amxmodx/third_party/utf8rewind -I /tmp/amxmodx/third_party/utf8rewind -H -c /tmp/amxmodx/third_party/utf8rewind/internal/composition.c -o internal_composition.o
In file included from /tmp/amxmodx/third_party/utf8rewind/internal/composition.h:36:0,
                 from /tmp/amxmodx/third_party/utf8rewind/internal/composition.c:26:
/tmp/amxmodx/third_party/utf8rewind/utf8rewind.h:1119:89: error: unknown type name ‘off_t’
 UTF8_API const char* utf8seek(const char* text, size_t textSize, const char* textStart, off_t offset, int direction);
                                                                                         ^
Build failed.
VolodyaCS is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-14-2017 , 08:26   Re: How to build amxx 183 with github?
Reply With Quote #6

I see. Actually, I had a fix locally applied in my linux installation and totally forgot about it!

I've pushed the fix: https://github.com/alliedmodders/amx...04b7decb2b10e0
By the way, AMXX uses clang to compile.

Try again?
__________________

Last edited by Arkshine; 10-14-2017 at 08:27.
Arkshine is offline
VolodyaCS
Junior Member
Join Date: Oct 2017
Old 10-14-2017 , 08:33   Re: How to build amxx 183 with github?
Reply With Quote #7

Good job, man
Quote:
Build succeeded.
VolodyaCS is offline
VolodyaCS
Junior Member
Join Date: Oct 2017
Old 10-14-2017 , 10:04   Re: How to build amxx 183 with github?
Reply With Quote #8

Quote:
Originally Posted by Arkshine View Post
By the way, AMXX uses clang to compile.
Can i use gcc only?
I am satifised with gcc. Or will there be some consequences?

Last edited by VolodyaCS; 10-14-2017 at 10:05.
VolodyaCS is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 10-14-2017 , 11:29   Re: How to build amxx 183 with github?
Reply With Quote #9

I've been using only GCC to compile AMXX for a long time.
klippy is offline
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:03.


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