FS#72640 - [jsoncpp] Stripping makes libjsoncpp.a unusable
Attached to Project:
Arch Linux
Opened by Alex Henrie (alex.henrie) - Thursday, 04 November 2021, 23:59 GMT
Last edited by Toolybird (Toolybird) - Monday, 27 March 2023, 01:42 GMT
Opened by Alex Henrie (alex.henrie) - Thursday, 04 November 2021, 23:59 GMT
Last edited by Toolybird (Toolybird) - Monday, 27 March 2023, 01:42 GMT
|
Details
Description:
The libjsoncpp.a that this package installs is unusable. Steps to reproduce: 1. Put the following in a file named test.cpp: ``` #include <json/json.h> int main() { Json::Value v = new Json::Value(); return 0; } ``` 2. Run `g++ -static test.cpp -ljsoncpp` Expected results: Successful compilation Actual results: ``` /usr/bin/ld: /tmp/cccl92Oy.o: in function `main': test.cpp:(.text+0x30): undefined reference to `Json::Value::Value(Json::ValueType)' /usr/bin/ld: test.cpp:(.text+0x47): undefined reference to `Json::Value::Value(bool)' /usr/bin/ld: test.cpp:(.text+0x58): undefined reference to `Json::Value::~Value()' collect2: error: ld returned 1 exit status ``` Proposed solution: Add '!strip' to this package's `options` array. |
This task depends upon
Closed by Toolybird (Toolybird)
Monday, 27 March 2023, 01:42 GMT
Reason for closing: Fixed
Additional comments about closing: jsoncpp 1.9.5-2
Monday, 27 March 2023, 01:42 GMT
Reason for closing: Fixed
Additional comments about closing: jsoncpp 1.9.5-2
Comment by
Alex Henrie (alex.henrie) - Friday,
05 November 2021, 17:05 GMT
Another solution is to add `-D b_lto=false` to the arguments to
arch-meson for the static library.