domoticz: fix build with gcc <= 4.7
PATCH 1/1 domoticz: fix build with gcc <= 4.7
sleep_for is not always defined with gcc <= 4.7, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52680
To fix this issue, add -D_GLIBCXX_USE_NANOSLEEP if gcc version is lower than 4.8
Fixes:
- http://autobuild.buildroot.net/results/0dada8dd727f32a4500670f6620adb05943ed0b7
--- package/domoticz/domoticz.mk | 6 ++++++ 1 file changed, 6 insertions(+)
package/domoticz/domoticz.mk +6 -0
@@ -18,6 +18,12 @@ DOMOTICZ_DEPENDENCIES = \ sqlite \ zlib +# sleep_for, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52680 +ifneq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_8),y) +DOMOTICZ_CONF_OPTS += \ + -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -D_GLIBCXX_USE_NANOSLEEP" +endif + # Due to the dependency on mosquitto, domoticz depends on # !BR2_STATIC_LIBS so set USE_STATIC_BOOST and USE_OPENSSL_STATIC to OFF DOMOTICZ_CONF_OPTS += \
Signature · 1 line
2.17.1
PATCH 1/1 domoticz: fix build with gcc <= 4.7
Hello,
Quoted 5 lines · Fabrice Fontaine
sleep_foris not always defined with gcc <= 4.7, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52680To fix this issue, add -D_GLIBCXX_USE_NANOSLEEP if gcc version is lower than 4.8
First comment in the bug report says:
"""
Don't define that manually, you should configure gcc with --enable-libstdccxx-time instead.
"""
So I'm not sure enthusiastic with going in this direction. What about making domoticz depend on gcc >= 4.8 ?
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 domoticz: fix build with gcc <= 4.7
Dear Thomas,
Le jeu. 20 sept. 2018 ? 23:50, Thomas Petazzoni <
[email protected]> a ?crit :
Quoted 11 lines
Hello,
Quoted 5 lines · Fabrice Fontaine
sleep_foris not always defined with gcc <= 4.7, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52680To fix this issue, add -D_GLIBCXX_USE_NANOSLEEP if gcc version is lower than 4.8
First comment in the bug report says:
Quoted 8 lines
"""
Don't define that manually, you should configure gcc with --enable-libstdccxx-time instead.
"""So I'm not sure enthusiastic with going in this direction. What about making domoticz depend on gcc >= 4.8 ?
OK, I will send a new patch with this dependency.
Quoted 8 lines
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Best Regards,
Fabrice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180920/3e9a99cb/attachment.html>