aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2

Author Topic: Compiling aMuleD on HP-UX  (Read 9307 times)

Inkus

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 8
Compiling aMuleD on HP-UX
« on: October 30, 2005, 04:00:54 PM »

I am trying to compile aMule 2.0.3 stable daemon on HP-UX 11.0 and have some problems:
$ gmake
...
g++  -DUSE_EMBEDDED_CRYPTO -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    -lpthread -o amuleweb  amuleweb-WebServer.o amuleweb-WebInterface.o amuleweb-WebSocket.o amuleweb-MD5Sum.o amuleweb-ECSocket.o amuleweb-ExternalConnector.o amuleweb-ECPacket.o amuleweb-OtherFunctions.o amuleweb-ECSpecialTags.o amuleweb-StringFunctions.o amuleweb-NetworkFunctions.o amuleweb-Format.o -L/usr/local/wxBase/lib    -lwx_base-2.6 -lwx_base_net-2.6  -lz     -lbfd -liberty -lgen
/usr/ccs/bin/ld: Unsatisfied symbols:
   typeinfo for CECFileConfig(first referenced in amuleweb-ExternalConnector.o) (data)
   typeinfo for CaMuleExternalConnector(first referenced in amuleweb-ExternalConnector.o) (data)
   typeinfo for ECSocket(first referenced in amuleweb-ECSocket.o) (data)
collect2: ld returned 1 exit status
gmake[1]: *** [amuleweb] Error 1
gmake[1]: Leaving directory `/home/user/tmp/aMule-2.0.3/src'
gmake: *** [all-recursive] Error 1

Actually, I do not know where the problem is. For example why amuleweb-ECSocket.o does not have ECSocket in it? amuleweb-ECSocket.o is compiled from ECSocket.cpp, which includes ECSocket.h and in this header ECSocket class is declared.

wxBase 2.6.2 is installed in /usr/local/wxBase, amule is configured vith "./configure --enable-amulecmd --disable-monolithic --enable-amule-daemon --with-wx-config=/usr/local/wxBase/bin/wx-config --enable-webserver".
« Last Edit: October 30, 2005, 04:03:17 PM by Inkus »
Logged

Inkus

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 8
RE: Compiling aMuleD on HP-UX
« Reply #1 on: November 01, 2005, 08:48:26 AM »

Maybe the problem is that I have to enable somehow "#pragma pack" in my compiler? I get Many warnings like this:
In file included from OtherFunctions.h:48,
                 from WebServer.h:61,
                 from WebServer.cpp:44:
OtherStructs.h: At global scope:
OtherStructs.h:35: warning: ignoring #pragma pack
OtherStructs.h:41: warning: ignoring #pragma pack
OtherStructs.h:43: warning: ignoring #pragma pack
OtherStructs.h:48: warning: ignoring #pragma pack
OtherStructs.h:50: warning: ignoring #pragma pack
OtherStructs.h:58: warning: ignoring #pragma pack
OtherStructs.h:60: warning: ignoring #pragma pack
OtherStructs.h:66: warning: ignoring #pragma pack
OtherStructs.h:80: warning: ignoring #pragma pack
OtherStructs.h:86: warning: ignoring #pragma pack
OtherStructs.h:95: warning: ignoring #pragma pack
OtherStructs.h:103: warning: ignoring #pragma pack

I am using GCC 3.2. Is there any way to enable "pragma pack" in this compiler, or I have to get  GCC 4.x.x to compile it? There is no GCC 4.x.x available for HP-UX 11.0 freely available, so I would have to compile GCC 4.x.x by myself, and it would take much time.
Logged

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235
Re: Compiling aMuleD on HP-UX
« Reply #2 on: November 01, 2005, 09:15:12 AM »

heyho

now that you mentioned it, the pragma thingy....

try to download latest cvs and compile this. we got rid of all pramgas lately

maybe taht works
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."

Inkus

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 8
Re: Compiling aMuleD on HP-UX
« Reply #3 on: November 02, 2005, 08:43:38 AM »

Quote
Originally posted by stefanero
heyho

now that you mentioned it, the pragma thingy....

try to download latest cvs and compile this. we got rid of all pramgas lately

maybe taht works

Thanks for the reply. I feel kinda guilty for not trying CVS version before posting to this forum, so as an excuse I could say, that from my experience, if I get not obvious error(like missing include or library etc) while compiling a source, it is almost allways HP-UX specific issue, and trying CVS is not gonna help. Looks like this was not the case with aMule. So I tried CVS, the previous error was gone, had to tweak wx includes, since I got realloc not defined in them, had to change wait4 to waitpid in amule.cpp, since there is no wait4 on hp-ux, and after all I got another error, and this time, it's something with the compiler I use:

Code: [Select]
if g++ -DHAVE_CONFIG_H -I. -I. -I..   -I/usr/local/include -I/usr/local/wxBase/lib/wx/include/base-ansi-release-2.6 -I/usr/local/wxBase/include/wx-2.6 -DwxUSE_GUI=0 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1   -DwxUSE_GUI=0  -DHAVE_BFD  -DAMULE_DAEMON  -DUSE_EMBEDDED_CRYPTO -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0 -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC   -MT amuled-amule.o -MD -MP -MF ".deps/amuled-amule.Tpo" -c -o amuled-amule.o `test -f 'amule.cpp' || echo './'`amule.cpp; \
then mv -f ".deps/amuled-amule.Tpo" ".deps/amuled-amule.Po"; else rm -f ".deps/amuled-amule.Tpo"; exit 1; fi
cc1plus: warning: changing search order for system directory "/usr/local/include"
cc1plus: warning:   as it has already been specified as a non-system directory
In file included from amule.cpp:92:
FriendList.h:63:10: warning: #warning THIS MUST BE MADE PRIVATE AFTER EC IS CODED
amule.cpp: In member function `virtual bool CamuleApp::OnInit()':
amule.cpp:373: Internal compiler error in c_expand_expr, at c-common.c:3646
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
gmake[4]: *** [amuled-amule.o] Error 1
gmake[4]: Leaving directory `/home/user/tmp/amule-cvs/src'

I googled for this error message, and found some other people getting such an error, but all of them were template related errors, and I guess this error I get is not template related. Looks like I should try to compile amule with gcc version >3.2. I am compiling GCC 4.0.2, but it will take much time (day or two), since my cpu is not that fast I wanted it to be :(. But if anyone has any clue how to overcome this problem with gcc 3.2, I would gladly hear it.
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: Compiling aMuleD on HP-UX
« Reply #4 on: November 02, 2005, 12:24:54 PM »

Inkus,

We wish you luck with your compilations, and please, any patches that will make aMule compile in hp-ux are wellcome, do share them.

Also, in the end, if you want to write an HP-UX how to in our wiki, you are more than wellcome :rolleyes:

Cheers!
Logged

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: Compiling aMuleD on HP-UX
« Reply #5 on: November 02, 2005, 05:06:22 PM »

It would be cool to have a guide to compile amule on HP-UX. That way, we would be missing one less OS (still missing IRIX, AIX, cray's OS whose name I can't remember (unicos was it?), BeOS, QNX and a few others) :D

Regards.
Logged

thedude0001

  • evil bugfinder ;)
  • Hero Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 827
Re: Compiling aMuleD on HP-UX
« Reply #6 on: November 02, 2005, 05:57:04 PM »

...you forgot Plan9 ;)
Logged
Das Schlimme auf dieser Welt ist
daß die Dummen so selbstsicher sind
und die Gescheiten so voller Zweifel.

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: Compiling aMuleD on HP-UX
« Reply #7 on: November 03, 2005, 04:44:03 AM »

Quote
Originally posted by thedude0001
...you forgot Plan9 ;)
No, I did not forget it, I just included it in the "and a few others" category  :P

(OK, so I did not even know about it, I just hate losing :D)

Regards, and thanks for pointing me to Plan9.
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: Compiling aMuleD on HP-UX
« Reply #8 on: November 03, 2005, 11:27:47 AM »

About plan9, is there anyone outside bell labs that actualy uses it?
Logged

lfroen

  • Guest
Re: Compiling aMuleD on HP-UX
« Reply #9 on: November 03, 2005, 12:53:45 PM »

Quote
amule.cpp:373: Internal compiler error in c_expand_expr, at c-common.c:3646
Please submit a full bug report,
with preprocessed source if appropriate.
See http://www.gnu.org/software/gcc/bugs.html> for instructions.

"Submit bug report" - means gcc bug report. Amule is good, gcc - bad. I have successfully compiled with gcc-4.x, as well as with gcc-3.4.x.

Quote
any patches that will make aMule compile in hp-ux are wellcome
Yes, wellcome, but I not quite sure if they will be merged with main source tree. Unlike Solaris and versions of BSD, there's no such machines in private use, which makes such compilation atttempts pure academic exersize. This note, however, is not relevant since your problems caused by inappropriate compiler use and/or install.
Logged

Inkus

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 8
Re: Compiling aMuleD on HP-UX
« Reply #10 on: November 03, 2005, 01:22:43 PM »

Quote
Originally posted by lfroen
 I have successfully compiled with gcc-4.x, as well as with gcc-3.4.x.

What OS are you talking about?
I have tried gcc-3.1, gcc-3.2, now successfully compiled gcc-4.0.2, and got different compiler error with it. :( After some browsing in gcc bug database, I have found other getting similar error on pa-risc, but only if gcc was compiled with --enable-checking (which I guess is the default). So now I am trying to compile gcc 4.0.2 with additional --disable-checking tag, and see if it helps.  

Quote
any patches that will make aMule compile in hp-ux are wellcome
Quote
Yes, wellcome, but I not quite sure if they will be merged with main source tree. Unlike Solaris and versions of BSD, there's no such machines in private use, which makes such compilation atttempts pure academic exersize. This note, however, is not relevant since your problems caused by inappropriate compiler use and/or install.

In aMule source I needed only one change yet : aMule.cpp - to change wait4 call  to waitpid, since there is no wait4 on hp-ux 11.0. waitpid is the same as wait4 with last argument equal to null(0), which happens to be in aMule.cpp.
« Last Edit: November 03, 2005, 01:23:33 PM by Inkus »
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: Compiling aMuleD on HP-UX
« Reply #11 on: November 04, 2005, 11:40:19 AM »

To the other devs:
Is there any compatibility problem using waitpid instead of wait4? Linux has both of them. Ken, what about Mac?
Logged

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: Compiling aMuleD on HP-UX
« Reply #12 on: November 04, 2005, 09:38:16 PM »

I know nobody asked, but Solaris also has waitpid and wait4 (no idea if they work the same, I just found in google it has both).

Regards.
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: Compiling aMuleD on HP-UX
« Reply #13 on: November 05, 2005, 01:25:10 AM »

phoenix, the man pages list waitpid as being identical to (indeed, implemented as) wait4 with NULL for the final parameter.
Logged

lfroen

  • Guest
Re: Compiling aMuleD on HP-UX
« Reply #14 on: November 05, 2005, 11:33:36 AM »

Quote
I have tried gcc-3.1, gcc-3.2, now successfully compiled gcc-4.0.2, and got different compiler error with it
Quote
but only if gcc was compiled with --enable-checking
Too bad. Your compiler is broken (word "your" is emphasized). Why don't you go and fix it or replaced with better one ? I never compiled gcc in my life - binary distributions are already invented, you know.

Quote
n aMule source I needed only one change yet : aMule.cpp - to change wait4 call to waitpid, since there is no wait4 on hp-ux 11.0
Too bad again.
You welcomed to change what you want, document it and place patch in wiki. No change going into code. We applied patch for ARM because people actually buy those devices, and running amule(d) there make sence, considering their design and purpose. This is not the case with all proprietary Unix'es out there like AIX, HPUX, QNX and others: very expansive hardware used by goverment/academic/coprs for very specific purposes. Not ever intended for private use.

BTW: given the cost of average HPUX machine I doubt that you own one. Did you asked permission to run amule there ? In places where I say such machines, you would need permission even to compile such thing.
Logged
Pages: [1] 2