aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Compilation on Solaris 11 x86  (Read 4429 times)

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Compilation on Solaris 11 x86
« on: December 07, 2005, 01:51:30 AM »

Hi!

I'm trying to test amule on my recent Solaris Express b24 installation, but I'm having a little problem:

When configuring, the libgd test complains that libgd is not installed, when in fact it is. It's not installed in the default place, and gd.h (the include library) is not in the default include dir, but libgd definitely is installed, and libgd-config is in the $PATH and gives correct information. Therefore, I can only conclude that libgd test is broken. Same happens with png test. I am compiling right now (slow PC) and will report back if amule works fine or not.

Thanks!

Edit: Forgot to say, this is aMule CVS 2005-12-06

Edit: I just made a quick hack to walaround this problem: I had to link gd.h, gd_io.h and gdfx.h from their installation locations to /usr/include. It's a really ugly hack, but I got the tests to succeed. Let's see if the compilation goes OK...

Third Edit: OK!! so compilation just finished and guess what...aMule started!! yipee!! and best of all, this time I made it to compile it using GTK2 under Solaris, I'll soon update my guide to compile it.

Code: [Select]
bash-3.00# uname -a
SunOS neptune 5.11 snv_24 i86pc i386 i86pc
bash-3.00# ./src/amule --version
aMule CVS using wxGTK2 v2.6.2 (Snapshot: Tue Dec  6 07:02:00 CET 2005) (OS: SunOS)
bash-3.00#

Thanks to all the aMule team.
Logged

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: Compilation on Solaris 11 x86
« Reply #1 on: December 07, 2005, 02:27:34 AM »

As a general hint: Instead of running
Code: [Select]
./configuretry this:
Code: [Select]
env CPPFLAGS="-I/where/the/headers/are" ./configureYou can do that as often as you want:
Code: [Select]
env CPPFLAGS="-I/path/to/gd-headers -I/path/to/png-headers -I/path/to/whatever-headers" ./configureAnd you can also combine preprocessor flags with linker flags:
Code: [Select]
env CPPFLAGS="-I/whre/the/headers/are" LDFLAGS="-L/where/the/libraries/are" ./configurePS: Did you try the "--with-gdlib-prefix", "--with-gdlib-exec-prefix" and "--with-gdlib-config" options? Do they work?
Logged

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: Compilation on Solaris 11 x86
« Reply #2 on: December 07, 2005, 02:36:57 AM »

Thanks for the hint, I'll try not to forget it and use it the next time instead of hacking with symlinks ;)
Quote
PS: Did you try the "--with-gdlib-prefix", "--with-gdlib-exec-prefix" and "--with-gdlib-config" options? Do they work?
Sure I tried them, but it seems they only work when you do not have gdlib-config (or lib-config) in your path, so the configure script can find it and use it to get the information.

Regards.
Logged

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: Compilation on Solaris 11 x86
« Reply #3 on: December 07, 2005, 02:57:38 AM »

OK, so not everything seems to be happiness. After starting aMule, I get these strange warnings:

Code: [Select]
Credits: Failed to create new RSA keypair: InvertibleRSAFunction: invalid public
 exponent
Credits: Error while initializing encryption keys: FileStore: error opening file
 for reading: /export/home/autizt/.aMule/cryptkey.dat

and the cryptkey.dat file is never created, so no credits for me :(

Any ideas? didi i compile wrongly?

Thanks.
Logged

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: Compilation on Solaris 11 x86
« Reply #4 on: December 07, 2005, 03:00:05 AM »

Quote
Originally posted by skolnick
I'll try not to forget it and use it the next time instead of hacking with symlinks ;)
Yes, I think you should remove the symlinks, and it's no problem to forget this information because you can always get it back with "./configure --help", at the bottom. ;)
Logged

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: Compilation on Solaris 11 x86
« Reply #5 on: December 08, 2005, 10:08:28 PM »

OK, I solved my problem. All I had to do was recompiling, using an external and current (5.2.1) cryptopp library. Then, all wass happiness. OK, I have not tested stability, but at least aMule started, and generated a valid RSA pair, so it should be ready to go.

Thanks Kry for the hint on using external cryptopp, and Gerd78 for the hin on LDFLAGS and CPPFLAGS. They work! :D

Regards.
Logged

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: Compilation on Solaris 11 x86
« Reply #6 on: December 10, 2005, 02:23:53 PM »

Maybe related question regarding external cryptopp: The internal one has bugfixes, so the external one might have bugs. Are there hidden ones or is it safe to use it anyway if ./cryptest.exe returns "All tests passed!" and "exit 0"?
Logged

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: Compilation on Solaris 11 x86
« Reply #7 on: December 10, 2005, 03:31:11 PM »

I didn't run crypttest.exe (I know it would take a long time on my solaris PC, and I wished to see amule running ASAP) but I will test it when i have more time. But it just woirked fine, and unlike the embedded one, it would not produce the strange error I described before.

Regards.
Logged

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: Compilation on Solaris 11 x86
« Reply #8 on: December 10, 2005, 11:17:52 PM »

Just for curiousity:

- Is it true that every single component or library of a largefile-aware application must be compiled with -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE or is that only needed for the application itself? I.e., do I have to use these flags for CryptoPP if using the external one?

- Pretty much the same question: Is it true that every single component or library of a multi-threaded application must be compiled with -D_REENTRANT or -pthread? I.e., do I have to use these flags for CryptoPP?
Logged

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: Compilation on Solaris 11 x86
« Reply #9 on: December 10, 2005, 11:43:42 PM »

No need to compile CryptoPP with that, since the largest files we open via CryptoPP functions are a few kb.

I'm not sure about -D_REENTRANT, but AFAIK, -pthread just links to libpthread.
Logged

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: Compilation on Solaris 11 x86
« Reply #10 on: December 10, 2005, 11:58:32 PM »

Quote
Originally posted by Xaignar
No need to compile CryptoPP with that, since the largest files we open via CryptoPP functions are a few kb.
OK, then this means that it is only necessary to specify this stuff if the library is actually used to open large files, right?
Quote
Originally posted by Xaignar
I'm not sure about -D_REENTRANT, but AFAIK, -pthread just links to libpthread.
-pthread as a gcc flag does different things:

- When compiling, it defines _REENTRANT, e.g. the same as -D_REENTRANT
- When linking, it links to libpthread, e.g. the same as -lpthread, but this is not necessary here because CryptoPP is not linked at all - it builds a static archive only - and aMule is linked to libpthread anyway.

-pthread is just a convenience option that combines -D_REENTRANT and -lpthread (as one can verify with "gcc -dumpspecs | grep pthread").
Logged