Difference between revisions of "Install-amule-freebsd"

From AMule Project FAQ
Jump to: navigation, search
(=patch 1=)
 
(78 intermediate revisions by 22 users not shown)
Line 1: Line 1:
maybe this page outdates soon,
+
<center>
until then it may help u
+
[[Install-amule-freebsd|English]] |
 +
[[Install-amule-freebsd-ru|Русский]] |
 +
[[Install-amule-freebsd-es|Espa&ntilde;ol]] |
 +
[[Install-amule-freebsd-it|Italiano]]
 +
</center>
  
 +
== Install aMule 2.2.4 on [http://www.freebsd.org FreeBSD] 6.X, 7.X ==
 +
Check that your /usr/ports is up-to-date, for example using portsnap:
 +
          portsnap fetch update
  
== install amule 2.0.0rc3 on freebsd 5.x ==
+
(you may need portsnap extract or portsnap fetch extract if not done before, you should be told at the end if this is necessary)
  
 +
Then, as the ports tree has been updated to 2.2.4, you should be able to just
  
why would u ask... we have /usr/ports/net/amule
+
Install aMule
  
well, this is the stable version 1.2.6
+
            cd /usr/ports/net/amule2
 +
            make config
 +
            make install clean
  
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'') ==
+
That should download and make all necessary dependencies etc.
  
 +
But if that doesn't work you can try (should also be useful for a newer version of aMule then 2.2.4 and the cvs):
  
''security/cryptopp''
 
  
and
 
  
''x11-toolkits/wxgtk''
+
Upgrade the FreeBSD 6.X (not needed on FreeBSD 7.X) flex release (2.5.4) with the new one (2.5.35):
  
and (but u will have this already ;-)
+
            cd  /usr/ports/textproc/flex
 +
            make install clean
  
''devel/gettext''
+
This installation didn't override the old /usr/bin/, but put a new release on /usr/local/bin/.
  
and (but u will have this already ;-)
+
Then we need to rename the old flex release:
  
''devel/gmake''
+
            mv /usr/bin/flex /usr/bin/flex.old
  
u know how to install ports as a bsd user, so i dont have to tell u i hope.
+
And check your version with this command:
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!
+
            flex --version
  
== configure ==
+
You should obtain: 2.5.35 (or newer)
  
 +
Install wxgtk28:
  
the ./configure does not work 100% automagically, we must help it out a bit
+
            cd /usr/ports/x11-toolkits/wxgtk28-unicode/
 +
            make install clean
  
i used the following line of configure, wich may differ for u a bit due to different os or library versions u have installed
+
Install cryptopp:
  
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.
+
            cd /usr/ports/security/cryptopp
 +
            make install clean
  
edit the <your home> tag of course, or install it elsewhere.
+
Install GD:
  
''./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''
+
            cd /usr/ports/graphics/gd
 +
            make install clean
  
this is one single line, not 3 lines or whatever wiki/html/ur browser wraps this line into.
+
Install GeoIP:
  
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.
+
            cd /usr/ports/net/GeoIP/
 +
            make install clean
  
'''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!
+
Download the aMule 2.2.4 source code
 +
[http://www.amule.org/files/files.php?cat=42 here].
  
''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.''
+
            tar -zxvf aMule-2.2.4.tar.bz2
 +
            cd aMule-2.2.2/
  
== patch 1 ==
+
You need to edit the file src/Scanner.l and after the line:
 +
            #include <wx/string.h>
 +
Add the line:
 +
            #include "Scanner.h.in"
  
the problem would be:
+
Configure some environement variable, for bash user:
 +
            export CPPFLAGS="-I/usr/local/include"
 +
            export LDFLAGS="-L/usr/local/lib"
 +
Or for csh user (default under FreeBSD):
 +
            setenv CPPFLAGS "-I/usr/local/include"
 +
            setenv LDFLAGS "-L/usr/local/lib"
 +
Then start the compilation:
 +
           
 +
            ./configure --prefix=/home/'''user'''/aMule-2.2.4/ \
 +
            --with-wx-config=/usr/local/bin/wxgtk2u-2.8-config --with-crypto-prefix=/usr/local/ \
 +
            --disable-debug --with-curl-config=/usr/local/bin/curl-config --enable-webserver  \
 +
            --enable-optimize --with-included-gettext --enable-amule-daemon --enable-amulecmd \
 +
            --enable-cas --enable-alcc --enable-geoip
  
'''<nowiki>[...]
+
'''NOTE:''' Check [[configure]]. Also, change '''user''' for your user name.
/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</nowiki>
+
'''
+
so we patch it now:
+
  
edit src/Makefile
+
            gmake
 +
            gmake install
  
search for the line containing
+
And start it:
 +
          ./amule-2.2.4/bin/amule &
  
''cryptopp''
 
  
this line will read as:
+
== Configuration info ==
  
''LIBS =  -lcryptopp''
+
After successfully installing:
  
add ''-L/usr/local/lib'' to that line
+
The program directory can be found: (~./aMule/). Means as root:
  
now the line will read as:
+
/root/.aMule/
  
''LIBS =  -L/usr/local/lib -lcryptopp''
+
any other user:
  
== patch 2 ==
+
/usr/home/<username>/.aMule/
  
 +
amule.conf can be found directly in the program folder. The webserver config file has to be made:
  
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 :-)
+
# amuleweb -w.
  
edit src/amule.cpp
+
and is called remote.conf
 
+
and insert
+
 
+
''#define __OPENBSD__''
+
 
+
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 ;-)
+
 
+
== make ==
+
 
+
 
+
make will fail, use gmake
+
 
+
make is bsd make, gmake is gnu make, both are not compatible
+
 
+
now do:
+
 
+
''gmake''
+
 
+
get urself 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 whereever u installed it to...
+
 
+
have phun
+
 
+
Eugene
+

Latest revision as of 17:13, 8 February 2010

English | Русский | Español | Italiano

Install aMule 2.2.4 on FreeBSD 6.X, 7.X

Check that your /usr/ports is up-to-date, for example using portsnap:

          portsnap fetch update

(you may need portsnap extract or portsnap fetch extract if not done before, you should be told at the end if this is necessary)

Then, as the ports tree has been updated to 2.2.4, you should be able to just

Install aMule

           cd /usr/ports/net/amule2
           make config
           make install clean


That should download and make all necessary dependencies etc.

But if that doesn't work you can try (should also be useful for a newer version of aMule then 2.2.4 and the cvs):


Upgrade the FreeBSD 6.X (not needed on FreeBSD 7.X) flex release (2.5.4) with the new one (2.5.35):

           cd  /usr/ports/textproc/flex
           make install clean

This installation didn't override the old /usr/bin/, but put a new release on /usr/local/bin/.

Then we need to rename the old flex release:

           mv /usr/bin/flex /usr/bin/flex.old

And check your version with this command:

           flex --version

You should obtain: 2.5.35 (or newer)

Install wxgtk28:

           cd /usr/ports/x11-toolkits/wxgtk28-unicode/
           make install clean

Install cryptopp:

           cd /usr/ports/security/cryptopp
           make install clean

Install GD:

           cd /usr/ports/graphics/gd
           make install clean

Install GeoIP:

           cd /usr/ports/net/GeoIP/
           make install clean

Download the aMule 2.2.4 source code here.

           tar -zxvf aMule-2.2.4.tar.bz2
           cd aMule-2.2.2/

You need to edit the file src/Scanner.l and after the line:

           #include <wx/string.h>

Add the line:

           #include "Scanner.h.in"

Configure some environement variable, for bash user:

           export CPPFLAGS="-I/usr/local/include"
           export LDFLAGS="-L/usr/local/lib"

Or for csh user (default under FreeBSD):

           setenv CPPFLAGS "-I/usr/local/include"
           setenv LDFLAGS "-L/usr/local/lib"

Then start the compilation:

           ./configure --prefix=/home/user/aMule-2.2.4/ \
           --with-wx-config=/usr/local/bin/wxgtk2u-2.8-config --with-crypto-prefix=/usr/local/ \
           --disable-debug --with-curl-config=/usr/local/bin/curl-config --enable-webserver  \
           --enable-optimize --with-included-gettext --enable-amule-daemon --enable-amulecmd \
           --enable-cas --enable-alcc --enable-geoip

NOTE: Check configure. Also, change user for your user name.

           gmake
           gmake install

And start it:

          ./amule-2.2.4/bin/amule &


Configuration info

After successfully installing:

The program directory can be found: (~./aMule/). Means as root:

/root/.aMule/

any other user:

/usr/home/<username>/.aMule/

amule.conf can be found directly in the program folder. The webserver config file has to be made:

  1. amuleweb -w.

and is called remote.conf