pyroscope / rtorrent-ps

:art: Extended rTorrent distribution with a fully customizable canvas and colors, other feature additions, and complete docs.
http://rtorrent-ps.readthedocs.io/
GNU General Public License v2.0
465 stars 43 forks source link

build: add "-std=c++0x" only on older platforms / gcc versions #103

Closed mhertz closed 6 years ago

mhertz commented 6 years ago

Firstly, thanks for amazing work, i'm blown away about rtorrent with your awesome additions in this and pyrocore! :)

Anyway, I just thought I would report an error i'm getting when following the source-install instructions. I don't personally have any issues because use rtorrent-ps-ch, but just to make you aware.

On arch-linux, meaning latest stable of every package, and as close to upstream as possible(minimal patching), then I get an error about std::vector and the building stops/fails. It did work when I tried building it manually, so I hunted for the culprit, found it and fixed in my install-script by adding in the following line before the './build.sh download deps extend' one:

sed -i 's|export CPPFLAGS="-std=c++0x -I $INSTALL_RELEASE_DIR/include${CPPFLAGS:+ }${CPPFLAGS}"|export CPPFLAGS="-I $INSTALL_RELEASE_DIR/include${CPPFLAGS:+ }${CPPFLAGS}"|' build.sh

So, '-std=c++0x' isn't working if included in CPPFLAGS on arch-linux. I see you already have a check for arch in build.sh which e.g. sources makepkg.conf.

Lastly, the instructions for building git instead of stable rtorrent/libtorrent doesn't work for me, and always ends with "you need to run xxxxx first", and when I change my script to include that and try again, it's the same, just with another xxxxx, which I have included. My script have cloned both rtorrent/libtorrent git repo's of-course additionally, as the instructions state and i've changed the build.sh arguments 3 or 4 times based on the error reported but to no avail. I gave up when it stated I needed to build deps first, even though I have. Thanks in advance!

-Martin.

mhertz commented 6 years ago

Pyroscope, please forgive my ignorance! The first issue holds true, but the later mentioned one was completely my own stupidity and I feel really embarrassed about posting that. The instructions clearly state that the build.sh line should be preceded with 'INSTALL_DIR=$HOME/.local/rtorrent-git', but as the instructions mentioned this was for installing and using both separately, then I omitted it as I wasn't installing nor using both, but of course when having problems I should've tested the complete proper line first, before reporting problems(and of course I now see that the line I omitted is crucial and for local installs, I don't know what I was thinking lol). Sorry again about that! I'm not closing this report, as the main issue still prevails. Thanks!

Edit: Btw, by running the command in the docs for building git head, I get a rtorrent from git but not with PS-patches, or atleast it just lists 'rTorrent 0.97/0.13.7' as title up-top and no PS functionality, but as the doc states, it's for testing compatibility of the patches and not stable/general-use, so I guess there's issues with one or more of the patches. It's no biggie, as im a very happy rtorrent-ps-ch user myself, but just wanted to atleast be able to build and test also the "mother-project" :)

-Martin.

pyroscope commented 6 years ago

The git build is exactly that, build a vanilla git version for producing PRs etc., not for production use.

mhertz commented 6 years ago

Ahh, gotcha, thanks pyroscope! I misinterpreted the bold part here to mean something else, sorry:

Building git HEAD of rTorrent You can also build the latest source of the main rTorrent project (including its libtorrent), with all the settings and rpath linking of the rtorrent-ps builds. This is intended to be used for checking compatibility of patches with the head of the core project, and preparing PRs for it. You will not get a stable system and these builds are in no way recommended for production use.

Btw, if you want to include build-deps for arch-linux in the docs, like you did for fedora(in addition to "official" debian-based), then here's the list, which is everything extra to install not part of base(standard minimal install) and base-devel(required to build packages) groups: (Packages in the AUR also never lists deps included in base and base-devel. Double-checked and tested!)

sudo pacman -S lsb-release subversion git time lsof tmux wget python2-setuptools python2-virtualenv python2 python2-cffi cppunit libxml2 libxslt

Thanks again!