[ 68%] Built target cocos2d
[ 68%] Linking CXX executable …/…/bin/cpp-empty-test/cpp-empty-test
/usr/bin/ld: …/…/…/…/external/bullet/prebuilt/linux/64-bit/libBulletDynamics.a(btSequentialImpulseConstraintSolver.o): relocation R_X86_64_32 against .rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: ../../../../external/bullet/prebuilt/linux/64-bit/libBulletDynamics.a(btTypedConstraint.o): relocation R_X86_64_32S against symbol_ZTV17btTypedConstraint’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: …/…/…/…/external/bullet/prebuilt/linux/64-bit/libBulletDynamics.a(btDiscreteDynamicsWorld.o): relocation R_X86_64_32 against `.rodata.str1.1’ can not be used when making a shared object; recompile with -fPIC
…
/usr/bin/ld: ../../../../external/bullet/prebuilt/linux/64-bit/libBulletDynamics.a(btTypedConstraint.o): relocation R_X86_64_32S against symbol_ZTV17btTypedConstraint’ can not be used when making a shared object; recompile
function install_linux_environment()
{
mkdir -p $HOME/bin
pushd $HOME/bin
echo "GCC version: gcc --version"
# install new version cmake
CMAKE_VERSION=“3.7.2”
CMAKE_DOWNLOAD_URL=“https://cmake.org/files/v3.7/cmake-${CMAKE_VERSION}.tar.gz”
echo “Download ${CMAKE_DOWNLOAD_URL}”
curl -O ${CMAKE_DOWNLOAD_URL}
tar -zxf “cmake-${CMAKE_VERSION}.tar.gz”
cd “cmake-${CMAKE_VERSION}”
./configure > /dev/null
make -j2 > /dev/null
sudo make install > /dev/null
echo "CMake Version: cmake --version"
cd …
# install new version binutils
BINUTILS_VERSION=“2.27”
BINUTILS_URL=“http://ftp.gnu.org/gnu/binutils/binutils-${BINUTILS_VERSION}.tar.gz”
echo “Download ${BINUTILS_URL}”
curl -O ${BINUTILS_URL}
tar -zxf “binutils-${BINUTILS_VERSION}.tar.gz”
cd “binutils-${BINUTILS_VERSION}”
./configure > /dev/null
make -j2 > /dev/null
sudo make install > /dev/null
echo "ld Version: ld --version"
echo "which ld: which ld"
sudo rm /usr/bin/ld
popd
echo “Installing linux dependence packages …”
echo -e “y” | bash $COCOS2DX_ROOT/build/install-deps-linux.sh
echo “Installing linux dependence packages finished!”
}
3. build/install-deps-linux.sh should be update currently there is g+±4.9
4. For future all external Linux dependencies should be delivered as for other platforms (by download-deps.py).
Comment:
Please update install_linux_environment if it is not true.
When I called only $COCOS2DX_ROOT/build/install-deps-linux.sh I had: /usr/bin/ld: ../cocos2d/external/bullet/prebuilt/linux/64-bit/libBulletDynamics.a(btConeTwistConstraint.o): unrecognized relocation (0x2a) in section.text’`
There is chance that it will work for you (e.g. if you already built before cocos2d-x on that laptop )
Please check it on clean ubuntu instance ( or VM, docker, travis CI image).
This is a clean laptop that I just loaded up this weekend Dont worry.
Edit 1: so far installing deps fails, it doesn’t find any of them. I need to see where these are located now.
Edit 2: actually the packages exist, just the script is failing. Installing them manually is working. libpng12-dev and libglew*-dev aren’t found. I need to see what to do here.
Edit 3: OK, I worked through these, now to try the next steps
Edit 4: worked through glfw issues.
Edit 5: Did anyone run ./download-deps.py?
Edit 6: It has been a manual effort, but make is running now. So far no errors.
ok, so it was a manual effort, but I compiled successfully on 17.10 We should probably try and update this doc with more manual steps and also fix issues with install-linux-deps.py
May be better to engage with Ubuntu 18.04 ? (It will be ready this April, but beta is usable, I only had to download some packages using another system to get working “pppoe” (DSL) connection to Internet.) There problem too.