Skip to content
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

rtorrent and libtorrent fail to build except with --cc=gcc-4.9 #157

Closed
Habbie opened this issue Apr 8, 2016 · 19 comments
Closed

rtorrent and libtorrent fail to build except with --cc=gcc-4.9 #157

Habbie opened this issue Apr 8, 2016 · 19 comments
Labels
upstream issue An upstream issue report is needed

Comments

@Habbie
Copy link
Contributor

Habbie commented Apr 8, 2016

gist-logs from 'brew install libtorrent': https://gist.github.com/Habbie/39a3d4e057da2957894644febfa16142
gist-logs from brew install rtorrent: https://gist.github.com/Habbie/df0cd0299e70753bf0add69a6a5cc996

brew install --cc=gcc-4.9 libtorrent (and same for rtorrent) work for me.

Not sure how to debug this further. Haven't managed to ask other users to try this. Let me know what I can do to debug this further!

@Habbie Habbie changed the title rtorrent fails to build except with --cc=gcc-4.9 rtorrent and libtorrent fail to build except with --cc=gcc-4.9 Apr 8, 2016
@ilovezfs
Copy link
Contributor

ilovezfs commented Apr 8, 2016

The original issue is from 2013 Homebrew/legacy-homebrew#24132

Should we just go back to clang and maybe it's fixed by now?

@Habbie
Copy link
Contributor Author

Habbie commented Apr 8, 2016

Good point, I can test that. Do I just remove the fails_with :clang block to switch it back to clang?

@ilovezfs
Copy link
Contributor

ilovezfs commented Apr 8, 2016

Yes. Both of them compiled and the tests passed just now but only extended usage will tell the tale based on how the original issue describes what went down.

@Habbie
Copy link
Contributor Author

Habbie commented Apr 8, 2016

How did you compile? I now get

Last 15 lines from /Users/peter/Library/Logs/Homebrew/rtorrent/03.make:
../../rak/priority_queue_default.h:40:10: fatal error: 'tr1/functional' file not found
#include <tr1/functional>
         ^
1 error generated.

and again I'm happy to debug but if it already works for you I'm curious to hear what you did.

@Habbie
Copy link
Contributor Author

Habbie commented Apr 8, 2016

To be clear, rtorrent is failing that way, libtorrent did build and install after removing fails_with :clang.

@ilovezfs
Copy link
Contributor

ilovezfs commented Apr 8, 2016

@Habbie you have to also put back in the ENV.libstdcxx if ENV.compiler == :clang that is commented out.

@Habbie
Copy link
Contributor Author

Habbie commented Apr 8, 2016

Oh that makes sense to get new C++ stuff.

@Habbie
Copy link
Contributor Author

Habbie commented Apr 8, 2016

It crashed for me:

Caught Segmentation fault, dumping stack:
0   rtorrent                            0x000000010a0bfacb _Z8do_panici + 233
1   libsystem_platform.dylib            0x00007fff90165f1a _sigtramp + 26
2   ???                                 0x0000000000000002 0x0 + 2
3   libtorrent.19.dylib                 0x000000010a2e855b _ZN7torrent16HandshakeManager14receive_failedEPNS_9HandshakeEii + 81
4   libtorrent.19.dylib                 0x000000010a2e693a _ZN7torrent9Handshake10event_readEv + 1360
5   libtorrent.19.dylib                 0x000000010a298842 _ZN7torrent10PollKQueue7performEv + 238
6   libtorrent.19.dylib                 0x000000010a2bd64f _ZN7torrent11thread_base10event_loopEPS0_ + 415
7   rtorrent                            0x000000010a0bf4f3 main + 13415
8   libdyld.dylib                       0x00007fff8acff5c9 start + 1
9   ???                                 0x0000000000000003 0x0 + 3
Abort trap: 6

so apparently we can't go clang on both. Maybe on one, not sure. My inclination is to submit a PR that would switch them to 4.9 without manual user intervention, do you have hints on how to put that in a formula?

@ilovezfs
Copy link
Contributor

ilovezfs commented Apr 8, 2016

This probably belongs in the boneyard.

@mistydemeo
Copy link
Member

Does it still segfault if we change the optimization level? Has the segfault been reported upstream? I know the C++11 compilation failure was, but I don't know if the segfault ever was.

@mistydemeo
Copy link
Member

Hm, no, the C++11 compilation failure is still totally there - never mind.

@mistydemeo
Copy link
Member

The C++11 branch was merged into master two years ago, but has yet to make it into a stable release: rakshasa/libtorrent@77a0f35

@dunn
Copy link
Contributor

dunn commented Apr 8, 2016

@Habbie both compile for me with GCC 5.3.0

@Habbie
Copy link
Contributor Author

Habbie commented Apr 8, 2016

Just as a datapoint, a clang libtorrent + 4.9 rtorrent also crashes.

@Habbie
Copy link
Contributor Author

Habbie commented Apr 8, 2016

@dunn does brew have a flag for that today?

@dunn
Copy link
Contributor

dunn commented Apr 8, 2016

If you have gcc-5 available, it should use it automatically, since it's marked as failing with Clang. But --cc=gcc-5 should work too.

@ilovezfs ilovezfs added the upstream issue An upstream issue report is needed label Apr 9, 2016
@ilovezfs
Copy link
Contributor

ilovezfs commented Apr 9, 2016

Other than possibly boneyarding this formula, I don't think there's an issue here beyond the usual things-that-don't-build-with-clang-don't-really-belong-in-core problem.

@ilovezfs ilovezfs closed this as completed Apr 9, 2016
@MikeMcQuaid
Copy link
Member

I don't think there's an issue here beyond the usual things-that-don't-build-with-clang-don't-really-belong-in-core problem.

It's on my TODO list to kill these.

dunn added a commit to dunn/homebrew-core that referenced this issue Apr 16, 2016
dunn added a commit that referenced this issue Apr 17, 2016
@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
upstream issue An upstream issue report is needed
Projects
None yet
Development

No branches or pull requests

5 participants