When compiling a program written for rust on ppc64le, I get the following error: Description of problem: = note: /usr/bin/ld: /builddir/build/BUILD/suricata-5.0.0-rc1/rust/target/debug/deps/suricata-e6597667108d11ec.2kpivclfzlxj8xrv.rcgu.o: in function `suricata::json::Json::object': /builddir/build/BUILD/suricata-5.0.0-rc1/rust/src/json.rs:54: undefined reference to `json_object' /usr/bin/ld: /builddir/build/BUILD/suricata-5.0.0-rc1/rust/target/debug/deps/suricata-e6597667108d11ec.2kpivclfzlxj8xrv.rcgu.o: in function `suricata::json::Json::array': /builddir/build/BUILD/suricata-5.0.0-rc1/rust/src/json.rs:60: undefined reference to `json_array' /usr/bin/ld: /builddir/build/BUILD/suricata-5.0.0-rc1/rust/target/debug/deps/suricata-e6597667108d11ec.2kpivclfzlxj8xrv.rcgu.o: in function `suricata::json::Json::set': /builddir/build/BUILD/suricata-5.0.0-rc1/rust/src/json.rs:82: undefined reference to `json_object_set_new' /usr/bin/ld: /builddir/build/BUILD/suricata-5.0.0-rc1/rust/target/debug/deps/suricata-e6597667108d11ec.2kpivclfzlxj8xrv.rcgu.o: in function `suricata::json::Json::set_string': /builddir/build/BUILD/suricata-5.0.0-rc1/rust/src/json.rs:100: undefined reference to `json_string' /usr/bin/ld: /builddir/build/BUILD/suricata-5.0.0-rc1/rust/src/json.rs:98: undefined reference to `json_object_set_new' /usr/bin/ld: /builddir/build/BUILD/suricata-5.0.0-rc1/rust/target/debug/deps/suricata-e6597667108d11ec.2kpivclfzlxj8xrv.rcgu.o: in function `suricata::json::Json::set_integer': /builddir/build/BUILD/suricata-5.0.0-rc1/rust/src/json.rs:108: undefined reference to `json_integer' /usr/bin/ld: /builddir/build/BUILD/suricata-5.0.0-rc1/rust/src/json.rs:106: undefined reference to `json_object_set_new' /usr/bin/ld: /builddir/build/BUILD/suricata-5.0.0-rc1/rust/target/debug/deps/suricata-e6597667108d11ec.2kpivclfzlxj8xrv.rcgu.o: in function `suricata::json::Json::array_append_string': /builddir/build/BUILD/suricata-5.0.0-rc1/rust/src/json.rs:127: undefined reference to `json_string' /usr/bin/ld: /builddir/build/BUILD/suricata-5.0.0-rc1/rust/src/json.rs:127: undefined reference to `json_array_append_new' collect2: error: ld returned 1 exit status error: aborting due to previous error error: Could not compile `suricata`. This compiles fine on other arches. I'm wondering if something is missing on the ppc64le that other arches have. This is against the rawhide version. How reproducible: Every time Steps to Reproduce: 1. Build rawhide version of suricata on ppc64le system Actual results: https://kojipkgs.fedoraproject.org//work/tasks/8303/37988303/build.log
Those symbols are supposed to be provided by libjansson, right? I don't see -ljansson on the link line. But this is only in "cargo test" -- are the Json functions not involved in testing? Perhaps other arches are doing a better job of pruning this?
I reproduced this with rust-1.37.0-1.fc30.ppc64le + llvm-libs-8.0.0-6.fc30.ppc64le, so the problem is not rawhide's newer toolchain. It works if I add a link attribute in src/json.rs: /// Expose the jansson functions we need. #[link(name = "jansson")] extern { fn json_object() -> *mut JsonT; ... }
I did a new build that let's all arches finish instead of fail-fast: https://koji.fedoraproject.org/koji/taskinfo?taskID=38039091 ppc64le is the only one failing. I wonder if something is different on that platform?
Could this be related to bug 1756838?
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle. Changing version to 32.
The problem is still in Rawhide. Josh, what component needs to be fixed? Is it rust, libjansson or something else? Where your workaround should go in?
(In reply to Dan Horák from comment #6) > The problem is still in Rawhide. > > Josh, what component needs to be fixed? Is it rust, libjansson or something > else? Where your workaround should go in? That was in suricata's src/json.rs, and in fact I think that's correct to require, not just a workaround. (But I still don't really know why only ppc64le is affected.)
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle. Changing version to 33.
This message is a reminder that Fedora 33 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '33'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 33 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 33 changed to end-of-life (EOL) status on 2021-11-30. Fedora 33 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
something is still broken with suricata or rust, suricata-6.0.4-5.fc37 fails to build using rust-1.59.0-2.fc37.ppc64le in %check due missing liblua functions ...
AFAICS, this is a similar situation as before. The file suricata-6.0.4/rust/src/lua.rs has an extern block with no link attribute, where it should have something like #[link(name = "lua")]. It looks like lua is not actually used by any of suricata's Rust tests, so that bit of code is probably getting pruned on most arches. For whatever reason, it's surviving to the link step on ppc64le though. I don't know if that's LLVM failing to remove that dead code early, or binutils ld failing to gc it, or what. But IMO it would still be expected to have a proper link attribute.
OK, I'll pass this along. Thanks for the analysis.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle. Changing version to 37.
This message is a reminder that Fedora Linux 37 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 37 on 2023-12-05. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '37'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 37 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Fedora Linux 37 entered end-of-life (EOL) status on None. Fedora Linux 37 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed.