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

Does not compile on Fedora 27 #3

Closed
jwflory opened this issue Nov 14, 2017 · 2 comments
Closed

Does not compile on Fedora 27 #3

jwflory opened this issue Nov 14, 2017 · 2 comments

Comments

@jwflory
Copy link
Contributor

jwflory commented Nov 14, 2017

Summary

When running make release, compiling fails and gives warnings about libevent and fails when it imports dbus/dbus.h.

Explanation

I noticed some required packages were missing in the README (pkg-config and ragel). I installed those and the other ones mentioned in the README. I tried building it on my Fedora 27 laptop and in a Fedora 26 Docker container and had the same result.

Expected results

  1. Git clone repository
  2. Install dependencies
  3. Run make release
  4. Successfully compile mpris-scrobbler

Actual results

  1. Git clone repository
  2. Install dependencies
  3. Run make release
  4. Fail on importing dbus

Stacktrace

This stacktrace is from my Fedora 26 container.

# dnf list installed | grep -i 'libevent'
libevent.x86_64                     2.0.22-3.fc26               @fedora
# dnf list installed | grep -i 'dbus'
dbus.x86_64                         1:1.11.18-1.fc26            @koji-override-0
dbus-glib.x86_64                    0.108-2.fc26                @anaconda       
dbus-libs.x86_64                    1:1.11.18-1.fc26            @koji-override-0
python3-dbus.x86_64                 1.2.4-6.fc26                @anaconda
# make release
Package libevent was not found in the pkg-config search path.
Perhaps you should add the directory containing `libevent.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libevent', required by 'virtual:world', not found
Package 'libcurl', required by 'virtual:world', not found
Package 'expat', required by 'virtual:world', not found
Package 'dbus-1', required by 'virtual:world', not found
Package 'openssl', required by 'virtual:world', not found
Package libevent was not found in the pkg-config search path.
Perhaps you should add the directory containing `libevent.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libevent', required by 'virtual:world', not found
Package 'libcurl', required by 'virtual:world', not found
Package 'expat', required by 'virtual:world', not found
Package 'dbus-1', required by 'virtual:world', not found
Package 'openssl', required by 'virtual:world', not found
Package libevent was not found in the pkg-config search path.
Perhaps you should add the directory containing `libevent.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libevent', required by 'virtual:world', not found
Package 'libcurl', required by 'virtual:world', not found
Package 'expat', required by 'virtual:world', not found
Package 'dbus-1', required by 'virtual:world', not found
Package 'openssl', required by 'virtual:world', not found
Package libevent was not found in the pkg-config search path.
Perhaps you should add the directory containing `libevent.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libevent', required by 'virtual:world', not found
Package 'libcurl', required by 'virtual:world', not found
Package 'expat', required by 'virtual:world', not found
Package 'dbus-1', required by 'virtual:world', not found
Package 'openssl', required by 'virtual:world', not found
Package libevent was not found in the pkg-config search path.
Perhaps you should add the directory containing `libevent.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libevent', required by 'virtual:world', not found
Package 'libcurl', required by 'virtual:world', not found
Package 'expat', required by 'virtual:world', not found
Package 'dbus-1', required by 'virtual:world', not found
Package 'openssl', required by 'virtual:world', not found
Package libevent was not found in the pkg-config search path.
Perhaps you should add the directory containing `libevent.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libevent', required by 'virtual:world', not found
Package 'libcurl', required by 'virtual:world', not found
Package 'expat', required by 'virtual:world', not found
Package 'dbus-1', required by 'virtual:world', not found
Package 'openssl', required by 'virtual:world', not found
Package libevent was not found in the pkg-config search path.
Perhaps you should add the directory containing `libevent.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libevent', required by 'virtual:world', not found
Package 'libcurl', required by 'virtual:world', not found
Package 'expat', required by 'virtual:world', not found
Package 'dbus-1', required by 'virtual:world', not found
Package 'openssl', required by 'virtual:world', not found
cc  -std=c11 -Wpedantic -D_GNU_SOURCE -Wall -Wextra -Wimplicit-fallthrough=0 -O2 -fno-omit-frame-pointer -DBUSNAME=org.mpris.scrobbler -DAPPLICATION_NAME=\"mpris-scrobbler\" src/daemon.c    -ompris-scrobbler
src/daemon.c:5:10: fatal error: dbus/dbus.h: No such file or directory
 #include <dbus/dbus.h>
          ^~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:96: mpris-scrobbler] Error 1
@mariusor
Copy link
Owner

Hi,

Unfortunately I don't know the exact packages on every distribution. For Ubuntu 14.04, for example, I had to get them in order for travis to work.

The rule of thumb is that you need the development equivalents for all of the listed libraries in the compile dependencies. (I have updated the readme to reflect this)

If you find this list for your version of Fedora, please add it here as a comment and I can add it to the documentation.

Thanx. :)

@jwflory
Copy link
Contributor Author

jwflory commented Nov 15, 2017

@mariusor Thanks! This was exactly the issue. I didn't realize I needed the development packages. Of course, when I installed them, everything worked fine with gcc and make.

Don't worry on the package dependencies for Fedora. I'm working on packaging it into an RPM here, and I'll send a PR to update the README once I get through it.

Closing as fixed!

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

No branches or pull requests

2 participants