Public bug reported:

When linking a simple program, the symbol is not found.

Program:
#include <iostream>
#include <systemd/sd-journal.h>

int main( int argc, char * argv[] )
{
    sd_journal_send( "MESSAGE=Begin test",
                     "MESSAGE_ID=test",
                     nullptr );
    std::cout << "test" << std::endl;
}

Build command:
g++ `pkg-config --cflags libsystemd` -o syslog-test `pkg-config --libs 
libsystemd` syslog-test.cpp
/usr/bin/ld: /tmp/cczTBtWR.o: in function `main':
syslog-test.cpp:(.text+0x3c): undefined reference to 
`sd_journal_send_with_location'
collect2: error: ld returned 1 exit status

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: libsystemd-dev 255.4-1ubuntu8.6
ProcVersionSignature: Ubuntu 6.8.0-2019.20-raspi-realtime 6.8.12
Uname: Linux 6.8.0-2019-raspi-realtime aarch64
ApportVersion: 2.28.1-0ubuntu3.5
Architecture: arm64
CasperMD5CheckResult: unknown
CloudArchitecture: aarch64
CloudID: none
CloudName: none
CloudPlatform: none
CloudSubPlatform: config
Date: Sat Mar 22 09:46:23 2025
ProcEnviron:
 LANG=C.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=dumb
 XDG_RUNTIME_DIR=<set>
SourcePackage: systemd
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: systemd (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug arm64 noble

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2103853

Title:
  sd_journal_send_with_location not in libsystemd in Ubuntu 24.04 RT
  raspi

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2103853/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to