Hey,
Trying to build Urho3d 1.7 as a buildroot package. My target is an ARM Tegra K1 processor. Here is the urho.mk
file which defines a cmake package in buildroot.
URHO_VERSION = 1.7
URHO_SOURCE = $(URHO_VERSION).tar.gz
URHO_SITE = https://github.com/urho3d/Urho3D/archive
URHO_INSTALL_STAGING = YES
URHO_INSTALL_TARGET = YES
URHO_CONF_OPTS = \
-DURHO3D_ANGELSCRIPT=0 \
-DURHO3D_LUA=0 \
-DARM_PREFIX=$(HOST_DIR)/usr/bin/arm-buildroot-linux-gnueabihf- \
-DARM_SYSROOT=$(TARGET_DIR) \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DURHO3D_IK=0 \
-DURHO3D_NETWORK=0 \
-DURHO3D_PHYSICS=0 \
-DURHO3D_NAVIGATION=0 \
-DURHO3D_URHO2D=0 \
-DURHO3D_WEBP=0 \
-DURHO3D_WEBP=SHARED
$(eval $(cmake-package))
The build gets to 93% and errors. Looking back through the output there are two main problems with linking. The first is with pugi.
XMLElement.cpp:(.text+0x20): undefined reference to 'pugi::xpath_node::attribute() const'
XMLElement.cpp:(.text+0x2c): undefined reference to 'pugi::xml_attribute::operator void (*)(pugi::xml_attribute***)() const'
XMLElement.cpp:(.text+0x36): undefined reference to 'pugi::xpath_node::attribute() const'
XMLElement.cpp:(.text+0x44): undefined reference to 'pugi::xml_attribute::set_value(char const*)'
In fact, every call to pugi is an undefined reference. The second is with SDL, same deal.
OGLGraphics.cpp:(.text+0x274c): undefined reference to `SDL_GetNumVideoDisplays'
OGLGraphics.cpp:(.text+0x2806): undefined reference to `SDL_GetDesktopDisplayMode'
OGLGraphics.cpp:(.text+0x2858): undefined reference to `SDL_GL_SetAttribute'
OGLGraphics.cpp:(.text+0x2860): undefined reference to `SDL_GL_SetAttribute'
OGLGraphics.cpp:(.text+0x2868): undefined reference to `SDL_GL_SetAttribute'
OGLGraphics.cpp:(.text+0x2874): undefined reference to `SDL_GL_SetAttribute'
OGLGraphics.cpp:(.text+0x287c): undefined reference to `SDL_GL_SetAttribute'
OGLGraphics.cpp:(.text+0x2884): undefined reference to `SDL_GetDisplayBounds'
Searching through the built files I found these libraries already build as shared libraries
~/v/buildroot (master|…) $ find output/build/urho-1.7/ -name '*.so'
output/build/urho-1.7/Source/ThirdParty/FreeType/libFreeType.so
output/build/urho-1.7/Source/ThirdParty/StanHull/libStanHull.so
output/build/urho-1.7/Source/ThirdParty/SDL/libSDL.so
output/build/urho-1.7/Source/ThirdParty/PugiXml/libPugiXml.so
output/build/urho-1.7/Source/ThirdParty/JO/libJO.so
output/build/urho-1.7/Source/ThirdParty/Assimp/libAssimp.so
output/build/urho-1.7/Source/ThirdParty/LZ4/libLZ4.so
output/build/urho-1.7/Source/ThirdParty/WebP/libWebP.so
So my question is why aren’t the paths to these third party libraries part of the library search path when I build and configure.
Thanks!