Skip Menu |

This queue is for tickets about the Log-Journald CPAN distribution.

Report information
The Basics
Id: 122642
Status: resolved
Priority: 0/
Queue: Log-Journald

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.20
Fixed in: (no value)



Subject: undefined symbol: sd_journal_sendv
On newer debian-like systems (stretch, Ubuntu 16.04) the test fails: # Failed test 'use Log::Journald;' # at t/Log-Journald.t line 7. # Tried to use 'Log::Journald'. # Error: Can't load '/home/cpansand/.cpan/build/2017072912/Log-Journald-0.20-0/blib/arch/auto/Log/Journald/Journald.so' for module Log::Journald: /home/cpansand/.cpan/build/2017072912/Log-Journald-0.20-0/blib/arch/auto/Log/Journald/Journald.so: undefined symbol: sd_journal_sendv at /opt/perl-5.27.2/lib/5.27.2/x86_64-linux/DynaLoader.pm line 193. # # Compilation failed in require at t/Log-Journald.t line 7. # BEGIN failed--compilation aborted at t/Log-Journald.t line 7. # Looks like you failed 1 test of 1. t/Log-Journald.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests
I made a patch and sent pull request to the author. https://github.com/lkundrak/perl-Log-Journald/pull/4 --- a/Build.PL +++ b/Build.PL @@ -3,9 +3,17 @@ use warnings; use Module::Build; -my $libsystemd_journal_CFLAGS = `pkg-config --cflags libsystemd-journal` +my @libpaths = qw(libsystemd-journal libsystemd); # recently system is libsystemd but some platform has both paths. +my $libpath = ''; + +for my $path ( @libpaths ) { + next unless `pkg-config --exists $path && echo 1`; + $libpath = $path; +} + +my $libsystemd_journal_CFLAGS = `pkg-config --cflags $libpath` or warn 'Could not determine systemd-journal compiler flags'; -my $libsystemd_journal_LDFLAGS = `pkg-config --libs libsystemd-journal` +my $libsystemd_journal_LDFLAGS = `pkg-config --libs $libpath` or warn 'Could not determine systemd-journal compiler flags'; my $build = Module::Build->new( On 2017-7月-29 土 14:15:51, SREZIC wrote: Show quoted text
> On newer debian-like systems (stretch, Ubuntu 16.04) the test fails: > > # Failed test 'use Log::Journald;' > # at t/Log-Journald.t line 7. > # Tried to use 'Log::Journald'. > # Error: Can't load '/home/cpansand/.cpan/build/2017072912/Log- > Journald-0.20-0/blib/arch/auto/Log/Journald/Journald.so' for module > Log::Journald: /home/cpansand/.cpan/build/2017072912/Log-Journald- > 0.20-0/blib/arch/auto/Log/Journald/Journald.so: undefined symbol: > sd_journal_sendv at /opt/perl-5.27.2/lib/5.27.2/x86_64- > linux/DynaLoader.pm line 193. > # # Compilation failed in require at t/Log-Journald.t line 7. > # BEGIN failed--compilation aborted at t/Log-Journald.t line 7. > # Looks like you failed 1 test of 1. > t/Log-Journald.t .. > Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/1 subtests