Public bug reported: [Impact] There is a bug in the packaging of Assimp (assimp-3.0~dfsg-2 and -3) shipped with Trusty and Vivid that strips some C++ symbols from the library. This makes it impossible to use the C++ API on those releases.
[Test Case] I've attached an example program that demonstrates this bug (originally from: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775890%3E). Compile the program with: g++ assimp.cpp -o assimp-ex `pkg-config --libs assimp` I expect this to succeed with no errors. On Trusty, this command fails with the following output: /tmp/ccVfhC0C.o: In function `main': assimp.cpp:(.text+0x1c): undefined reference to `aiMaterial::aiMaterial()' /tmp/ccVfhC0C.o: In function `aiReturn aiMaterial::AddProperty<float>(float const*, unsigned int, char const*, unsigned int, unsigned int)': assimp.cpp:(.text._ZN10aiMaterial11AddPropertyIfEE8aiReturnPKT_jPKcjj[_ZN10aiMaterial11AddPropertyIfEE8aiReturnPKT_jPKcjj]+0x4e): undefined reference to `aiMaterial::AddBinaryProperty(void const*, unsigned int, char const*, unsigned int, unsigned int, aiPropertyTypeInfo)' /tmp/ccVfhC0C.o: In function `aiReturn aiMaterial::AddProperty<aiColor3D>(aiColor3D const*, unsigned int, char const*, unsigned int, unsigned int)': assimp.cpp:(.text._ZN10aiMaterial11AddPropertyI9aiColor3DEE8aiReturnPKT_jPKcjj[_ZN10aiMaterial11AddPropertyI9aiColor3DEE8aiReturnPKT_jPKcjj]+0x4e): undefined reference to `aiMaterial::AddBinaryProperty(void const*, unsigned int, char const*, unsigned int, unsigned int, aiPropertyTypeInfo)' /tmp/ccVfhC0C.o: In function `aiReturn aiMaterial::AddProperty<char>(char const*, unsigned int, char const*, unsigned int, unsigned int)': assimp.cpp:(.text._ZN10aiMaterial11AddPropertyIcEE8aiReturnPKT_jPKcjj[_ZN10aiMaterial11AddPropertyIcEE8aiReturnPKT_jPKcjj]+0x4e): undefined reference to `aiMaterial::AddBinaryProperty(void const*, unsigned int, char const*, unsigned int, unsigned int, aiPropertyTypeInfo)' collect2: error: ld returned 1 exit status [Regression Potential] This is fixed by adding a few entries to the 'debian/libassimp3.symbols' and `libassimp3.ver` files: (c++)"aiMaterial::AddProperty(aiString const*, char const*, unsigned int, unsigned int)@Base" 3.0~ (c++)"aiMaterial::RemoveProperty(char const*, unsigned int, unsigned int)@Base" 3.0~ (c++)"aiMaterial::CopyPropertyList(aiMaterial*, aiMaterial const*)@Base" 3.0~ (c++)"aiMaterial::AddBinaryProperty(void const*, unsigned int, char const*, unsigned int, unsigned int, aiPropertyTypeInfo)@Base" 3.0~ (c++)"aiMaterial::Clear()@Base" 3.0~ (c++)"aiMaterial::aiMaterial()@Base" 3.0~ (c++)"aiMaterial::~aiMaterial()@Base" 3.0~ All of these symbols start with "ai", the prefix used by all symbols in Assimp, so they should not conflict with any other libraries (and, if they do, it is likely that other symbols already exported will conflict as well). This is fixed in 3.0~dfsg-4 (see: https://bugs.debian.org/cgi- bin/bugreport.cgi?bug=775890%3E). This update is available in Wiley and Debian and, as far as I can tell, has led to no regressions. I successfully built the 3.0~dfsg-4 on Trusty and confirms that it fixes the issue. [Other Information] $ lsb_release -rd Description: Ubuntu 14.04.2 LTS Release: 14.04 $ apt-cache policy libassimp3 libassimp3: Installed: 3.0~dfsg-2 Candidate: 3.0~dfsg-2 Version table: *** 3.0~dfsg-2 0 500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages 100 /var/lib/dpkg/status Note that this issue also applies to 3.0~dfsg-3. This affects Precise, Trusty, Utopic, and Vivid. ** Affects: assimp (Ubuntu) Importance: Undecided Status: New ** Attachment added: "assimp.cpp" https://bugs.launchpad.net/bugs/1473503/+attachment/4427541/+files/assimp.cpp -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1473503 Title: Unresolved symbols in the 3.0~dfsg-2 and 3.0~dfsg-3 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/assimp/+bug/1473503/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
