Configuring Apache 1.3.12 on Neutrino (QNXRTP)

Took a little doing, but apache 1.3.12 now compile/works on Neutrino.
Doing a configure --host=qnx almost works (There does not seem to be a
Neutrino host config). However, the following problems arise:

The linker flags -lunix and -N128 don’t work.

Solution:
linker flags that work: -lsocket -lm

The flock function does not seem to be in libc

Solution:
write your own using fcntl()… something like this

#define LOCK_SH 1
#define LOCK_EX 2
#define LOCK_NB 4
#define LOCK_UN 8

int flock(int fd, int op)
{


struct flock fl;

switch(op & (~LOCK_NB))
{
case LOCK_EX:
fl.l_type = F_WRLCK;
break;
case LOCK_UN:
fl.l_type = F_UNLCK;
break;
case LOCK_SH:
fl.l_type = F_RDLCK;
break;
}

fl.l_whence = SEEK_SET;
fl.l_start = 0;
fl.l_len = 0;

if((op & LOCK_NB) == LOCK_NB) {
if (fcntl(fd, F_SETLK, &fl) != -1)
return 0;
else
return -1;
}
else {
if (fcntl(fd, F_SETLKW, &fl) != -1)
return 0;
else
return -1;
}

The default SCOREBOARD file type selected by config uses shared memory which
causes a core dump with a SIGBUS. Actually, it seems that shm_open is
unimplemented.

Solution:
change the config.h file to use MMAP_SCOREBOARD


The default method of execing programs fails for CGI scripts (exec format
error).

Solution:

change config.h to indicate that you need HASHBANG emulation.

Recompile and install… Should work now…

Luis Correia <llcorreia@home.com> wrote:

Took a little doing, but apache 1.3.12 now compile/works on Neutrino.
Doing a configure --host=qnx almost works (There does not seem to be a
Neutrino host config). However, the following problems arise:

There is one, check out:

ftp.gnu.org/pub/config

get those 2 config.* files, drop in, and re- “configure”.

-xtang

The linker flags -lunix and -N128 don’t work.

Solution:
linker flags that work: -lsocket -lm

The flock function does not seem to be in libc

Solution:
write your own using fcntl()… something like this

#define LOCK_SH 1
#define LOCK_EX 2
#define LOCK_NB 4
#define LOCK_UN 8

int flock(int fd, int op)
{



struct flock fl;

switch(op & (~LOCK_NB))
{
case LOCK_EX:
fl.l_type = F_WRLCK;
break;
case LOCK_UN:
fl.l_type = F_UNLCK;
break;
case LOCK_SH:
fl.l_type = F_RDLCK;
break;
}

fl.l_whence = SEEK_SET;
fl.l_start = 0;
fl.l_len = 0;

if((op & LOCK_NB) == LOCK_NB) {
if (fcntl(fd, F_SETLK, &fl) != -1)
return 0;
else
return -1;
}
else {
if (fcntl(fd, F_SETLKW, &fl) != -1)
return 0;
else
return -1;
}

The default SCOREBOARD file type selected by config uses shared memory which
causes a core dump with a SIGBUS. Actually, it seems that shm_open is
unimplemented.

Solution:
change the config.h file to use MMAP_SCOREBOARD



The default method of execing programs fails for CGI scripts (exec format
error).

Solution:

change config.h to indicate that you need HASHBANG emulation.

Recompile and install… Should work now…

Xiaodan Tang <xtang@ottawa.com> wrote:

Luis Correia <> llcorreia@home.com> > wrote:
Took a little doing, but apache 1.3.12 now compile/works on Neutrino.
Doing a configure --host=qnx almost works (There does not seem to be a
Neutrino host config). However, the following problems arise:

There is one, check out:

ftp.gnu.org/pub/config

get those 2 config.* files, drop in, and re- “configure”.

or use the ones in /usr/share/libtool

-xtang

The linker flags -lunix and -N128 don’t work.

Solution:
linker flags that work: -lsocket -lm

The flock function does not seem to be in libc

Solution:
write your own using fcntl()… something like this

#define LOCK_SH 1
#define LOCK_EX 2
#define LOCK_NB 4
#define LOCK_UN 8

int flock(int fd, int op)
{



struct flock fl;

switch(op & (~LOCK_NB))
{
case LOCK_EX:
fl.l_type = F_WRLCK;
break;
case LOCK_UN:
fl.l_type = F_UNLCK;
break;
case LOCK_SH:
fl.l_type = F_RDLCK;
break;
}

fl.l_whence = SEEK_SET;
fl.l_start = 0;
fl.l_len = 0;

if((op & LOCK_NB) == LOCK_NB) {
if (fcntl(fd, F_SETLK, &fl) != -1)
return 0;
else
return -1;
}
else {
if (fcntl(fd, F_SETLKW, &fl) != -1)
return 0;
else
return -1;
}

The default SCOREBOARD file type selected by config uses shared memory which
causes a core dump with a SIGBUS. Actually, it seems that shm_open is
unimplemented.

Solution:
change the config.h file to use MMAP_SCOREBOARD



The default method of execing programs fails for CGI scripts (exec format
error).

Solution:

change config.h to indicate that you need HASHBANG emulation.

Recompile and install… Should work now…



cburgess@qnx.com

Tried this, replaced GuessOS with config.guess and removed the N128k and
lunix commands from configure .

but when tried make, got

conflicting types for `initgroups’ from includes on os.c

I guess there ar emore steps that in this thread


“Luis Correia” <llcorreia@home.com> wrote in message
news:XTjC5.33541$Z2.503095@nnrp1.uunet.ca

Took a little doing, but apache 1.3.12 now compile/works on Neutrino.
Doing a configure --host=qnx almost works (There does not seem to be a
Neutrino host config). However, the following problems arise:

The linker flags -lunix and -N128 don’t work.

Solution:
linker flags that work: -lsocket -lm

The flock function does not seem to be in libc

Solution:
write your own using fcntl()… something like this

#define LOCK_SH 1
#define LOCK_EX 2
#define LOCK_NB 4
#define LOCK_UN 8

int flock(int fd, int op)
{


struct flock fl;

switch(op & (~LOCK_NB))
{
case LOCK_EX:
fl.l_type = F_WRLCK;
break;
case LOCK_UN:
fl.l_type = F_UNLCK;
break;
case LOCK_SH:
fl.l_type = F_RDLCK;
break;
}

fl.l_whence = SEEK_SET;
fl.l_start = 0;
fl.l_len = 0;

if((op & LOCK_NB) == LOCK_NB) {
if (fcntl(fd, F_SETLK, &fl) != -1)
return 0;
else
return -1;
}
else {
if (fcntl(fd, F_SETLKW, &fl) != -1)
return 0;
else
return -1;
}

The default SCOREBOARD file type selected by config uses shared memory
which
causes a core dump with a SIGBUS. Actually, it seems that shm_open is
unimplemented.

Solution:
change the config.h file to use MMAP_SCOREBOARD


The default method of execing programs fails for CGI scripts (exec format
error).

Solution:

change config.h to indicate that you need HASHBANG emulation.

Recompile and install… Should work now…
\