Code Monkey home page Code Monkey logo

Comments (13)

2franix avatar 2franix commented on May 26, 2024

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.

2franix avatar 2franix commented on May 26, 2024

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.

tru7 avatar tru7 commented on May 26, 2024

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.

2franix avatar 2franix commented on May 26, 2024

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.

tru7 avatar tru7 commented on May 26, 2024

@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.

2franix avatar 2franix commented on May 26, 2024

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.

tru7 avatar tru7 commented on May 26, 2024

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.

2franix avatar 2franix commented on May 26, 2024

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.

2franix avatar 2franix commented on May 26, 2024

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.

neheb avatar neheb commented on May 26, 2024

@2franix out of curiosity, why is C++98 requested here?

from linknx.

2franix avatar 2franix commented on May 26, 2024

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.

neheb avatar neheb commented on May 26, 2024

Current oldest supported Linux system is CentOS7 with GCC 4.8.5. It supports unique_ptr just fine.

from linknx.

2franix avatar 2franix commented on May 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.