Activity log for bug #1510042

Date Who What changed Old value New value Message
2015-10-26 11:04:27 Jeff Abrahamson bug added bug
2016-04-01 09:37:15 Gianfranco Costamagna bug watch added http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797038
2016-04-01 09:37:15 Gianfranco Costamagna bug task added libjsoncpp (Debian)
2016-04-01 09:37:47 Gianfranco Costamagna affects libjsoncpp (Ubuntu) llvm-toolchain-3.8 (Ubuntu)
2016-04-01 09:38:08 Gianfranco Costamagna affects libjsoncpp (Debian) llvm-toolchain-3.8 (Debian)
2016-04-01 10:30:34 Bug Watch Updater llvm-toolchain-3.8 (Debian): status Unknown Confirmed
2016-04-04 16:56:07 Matthias Klose llvm-toolchain-3.8 (Ubuntu): status New Confirmed
2016-04-20 14:53:52 Alberto Salvia Novella llvm-toolchain-3.8 (Ubuntu): importance Undecided Medium
2016-07-09 11:19:10 Matthias Klose nominated for series Ubuntu Xenial
2016-07-09 11:19:10 Matthias Klose bug task added llvm-toolchain-3.8 (Ubuntu Xenial)
2016-07-09 11:51:14 Matthias Klose description On updating ubuntu from 15.04 to 15.10, I see changes in how clang resolves references to some libraries. (I think this is not an ubuntu question but rather a clang question and that I've missed some subtlety on how clang has recently changed. I suspect initially that this is related to the gcc-5 ABI changes, but I'm not sure how to proceed.) Here's a tiny test example designed only to tickle the phenomenon: #include <jsoncpp/json/json.h> #include <iostream> int main(int argc, char *argv[]) { std::cout << argc << " - " << argv[0] << std::endl; Json::Reader reader; Json::Value root; reader.parse("", root, false); std::cout << reader.getFormattedErrorMessages() << std::endl; return 0; } If I compile like this clang++ -ggdb3 -Wall -Wextra -std=c++14 -o json_test json_test.cc -ljsoncpp /tmp/json_test-680d3a.o: In function `main': /tmp/json_test.cc:10: undefined reference to `Json::Reader::getFormattedErrorMessages() const' clang: error: linker command failed with exit code 1 (use -v to see invocation) And yet the definition appears to be present: jeff@birdsong:src $ objdump -TC /usr/lib/x86_64-linux-gnu/libjsoncpp.so | grep getFormatted 000000000000e190 g DF .text 00000000000004d2 Base Json::OurReader::getFormattedErrorMessages[abi:cxx11]() const 000000000000dc70 g DF .text 00000000000004d2 Base Json::Reader::getFormattedErrorMessages[abi:cxx11]() const jeff@birdsong:src $ The abi:cxx11 suggests I might at least try this clang++ -ggdb3 -Wall -Wextra -std=c++11 -o json_test json_test.cc -ljsoncpp but same error. On the other hand, this works fine: g++ -ggdb3 -Wall -Wextra -std=c++14 -o json_test json_test.cc -ljsoncpp Fwiw, here's version info: jeff@birdsong:tmp $ g++ --version g++ (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. jeff@birdsong:tmp $ clang++ --version Ubuntu clang version 3.6.2-1 (tags/RELEASE_362/final) (based on LLVM 3.6.2) Target: x86_64-pc-linux-gnu Thread model: posix jeff@birdsong:tmp $ ProblemType: Bug DistroRelease: Ubuntu 15.10 Package: libjsoncpp-dev 0.10.5-1 ProcVersionSignature: Ubuntu 4.2.0-16.19-generic 4.2.3 Uname: Linux 4.2.0-16-generic x86_64 ApportVersion: 2.19.1-0ubuntu3 Architecture: amd64 CurrentDesktop: i3 Date: Mon Oct 26 12:00:40 2015 Dependencies: gcc-5-base 5.2.1-22ubuntu2 libc6 2.21-0ubuntu4 libgcc1 1:5.2.1-22ubuntu2 libjsoncpp0v5 0.10.5-1 libstdc++6 5.2.1-22ubuntu2 EcryptfsInUse: Yes InstallationDate: Installed on 2015-10-23 (2 days ago) InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422) SourcePackage: libjsoncpp UpgradeStatus: Upgraded to wily on 2015-10-23 (2 days ago) SRU acceptance criteria: the example successfully links. On updating ubuntu from 15.04 to 15.10, I see changes in how clang resolves references to some libraries. (I think this is not an ubuntu question but rather a clang question and that I've missed some subtlety on how clang has recently changed. I suspect initially that this is related to the gcc-5 ABI changes, but I'm not sure how to proceed.) Here's a tiny test example designed only to tickle the phenomenon: #include <jsoncpp/json/json.h> #include <iostream> int main(int argc, char *argv[]) {     std::cout << argc << " - " << argv[0] << std::endl;     Json::Reader reader;     Json::Value root;     reader.parse("", root, false);     std::cout << reader.getFormattedErrorMessages() << std::endl;     return 0; } If I compile like this clang++ -ggdb3 -Wall -Wextra -std=c++14 -o json_test json_test.cc -ljsoncpp /tmp/json_test-680d3a.o: In function `main': /tmp/json_test.cc:10: undefined reference to `Json::Reader::getFormattedErrorMessages() const' clang: error: linker command failed with exit code 1 (use -v to see invocation) And yet the definition appears to be present: jeff@birdsong:src $ objdump -TC /usr/lib/x86_64-linux-gnu/libjsoncpp.so | grep getFormatted 000000000000e190 g DF .text 00000000000004d2 Base Json::OurReader::getFormattedErrorMessages[abi:cxx11]() const 000000000000dc70 g DF .text 00000000000004d2 Base Json::Reader::getFormattedErrorMessages[abi:cxx11]() const jeff@birdsong:src $ The abi:cxx11 suggests I might at least try this clang++ -ggdb3 -Wall -Wextra -std=c++11 -o json_test json_test.cc -ljsoncpp but same error. On the other hand, this works fine: g++ -ggdb3 -Wall -Wextra -std=c++14 -o json_test json_test.cc -ljsoncpp Fwiw, here's version info: jeff@birdsong:tmp $ g++ --version g++ (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. jeff@birdsong:tmp $ clang++ --version Ubuntu clang version 3.6.2-1 (tags/RELEASE_362/final) (based on LLVM 3.6.2) Target: x86_64-pc-linux-gnu Thread model: posix jeff@birdsong:tmp $ ProblemType: Bug DistroRelease: Ubuntu 15.10 Package: libjsoncpp-dev 0.10.5-1 ProcVersionSignature: Ubuntu 4.2.0-16.19-generic 4.2.3 Uname: Linux 4.2.0-16-generic x86_64 ApportVersion: 2.19.1-0ubuntu3 Architecture: amd64 CurrentDesktop: i3 Date: Mon Oct 26 12:00:40 2015 Dependencies:  gcc-5-base 5.2.1-22ubuntu2  libc6 2.21-0ubuntu4  libgcc1 1:5.2.1-22ubuntu2  libjsoncpp0v5 0.10.5-1  libstdc++6 5.2.1-22ubuntu2 EcryptfsInUse: Yes InstallationDate: Installed on 2015-10-23 (2 days ago) InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422) SourcePackage: libjsoncpp UpgradeStatus: Upgraded to wily on 2015-10-23 (2 days ago)
2016-07-09 15:06:13 Matthias Klose llvm-toolchain-3.8 (Ubuntu Xenial): status New Confirmed
2016-07-11 22:47:51 Launchpad Janitor llvm-toolchain-3.8 (Ubuntu): status Confirmed Fix Released
2016-07-12 07:02:41 Martin Pitt llvm-toolchain-3.8 (Ubuntu Xenial): status Confirmed Fix Committed
2016-07-12 07:02:43 Martin Pitt bug added subscriber Ubuntu Stable Release Updates Team
2016-07-12 07:02:47 Martin Pitt bug added subscriber SRU Verification
2016-07-12 07:02:51 Martin Pitt tags amd64 apport-bug wily amd64 apport-bug verification-needed wily
2016-07-20 07:04:27 Mathew Hodson llvm-toolchain-3.8 (Ubuntu Xenial): importance Undecided Medium
2016-07-21 18:33:03 Matthias Klose tags amd64 apport-bug verification-needed wily amd64 apport-bug verification-done wily
2016-07-26 13:48:08 Martin Pitt removed subscriber Ubuntu Stable Release Updates Team
2016-07-26 13:51:26 Launchpad Janitor llvm-toolchain-3.8 (Ubuntu Xenial): status Fix Committed Fix Released
2016-08-03 07:43:12 Daniel van Vugt summary linking against -ljsoncpp fails with clang clang++ no longer ABI-compatible with g++
2016-08-05 22:09:49 Bug Watch Updater llvm-toolchain-3.8 (Debian): status Confirmed Fix Released