openbmc / sdbusplus

C++ bindings for systemd dbus APIs
Apache License 2.0
104 stars 82 forks source link

Unable to run configure (to generate example code) #14

Closed PTaylor-RA closed 6 years ago

PTaylor-RA commented 7 years ago

This looks like a great project and possibly the only one I could find using the sd-bus D-Bus implementation. My goal is to generate the full example code for reference as I try to implement this library in my project. Specifically,

using Calculator_inherit = sdbusplus::server::object_t<sdbusplus::net::poettering::server::Calculator>;

and its inheritance by the Calculator struct seems to be hiding a LOT of code for setting up the server.

I couldn't find any options to just generate the examples, but it does appear that the sdbus++ tool is required for that so I tried going ahead and making the tool, but that won't work either. Here's what I'm trying (after running bootstrap.sh):

./configure --disable-libsdbusplus --enable-sdbuspp
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking whether make sets $(MAKE)... (cached) yes
checking for a Python interpreter with version >= 2.7... python
checking for python... /usr/bin/python
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.7/dist-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.7/dist-packages
./configure: line 4970: syntax error near unexpected token `newline'
./configure: line 4970: `AX_PKG_CHECK_MODULES('
msbarth commented 7 years ago

If you're attempting to build sdbusplus outside of an openbmc SDK, you will need to install/configure the autoconf archive package. Installing this depends on your distribution.

PTaylor-RA commented 7 years ago

I am not very good with makefiles, autoconf, etc and am afraid it will take me hours to figure out how to get everything configured. Would it be possible to just post the contents of the generated files:

calculator_server_generated_files = \
    net/poettering/Calculator/server.hpp \
    net/poettering/Calculator/server.cpp \
    net/poettering/Calculator/error.hpp \
    net/poettering/Calculator/error.cpp

I think that is all I would need to understand how to use the library.

The-Funk commented 6 years ago

I'm really interested in using this library as well. I have autoconf-archive installed on my system, but can't figure out where to go from there. Any advice?

amboar commented 6 years ago

Hi @The-Funk,

Your query isn't really a bug or a feature as such, and it's probably better served in a different forum. Please get in touch via Matrix, IRC or the mailing list and we'd be happy to help there:

Mail: openbmc@lists.ozlabs.org https://lists.ozlabs.org/listinfo/openbmc IRC: #openbmc on freenode.net Riot: #openbmc:matrix.org

The-Funk commented 6 years ago

@amboar I forgot I even commented here. I got it working. I needed the pkg-config package.... doh!