Difference between revisions of "HowTo compile on Solaris"

From AMule Project FAQ
Jump to: navigation, search
Line 13: Line 13:
 
   Note: blastwave has packages for wxGTK but they are outdated and will not work with [[aMule]].
 
   Note: blastwave has packages for wxGTK but they are outdated and will not work with [[aMule]].
 
                                        
 
                                        
*Get the latest cryptopp library from http://www.cryptopp.com/ compile it and install it to /usr/local.
+
*Symlink the [http://www.gnu.org GNU] utilities in ''/usr/sfw/bin'' to their "right" names (''gar=ar'', ''gld=ld'', ''gmake=make'', ''ggrep=grep'', ''gtar=tar'', ''granlib=ranlib'', etc...) somewhere in your path. I sym-linked them to their same directory (''/usr/sfw/bin''). Do not symlink gas to as, since it will not work when
  Hint 1: Change the "as" symlink you created before (which points to /usr/sfw/bin/gas) to point to /usr/ccs/bin/as instead. The difference is that gas is GNU as, the other one
+
compiling cryptopp.
  is Solaris as, which is the one expected by cryptopp.
+
 
   Hint 2: To install cryptopp, just copy libcryptopp.a to /usr/local/lib and copy *.h to /usr/local/include/cryptopp
+
*Get the latest cryptopp library from http://www.cryptopp.com/ compile it and install it to /usr/local. To compile, just change to the folder and type gmake.
 +
   Hint: To install cryptopp, just copy libcryptopp.a to /usr/local/lib and copy *.h to /usr/local/include/cryptopp
 
    
 
    
 
*Install the [http://www.blastwave.org/jir/blastwave.fam pkg-get] script from http://www.blastwave.org/
 
*Install the [http://www.blastwave.org/jir/blastwave.fam pkg-get] script from http://www.blastwave.org/
  
 
*Use the [http://www.blastwave.org/jir/blastwave.fam pkg-get] script to install some required libraries, which do not come with [http://www.sun.com/software/solaris Solaris], or the versions in solaris will not work for aMule:
 
*Use the [http://www.blastwave.org/jir/blastwave.fam pkg-get] script to install some required libraries, which do not come with [http://www.sun.com/software/solaris Solaris], or the versions in solaris will not work for aMule:
 
 
**autoconf
 
**autoconf
 
**automake
 
**automake
Line 40: Line 40:
 
   LD_LIBRARY_PATH=/usr/local/lib:/opt/csw/lib:/usr/sfw/lib:/usr/lib
 
   LD_LIBRARY_PATH=/usr/local/lib:/opt/csw/lib:/usr/sfw/lib:/usr/lib
 
   export PATH CPPFLAGS LDFLAGS LD_LIBRARY_PATH
 
   export PATH CPPFLAGS LDFLAGS LD_LIBRARY_PATH
 
*Symlink the [http://www.gnu.org GNU] utilities in ''/usr/sfw/bin'' to their "right" names (''gar=ar'', ''gas=as'', ''gld=ld'', ''gmake=make'', ''ggrep=grep'', ''gtar=tar'', ''granlib=ranlib'', etc...) somewhere in your path. I sym-linked them to their same directory (''/usr/sfw/bin'').
 
  
 
*Symlink the [http://www.gnu.org GNU] utilities in ''/opt/csw/bin'' to their "right" names (''gsed=sed'', ''gawk=awk'', ''flex_new=flex'', etc...) somewhere in your path. I sym-linked them to their same directory (''/opt/csw/bin'').
 
*Symlink the [http://www.gnu.org GNU] utilities in ''/opt/csw/bin'' to their "right" names (''gsed=sed'', ''gawk=awk'', ''flex_new=flex'', etc...) somewhere in your path. I sym-linked them to their same directory (''/opt/csw/bin'').

Revision as of 19:17, 21 November 2009

English | Deutsch

Compiling aMule/aMuleWeb on Solaris 10 or 11 beta x86


  • Set your path like this:
 PATH=/usr/sfw/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/ucb
 Hint: this configure line worked for me: ./configure --enable-unicode --with-gtk=2
 Note: blastwave has packages for wxGTK but they are outdated and will not work with aMule.
                                      
  • Symlink the GNU utilities in /usr/sfw/bin to their "right" names (gar=ar, gld=ld, gmake=make, ggrep=grep, gtar=tar, granlib=ranlib, etc...) somewhere in your path. I sym-linked them to their same directory (/usr/sfw/bin). Do not symlink gas to as, since it will not work when

compiling cryptopp.

  • Get the latest cryptopp library from http://www.cryptopp.com/ compile it and install it to /usr/local. To compile, just change to the folder and type gmake.
 Hint: To install cryptopp, just copy libcryptopp.a to /usr/local/lib and copy *.h to /usr/local/include/cryptopp
 
  • Use the pkg-get script to install some required libraries, which do not come with Solaris, or the versions in solaris will not work for aMule:
    • autoconf
    • automake
    • flex (flex_new, so it will be 2.5.33 or newer, don't forget to link /opt/csw/bin/flex_new to flex)
    • gd
    • GNU gettext (ggettext)
    • GNU sed (gsed)

Install them with:

 /opt/csw/bin/pkgutil -i autoconf automake flex_new gd ggettext gsed

These packages will install to /opt/csw tree

  • Set these environment variables:
 PATH=/usr/local/bin:/opt/csw/bin:/usr/sfw/bin:/usr/bin:/usr/sbin
 CPPFLAGS='-I/usr/local/include -I/opt/csw/include -I/usr/sfw/include'
 LDFLAGS='-L/usr/local/lib -R/usr/local/lib -L/opt/csw/lib -R/opt/csw/lib -L/usr/sfw/lib -R/usr/sfw/lib'
 LD_LIBRARY_PATH=/usr/local/lib:/opt/csw/lib:/usr/sfw/lib:/usr/lib
 export PATH CPPFLAGS LDFLAGS LD_LIBRARY_PATH
  • Symlink the GNU utilities in /opt/csw/bin to their "right" names (gsed=sed, gawk=awk, flex_new=flex, etc...) somewhere in your path. I sym-linked them to their same directory (/opt/csw/bin).
 Hint: this configure line worked for me: ./configure
 Hint 1: this configure line worked for me: ./configure CFLAGS="-DSPARC_SOLARIS" --disable-samples
 Hint 2: I needed to add this at the beginning of the file upnp/src/api/upnpapi.c, along with the other #include lines:
         #include <sys/sockio.h>
  • If you are compiling a SVN version of aMule, run the autogen.sh script. If not, ignore this step (you should first edit this file, and change the first line from #!/bin/sh to #!/bin/bash else, it will fail with an error.
  • Configure aMule. I used these options, but feel free to remove the ones you don't need:
 ./configure --enable-webserver --enable-amule-daemon --enable-amulecmd --enable-amule-gui --enable-cas --enable-wxcas --enable-alc --enable-alcc
 --disable-embedded-crypto --with-crypto-prefix=/usr/local/ --enable-geoip --enable-optimize --disable-debug --with-libupnp-prefix=/usr/local
  • Type gmake, press <ENTER> and hope for the best.
  • If compilation went OK, install aMule with: gmake install.
  • ENJOY!

This guide was used for compiling aMule and aMuleWeb on Solaris 10 and 11 beta for x86. I have no idea if it will work or not on previous Solaris releases or on SPARC, but it should. Also, if you got aMule compiled using other Solaris than Solaris 10 or 11 beta, please tell me how you did, or if this guide worked for you or any extra things you had to do, etc.

The versions I used for this wiki (the last time I tried it) are:

aMule2.2.6, cryptopp 5.6.0, wxGTK 2.8.10, GeoIP 1.4.6 and libupnp 1.6.6.

Last, but not least, this guide works only for aMule versions (either SVN or release) starting March 7th/2005, no previous aMule version will compile on Solaris following this guide.

Thanks goes to all the aMule dev team, specially Kry, who helped me a lot, and ken for the CPPFLAGS tip.