Cannot build TestCpp for linux.

First of all sorry to be posting here if it is not appropriate. I didn’t find a newbie corner.

I am an android developer I reached cocos2d-x after a fair search for a good game engine. The thing is that I have gone great deal for trying cocos2d-x and I cannot even build the TestCpp sample that comes along with the cocos2d-x-2.2.2.zip available in the download section.

I usually run on ArchLinux but understanding the fact that it is pretty difficult to set up cocos2d-x for arch I installed Ubuntu on my machine and the setup was easy but still cant build a project using the steps mentioned in the Documentation. I have googled a lot but was unable to find a similar issue anywhere.

I tried to build the project.
cd samples/Cpp/TestCpp/proj.linux/ && make -j5 DEBUG=1

But the build was interrupted by an error.
make: *** No rule to make target `/home/mahesmohan/cocos2d-x-2.2.2/lib/linux/debug/libextension.a', needed by `bin/debug/TestCpp'. Stop.

Any guidance will be appreciated. Thankyou.

have you tried run

make-all-linux-project.sh

Yes I just tried that. Since I am running in arch linux I did comment out the part in the script which invokes the install-deps-linux.sh

It looked running well but soon stopped with errors

@ LINK …/…/lib/linux/debug/libcocos2d.so
/usr/bin/ld: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/…/…/…/…/lib/libglfw.a(glext.o): relocation R_X86_64_32 against `_glfwWin’ can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/…/…/…/…/lib/libglfw.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[1]: * Error 1
make[1]: Leaving directory `/home/mahesmohan/cocos2d-x-2.2.2/cocos2dx/proj.linux’
make:
* [all] Error 2
@

I just tried the make-all-linux-projects.sh and I have not been able to give a full thought to the errors.