aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Compile issues with Solaris x86, and patch  (Read 4290 times)

wimms

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 14
Compile issues with Solaris x86, and patch
« on: January 03, 2004, 01:29:33 PM »

Same issues were in xmule. Solaris does not define some thats used by amule.

Code: [Select]
Index: src/amule.cpp
===================================================================
RCS file: /cvsroot/amule/amule-cvs/src/amule.cpp,v
retrieving revision 1.26
diff -u -r1.26 amule.cpp
--- src/amule.cpp       30 Dec 2003 17:57:50 -0000      1.26
+++ src/amule.cpp       3 Jan 2004 12:20:43 -0000
@@ -88,8 +88,10 @@
        UnlimitResource(RLIMIT_DATA);
        UnlimitResource(RLIMIT_FSIZE);
        UnlimitResource(RLIMIT_NOFILE);
+#ifdef RLIMIT_RSS
        UnlimitResource(RLIMIT_RSS);
 #endif
+#endif
 }
 
 // IPC classes
@@ -182,11 +184,12 @@
        /*  We need to fix locale... */
        //export LANG=C && export LC_ALL=en_EN && export LANG=en_EN && export LC_MESSAGES=C && amule
 
+#ifdef HAVE_SETENV
        setenv("LANG","C",1);
        setenv("LC_ALL","en_EN",1);
        setenv("LANG","en_EN",1);
        setenv("LC_MESSAGES","C",1);
-
+#endif
        /* ... and remove above shit */
 
        SetResourceLimits();
Index: src/amule.h
===================================================================
RCS file: /cvsroot/amule/amule-cvs/src/amule.h,v
retrieving revision 1.10
diff -u -r1.10 amule.h
--- src/amule.h 30 Dec 2003 05:31:32 -0000      1.10
+++ src/amule.h 3 Jan 2004 12:20:43 -0000
@@ -46,6 +46,14 @@
 #include "ExternalConn.h"
 //#include
 
+/*
+ * INADDR_BROADCAST is identical to INADDR_NONE which is not defined
+ * on all systems. INADDR_BROADCAST should be fine to indicate an error.
+ */
+#ifndef INADDR_NONE
+#define INADDR_NONE INADDR_BROADCAST
+#endif
+
 //extern CamuleApp theApp;
 #define theApp (*((CamuleApp*)wxTheApp))
 #define G_BLEND(a,b) ( ((int)a*b)/100>255?255:((int)a*b)/100 )
Logged

enzo

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 14
RE: Compile issues with Solaris x86, and patch
« Reply #1 on: January 16, 2004, 07:13:55 AM »

I also have some problem.
The SPARC that I use is blande 100.
Solaris 9
Logged

deltaHF

  • Evil Admin
  • Former Developer
  • Hero Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 3920
  • .. Legends may sleep, but they never die ..
    • http://www.amule.org
Re: Compile issues with Solaris x86, and patch
« Reply #2 on: January 16, 2004, 12:19:46 PM »

hi enzo,

try to compile your aMule:

1. with changes that wimms said
2. and with the Systray.cpp i put in attachment

Quote
Youm
 
> Hi DeltaHF,
>
> In addition to the patches suggested by Wimms (amule.cpp & amule.h),
> SIOCGIFADDR  could not be found by compiler under Solaris2.8, so I had to
> tell him where to get it, in SysTray.cpp I added :
> <<
> #ifndef SIOCGIFADDR
> #include
> #endif
> >>
> at the beginning (File is attached).
>
>
> At the final linking stage, I had to manually add to the command :
> -L/usr/local/lib -L/usr/openwin/lib -R/usr/openwin/lib -lgtk -lgdk -lgmodule
>  -lglib -ldl -lXext -lX11 -lsocket -lnsl -lm -lresolv
>
> or else g++ couldn't find the objects (mainly libgtk, but not only)
>
> I'll try to be as verbose as possible in the post.
>
> Thanks again for your assistance !
>
> Enjoy the evening,
>
> Youm

greets
delta

enzo

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 14
Thanks
« Reply #3 on: January 18, 2004, 03:25:23 AM »

yo man,
    Thank you very much!!!
I will try it in my Solaris.
Logged

enzo

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 14
The other error
« Reply #4 on: January 18, 2004, 03:41:14 AM »

BTW, I also found some "ld: fatal: Symbol referencing errors." from config.log

 line 268, 269,  852, 853,  976,  1082, 1184,  1305,  1406,  1507,  1610, 2267
,  2404 and  2567.
   
     The config.log file was attached with tis post.
Logged

wimms

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 14
Re: Compile issues with Solaris x86, and patch
« Reply #5 on: February 11, 2004, 07:12:02 PM »

amule 1.2.5 misses proposed patches again.
RLIMIT_RSS fix missing

INADDR_NONE is lost with amule.h
I compiled mine by putting this into sys.h
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Compile issues with Solaris x86, and patch
« Reply #6 on: February 11, 2004, 07:43:17 PM »

sorry wimms, will do that RIGHT NOW
Logged