Difference between revisions of "Install-amule-freebsd"

From AMule Project FAQ
Jump to: navigation, search
Line 2: Line 2:
  
  
== install amule 2.0.0rc3 on freebsd 5.x ==
+
== Install amule 2.0.0rc3 on freebsd 5.x ==
  
  
why would u ask... we have /usr/ports/net/amule
+
Why would u ask... we have <i>/usr/ports/net/amule</i>
  
well, this is the stable version 1.2.6
+
Well, this is the stable version 1.2.6
  
we wanna stay current or help testing / debugging, why else would u read this?
+
We wanna stay current or help testing / debugging, why else would u read this?
  
== install ports we need if u dont allready have (see ''pkg_info'') ==
+
== Install ports we need if u dont allready have (see ''pkg_info'') ==
  
  
Line 20: Line 20:
 
''x11-toolkits/wxgtk''
 
''x11-toolkits/wxgtk''
  
and (but u will have this already ;-)
+
and (but you will have this already ;-)
  
 
''devel/gettext''
 
''devel/gettext''
  
and (but u will have this already ;-)
+
and (but you will also have this already ;-)
  
 
''devel/gmake''
 
''devel/gmake''
  
u know how to install ports as a bsd user, so i dont have to tell u i hope.
+
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].
its just too easy u know. in case ur very new to freebsd, consult the great handbook at www.freebsd.org.
+
  
'''NOTE:''' if u think u have wxgtk installed because u see wxgtk2, u should know, wxgtk is linked to gtk1 and wxgtk2 is linked to gtk2. wxgtk2 and amule will be unstable! u have to use wxgtk, not wxgtk2!
+
'''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 will become aMule unstable! You have to use wxGTK, not wxGTK2.
  
== configure ==
+
== Configure  ==
  
  
the ./configure does not work 100% automagically, we must help it out a bit
+
The <i>./configure</i> does not work 100% automagically, we must help it out a bit.
  
i used the following line of configure, wich may differ for u a bit due to different os or library versions u have installed
+
I used the following line of <i>configure</i>, wich may differ for you a bit due to different OS or library versions you have installed
  
right now this line works for FreeBSD 5.2-CURRENT 03-May-2004 for example but version numbers may be different for freebsd 5.2.1 or the upcomming 5.3.
+
Right now this line works for FreeBSD 5.2-CURRENT 03-May-2004 for example but version numbers may be different for FreeBSD 5.2.1 or the upcomming 5.3.
  
edit the <your home> tag of course, or install it elsewhere.
+
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''
 
''./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''
  
this is one single line, not 3 lines or whatever wiki/html/ur browser wraps this line into.
+
<b>NOTE:</b> This is one single line, not 3 lines or whatever wiki/html/your browser wraps this line into.
  
u will see configure doesnt find gdlib-config, even if u unstalled gdlib. dont care, its just not there and its no "must have". just skip it.
+
You will see configure doesn't find <i>gdlib-config</i>, even if you installed <i>gdlib</i>. dont care, its just not there and its no "must have". Just skip it.
  
'''NOTE:''' if u get the following warning at the end of configure u are probably linking to wxgtk2 instead of wxgtk. amule will memleak and eat ur cpu. it will probably crash as well. use wxgtk as mentioned above!
+
'''NOTE:''' If you get the following warning
  
''WARNING!! Your wxWidgets copy has been linked against GTK2 and this will make aMule be instable, use so much cpu and ram. You have been advised, dont report bugs so.''
+
''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.''
  
== patch 1 ==
+
at the end of <i>configure</i> 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!
  
the problem would be:
+
==  Patch 1  ==
  
'''<nowiki>[...]
+
The problem would be:
 +
 
 +
'''<pre>[...]
 
/usr/bin/ld: cannot find -lcryptopp
 
/usr/bin/ld: cannot find -lcryptopp
 
gmake[2]: *** [cas] Error 1
 
gmake[2]: *** [cas] Error 1
Line 64: Line 65:
 
gmake[1]: *** [all-recursive] Error 1
 
gmake[1]: *** [all-recursive] Error 1
 
gmake[1]: Leaving directory `/home/eugene/aMule-2.0.0rc3'
 
gmake[1]: Leaving directory `/home/eugene/aMule-2.0.0rc3'
gmake: *** [all] Error 2</nowiki>'''
+
gmake: *** [all] Error 2</pre>'''
  
so we patch it now:
+
So we patch it now:
  
edit src/Makefile
+
''edit src/Makefile''
  
search for the line containing
+
Search for the line containing
  
 
''cryptopp''
 
''cryptopp''
  
this line will read as:
+
This line will read as:
  
 
''LIBS =  -lcryptopp''
 
''LIBS =  -lcryptopp''
  
add ''-L/usr/local/lib'' to that line
+
Add ''-L/usr/local/lib'' to that line
  
now the line will read as:
+
Now the line will read as:
  
 
''LIBS =  -L/usr/local/lib -lcryptopp''
 
''LIBS =  -L/usr/local/lib -lcryptopp''
  
== patch 2 ==
+
== Patch 2 ==
  
  
the problem would be:
+
The problem would be:
  
'''<nowiki>[...]
+
'''<pre>[...]
 
amule.cpp:39:30: execinfo.h: No such file or directory
 
amule.cpp:39:30: execinfo.h: No such file or directory
 
amule.cpp:40:28: mntent.h: No such file or directory
 
amule.cpp:40:28: mntent.h: No such file or directory
Line 115: Line 116:
 
gmake[1]: *** [all-recursive] Error 1
 
gmake[1]: *** [all-recursive] Error 1
 
gmake[1]: Leaving directory `/home/eugene/aMule-2.0.0rc3'
 
gmake[1]: Leaving directory `/home/eugene/aMule-2.0.0rc3'
gmake: *** [all] Error 2</nowiki>'''
+
gmake: *** [all] Error 2</pre>'''
  
so we patch it now:
+
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 :-)
+
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
+
Edit ''src/amule.cpp''
  
 
and insert
 
and insert
Line 127: Line 128:
 
''#define __OPENBSD__''
 
''#define __OPENBSD__''
  
at the top of this file. i placed it right before the first #include line...
+
at the top of this file. I placed it right before the first ''#include'' line...
  
what a workaround u may scream. hey we dont fiddle too much around with the code, just hack it to work and get ready to share ;-)
+
"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 ;-)
  
== make ==
+
== Make  ==
  
  
make will fail, use gmake
+
''make'' will fail, use ''gmake''
  
make is bsd make, gmake is gnu make, both are not compatible
+
''make'' is BSD make, ''gmake'' is gnu make. They are '''not''' compatible.
  
now do:
+
Now do:
  
 
''gmake''
 
''gmake''
  
get urself a hot green tea (i prefer some sort of sencha) while it is compiling
+
Get yourself a hot green tea (I prefer some sort of sencha) while it is compiling.
  
then do:
+
Then do:
  
 
''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''
or whereever u installed it to...
+
or wherever you installed it to...
  
have phun
+
Have phun
  
 
Eugene
 
Eugene
  
== Update - using the port ==
+
== Update - Using the port ==
  
 
I've just released the 2.0.0rc3 port.  
 
I've just released the 2.0.0rc3 port.  
See http://www.amule.org/amule/download.php ( and  
+
See [http://www.amule.org/amule/download.php] (and [http://contribs.martymac.com]) to download it.  
http://contribs.martymac.com ) to download it.  
+
  
Since the port is not (yet) officially available,  
+
Since the port is not (yet) 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''.
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 :)
 
Any feedback welcome, many thanks to Eugene for this great wiki :)
  
 
Ganael Laplanche.
 
Ganael Laplanche.

Revision as of 15:17, 31 May 2004

This page is likely to be updated soon, but it might help you even right now.


Install amule 2.0.0rc3 on freebsd 5.x

Why would u ask... we have /usr/ports/net/amule

Well, this is the stable version 1.2.6

We wanna stay current or help testing / debugging, why else would u read this?

Install ports we need if u dont allready have (see pkg_info)

security/cryptopp

and

x11-toolkits/wxgtk

and (but you will have this already ;-)

devel/gettext

and (but you will also have this already ;-)

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 [1].

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 will become aMule unstable! You have to use wxGTK, not wxGTK2.

Configure

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

I used the following line of configure, wich may differ for you a bit due to different OS or library versions you have installed

Right now this line works for FreeBSD 5.2-CURRENT 03-May-2004 for example but version numbers may be different for FreeBSD 5.2.1 or the upcomming 5.3.

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. dont care, its just not there and its 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!

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 ;-)

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

Update - Using the port

I've just released the 2.0.0rc3 port. See [2] (and [3]) to download it.

Since the port is not (yet) 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.