Comments (13)
I'll take a look at the warnings. I have to build linknx for Stretch for my own purpose anyway. Thanks for pointing this out @tru7 :)
from linknx.
I fixed all warnings regarding gcc6. C++11 functionality such as std::unique_ptr is now required to build linknx but I believe this is acceptable. But I am still fixing Travis' configuration to make it build with gcc6.
For now, the fix is in branch issue31. All tests pass.
I will merge it on master once I had time to test it on my own installation. Unless @tru7 is faster than me to report here that it works well for him ;)
from linknx.
branch issue31 compiles well for gcc v6 now. My possibilities for testing are very limited on this Debian system, at least "linknx -V" runs fine.
However branch issue31 breaks on older gcc. Here with gcc version 4.9.2 (Debian 4.9.2-10) it stops with:
In file included from ruleserver.cpp:24:0:
ioport.h:112:10: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
std::unique_ptr rxThread_m;
^
Makefile:413: recipe for target 'ruleserver.o' failed
I think the code must also work with older gcc
from linknx.
This is due to c++11. Travis had the same issue before I reconfigured it to use gcc6.
With gcc4, -std=c++0x may help. Or I can get rid of that unique_ptr feature, as it is used only once.
I'll have a look.
But at some point, we'll have to accept to break with older GCC anyway.
from linknx.
@2franix agreed, but gcc 4.9.2 is an Debian Jessie which was the stable version until recently. So it's too early to drop that I think. And it also fails on current Ubuntu LTS with gcc 5.4.0. Good work anyway, thanks.
from linknx.
I fixed the problem by removing this unique_ptr usage. It was not worth the trouble.
I also changed travis' configuration to build for both gcc6 and gcc4.
from linknx.
good job @2franix ! Compilation now works fine with branch issue31 for gcc with version 4, 5 and 6. Quick test with "linknx -V" also works for all versions. I guess it's time for a merge and maybe for a new release. Thanks
from linknx.
Closing the issue is premature. Until it is merged with master, it may be helpful to have it open, thus more visible, in case others encounter the same issue.
I'll merge with master once I can test this new version a little bit more.
from linknx.
After a few days with this version in production at home, I think it is safe to consider it stable.
New release 0.0.1.34 is out, @tru7.
from linknx.
@2franix out of curiosity, why is C++98 requested here?
from linknx.
Do you mean, why did I eventually refrain from using smart pointers? As stated above, we did not want to leave Debian Jessie's users behind at that time, as this version of Debian was still using gcc4. Leveraging C++11 features like std::unique_ptr
in gcc4 is not easy, if at all possible. So I figured it was just not worth the pain and stuck to simpler C++ for now.
If this was not your question, then please elaborate.
from linknx.
Current oldest supported Linux system is CentOS7 with GCC 4.8.5. It supports unique_ptr just fine.
from linknx.
According to https://gcc.gnu.org/projects/cxx-status.html, the first feature-complete version of GCC of the 2011 standard was 4.8.1. So yes, version 4.9 in Jessie was fine and my initial fix would have built with -std=c++11
. I did not take the time to review the standard back then, as the simplest solution was just not to use std::unique_ptr
.
from linknx.
Related Issues (20)
- Create Tag / Release for the project HOT 3
- Add support for 229 and 235 KNX datapoints HOT 2
- Unable to start linknx with --daemon from systemd HOT 3
- Enhance rule triggering with rising and falling edges HOT 8
- New rule action that triggers another rule HOT 2
- Get rid of pthsem HOT 5
- Integrate with Travis CI HOT 2
- Rules cannot mix if-xxx and on-xxx actionlists
- Regression in rules in v0.0.1.35 and v0.0.1.36
- Compile fails since commit 0512f6d0a07d50df33bfdca22d48360d164922a8 HOT 1
- sunrise and sunset timer fail to schedule at the end of the month (for the first day of the next month) HOT 4
- Move to Github Actions HOT 2
- configure: error: cannot run /bin/bash ./config.sub HOT 6
- init="request" for object of type "20.102" does not trigger a read group address on the bus at startup HOT 4
- Broken build on Github, master branch HOT 1
- Migrate from MySQL connector to MariaDB connector
- Make CI build matrix more explicit in the way it selects optional features
- Library in cpp HOT 1
- rules created with flag active="no" have stateless actionlists executed on initialization HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linknx.