Jump to content
  • 0

Problems Compiling Blueboy/Portal New_Ai with Mangos Master


bugeyedcreepy

Question

Also posted on Playerbot Forums but since there's crossover anyway:

So, I've been following both Mangos Master and compiling it with New_Ai branch of Blueboy's Playerbot but past few weeks I've been getting an error while compiling so I need some guidance on what and/or where I'm going wrong. To give you the full story, I've got an idiot script (yep, cause I'm an idiot) that sucks from the relative repos and patches in what I believe should be a complete package including New_Ai so I can play with all the features but I can never get it to compile. It gets me thus far and drops me this info:

[ 30%] Building CXX object src/shared/CMakeFiles/shared.dir/Database/QueryResultPostgre.cpp.o
[ 30%] Building CXX object src/shared/CMakeFiles/shared.dir/Database/DatabasePostgre.cpp.o
[ 31%] Building CXX object src/shared/CMakeFiles/shared.dir/Database/QueryResultMysql.cpp.o
[ 31%] Building CXX object src/shared/CMakeFiles/shared.dir/Database/SQLStorage.cpp.o
[ 32%] Building CXX object src/shared/CMakeFiles/shared.dir/Util.cpp.o
Linking CXX static library libshared.a
[ 32%] Built target shared
Scanning dependencies of target realmd
[ 33%] Building CXX object src/realmd/CMakeFiles/realmd.dir/Main.cpp.o
In file included from /root/mangos/src/realmd/Main.cpp:33:0:
/root/mangos/src/shared/revision_sql.h:3:1: error: expected unqualified-id before ‘<<’ token
In file included from /root/mangos/src/realmd/Main.cpp:34:0:
/root/mangos/src/shared/Util.h:29:1: error: ‘Tokens’ does not name a type
/root/mangos/src/shared/Util.h:30:32: error: ‘Tokens’ was not declared in this scope
/root/mangos/src/shared/Util.h:30:59: error: expected primary-expression before ‘index’
/root/mangos/src/shared/Util.h:30:64: error: expression list treated as compound expression in initializer [-fpermissive]
/root/mangos/src/shared/Util.h:31:30: error: ‘Tokens’ was not declared in this scope
/root/mangos/src/shared/Util.h:31:57: error: expected primary-expression before ‘index’
/root/mangos/src/shared/Util.h:31:62: error: expression list treated as compound expression in initializer [-fpermissive]
make[2]: *** [src/realmd/CMakeFiles/realmd.dir/Main.cpp.o] Error 1
make[1]: *** [src/realmd/CMakeFiles/realmd.dir/all] Error 2
make: *** [all] Error 2
[[email protected] ~]#

It only happens when I combine New_Ai in my pulls, this is my idiot script:

echo SHELLSCRIPT: Removing directory mangos with prejudice
rm -Rf mangos
echo SHELLSCRIPT: Directory mangos Removed.
echo SHELLSCRIPT: Git cloning MaNGOS Master
git clone git://github.com/mangos/mangos.git mangos
echo SHELLSCRIPT: Changed to /root/mangos
cd mangos
echo SHELLSCRIPT: Git pulling PlayerBot new-ai
git pull git://github.com/blueboy/portal.git new-ai
echo SHELLSCRIPT: Changed to /root/mangos/src/bindings
cd src/bindings/
echo SHELLSCRIPT: Git cloning ScriptDev2 Master
git clone git://github.com/scriptdev2/scriptdev2.git ScriptDev2
echo SHELLSCRIPT: Changed to /root/mangos
cd ../..
echo SHELLSCRIPT: Applying ScriptDev2 Patch
git am src/bindings/ScriptDev2/patches/MaNGOS-11167-ScriptDev2.patch
mkdir build
echo SHELLSCRIPT: Changed to /root/mangos/build
cd build
echo SHELLSCRIPT: Executing cmake...
cmake ../ -DCMAKE_INSTALL_PREFIX=/opt/development -DDEBUG=0 && echo SHELLSCRIPT: Executing make... && make && echo SHELLSCRIPT: Executing make install into /opt/development && make install

If I rem out the lines for New_Ai, it compiles no worries. Am I doing something wrong?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Does your shell script always favor the code from the patch you're applying? In other words, when you merge new-ai with MaNGOS, does the new-ai code write over the code in the core?

Since the Playerbot repos revisions usually lag behind the MaNGOS master, it may be best to first do a diff between the same revisions of new-ai and MaNGOS master, generate a patch, and then merge just the patch with the current core revision.

It seems something in MaNGOS is being overwritten with older code still present in the new-ai repo. You could also wait until blueboy syncs the repo with MaNGOS. Once he does that, your script should work fine.

Link to comment
Share on other sites

Does your shell script always favor the code from the patch you're applying? In other words, when you merge new-ai with MaNGOS, does the new-ai code write over the code in the core?

Since the Playerbot repos revisions usually lag behind the MaNGOS master, it may be best to first do a diff between the same revisions of new-ai and MaNGOS master, generate a patch, and then merge just the patch with the current core revision.

It seems something in MaNGOS is being overwritten with older code still present in the new-ai repo. You could also wait until blueboy syncs the repo with MaNGOS. Once he does that, your script should work fine.

Hmmm, I never understood why there were different ways to get Playerbot code into Mangos so this makes sense... I'll try the Patch method and see if this does less damage!

:)

Link to comment
Share on other sites

Just make sure you roll back your MaNGOS master to the same revision as your new-ai branch before using "git diff" to generate the patch. Otherwise, your patch will also contain the code changes between the older MaNGOS core and the current master.

I prefer just merging branches, but using the patch method is especially handy for large mods like Playerbot when there is a big difference in revisions. It ensures you're only getting the patch code and makes merging less confusing.

The patch method may require more steps, but it's more simple than using the advanced Git commands for rebasing or doing things like upstream merges. However, I do recommend you read up on using "git rebase" for keeping your patch repos updated with MaNGOS master.

Link to comment
Share on other sites

Just make sure you roll back your MaNGOS master to the same revision as your new-ai branch before using "git diff" to generate the patch. Otherwise, your patch will also contain the code changes between the older MaNGOS core and the current master.

I prefer just merging branches, but using the patch method is especially handy for large mods like Playerbot when there is a big difference in revisions. It ensures you're only getting the patch code and makes merging less confusing.

The patch method may require more steps, but it's more simple than using the advanced Git commands for rebasing or doing things like upstream merges. However, I do recommend you read up on using "git rebase" for keeping your patch repos updated with MaNGOS master.

:D Got it working with some poiners from Blueboy! It was a case of adjusting the merge conflict and restarting make, worked like a charm! Up and Running again with the latest builds.... I'll be rescripting to hopefully use this patching method to save it all collapsing in future. :P

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use