FS#52198 - [xmlrpc-c] Can not link programs to 1:1.43.03-2
Attached to Project:
Community Packages
Opened by Bas Timmer (bepaald) - Sunday, 18 December 2016, 10:02 GMT
Last edited by Doug Newgard (Scimmia) - Sunday, 29 January 2017, 15:05 GMT
Opened by Bas Timmer (bepaald) - Sunday, 18 December 2016, 10:02 GMT
Last edited by Doug Newgard (Scimmia) - Sunday, 29 January 2017, 15:05 GMT
|
Details
Description:
Since the last package update of xmlrpc-c-1:1.43.03-2 I am getting errors when trying to link to xmlrpc-c. Since the problem was introduced after a package update (not a software update) I am assuming this is not an upstream bug, but please correct me if I am wrong. Downgrading to the previous package version (1:1.43.03-2 => 1:1.43.03-1) solves the issue. Additional info: I am running x86_64, so just reporting for that architecture but it is quite possible the problem also occurs on i686. Steps to reproduce: The following shows a tiny example program failing to link, then downgrading xmlrpc-c, then successfully linking. Probably best viewed in a monospace font. I've also tested with other g++ flags (changing the std to c++11 or leaving it out), but the results are the same. [~] $ cat xmlrpc_sample_add_client.cpp #include <cstdlib> #include <string> #include <iostream> #include <map> #include <xmlrpc-c/girerr.hpp> #include <xmlrpc-c/base.hpp> #include <xmlrpc-c/client_simple.hpp> int main() { std::map<std::string, xmlrpc_c::value> structData; xmlrpc_c::value_struct vs(structData); // linking works without next line std::map<std::string, xmlrpc_c::value> const mapData(static_cast<std::map<std::string, xmlrpc_c::value> >(vs)); return 0; } [~] $ g++ --std=c++14 -Wall -Wextra -O3 -march=native $(xmlrpc-c-config c++2 client --libs) xmlrpc_sample_add_client.cpp /tmp/ccvmIYlZ.o: In function `main': xmlrpc_sample_add_client.cpp:(.text.startup+0x44): undefined reference to `xmlrpc_c::value_struct::operator std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, xmlrpc_c::value, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, xmlrpc_c::value> > >[abi:cxx11]() const' collect2: error: ld returned 1 exit status [~] $ sudo pacman -U /var/cache/pacman/pkg/xmlrpc-c-1\:1.43.03-1-x86_64.pkg.tar.xz [sudo] password for bepaald: loading packages... warning: downgrading package xmlrpc-c (1:1.43.03-2 => 1:1.43.03-1) resolving dependencies... looking for conflicting packages... Packages (1) xmlrpc-c-1:1.43.03-1 Total Installed Size: 1,22 MiB Net Upgrade Size: 0,01 MiB :: Proceed with installation? [Y/n] (1/1) checking keys in keyring [#########################################################] 100% (1/1) checking package integrity [#########################################################] 100% (1/1) loading package files [#########################################################] 100% (1/1) checking for file conflicts [#########################################################] 100% (1/1) checking available disk space [#########################################################] 100% :: Processing package changes... (1/1) downgrading xmlrpc-c [#########################################################] 100% [~] $ g++ --std=c++14 -Wall -Wextra -O3 -march=native $(xmlrpc-c-config c++2 client --libs) xmlrpc_sample_add_client.cpp [~] $ # no output, linked successfully. [~] $ |
This task depends upon
Closed by Doug Newgard (Scimmia)
Sunday, 29 January 2017, 15:05 GMT
Reason for closing: Fixed
Additional comments about closing: xmlrpc-c 1:1.43.06-1
Sunday, 29 January 2017, 15:05 GMT
Reason for closing: Fixed
Additional comments about closing: xmlrpc-c 1:1.43.06-1
[~] $ g++ -std=c++14 -Wall -Wextra -O3 -march=native $(xmlrpc-c-config c++2 client --libs) xmlrpc_sample_add_client.cpp
/tmp/cc8LMvU3.o: In function `main':
xmlrpc_sample_add_client.cpp:(.text.startup+0x37): undefined reference to `xmlrpc_c::value_struct::value_struct(std::map<std::string, xmlrpc_c::value, std::less<std::string>, std::allocator<std::pair<std::string const, xmlrpc_c::value> > > const&)'
xmlrpc_sample_add_client.cpp:(.text.startup+0x44): undefined reference to `xmlrpc_c::value_struct::operator std::map<std::string, xmlrpc_c::value, std::less<std::string>, std::allocator<std::pair<std::string const, xmlrpc_c::value> > >() const'
collect2: error: ld returned 1 exit status
So, now there are two errors instead of one, and the second one is identical to the previously mentioned error but without the [abi:cxx11] tag. Again, these results do not change with other -std=c++XX flags.
thanks