Difference between revisions of "HowTo Compile In Slackware"
m (Added note about minimum requirements and brief howto using SlackBuild) |
|||
(21 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | <center> | + | <center> |
+ | [[HowTo_Compile_In_Slackware|English]] | | ||
+ | [[HowTo_Compile_In_Slackware-fr|Français]] | | ||
+ | [[HowTo_Compile_In_Slackware-it|Italiano]] | ||
+ | </center> | ||
− | + | <h1>Installing [[aMule]] 2.2.* on [http://www.slackware.com Slackware] 12.*</h1> | |
− | + | ||
− | + | '''NOTE''': you will need super-user (usually ''root'') access to complete [[aMule]] install/uninstallation/update, also consider using [http://asic-linux.com.mx/~izto/checkinstall checkinstall] installed to manage packages. | |
− | + | ||
− | + | <h2>Installation requirements</h2> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | : | + | In order to compile aMule 2.2.* on Slackware 12.* you need the following packages. Package version suggested are those provided for the Slackware 12.* or is the minimum version tested: |
− | :'' | + | * geoip >= 1.4.4 (from http://slacky.eu) |
− | + | * libupnp 1.6.6 (if you want to use the UPnP feature, get the tarball from http://pupnp.sf.net) | |
− | + | * cryptopp 5.5.2 (from http://slacky.eu) | |
− | :'' | + | * wxWidgets >= 2.8.* (http://www.wxwidgets.org or a precompiled package from http://www.slacky.eu) |
+ | * '''If using Slackware 12.0''' upgrade package gcc with >= 4.2.3-i486-1 (http://packages.slackware.it) | ||
+ | * '''If using Slackware 12.0''' upgrade package gcc-g++ with >= 4.2.3-i486-1 (http://packages.slackware.it) | ||
+ | * (''optional'') ccache-2.4-i486-1 package if you want to speedup compiling | ||
− | |||
− | + | The minimum GCC version declared into the file docs/INSTALL appears to be obsolete as I encountered | |
+ | the following error: | ||
− | : | + | <code>amule: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by amule)</code> |
− | |||
− | + | Other packages - system libs rather strictly aMule related - that are needed: these are mentioned | |
+ | at the end of the configure summary of aMule. | ||
− | + | * regex system | |
− | + | * libintl system | |
− | + | * libpng 1.2.18 | |
+ | * libgd 2.0.35 | ||
+ | * zlib 1.2.3 | ||
− | + | <h2>aMule prepackaged binaries</h2> | |
+ | Provided your system satisfies the above mentioned requirements, grab a pre-built [http://www.slackware.com Slackware] package from [http://www.linuxpackages.net/search_view.php?by=name&name=amule&ver= linuxpackages.net] and install it (as root) with: | ||
+ | :''# installpkg aMule-x.y.z.tgz'' | ||
− | + | or if you simply need to upgrade the package: | |
− | + | :''# upgradepkg aMule-x.y.z.tgz'' | |
− | + | ||
− | + | Type ''amule'' in a shell to lauch or in [http://www.kde.org KDE] (similar in [http://www.gnome.org GNOME]) go to Kstart->Internet->aMule | |
− | + | ||
+ | If you want to ''remove'' aMule simply run: | ||
+ | |||
+ | :''# removepkg aMule-x.y.z.tgz'' | ||
+ | |||
+ | <h2>Compiling aMule</h2> | ||
+ | |||
+ | * First install/upgrade the above mentioned packages. Then compile '''cryptopp''' (no special flags required) and aMule with the following flags (for a feature-complete installation): | ||
+ | |||
+ | :''$ ./configure --with-denoise-level=3 --enable-optimize --enable-verbose --enable-geoip --enable-wxcas --enable-amule-gui --enable-amulecmd --enable-amule-daemon --enable-alc --enable-alcc --enable-cas --disable-debug --enable-ccache --enable-webserver'' | ||
+ | :''$ make'' | ||
+ | :''$ su <insert password>'' | ||
+ | :''# make install'' | ||
+ | |||
+ | Even better, you can use checkinstall or read up on how to properly make Slackware packages on slackwiki.org. Checkinstall and selfmade packages can be handled by Slackware's package tools, which make upgrading and removing old cruft from previous installs a breeze. If the Slackwiki howto is a little too much for, stick to checkinstall for the moment: | ||
+ | |||
+ | : become root | ||
+ | |||
+ | : ''$ su -'' | ||
+ | |||
+ | : then just call | ||
+ | |||
+ | : ''# checkinstall'' | ||
+ | |||
+ | : Just answer the questions and you're done. | ||
+ | |||
+ | <h3>Installing [[wxBase]] (Optional)</h3> | ||
+ | |||
+ | If you downloaded [[wxWidgets|wxGTK]] earlier than version 2.5 and you are planning to use [[aMule]] with command line interface (such as [[aMuleCMD]], [[aMuleWeb]], [[aMuled]], etc), then you you should install [[wxBase]]. In any other case, there's no need at all. | ||
+ | |||
+ | Download [[wxBase]] sources (.tar.gz packages) from http://www.amule-project.net or http://www.amule.org and do the following: | ||
+ | |||
+ | :''$ tar -xzvf wxBase*'' | ||
+ | :''$ cd wxBase*'' | ||
+ | :''$ ./configure'' | ||
+ | :''$ make'' | ||
+ | :''$ su <insert password>'' | ||
+ | :''# make install'' | ||
+ | |||
+ | * Then compile '''aMule'''. Run the "configure" with the parameters specified above. | ||
+ | |||
+ | * If you are satisfied of the summary that is shown, run: | ||
+ | |||
+ | :$ make | ||
+ | |||
+ | :If you have a multi-core CPU you can speedup the compilation adding the parameter "-j" according to the number of logical/phisical CPUs detected on your system, example for a dual-core CPU: | ||
+ | |||
+ | :$ make -j 2 | ||
+ | |||
+ | * If no error arise, you can run (as root): | ||
+ | |||
+ | :<code># make install</code> | ||
+ | |||
+ | * Finally run the "amule" executable: | ||
+ | |||
+ | :$ amule & | ||
+ | |||
+ | <h2>Building a Slackware package</h2> | ||
+ | |||
+ | The steps I followed to build a package change just a little. | ||
+ | |||
+ | * First I have installed aMule in a different, dedicated path in order to check the results, i.e. adding the following parameter to the configure script: | ||
+ | :--prefix=/home/''$(whoami)''/tmp/amule/usr | ||
+ | |||
+ | :Remember to append "/usr" at the end of the path. | ||
+ | |||
+ | * After installing ("make && make install"), strip down all the binaries with the following command in order to squeeze package size (a lot!): | ||
+ | :$ cd /home/$(whoami)/tmp/amule/usr/bin | ||
+ | :$ for i in alc alcc amule amulecmd amuled amulegui amuleweb cas ed2k wxcas; do strip $i; done | ||
+ | :$ cd ../.. | ||
+ | :$ md install | ||
+ | :$ cd install | ||
+ | |||
+ | :Here edit "''slack-required''" and "''slack-desc''" files according to SlackBuild guidelines. I was lazy and just copied them from another recent Slackware aMule package (changing the relevant requirements). | ||
+ | |||
+ | * Then create the package: | ||
+ | |||
+ | :<code>$ cd ..</code> | ||
+ | :<code>$ ls</code> | ||
+ | :<code>install usr</code> | ||
+ | :<code>$ makepkg aMule-x.y.z.tgz</code> | ||
+ | |||
+ | * Test your build and then notify the forum posting the ed2k link (set to ''release'' priority the file) ;-) | ||
+ | |||
+ | <h4>Building using a Slackbuild script</h4> | ||
+ | |||
+ | An alternate method to build a package is done by using a [http://slackbuilds.org SlackBuild] script. You can get download one from [http://slackbuilds.org/repository/12.2/network/aMule the repository] or [http://slackbuilds.org/guidelines create one] if not available. | ||
+ | |||
+ | Once the build package script is downloaded, explode it in a directory. Copy the source tarball in the same directory, and edit the file ''aMule.SlackBuild'' according to your needs (namely the compiling options and the version of aMule you're compiling). | ||
+ | |||
+ | Then impersonate ''root'' and execute the bash script: | ||
+ | |||
+ | :''# sh aMule.SlackBuild | ||
+ | |||
+ | When the scripts finishes you will find the new package in the directory desired. That's all! | ||
+ | |||
+ | <h2>Final note</h2> | ||
Enjoy the hard work [[aMule]] [[AMule_devs|developers]] have done and continue to do! | Enjoy the hard work [[aMule]] [[AMule_devs|developers]] have done and continue to do! | ||
+ | Catch me on [[IRC]] at [irc://irc.freenode.net irc.freenode.com] channel [irc://irc.freenode.net/amule #amule] nick '''servnov'''. | ||
− | + | Or post your questions on the [http://forum.amule.org forum]. |
Latest revision as of 20:36, 5 January 2009
Contents
Installing aMule 2.2.* on Slackware 12.*
NOTE: you will need super-user (usually root) access to complete aMule install/uninstallation/update, also consider using checkinstall installed to manage packages.
Installation requirements
In order to compile aMule 2.2.* on Slackware 12.* you need the following packages. Package version suggested are those provided for the Slackware 12.* or is the minimum version tested:
- geoip >= 1.4.4 (from http://slacky.eu)
- libupnp 1.6.6 (if you want to use the UPnP feature, get the tarball from http://pupnp.sf.net)
- cryptopp 5.5.2 (from http://slacky.eu)
- wxWidgets >= 2.8.* (http://www.wxwidgets.org or a precompiled package from http://www.slacky.eu)
- If using Slackware 12.0 upgrade package gcc with >= 4.2.3-i486-1 (http://packages.slackware.it)
- If using Slackware 12.0 upgrade package gcc-g++ with >= 4.2.3-i486-1 (http://packages.slackware.it)
- (optional) ccache-2.4-i486-1 package if you want to speedup compiling
The minimum GCC version declared into the file docs/INSTALL appears to be obsolete as I encountered
the following error:
amule: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by amule)
Other packages - system libs rather strictly aMule related - that are needed: these are mentioned
at the end of the configure summary of aMule.
- regex system
- libintl system
- libpng 1.2.18
- libgd 2.0.35
- zlib 1.2.3
aMule prepackaged binaries
Provided your system satisfies the above mentioned requirements, grab a pre-built Slackware package from linuxpackages.net and install it (as root) with:
- # installpkg aMule-x.y.z.tgz
or if you simply need to upgrade the package:
- # upgradepkg aMule-x.y.z.tgz
Type amule in a shell to lauch or in KDE (similar in GNOME) go to Kstart->Internet->aMule
If you want to remove aMule simply run:
- # removepkg aMule-x.y.z.tgz
Compiling aMule
- First install/upgrade the above mentioned packages. Then compile cryptopp (no special flags required) and aMule with the following flags (for a feature-complete installation):
- $ ./configure --with-denoise-level=3 --enable-optimize --enable-verbose --enable-geoip --enable-wxcas --enable-amule-gui --enable-amulecmd --enable-amule-daemon --enable-alc --enable-alcc --enable-cas --disable-debug --enable-ccache --enable-webserver
- $ make
- $ su <insert password>
- # make install
Even better, you can use checkinstall or read up on how to properly make Slackware packages on slackwiki.org. Checkinstall and selfmade packages can be handled by Slackware's package tools, which make upgrading and removing old cruft from previous installs a breeze. If the Slackwiki howto is a little too much for, stick to checkinstall for the moment:
- become root
- $ su -
- then just call
- # checkinstall
- Just answer the questions and you're done.
Installing wxBase (Optional)
If you downloaded wxGTK earlier than version 2.5 and you are planning to use aMule with command line interface (such as aMuleCMD, aMuleWeb, aMuled, etc), then you you should install wxBase. In any other case, there's no need at all.
Download wxBase sources (.tar.gz packages) from http://www.amule-project.net or http://www.amule.org and do the following:
- $ tar -xzvf wxBase*
- $ cd wxBase*
- $ ./configure
- $ make
- $ su <insert password>
- # make install
- Then compile aMule. Run the "configure" with the parameters specified above.
- If you are satisfied of the summary that is shown, run:
- $ make
- If you have a multi-core CPU you can speedup the compilation adding the parameter "-j" according to the number of logical/phisical CPUs detected on your system, example for a dual-core CPU:
- $ make -j 2
- If no error arise, you can run (as root):
# make install
- Finally run the "amule" executable:
- $ amule &
Building a Slackware package
The steps I followed to build a package change just a little.
- First I have installed aMule in a different, dedicated path in order to check the results, i.e. adding the following parameter to the configure script:
- --prefix=/home/$(whoami)/tmp/amule/usr
- Remember to append "/usr" at the end of the path.
- After installing ("make && make install"), strip down all the binaries with the following command in order to squeeze package size (a lot!):
- $ cd /home/$(whoami)/tmp/amule/usr/bin
- $ for i in alc alcc amule amulecmd amuled amulegui amuleweb cas ed2k wxcas; do strip $i; done
- $ cd ../..
- $ md install
- $ cd install
- Here edit "slack-required" and "slack-desc" files according to SlackBuild guidelines. I was lazy and just copied them from another recent Slackware aMule package (changing the relevant requirements).
- Then create the package:
$ cd ..
$ ls
install usr
$ makepkg aMule-x.y.z.tgz
- Test your build and then notify the forum posting the ed2k link (set to release priority the file) ;-)
Building using a Slackbuild script
An alternate method to build a package is done by using a SlackBuild script. You can get download one from the repository or create one if not available.
Once the build package script is downloaded, explode it in a directory. Copy the source tarball in the same directory, and edit the file aMule.SlackBuild according to your needs (namely the compiling options and the version of aMule you're compiling).
Then impersonate root and execute the bash script:
- # sh aMule.SlackBuild
When the scripts finishes you will find the new package in the directory desired. That's all!
Final note
Enjoy the hard work aMule developers have done and continue to do!
Catch me on IRC at irc.freenode.com channel #amule nick servnov.
Or post your questions on the forum.