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

GCC 4.8 (C++11) support #256

Merged
merged 1 commit into from Aug 5, 2016

Conversation

Projects
None yet
3 participants
@caronc
Contributor

caronc commented Aug 4, 2016

With respect to a blog I wrote on NZBGet v17, the only complaint I had with it was the fact everything was re-factored to use the C++14 standards to which most (Stable) Linux distributions don't support. I was bummed out when i found out i couldn't compile it anymore with CentOS 7 specifically.

I wrote a patch that made it compatible with my OS (by reverting a bunch of the code to follow C++11 standards instead) and shared it here. Although I may have started the initiative of this change, @hugbug gets credit for greatly simplifying the patch I had started and sharing it with me for this commit.

This pull request provides the ability to compile NZBGet on older Linux Distributions for those (like me) who want to build it themselves and have it link to the shared libraries maintained by our OS.

@Prinz23

This comment has been minimized.

Show comment
Hide comment
@Prinz23

Prinz23 Aug 5, 2016

At least on CentOS 7 gcc 4.9.2 should work according to this: https://gist.github.com/craigminihan/b23c06afd9073ec32e0c

Prinz23 commented Aug 5, 2016

At least on CentOS 7 gcc 4.9.2 should work according to this: https://gist.github.com/craigminihan/b23c06afd9073ec32e0c

@caronc

This comment has been minimized.

Show comment
Hide comment
@caronc

caronc Aug 5, 2016

Contributor

Except, what you're implying is that we don't adopt and use the mainstream packaged versions which are patched and maintained regularly by Red Hat (and then by the CentOS community). Compiling and manually installing a new version of the glib core ourselves forfeits all the stability we chose the OS for in the first place. @Prinz23, I guess what I'm saying is that a link to some ghist of someone who hacked their system and destroyed any integrity they had isn't a good argument. The proposal isn't a re-write of NZBGet, it's just more compiler support for non-bleeding edge systems.

Contributor

caronc commented Aug 5, 2016

Except, what you're implying is that we don't adopt and use the mainstream packaged versions which are patched and maintained regularly by Red Hat (and then by the CentOS community). Compiling and manually installing a new version of the glib core ourselves forfeits all the stability we chose the OS for in the first place. @Prinz23, I guess what I'm saying is that a link to some ghist of someone who hacked their system and destroyed any integrity they had isn't a good argument. The proposal isn't a re-write of NZBGet, it's just more compiler support for non-bleeding edge systems.

@hugbug

This comment has been minimized.

Show comment
Hide comment
@hugbug

hugbug Aug 5, 2016

Member

Thank you.

@Prinz23: considering the very small amount of changes in the patch, it't a good thing to have nzbget compatible with gcc 4.8 out of the box. Especially for users of CentOS, who has no option to upgrade their OS at the moment, unlike, for example, users of Ubuntu and Debian.

Member

hugbug commented Aug 5, 2016

Thank you.

@Prinz23: considering the very small amount of changes in the patch, it't a good thing to have nzbget compatible with gcc 4.8 out of the box. Especially for users of CentOS, who has no option to upgrade their OS at the moment, unlike, for example, users of Ubuntu and Debian.

@hugbug hugbug merged commit 418acb0 into nzbget:develop Aug 5, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@hugbug

This comment has been minimized.

Show comment
Hide comment
@hugbug

hugbug Aug 5, 2016

Member

Documentation

to merge into wiki after v17.1 release

Usage

To compile with gcc 4.8 use the following configure command:

CXXFLAGS="-std=c++11 -O2 -s" ./configure --disable-cpp-check

Important notes:

  • compiling is possible only without debug info. When trying to compile with -g the compiler fails with internal error. The original patch works in debug mode too but brings additional changes to source code.
  • support for gcc 4.8 is considered temporary and may be dropped in future NZBGet versions.
Member

hugbug commented Aug 5, 2016

Documentation

to merge into wiki after v17.1 release

Usage

To compile with gcc 4.8 use the following configure command:

CXXFLAGS="-std=c++11 -O2 -s" ./configure --disable-cpp-check

Important notes:

  • compiling is possible only without debug info. When trying to compile with -g the compiler fails with internal error. The original patch works in debug mode too but brings additional changes to source code.
  • support for gcc 4.8 is considered temporary and may be dropped in future NZBGet versions.

@cytec cytec referenced this pull request Aug 9, 2016

Closed

Please update NZBGet to 17.0 #2420

hugbug added a commit that referenced this pull request Oct 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment