GithubHelp home page GithubHelp logo

Comments (10)

rnarasappa avatar rnarasappa commented on August 20, 2024 1

Hi Stanislav,

Thanks for responding. Last week I was on holidays.
The dbus-daemon doesn't use the option "--address=systemd:". Based on your hint to look at the value of DBUS_SYSTEM_BUS_ADDRESS, I checked and noticed that the path indeed required a correction, i.e., default dbus build configuration used localstatedir=/usr/var. But I had the value /var/run/dbus/system_bus_socket set in DBUS_SYSTEM_BUS_ADDRESS.

In addition, I noticed we also need to include the string "unix:path". That is,
DBUS_SYSTEM_BUS_ADDRESS=unix:path=/usr/var/run/dbus/system_bus_socket

With this, the sdbus-c++ unit and integration tests are passing now.
Thanks for your help.

regards,
Raghunath

from sdbus-cpp.

sangelovic avatar sangelovic commented on August 20, 2024

from sdbus-cpp.

rnarasappa avatar rnarasappa commented on August 20, 2024

Hi Stanislav,

Yes, dbus-daemon is running. I have an example server & client code based on dbus-c++ library that works fine (they communicate over dbus) with the same dbus-daemon running.

The dbus-1.9.16 is being used and I have set the flag enable_systemd=no during its configuration (since I don't use a systemd environment). I believe that's correct.? Are there any other dbus configuration flags that need to be set for usage on a non-systemd environment with sdbus-c++ APIs.?

And, yes only the root login is being used for running all of these binaries & tests.

regards,
Raghunath

from sdbus-cpp.

sangelovic avatar sangelovic commented on August 20, 2024

Sorry for a bit delayed reply, have been quite busy.

I don't know what enable_systemd=no does exactly, but I don't think that is the cause of your problem. With what arguments is the dbus-daemon running in your system? I think it should not run with "--address=systemd:" parameter.

It might also very well be that the D-Bus socket path in your system is different than what sd-bus (implementation under sdbus-c++) expects. sd-bus by default tries opening /run/dbus/system_bus_socket, unless DBUS_SYSTEM_BUS_ADDRESS environment variable is set (see e.g. balena-os/wifi-connect#72). D-Bus socket path for system bus is mentioned in in D-Bus configuration file /usr/share/dbus-1/system.conf, under <listen> node. Please check whether they match, and try setting DBUS_SYSTEM_BUS_ADDRESS before running sdbus-c++ tests if not, and let me know.

from sdbus-cpp.

lujfsd avatar lujfsd commented on August 20, 2024

Hi Raghunath,
When you cross compile systemd, have you encountered the following error?
issue#12717
Can you give some advice?
Thanks!

from sdbus-cpp.

sangelovic avatar sangelovic commented on August 20, 2024

Hey lujfsd, are you using Yocto for cross-compilation? If so, what version? From the error description it seems like you don't have necessary dependencies for building libsystemd in your recipe. Please make sure you have libcap as DEPENDS and RDEPENDS dependency, among others (other DEPENDS dependencies are e.g. meson-native ninja-native git-native gperf-native gettext-native util-linux glibc).

Btw. I've prepared recipe for sdbus-c++ for Yocto versions Sumo, Thud, Warrior, and current master. They will soon be PRed to OpenEmbedded repo, I'm just waiting for the upcoming sdbus-c++ release.

from sdbus-cpp.

lujfsd avatar lujfsd commented on August 20, 2024

I'm not using Yocto 。I have solved this issues temporarily. issue#12717
Thanks for you reply。
I will be try if the Yocto released.

from sdbus-cpp.

rnarasappa avatar rnarasappa commented on August 20, 2024

Hi lujfsd,

Yes, I had seen the issue of linux/capability.h not being found during cross compilation for ARM.
I recall I had to just set the options right in my cross-file.txt. That is, the --sysroot, -DDESTDIR, -I options were passed with relevant staging & include paths. Both c_args/c_link_args and cpp_args/cpp_link_args were set to identical values for these options.

I didn't patch anything to the meson.build file. I had built systemd-241 with libcap 2.25.

regards,
Raghunath

from sdbus-cpp.

lujfsd avatar lujfsd commented on August 20, 2024

Hi,Raghunath
thank you, could you upload your cross-file.txt, please?

from sdbus-cpp.

rnarasappa avatar rnarasappa commented on August 20, 2024

cross_file.txt
Hi lujfsd,
Attached my cross-file.txt
regards,
Raghunath

from sdbus-cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.