HowTo Compile In Gentoo

From AMule Project FAQ
Revision as of 14:09, 19 March 2006 by S0undt3ch (Talk | contribs)

Jump to: navigation, search
English | Español

Introduction

Gentoo is known for choices. Unfortunately, some choices require more labor than others. As such, aMule comes in a variety of versions and installation methods based on what version of wxGTK you decide to use...

Also, if you plan to build a GUI-less core, you might want to take a look at http://bugs.gentoo.org/show_bug.cgi?id=109515, comment #3 contains a patch for wxGTK ebuild that removes the dependency on X.

Methods of Installation

amule-2.0.3.ebuild

This ebuild matches the most current, stable aMule release.

Dependencies: >=x11-libs/wxGTK-2.6.0; >=sys-libs/zlib-1.2.2; sys-devel/gettext; >=media-libs/libpng-1.2.8; >=media-libs/gd-2.0.32

amule-cvs

This ebuild is marked as unstable for all architectures.

Not intended for the general public. If you'd like to test out the daily development snapshot, then this is the version for you.

Dependencies: >=x11-libs/wxGTK-2.6.0; >=sys-libs/zlib-1.2.1; >=media-libs/gd-2.0.26; >=media-libs/libpng-1.2.0
Status: In development; not in Portage; requires portage overlay

Installation instructions

amule-2.0.3.ebuild

1. Emerge package:

 emerge --sync
 emerge amule -pv
 emerge amule

amule-cvs

The current ebuilds for aMule CVS can be found here. Download it and continue with this wiki article.

1. Define PORTDIR_OVERLAY. Open up /etc/make.conf with your favourite text editor and define the PORTDIR_OVERLAY variable. The default is:

 PORTDIR_OVERLAY="/usr/local/portage"

2. Create overlay for amule-cvs:

 mkdir -p {PORTDIR_OVERLAY}/net-p2p/amule-cvs
 mkdir -p {PORTDIR_OVERLAY}/net-p2p/amule-cvs/files

3. Add to package.keywords:

 echo "net-p2p/amule-cvs ~x86" >> /etc/portage/package.keywords

4. Copy amule-cvs-3.ebuild to {PORTDIR_OVERLAY}/net-p2p/amule-cvs

5. Copy amuled and amuleweb init script from official ebuild files:

 cp {PORTDIR}/net-p2p/amule/files/amuled.* {PORTDIR_OVERLAY}/net-p2p/amule-cvs/files/
 cp {PORTDIR}/net-p2p/amule/files/amuleweb.* {PORTDIR_OVERLAY}/net-p2p/amule-cvs/files/

PORTDIR is the official portage directory (usually /usr/portage/)

6. Change directory:

 cd {PORTDIR_OVERLAY}/net-p2p/amule-cvs/

7. Digest ebuild:

 ebuild amule-cvs-2.ebuild digest

8. Review installation flags:

 emerge amule-cvs -pv

9. Modify /etc/portage/package.use to suit your needs (please note that debug is enabled regardless of USE flag):

 net-p2p/amule-cvs X -amuled -debug gtk2 kad nls -nosystray -optimize -remote -remotegui -stats unicode

10. Install aMule CVS:

 emerge amule-cvs

PLEASE PLEASE PLEASE do emerge amule-cvs -pv before installing to determine how you want to compile aMule.

aMule 2.1.1 Compilation FAQ

When compiling aMule-2.1.1 on a hardened system with gcc-3.4.5(at least), it will fail with something like:

WebServer.h: In member function `T* UpdatableItemsContainer<T, G, I>::GetByID(I) [with T = SharedFile, G = CEC_SharedFile_Tag, I = CMD4Hash]':
WebServer.h:270: internal compiler error: in sweep_string_variable, at protector.c:1158

The possible problem is the -fPIE CFLAG because using `gcc-config` to select i386-pc-linux-gnu-3.4.5-hardenednopiessp fixed the problem, and you can even remove from the ebuild:

if has_hardened; then
    filter-flags -fstack-protector -fstack-protector-all
fi

You can read more on the subject following the link http://bugs.gentoo.org/show_bug.cgi?id=74457