Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility fix for liblog4cxx v0.11-0.13 #58

Open
wants to merge 4 commits into
base: noetic-devel
Choose a base branch
from

Conversation

twdragon
Copy link

  • Partially implements (manually) changes suggested both in be compatible with log4cxx 0.11 and 0.12 #54 and orphaned commit e3753ee
  • Sets up pointer-level compatibility with both new and old log4cxx versions
  • Adds a workaround for API breaking changes in liblog4cxx

I would be very much appreciated if someone would test this code also on liblog4cxx version 0.11 to avoid wrong API calls.

dreuter and others added 3 commits May 11, 2022 16:55
[`log4cxx` uses `std::shared_ptr`](https://issues.apache.org/jira/browse/LOGCXX-486)
since [version `0.12`](https://logging.apache.org/log4cxx/latest_stable/changelog.html)

Unfortunately Ubuntu 22.04 ships with
[`0.12`](https://packages.ubuntu.com/jammy/liblog4cxx12), which means
that rosconsole with the `log4cxx` backend wouldn't compile. This is
also a problem on other distros such as Arch or Gentoo.

I have carefully applied explicit construction/conversion and `&*`
instead of `.get()` to make the code compile with both versions of
`log4cxx`.
	- Partially implements changes suggested both in ros#54 and
	  orphaned commit e3753ee
	- Tested on liblog4cxx v0.12 and 0.13
	- Sets up pointer-level compatibility with both new and old
	  log4cxx versions
	- Adds a workaround for API breaking changes in liblog4cxx
	- Testing needed

Signed-off-by: Andrey Vukolov <[email protected]>
Signed-off-by: Andrey Vukolov <[email protected]>
TarikViehmann added a commit to TarikViehmann/rosfed that referenced this pull request Jan 2, 2023
Fedora 37 ships with log4cxx 0.13. This causes issues in ros-rosconsole,
which are solved by ros/rosconsole#58, which is
supplied as patch here.
Also, all packages that utilize log4cxx need to be build with c++17 due
to internal usage of std::shared_mutex.
@mikepurvis
Copy link
Member

I've validated this patch with GCC 12 / log4cxx 1.1.0 on NixOS 23.05.

Looks good to me. 🚢

@cameroncooper
Copy link

This fixes my failing build on Ubuntu 23.10

@tcrider84
Copy link

Just confirming this also allows log4cxx versions 0.13 and 1.1.0 on Fedora to work.

@ruiqurm
Copy link

ruiqurm commented Mar 28, 2024

This fixes my failing build on Raspberry Pi OS(Debian 12 bookworm based). Thanks.

@kjeremy
Copy link

kjeremy commented Jul 25, 2024

Is anyone hitting runtime issues with this patch? I'm seeing nodes crash in log4cxx if they call ros::console::set_logger_level more than once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants