Difference between revisions of "Install-amule-freebsd"

From AMule Project FAQ
Jump to: navigation, search
(=Update 15-Dec-2004: Install aMule-cvs on FreeBSD 5.3=)
Line 1: Line 1:
This page is likely to be updated soon, but it might help you even right now.
+
==  Installing official [[aMule]] ports  ==
  
== Update 15-Dec-2004: Install aMule-cvs on FreeBSD 5.3 ==
+
The official port is ''/usr/ports/net/amule''
 +
 
 +
This is the stable version [[aMule]] 1.2.6
 +
 
 +
We wanna stay current? help testing / debugging: read how to install/compile aMule on your won in this article! Read below.
 +
 
 +
== Install [[aMule CVS]] on [http://www.freebsd.org FreeBSD] 5.3 ==
  
 
Make sure you have installed:
 
Make sure you have installed:
  
/usr/ports/x11-toolkits/wxgtk2
+
''/usr/ports/x11-toolkits/wxgtk2''
  
-> Ignore the "problems" about wxgtk2 on FreeBSD. It works perfect!
+
* Ignore the "problems" about [[wxGTK]]2 on [http://www.freebsd.org FreeBSD]. It works perfectly!
  
Download the latest aMule-cvs snapshot
+
Download the latest [[aMule CVS]] snapshot
[http://www.amule.org/files/download.php?file=5 aMule-cvs Files]
+
[http://www.amule.org/files/download.php?file=5 here].
  
fetch http://amule.hirnriss.net/cvs/aMule-cvs-20041215.tar.bz2
+
(This article is tested with http://amule.hirnriss.net/cvs/aMule-cvs-20041215.tar.bz2)
  
tar -zxvf aMule-cvs-20041215.tar.bz2
+
''tar -zxvf aMule-cvs-20041215.tar.bz2''
  
cd amule-cvs/
+
''cd amule-cvs/''
  
./configure --prefix=~/amule-cvs/
+
''./configure --prefix=~/amule-cvs/
 
--with-wx-config=/usr/X11R6/bin/wx-config
 
--with-wx-config=/usr/X11R6/bin/wx-config
 
--with-wxbase-config=/usr/X11R6/bin/wx-config
 
--with-wxbase-config=/usr/X11R6/bin/wx-config
Line 25: Line 31:
 
--x-includes=/usr/X11R6/include --localstatedir=/usr/X11R6/share/gnome
 
--x-includes=/usr/X11R6/include --localstatedir=/usr/X11R6/share/gnome
 
--datadir=/usr/X11R6/share/gnome --with-html-dir=/usr/X11R6/share/doc
 
--datadir=/usr/X11R6/share/gnome --with-html-dir=/usr/X11R6/share/doc
--with-crypto-prefix=/usr/local --with-included-gettext --disable-cas
+
--with-crypto-prefix=/usr/local --with-included-gettext --disable-cas''
  
gmake
+
''gmake''
cd ~/amule-cvs/src/amule
+
 
 +
''cd ~/amule-cvs/src/amule''
  
If you would like to install RC7, you can follow the same instructions.
+
If you would like to compile/install [[aMule]] 2.0.0-rc7, you can follow the same instructions.
  
 
Greetz,
 
Greetz,
Line 37: Line 44:
 
[mailto://amule@air-maxx.net amule@air-maxx.net]
 
[mailto://amule@air-maxx.net amule@air-maxx.net]
  
== Install [[aMule]] 2.0.0rc3 on [http://www.freebsd.org FreeBSD] 5.x  ==
+
== Manual compilation ==
  
Why would you ask... we have ''/usr/ports/net/amule''
+
Follow this guide to compile [[aMule]] on your [http://www.freebsd.org FreeBSD] system.
Well, this is the stable version 1.2.6
+
We wanna stay current or help testing / debugging, why else would you read this?
+
  
==  Install ports we need if you don't allready have (see ''pkg_info'') ==
+
===  Requirements ===
 +
 
 +
Install this ports if you don't already have them installed (see ''pkg_info''), since they are needed to compile [[aMule]]:
  
 
''x11-toolkits/wxgtk''
 
''x11-toolkits/wxgtk''
  
also (but you will have these already ;-)) ''devel/gettext'' and ''devel/gmake''
+
If you are installing any [[aMule]] version between 2.0.0-rc1 and 2.0.0-rc5 (inclusive), you will also need ''security/cryptopp''
 +
 
 +
Also (but you will have these already ;-)) ''devel/gettext'' and ''devel/gmake''
  
 
You know how to install ports as a [http://www.bsd.org BSD] user, so I don't have to tell you, I hope. It's just too easy you know. In case you're very new to [http://www.freebsd.org FreeBSD], consult the great [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook handbook] at [http://www.freebsd.org http://www.freebsd.org].
 
You know how to install ports as a [http://www.bsd.org BSD] user, so I don't have to tell you, I hope. It's just too easy you know. In case you're very new to [http://www.freebsd.org FreeBSD], consult the great [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook handbook] at [http://www.freebsd.org http://www.freebsd.org].
  
==  Configure  ==
+
'''NOTE:''' If you think you have [[wxWidgets|wxGTK]] installed because you see [[wxWidgets|wxGTK2]], you should know, [[wxWidgets|wxGTK]] is linked against [http://www.gtk.org GTK1] and [[wxWidgets|wxGTK2]] is linked against [http://www.gtk.org GTK2]. Using [[wxWidgets|wxGTK2]] with [[aMule]] might become [[aMule]] unstable! You should use [[wxWidgets|wxGTK]], not [[wxWidgets|wxGTK2]].
 +
 
 +
===  Configure  ===
 +
 
 +
(Tested with  [http://www.freebsd.org FreeBSD] 5.2-CURRENT 03-May-2004)
  
 
The ''./configure'' does not work 100% automagically, we must help it out a bit.
 
The ''./configure'' does not work 100% automagically, we must help it out a bit.
Line 69: Line 82:
 
at the end of ''configure'' you are probably linking against [[wxWidgets|wxGTK2]] instead of [[wxWidgets|wxGTK]]. [[aMule]] will memleak and eat your CPU. It will probably crash as well. Use [[wxWidgets|wxGTK]] as mentioned above!
 
at the end of ''configure'' you are probably linking against [[wxWidgets|wxGTK2]] instead of [[wxWidgets|wxGTK]]. [[aMule]] will memleak and eat your CPU. It will probably crash as well. Use [[wxWidgets|wxGTK]] as mentioned above!
  
==  Make  ==
+
===  Make  ===
 
+
  
 
''make'' will fail, use ''gmake''
 
''make'' will fail, use ''gmake''
Line 86: Line 98:
 
''gmake install''
 
''gmake install''
  
==  Use it  ==
+
===  Use it  ===
 
+
  
 
Just start it with ''/home/<your home>/amule/bin/amule''
 
Just start it with ''/home/<your home>/amule/bin/amule''
Line 96: Line 107:
 
Eugene
 
Eugene
  
== The rc6 port ==
+
== The [[aMule]] 2.0.0-rc7 port ==
  
Visit http://www.amule-project.net/amule/thread.php?threadid=3758 and do as it sais ;-)
+
Hi all, the rc7 port is now available on my website:
 +
http://contribs.martymac.com
  
== The rc7 port ==
+
I've also added binaries for those who don't want to spend time to compile. The port works on [http://www.freebsd.org FreeBSD] 4.10 and 5.2.1. Any feedback welcome. I've changed some options to the Makefile: amule-ed2k-handler is now amule-ed2k, and cmd+GUI options are now joined in global ones. Do a "make config" prior to the "make install" to update your config file.
 
+
Hi all, the rc7 port is now available on my website : http://contribs.martymac.com.
+
I've also added binaries for those who don't want to spend time to compile. The port works on FreeBSD 4.10 and 5.2.1. Any feedback welcome. I've changed some options to the Makefile : amule-ed2k-handler is now amule-ed2k, and cmd+GUI options are now joined in global ones. Do a "make config" prior to the "make install" to update your config file.
+
  
 
Enjoy :)
 
Enjoy :)
Line 112: Line 121:
  
 
[mailto://ganael.laplanche@martymac.com ganael.laplanche@martymac.com]
 
[mailto://ganael.laplanche@martymac.com ganael.laplanche@martymac.com]
 +
 +
== The [[aMule]] 2.0.0-rc6 port ==
 +
 +
Visit http://www.amule-project.net/amule/thread.php?threadid=3758 and do as it says ;-)
 +
 +
== The [[aMule]] 2.0.0-rc4a ports ==
 +
 +
Hi all, new update to this wiki: 2.0.0rc4a ports are available. No, you ain't dreaming, you've just seen an 's' appended, because there are two ports.
 +
 +
Unfortunately, [http://www.freebsd.org FreeBSD] 4.x (and [http://gcc.gnu.org GCC] 2.95) doesn't provide some required libs (see the patches inside the archive) to build this brand-new [[aMule]] version, so I released two ports :
 +
 +
*One for the 4.x branch, which won't compile under 5.x:
 +
Includes many patches, sometimes tricky, to make it work. This could lead to unstability and require further testing. Any feedback is welcome :)
 +
 +
*Another one for the 5.x branch, wich won't compile under 4.x:
 +
This one doesn't include any patch.
 +
 +
To download the ports: http://www.amule.org/amule/download.php or http://contribs.martymac.com
 +
 +
Enjoy!
 +
 +
Ganael LAPLANCHE
 +
 +
http://contribs.martymac.com
 +
 +
[mailto://ganael.laplanche@martymac.com ganael.laplanche@martymac.com]
 +
 +
== The [[aMule]] 2.0.0-rc3 port ==
 +
 +
I've just released the 2.0.0rc3 port.
 +
 +
See http://www.amule.org/amule/download.php (and http://contribs.martymac.com) to download it.
 +
 +
== Installing non-official ports ==
 +
 +
If you download a port which is not officially available, you'll have to uncompress it (''tar xvzf file.tgz'') into the ''/usr/ports/net'' directory and then do a standard ''make install''.
 +
 +
Any feedback welcome, many thanks to Eugene for this great wiki :)
 +
 +
Ganael Laplanche.
 +
 +
== Compilation problems ==
 +
 +
If you still can't compile [[aMule]] see if the following patches work.
 +
 +
=== Patch 1 ===
 +
 +
The problem would be:
 +
 +
''<pre>[...]
 +
/usr/bin/ld: cannot find -lcryptopp
 +
gmake[2]: *** [cas] Error 1
 +
gmake[2]: Leaving directory `/home/eugene/aMule-2.0.0rc3/src'
 +
gmake[1]: *** [all-recursive] Error 1
 +
gmake[1]: Leaving directory `/home/eugene/aMule-2.0.0rc3'
 +
gmake: *** [all] Error 2</pre>''
 +
 +
So we patch it now:
 +
 +
''edit src/Makefile''
 +
 +
Search for the line containing
 +
 +
''cryptopp''
 +
 +
This line will read as:
 +
 +
''LIBS = -lcryptopp''
 +
 +
Add ''-L/usr/local/lib'' to that line
 +
 +
Now the line will read as:
 +
 +
''LIBS = -L/usr/local/lib -lcryptopp''
 +
 +
=== Patch 2 ===
 +
 +
The problem would be:
 +
 +
''<pre>[...]
 +
amule.cpp:39:30: execinfo.h: No such file or directory
 +
amule.cpp:40:28: mntent.h: No such file or directory
 +
In file included from /usr/local/include/cryptopp/pkcspad.h:4,
 +
from /usr/local/include/cryptopp/rsa.h:9,
 +
from ClientCredits.h:32,
 +
from amule.cpp:86:
 +
/usr/local/include/cryptopp/cryptlib.h:1358:9: warning: "/*" within comment
 +
amule.cpp: In member function `virtual bool CamuleApp: nInit()':
 +
amule.cpp:423: error: `setmntent' undeclared (first use this function)
 +
amule.cpp:423: error: (Each undeclared identifier is reported only once for
 +
each function it appears in.)
 +
amule.cpp:429: error: `getmntent' undeclared (first use this function)
 +
amule.cpp:431: error: invalid use of undefined type `struct mntent'
 +
amule.cpp:427: error: forward declaration of `struct mntent'
 +
amule.cpp:432: error: invalid use of undefined type `struct mntent'
 +
amule.cpp:427: error: forward declaration of `struct mntent'
 +
amule.cpp:437: error: invalid use of undefined type `struct mntent'
 +
amule.cpp:427: error: forward declaration of `struct mntent'
 +
amule.cpp: In member function `virtual void CamuleApp: nFatalException()':
 +
amule.cpp:982: error: `backtrace' undeclared (first use this function)
 +
amule.cpp:987: error: `backtrace_symbols' undeclared (first use this function)
 +
gmake[2]: *** [amule-amule.o] Error 1
 +
gmake[2]: Leaving directory `/home/eugene/aMule-2.0.0rc3/src'
 +
gmake[1]: *** [all-recursive] Error 1
 +
gmake[1]: Leaving directory `/home/eugene/aMule-2.0.0rc3'
 +
gmake: *** [all] Error 2</pre>''
 +
 +
So we patch it now:
 +
 +
As there is no official [http://www.freebsd.org FreeBSD] support in [[aMule]] yet we will patch it to work... Well there is [http://www.openbsd.org OpenBSD] support and this support will work for us too :-)
 +
 +
Edit ''src/amule.cpp''
 +
 +
and insert
 +
 +
''#define __OPENBSD__''
 +
 +
at the top of this file. I placed it right before the first ''#include'' line...
 +
 +
"What a workaround!" you may scream. Hey, we don't fiddle too much around with the code, just hack it to work and get ready to share ;-)

Revision as of 02:38, 16 December 2004

Installing official aMule ports

The official port is /usr/ports/net/amule

This is the stable version aMule 1.2.6

We wanna stay current? help testing / debugging: read how to install/compile aMule on your won in this article! Read below.

Install aMule CVS on FreeBSD 5.3

Make sure you have installed:

/usr/ports/x11-toolkits/wxgtk2

  • Ignore the "problems" about wxGTK2 on FreeBSD. It works perfectly!

Download the latest aMule CVS snapshot here.

(This article is tested with http://amule.hirnriss.net/cvs/aMule-cvs-20041215.tar.bz2)

tar -zxvf aMule-cvs-20041215.tar.bz2

cd amule-cvs/

./configure --prefix=~/amule-cvs/ --with-wx-config=/usr/X11R6/bin/wx-config --with-wxbase-config=/usr/X11R6/bin/wx-config --disable-debug --with-curl-config=/usr/local/bin/curl-config --enable-optimize --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include --localstatedir=/usr/X11R6/share/gnome --datadir=/usr/X11R6/share/gnome --with-html-dir=/usr/X11R6/share/doc --with-crypto-prefix=/usr/local --with-included-gettext --disable-cas

gmake

cd ~/amule-cvs/src/amule

If you would like to compile/install aMule 2.0.0-rc7, you can follow the same instructions.

Greetz, Martin

amule@air-maxx.net

Manual compilation

Follow this guide to compile aMule on your FreeBSD system.

Requirements

Install this ports if you don't already have them installed (see pkg_info), since they are needed to compile aMule:

x11-toolkits/wxgtk

If you are installing any aMule version between 2.0.0-rc1 and 2.0.0-rc5 (inclusive), you will also need security/cryptopp

Also (but you will have these already ;-)) devel/gettext and devel/gmake

You know how to install ports as a BSD user, so I don't have to tell you, I hope. It's just too easy you know. In case you're very new to FreeBSD, consult the great handbook at http://www.freebsd.org.

NOTE: If you think you have wxGTK installed because you see wxGTK2, you should know, wxGTK is linked against GTK1 and wxGTK2 is linked against GTK2. Using wxGTK2 with aMule might become aMule unstable! You should use wxGTK, not wxGTK2.

Configure

(Tested with FreeBSD 5.2-CURRENT 03-May-2004)

The ./configure does not work 100% automagically, we must help it out a bit.

Edit the <your home> tag, of course, or install it elsewhere.

./configure --prefix=/home/<your home>/amule --with-wx-config=/usr/X11R6/bin/wxgtk-2.4-config --with-wxbase-config=/usr/X11R6/bin/wxgtk-2.4-config

NOTE: This is one single line, not 3 lines or whatever wiki/HTML/your browser wraps this line into.

You will see configure doesn't find gdlib-config, even if you installed gdlib. Don't care, it's just not there and it's no "must have". Just skip it.

NOTE: If you get the following warning:

WARNING!! Your wxWidgets copy has been linked against GTK2 and this will make aMule be unstable, use so much cpu and ram. You have been advised, don't report bugs so.

at the end of configure you are probably linking against wxGTK2 instead of wxGTK. aMule will memleak and eat your CPU. It will probably crash as well. Use wxGTK as mentioned above!

Make

make will fail, use gmake

make is BSD make, gmake is GNU make. They are not compatible.

Now do:

gmake

Get yourself a hot green tea (I prefer some sort of sencha) while it is compiling.

Then do:

gmake install

Use it

Just start it with /home/<your home>/amule/bin/amule or wherever you installed it to...

Have phun

Eugene

The aMule 2.0.0-rc7 port

Hi all, the rc7 port is now available on my website: http://contribs.martymac.com

I've also added binaries for those who don't want to spend time to compile. The port works on FreeBSD 4.10 and 5.2.1. Any feedback welcome. I've changed some options to the Makefile: amule-ed2k-handler is now amule-ed2k, and cmd+GUI options are now joined in global ones. Do a "make config" prior to the "make install" to update your config file.

Enjoy :)

Ganael LAPLANCHE

http://contribs.martymac.com

ganael.laplanche@martymac.com

The aMule 2.0.0-rc6 port

Visit http://www.amule-project.net/amule/thread.php?threadid=3758 and do as it says ;-)

The aMule 2.0.0-rc4a ports

Hi all, new update to this wiki: 2.0.0rc4a ports are available. No, you ain't dreaming, you've just seen an 's' appended, because there are two ports.

Unfortunately, FreeBSD 4.x (and GCC 2.95) doesn't provide some required libs (see the patches inside the archive) to build this brand-new aMule version, so I released two ports :

  • One for the 4.x branch, which won't compile under 5.x:

Includes many patches, sometimes tricky, to make it work. This could lead to unstability and require further testing. Any feedback is welcome :)

  • Another one for the 5.x branch, wich won't compile under 4.x:

This one doesn't include any patch.

To download the ports: http://www.amule.org/amule/download.php or http://contribs.martymac.com

Enjoy!

Ganael LAPLANCHE

http://contribs.martymac.com

ganael.laplanche@martymac.com

The aMule 2.0.0-rc3 port

I've just released the 2.0.0rc3 port.

See http://www.amule.org/amule/download.php (and http://contribs.martymac.com) to download it.

Installing non-official ports

If you download a port which is not officially available, you'll have to uncompress it (tar xvzf file.tgz) into the /usr/ports/net directory and then do a standard make install.

Any feedback welcome, many thanks to Eugene for this great wiki :)

Ganael Laplanche.

Compilation problems

If you still can't compile aMule see if the following patches work.

Patch 1

The problem would be:

[...]	 
/usr/bin/ld: cannot find -lcryptopp	 
gmake[2]: *** [cas] Error 1	 
gmake[2]: Leaving directory `/home/eugene/aMule-2.0.0rc3/src'	 
gmake[1]: *** [all-recursive] Error 1	 
gmake[1]: Leaving directory `/home/eugene/aMule-2.0.0rc3'	 
gmake: *** [all] Error 2

So we patch it now:

edit src/Makefile

Search for the line containing

cryptopp

This line will read as:

LIBS = -lcryptopp

Add -L/usr/local/lib to that line

Now the line will read as:

LIBS = -L/usr/local/lib -lcryptopp

Patch 2

The problem would be:

[...]	 
amule.cpp:39:30: execinfo.h: No such file or directory	 
amule.cpp:40:28: mntent.h: No such file or directory	 
In file included from /usr/local/include/cryptopp/pkcspad.h:4,	 
from /usr/local/include/cryptopp/rsa.h:9,	 
from ClientCredits.h:32,	 
from amule.cpp:86:	 
/usr/local/include/cryptopp/cryptlib.h:1358:9: warning: "/*" within comment	 
amule.cpp: In member function `virtual bool CamuleApp: nInit()':	 
amule.cpp:423: error: `setmntent' undeclared (first use this function)	 
amule.cpp:423: error: (Each undeclared identifier is reported only once for	 
each function it appears in.)	 
amule.cpp:429: error: `getmntent' undeclared (first use this function)	 
amule.cpp:431: error: invalid use of undefined type `struct mntent'	 
amule.cpp:427: error: forward declaration of `struct mntent'	 
amule.cpp:432: error: invalid use of undefined type `struct mntent'	 
amule.cpp:427: error: forward declaration of `struct mntent'	 
amule.cpp:437: error: invalid use of undefined type `struct mntent'	 
amule.cpp:427: error: forward declaration of `struct mntent'	 
amule.cpp: In member function `virtual void CamuleApp: nFatalException()':	 
amule.cpp:982: error: `backtrace' undeclared (first use this function)	 
amule.cpp:987: error: `backtrace_symbols' undeclared (first use this function)	 
gmake[2]: *** [amule-amule.o] Error 1	 
gmake[2]: Leaving directory `/home/eugene/aMule-2.0.0rc3/src'	 
gmake[1]: *** [all-recursive] Error 1	 
gmake[1]: Leaving directory `/home/eugene/aMule-2.0.0rc3'	 
gmake: *** [all] Error 2

So we patch it now:

As there is no official FreeBSD support in aMule yet we will patch it to work... Well there is OpenBSD support and this support will work for us too :-)

Edit src/amule.cpp

and insert

#define __OPENBSD__

at the top of this file. I placed it right before the first #include line...

"What a workaround!" you may scream. Hey, we don't fiddle too much around with the code, just hack it to work and get ready to share ;-)