Mailing List Archive

SGI Irix 6.5 patch
Hi!!

I downloaded the sources from SVN (rev. 1694) and I did the changes
for a successful IRIX 6.5.x build.

I had to solve some Issues.

-Irix headers has getopt.h but it lacks getopt_long(). Had to use
cherokee/cherokee/getopt.h
-cherokee/util.c has gethostbyname_r() (same prototype as Solaris)
-Minor changes to autoconf.in.

Unsolved issues:
configure hangs up cause it does something with the modules near the
end. System grep is not compatible with GNU grep. I had to set up my
$HOME to find GNU grep path first.

That's all. It could build and run, but cherokee-admin hangs up after
launch cherokee.
cherokee runs flawlessly and it is still running. I show the output of
cherokee-admin:
---------
bash-3.1# /opt/cherokee-irix/sbin/cherokee-admin
Cherokee Web Server 0.8.0 (Jul 26 2008): Listening on port 9090, TLS disabled,
IPv6 disabled, using poll, 200 fds system limit, max. 95 connections, 5
threads, 40 fds per thread, standard scheduling policy
Server 0.8.0 running.. PID=34223
Traceback (most recent call last):
File "/opt/cherokee-irix/share/cherokee/admin/pyscgi.py", line 120, in handle
self.handle_request()
File "/opt/cherokee-irix/share/cherokee/admin/server.py", line 132,
in handle_request
body = page.HandleRequest(uri, post)
File "/opt/cherokee-irix/share/cherokee/admin/Form.py", line 50, in
HandleRequest
return self._op_render()
File "/opt/cherokee-irix/share/cherokee/admin/PageMain.py", line 48,
in _op_render
if manager.is_alive():
File "/opt/cherokee-irix/share/cherokee/admin/CherokeeManagement.py",
line 65, in is_alive
return is_PID_alive (self._pid)
File "/opt/cherokee-irix/share/cherokee/admin/CherokeeManagement.py",
line 198, in is_PID_alive
raise 'TODO'
TODO
----------


The machine specs:
SGI O2
CPU: MIPS R5000 Processor Chip Revision: 2.1
FPU: MIPS R5000 Floating Point Coprocessor Revision: 1.0
1 200 MHZ IP32 Processor
Main memory size: 576 Mbytes
Secondary unified instruction/data cache size: 1 Mbyte on Processor 0
Instruction cache size: 32 Kbytes
Data cache size: 32 Kbytes
OS: Irix 6.5.29

Here is the patch:
____________________________________________________________
diff -Naur cherokee/cget/main.c cherokee-irix/cget/main.c
--- cherokee/cget/main.c 2008-07-26 01:34:13.090918369 +0000
+++ cherokee-irix/cget/main.c 2008-07-26 03:57:00.496862761 +0000
@@ -40,12 +40,15 @@
# include <time.h>
#endif

+
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <strings.h>

+
+
#include "init.h"
#include "util.h"
#include "url.h"
@@ -56,6 +59,9 @@
#include "downloader-protected.h"
#include "socket.h"
#include "header-protected.h" /* FIXME! */
+#ifndef HAVE_GETOPT_LONG
+# include "getopt/getopt.h"
+#endif

#include "proxy.h"

diff -Naur cherokee/cherokee/main.c cherokee-irix/cherokee/main.c
--- cherokee/cherokee/main.c 2008-07-26 01:27:16.602932272 +0000
+++ cherokee-irix/cherokee/main.c 2008-07-26 04:00:30.368791884 +0000
@@ -31,6 +31,9 @@
#ifdef HAVE_GETOPT_H
# include <getopt.h>
#endif
+#ifndef HAVE_GETOPT_LONG
+# include "getopt/getopt.h"
+#endif

/* Notices
*/
diff -Naur cherokee/cherokee/main_admin.c cherokee-irix/cherokee/main_admin.c
--- cherokee/cherokee/main_admin.c 2008-07-26 01:27:16.247154784 +0000
+++ cherokee-irix/cherokee/main_admin.c 2008-07-26 04:00:41.196701184 +0000
@@ -31,6 +31,10 @@
#ifdef HAVE_GETOPT_H
# include <getopt.h>
#endif
+#ifndef HAVE_GETOPT_LONG
+# include "getopt/getopt.h"
+#endif
+

#define APP_NAME \
"Cherokee Web Server: Admin"
diff -Naur cherokee/cherokee/main_tweak.c cherokee-irix/cherokee/main_tweak.c
--- cherokee/cherokee/main_tweak.c 2008-07-26 01:27:17.334570650 +0000
+++ cherokee-irix/cherokee/main_tweak.c 2008-07-26 04:00:48.386467526 +0000
@@ -29,6 +29,10 @@
#ifdef HAVE_GETOPT_H
# include <getopt.h>
#endif
+#ifndef HAVE_GETOPT_LONG
+# include "getopt/getopt.h"
+#endif
+

#include <cherokee/cherokee.h>

diff -Naur cherokee/cherokee/util.c cherokee-irix/cherokee/util.c
--- cherokee/cherokee/util.c 2008-07-26 01:27:16.893153177 +0000
+++ cherokee-irix/cherokee/util.c 2008-07-26 03:11:43.572712960 +0000
@@ -675,8 +675,8 @@
char tmp[GETHOSTBYNAME_R_BUF_LEN];


-# ifdef SOLARIS
- /* Solaris 10:
+# if defined SOLARIS || IRIX
+ /* Solaris 10 or IRIX:
* struct hostent *gethostbyname_r
* (const char *, struct hostent *, char *, int, int *h_errnop);
*/
diff -Naur cherokee/configure.in cherokee-irix/configure.in
--- cherokee/configure.in 2008-07-26 01:36:47.836686496 +0000
+++ cherokee-irix/configure.in 2008-07-26 03:16:41.938123490 +0000
@@ -108,6 +108,11 @@
setenv_is_threadsafe="yes"
libdl="-ldl"
;;
+ *-*-irix6*)
+ AC_DEFINE(IRIX, 1, [It is SGI Irix])
+ setenv_is_threadsafe="yes"
+ libdl="-ldl"
+ ;;
*-*-hpux*)
libdl="-ldl"
;;
@@ -276,7 +281,7 @@
AC_FUNC_MEMCMP
AC_FUNC_MMAP

-AC_CHECK_FUNCS(gmtime gmtime_r localtime localtime_r getrlimit
getdtablesize readdir readdir_r flockfile funlockfile)
+AC_CHECK_FUNCS(gmtime gmtime_r localtime localtime_r getrlimit
getdtablesize readdir readdir_r flockfile funlockfile getopt_long)

FW_CHECK_PWD
FW_CHECK_GRP

___________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cherokee-irix.patch
Type: application/octet-stream
Size: 3090 bytes
Desc: not available
Url : http://lists.octality.com/pipermail/cherokee-dev/attachments/20080726/3554e2e7/attachment.obj
SGI Irix 6.5 patch [ In reply to ]
Hello there,

On 26 Jul 2008, at 22:13, BSDero wrote:
> -Irix headers has getopt.h but it lacks getopt_long(). Had to use
> cherokee/cherokee/getopt.h
> -cherokee/util.c has gethostbyname_r() (same prototype as Solaris)
> -Minor changes to autoconf.in.

These changes are applied upstream. Thanks!

> Unsolved issues:
> configure hangs up cause it does something with the modules near the
> end. System grep is not compatible with GNU grep. I had to set up my
> $HOME to find GNU grep path first.

Well, then we must check what's wrong with our use of grep. We should
not depend on the GNU tool-chain. Could you please follow up with
this? (I don't have access to any Irix box).

> ---------
> bash-3.1# /opt/cherokee-irix/sbin/cherokee-admin
> return is_PID_alive (self._pid)
> File "/opt/cherokee-irix/share/cherokee/admin/CherokeeManagement.py",
> line 198, in is_PID_alive
> raise 'TODO'
> TODO
> ----------

This should be fixed now (r1696).

> Here is the patch:

Thanks for the patch :-)

--
Greetings, alo.
http://www.alobbs.com/
SGI Irix 6.5 patch [ In reply to ]
Ey BSDero! (or should I say Irix'ero?)

On 29 Jul 2008, at 06:57, BSDero wrote:
> Hi, Alvaro!!
>>> Unsolved issues:
>>> configure hangs up cause it does something with the modules near the
>>> end. System grep is not compatible with GNU grep. I had to set up my
>>> $HOME to find GNU grep path first.
>>
>> Well, then we must check what's wrong with our use of grep. We
>> should not
>> depend on the GNU tool-chain. Could you please follow up with this?
>> (I don't
>> have access to any Irix box).
>>
>
> checking module "file"... Illegal option -- w
> Usage: grep [-E|-F][-c|-l|-q][-xhbnsviyC] -e pattern_list [-f
> pattern_file] [file ...]
> dynamic

Quite frankly, I don't think I will find the time to fix it up (Irix
is not among our target platforms and I don't even have a testing
box). However, I would be happy to apply a patch that you could
provide as it does not break the Linux, OS X, OpenSolaris and BSD
compilations. :)

--
Greetings, alo.
http://www.alobbs.com/