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

Update CMakeLists.txt #482

Merged
merged 2 commits into from
May 17, 2023
Merged

Update CMakeLists.txt #482

merged 2 commits into from
May 17, 2023

Conversation

LocutusOfBorg
Copy link
Contributor

Link systemd libraries, to avoid underlinking of tests with -DWITH_SYSTEMD_SOCKET_ACTIVATION=ON

[ 82%] Linking CXX executable gtest_dlt_daemon_gateway cd dlt-daemon-2.18.9/obj-x86_64-linux-gnu/tests && /usr/bin/cmake -E cmake_link_script CMakeFiles/gtest_dlt_daemon_gateway.dir/link.txt --verbose=1 /usr/bin/c++ -g -O2 -ffile-prefix-map=dlt-daemon-2.18.9=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -isystem /include -std=gnu++0x -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -rdynamic CMakeFiles/gtest_dlt_daemon_gateway.dir/gtest_dlt_daemon_gateway.cpp.o CMakeFiles/gtest_dlt_daemon_gateway.dir/__/systemd/3rdparty/sd-daemon.c.o -o gtest_dlt_daemon_gateway -Wl,-rpath,dlt-daemon-2.18.9/obj-x86_64-linux-gnu/src/daemon ../src/daemon/libdlt_daemon.so /usr/lib/x86_64-linux-gnu/libgtest.a /usr/lib/x86_64-linux-gnu/libgtest_main.a -lrt /usr/lib/x86_64-linux-gnu/libgtest.a /usr/bin/ld: ../src/daemon/libdlt_daemon.so: undefined reference to `sd_listen_fds_with_names'

LocutusOfBorg and others added 2 commits April 28, 2023 22:46
Link systemd libraries, to avoid underlinking of tests with 
-DWITH_SYSTEMD_SOCKET_ACTIVATION=ON

[ 82%] Linking CXX executable gtest_dlt_daemon_gateway
cd dlt-daemon-2.18.9/obj-x86_64-linux-gnu/tests && /usr/bin/cmake -E cmake_link_script CMakeFiles/gtest_dlt_daemon_gateway.dir/link.txt --verbose=1
/usr/bin/c++ -g -O2 -ffile-prefix-map=dlt-daemon-2.18.9=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -isystem /include -std=gnu++0x -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -rdynamic CMakeFiles/gtest_dlt_daemon_gateway.dir/gtest_dlt_daemon_gateway.cpp.o CMakeFiles/gtest_dlt_daemon_gateway.dir/__/systemd/3rdparty/sd-daemon.c.o -o gtest_dlt_daemon_gateway  -Wl,-rpath,dlt-daemon-2.18.9/obj-x86_64-linux-gnu/src/daemon ../src/daemon/libdlt_daemon.so /usr/lib/x86_64-linux-gnu/libgtest.a /usr/lib/x86_64-linux-gnu/libgtest_main.a -lrt /usr/lib/x86_64-linux-gnu/libgtest.a 
/usr/bin/ld: ../src/daemon/libdlt_daemon.so: undefined reference to `sd_listen_fds_with_names'
and removed deprecated versions

Signed-off-by: Michael Methner <mmethner@de.adit-jv.com>
set(SYSTEMD_LIBS systemd-journal systemd-id128)
else(SYSTEMD_VERSION LESS 209)
set(SYSTEMD_LIBS systemd)
endif(SYSTEMD_VERSION LESS 209)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the version check. Nobody should think that we support ten years old systemd versions.
Anyhow, it would not compile for systemd version 209 as the "api sd_listen_fds_with_names" was introduced in version 227.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I wondered if that check was just useless, but didn't have an old enough systemd to actually check that assumption I'm running 249.11 in my pc, and I didn't bother to chroot on some system that old :D

@michael-methner michael-methner merged commit 478ddcd into COVESA:master May 17, 2023
@LocutusOfBorg LocutusOfBorg deleted the patch-3 branch May 17, 2023 13:18
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.

None yet

2 participants