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

Fix include paths to not confuse local files with system files #3669

Merged
merged 1 commit into from Oct 17, 2019
Merged

Fix include paths to not confuse local files with system files #3669

merged 1 commit into from Oct 17, 2019

Conversation

danielwallner
Copy link
Contributor

The build fails on my Arch Linux box without these changes

@gizmocuz
Copy link
Contributor

Thanks, but could you post the output of your original build issues?
You are removing includes

@gizmocuz gizmocuz merged commit 23f6928 into domoticz:development Oct 17, 2019
@gizmocuz
Copy link
Contributor

Thanks!!

@danielwallner
Copy link
Contributor Author

For completeness, the build issue was a number of these:

PluginManager.cpp:(.text+0x3cd6): undefined reference to `Json::Value::operator=(Json::Value&&)'

Caused by binary incompatibility of system and local version of json/json.h

This was not found during compile due to this line in CMakeLists.txt:

include_directories(${CMAKE_SOURCE_DIR}/main)

Which makes ../json/json.h always be found even if the relative path is wrong, but unfortunately on my system a sibling to the system json include was in the include paths and this got picked up instead (if the relative paths are correct it won't be).

A different mechanism to find stdafx.h than adding main to the include dirs would make this more obvious.

I'm a bit surprised that this doesn't seem to be a problem for more users.

@gizmocuz
Copy link
Contributor

@danielwallner , seems your the first user that reports this issue.
I compiled on various systems and never had this issue.

Did you follow:

https://www.domoticz.com/wiki/Raspberry_Pi_-_Build_Domoticz_from_source

@danielwallner
Copy link
Contributor Author

I followed what seemed relevant to Arch as it isn't using APT package management.
I also had to specify ssl libraries or cmake wouldn't find them.

This problem is likely only happening on distros that default installs headers like Arch or Gentoo and have an incompatible jsoncpp installed. Maybe that's not so common then.

@ffontaine
Copy link
Contributor

For information, I got the same build failure with domoticz on buildroot: http://autobuild.buildroot.org/results/a73/a73406eb780a454369ea997654b6b4c6b3757a41/build-end.log.
It could be related to the latest versions of jsoncpp: we started to got build failures after bumping jsoncpp from 1.8.4 to 1.9.1.

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

3 participants