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

Build amxmodx without using git to get the source code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
YuGiOhJCJ
Member
Join Date: Mar 2007
Old 08-19-2016 , 13:01   Build amxmodx without using git to get the source code
Reply With Quote #1

Hello,

I am using:
  • ambuild-965f21beb316e9f693b5236a9b33903625d673f1 [1]
  • hlsdk-a0edb7792a96998d349325bebab8ea41ec5cb239 [2]
  • metamod-hl1-18a10db686702e8ae9e0fcb5b5febf8881dc9c2d [3]
  • amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790 [4]
I have downloaded the source code of these four programs directly from my web browser on github in ZIP format.
It means that I have not used git at all.

If I try to build amxmodx then I get this error:
Code:
$ python ../configure.py --no-mysql
Checking CC compiler (vendor test gcc)... ['cc', 'test.c', '-o', 'test']
found gcc version 5.3
Checking CXX compiler (vendor test gcc)... ['c++', 'test.cpp', '-o', 'testp']
found gcc version 5.3
Traceback (most recent call last):
  File "../configure.py", line 33, in <module>
    run.Configure()
  File "/usr/lib/python2.7/site-packages/ambuild2/frontend/v2_0/prep.py", line 121, in Configure
    if not builder.generate():
  File "/usr/lib/python2.7/site-packages/ambuild2/frontend/v2_0/base/gen.py", line 274, in generate
    self.parseBuildScripts()
  File "/usr/lib/python2.7/site-packages/ambuild2/frontend/v2_0/base/gen.py", line 183, in parseBuildScripts
    self.evalScript(root)
  File "/usr/lib/python2.7/site-packages/ambuild2/frontend/v2_0/base/gen.py", line 243, in evalScript
    exec(code, new_vars)
  File "/tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/AMBuildScript", line 376, in <module>
    { 'AMXX': AMXX }
  File "/usr/lib/python2.7/site-packages/ambuild2/frontend/v2_0/base/gen.py", line 110, in RunScript
    return self.generator.evalScript(file, vars)
  File "/usr/lib/python2.7/site-packages/ambuild2/frontend/v2_0/base/gen.py", line 243, in evalScript
    exec(code, new_vars)
  File "/tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/support/Versioning", line 20, in <module>
    with open(os.path.join(builder.sourcePath, '.git', 'HEAD')) as fp:
IOError: [Errno 2] No such file or directory: '/tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/.git/HEAD'
My guess is that as I have not used git to download the amxmodx source code, the ".git" directory is missing.
And for some reason, the presence of this directory is mandatory during the build process.

Does it mean that building amxmodx without using git to get the source code is not supported?
Is there a workaround?

Thank you.
Best regards.

[1] https://github.com/alliedmodders/amb...33903625d673f1
[2] https://github.com/alliedmodders/hls...b8ea41ec5cb239
[3] https://github.com/alliedmodders/met...febf8881dc9c2d
[4] https://github.com/alliedmodders/amx...84b6d171bd2790

Last edited by YuGiOhJCJ; 08-19-2016 at 13:17.
YuGiOhJCJ is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 08-19-2016 , 14:26   Re: Build amxmodx without using git to get the source code
Reply With Quote #2

Git command line is required to build AlliedModder's projects because the versioning script has the build process run the "git" command to get the current commit's revision number + it's hash.
__________________
WildCard65 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-19-2016 , 15:34   Re: Build amxmodx without using git to get the source code
Reply With Quote #3

You can use --no-auto-versioning, it will use "manual" as version.
__________________

Last edited by Arkshine; 08-19-2016 at 15:35.
Arkshine is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 08-19-2016 , 15:45   Re: Build amxmodx without using git to get the source code
Reply With Quote #4

Quote:
Originally Posted by Arkshine View Post
You can use --no-auto-versioning, it will use "manual" as version.
I actually forgot about that flag.
__________________
WildCard65 is offline
YuGiOhJCJ
Member
Join Date: Mar 2007
Old 08-23-2016 , 07:04   Re: Build amxmodx without using git to get the source code
Reply With Quote #5

Nice thanks that's what I need.
Well, the option name is not exactly "--no-auto-versioning" but "--disable-auto-versioning".
Anyway, now the configuration step is working:
Code:
$ python ../configure.py --no-mysql --disable-auto-versioning
Checking CC compiler (vendor test gcc)... ['cc', 'test.c', '-o', 'test']
found gcc version 5.3
Checking CXX compiler (vendor test gcc)... ['c++', 'test.cpp', '-o', 'testp']
found gcc version 5.3
However, I have now an other problem in the ambuild step (I should maybe create an other thread for that):
Code:
$ ambuild
[...]
[26354] cc -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 -g3 -ggdb3 -std=c99 -D_LINUX -DPOSIX -DLINUX -DAMX_NOPROPLIST -DPAWN_CELL_SIZE=32 -DAMXMODX_BUILD -DAMXX_USE_VERSIONLIB -DSM_DEFAULT_THREADER -DHAVE_STDINT_H -Dstricmp=strcasecmp -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/public -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/public/sdk -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/public/amtl -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/public/amtl/amtl -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/public/memtools -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/third_party -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/third_party/hashing -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/third_party/zlib -H -c /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/third_party/sqlite/sqlite3.c -o _third_party_sqlite_sqlite3.o
[26355] c++ -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 -g3 -ggdb3 -Wno-invalid-offsetof -std=c++11 -fvisibility-inlines-hidden -Wno-delete-non-virtual-dtor -fno-exceptions -fno-rtti -D_LINUX -DPOSIX -DLINUX -DAMX_NOPROPLIST -DPAWN_CELL_SIZE=32 -DAMXMODX_BUILD -DAMXX_USE_VERSIONLIB -DSM_DEFAULT_THREADER -DHAVE_STDINT_H -Dstricmp=strcasecmp -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/public -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/public/sdk -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/public/amtl -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/public/amtl/amtl -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/public/memtools -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/third_party -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/third_party/hashing -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/third_party/zlib -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/modules/sqlite -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/modules/sqlite/sdk -I /tmp/build/metamod/metamod -I /tmp/build/hlsdk/common -I /tmp/build/hlsdk/dlls -I /tmp/build/hlsdk/engine -I /tmp/build/hlsdk/game_shared -I /tmp/build/hlsdk/public -I /tmp/build/hlsdk/pm_shared -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/modules/sqlite/sqlitepp -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/modules/sqlite/thread -I /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/third_party/sqlite -H -c /tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/modules/sqlite/sqlitepp/SqliteDriver.cpp -o sqlitepp_SqliteDriver.o
/tmp/build/amxmodx-e24b9548d43c2f0d09d394cc1884b6d171bd2790/modules/sqlite/sqlitepp/SqliteDriver.cpp:18:28: fatal error: amtl/am-string.h: No such file or directory
compilation terminated.
Build failed.
It seems that there is a problem to find the amtl/am-string.h file.
I found it in:
  • amtl-364541372c405ed172e7da778367a0392afdc24f [1]
However, I am unable to build amtl:
Code:
$ python ../configure.py
Checking CC compiler (vendor test gcc)... ['cc', 'test.c', '-o', 'test']
found gcc version 5.3
Checking CXX compiler (vendor test gcc)... ['c++', 'test.cpp', '-o', 'testp']
found gcc version 5.3
$ ambuild
[create] mkdir -p tests
[create] mkdir -p tests/testrunner
Spawned taskmaster (pid: 26619)
Spawned worker (pid: 26626)
Spawned worker (pid: 26627)
[26626] c++ -pipe -Wall -Werror -fvisibility=hidden -mfpmath=sse -g3 -ggdb3 -std=c++14 -fvisibility-inlines-hidden -fno-exceptions -fno-threadsafe-statics -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_LINUX -DPOSIX -I /tmp/build/amtl-364541372c405ed172e7da778367a0392afdc24f/amtl -I /tmp/build/amtl-364541372c405ed172e7da778367a0392afdc24f -H -c /tmp/build/amtl-364541372c405ed172e7da778367a0392afdc24f/tests/test-string.cpp -o test_string.o
/tmp/build/amtl-364541372c405ed172e7da778367a0392afdc24f/tests/test-string.cpp:1:0: error: SSE instruction set disabled, using 387 arithmetics [-Werror]
 // vim: set sts=8 ts=2 sw=2 tw=99 et:
 ^
cc1plus: all warnings being treated as errors
[26627] c++ -pipe -Wall -Werror -fvisibility=hidden -mfpmath=sse -g3 -ggdb3 -std=c++14 -fvisibility-inlines-hidden -fno-exceptions -fno-threadsafe-statics -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_LINUX -DPOSIX -I /tmp/build/amtl-364541372c405ed172e7da778367a0392afdc24f/amtl -I /tmp/build/amtl-364541372c405ed172e7da778367a0392afdc24f -H -c /tmp/build/amtl-364541372c405ed172e7da778367a0392afdc24f/tests/test-priority-queue.cpp -o test_priority_queue.o
/tmp/build/amtl-364541372c405ed172e7da778367a0392afdc24f/tests/test-priority-queue.cpp:1:0: error: SSE instruction set disabled, using 387 arithmetics [-Werror]
 // vim: set sts=8 ts=2 sw=2 tw=99 et:
 ^
cc1plus: all warnings being treated as errors
Build failed.
Any idea how to solve this second problem please?

[1] https://github.com/alliedmodders/amt...67a0392afdc24f
YuGiOhJCJ is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-23-2016 , 07:41   Re: Build amxmodx without using git to get the source code
Reply With Quote #6

Using git would be much easier because amtl is a submodule of amxmodx. Try copying the whole amtl repository into amxmodx/public/amtl. If you had git, you would be required only to run one command to automatically download it where it belongs.
Also, you don't have to build AMTL, it's consisting only of headers, what you are trying to compile are test cases.

By the way, what's the reason you don't want to use git?
klippy is online now
YuGiOhJCJ
Member
Join Date: Mar 2007
Old 08-23-2016 , 11:10   Re: Build amxmodx without using git to get the source code
Reply With Quote #7

Oh, it was a submodule!
Thanks a lot.
Now it works:
Code:
$ ambuild
Build succeeded.
Well, I am not sure if I will be able to explain why I don't want to use git during the build process but I will try to do it.
The main reason I think is that I like the simplicity of things in order to understand them better.
I may achieve my goal less quickly and less easily because I am not assisted by tools that automatically take some decisions for me but I know better what I am doing.
I guess that it is the same reason that makes me building programs from source code, using the Slackware64 operating system that does not handle (by default) dependencies between packages, using the Openbox window manager, ...

Last edited by YuGiOhJCJ; 08-23-2016 at 14:09.
YuGiOhJCJ is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-23-2016 , 11:30   Re: Build amxmodx without using git to get the source code
Reply With Quote #8

Git is just another tool, and it's awesome. Long live git!

Last edited by klippy; 08-23-2016 at 11:30.
klippy is online now
YuGiOhJCJ
Member
Join Date: Mar 2007
Old 08-23-2016 , 13:53   Re: Build amxmodx without using git to get the source code
Reply With Quote #9

I agree, I am not saying that git is bad.
I know git and I am using it often for development purpose because it is a great tool.
However, as I said, during the build process, I prefer to not use it because it adds a layer of complexity and I think it is too much.

Last edited by YuGiOhJCJ; 08-23-2016 at 14:03.
YuGiOhJCJ is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-23-2016 , 14:46   Re: Build amxmodx without using git to get the source code
Reply With Quote #10

Au contraire, I think it makes the process easier - you just had problems because you didn't want to use git.

Anyway, each to their own I guess. Glad you compiled it in the end.
klippy is online now
Reply


Thread Tools
Display Modes

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 15:59.


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