Opened 12 years ago

Closed 12 years ago

#32295 closed defect (fixed)

libtorrent, rtorrent: build fails with clang

Reported by: blobdobguy@… Owned by: gardnermj@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: clang haspatch Cc: ryandesign (Ryan Carsten Schmidt)
Port: libtorrent, rtorrent

Description (last modified by mf2k (Frank Schima))

Error: Target org.macports.build returned: shell command failed (see log for details)
Error: Failed to install libtorrent
Log for libtorrent is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_libtorrent/libtorrent/main.log

Logfile is attached.

Attachments (5)

main.log (57.5 KB) - added by blobdobguy@… 12 years ago.
logfile containing build error
Portfile-libtorrent.diff (452 bytes) - added by gardnermj@… 12 years ago.
Portfile-rtorrent.diff (351 bytes) - added by gardnermj@… 12 years ago.
Portfile-libtorrent-devel.diff (377 bytes) - added by gardnermj@… 12 years ago.
Portfile-rtorrent-devel.diff (398 bytes) - added by gardnermj@… 12 years ago.

Download all attachments as: .zip

Change History (14)

Changed 12 years ago by blobdobguy@…

Attachment: main.log added

logfile containing build error

comment:1 Changed 12 years ago by blobdobguy@…

Cc: blobdobguy@… added

Cc Me!

comment:2 Changed 12 years ago by mf2k (Frank Schima)

Cc: blobdobguy@… removed
Description: modified (diff)
Keywords: clang added
Owner: changed from macports-tickets@… to gardnermj@…
Port: libtorrent added

comment:3 Changed 12 years ago by gardnermj@…

You're compiling with clang, right? Upstream has been working on fixing clang warnings and errors recently (http://rakshasa.no/pipermail/libtorrent-devel/2011-August/002655.html), but the changes haven't made it into a release yet. Until then I'd suggest either using gcc, or compiling from upstream's trunk.

comment:4 Changed 12 years ago by blobdobguy@…

I left everything as default. How do I switch from clang to gcc?

comment:5 Changed 12 years ago by blobdobguy@…

I have XCode 4.2.1 on Mac OS Lion.

comment:6 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Try llvm-gcc-4.2 first. Only try gcc if llvm-gcc-4.2 doesn't work. Please read ProblemHotlist#compiler.

comment:7 Changed 12 years ago by gardnermj@…

I didn't realize clang had become the default with Xcode 4.2. That explains why I hadn't had any problems building libtorrent, since I was still on Xcode 4.1.

The next upstream release should hopefully compile on clang. In the meanwhile, we can update the portfiles for libtorrent/rtorrent (and the devel versions) to use llvm-gcc-4.2.

Changed 12 years ago by gardnermj@…

Attachment: Portfile-libtorrent.diff added

Changed 12 years ago by gardnermj@…

Attachment: Portfile-rtorrent.diff added

Changed 12 years ago by gardnermj@…

Changed 12 years ago by gardnermj@…

comment:8 Changed 12 years ago by blobdobguy@…

It works with llvm-gcc.

comment:9 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Keywords: haspatch added
Port: rtorrent added
Resolution: fixed
Status: newclosed
Summary: libtorrent failed to buildlibtorrent, rtorrent: build fails with clang

Committed these changes for libtorrent and rtorrent in r88368. libtorrent-devel and rtorrent-devel were dealt with in #32681.

Note: See TracTickets for help on using tickets.