zsh-workers
 help / color / mirror / code / Atom feed
* Problems building zsh on QNX 6.1
@ 2002-06-03  1:42 dwolfe
  2002-06-03  5:17 ` Borsenkow Andrej
  0 siblings, 1 reply; 5+ messages in thread
From: dwolfe @ 2002-06-03  1:42 UTC (permalink / raw)
  To: zsh-workers

Hello...  I wanted to report some trouble I had building zsh 4.0.2 for
QNX 6.1.  I was ultimately successful in getting it to compile, but
there were a few minor problems.  Also, I'm not sure whether the
work-around I used led to a proper executable.  (It seems to work
fine.)

The 'out-of-the-box' QNX installation choked when I ran ./configure in
the build directory as follows:

# pwd
/usr/local/src/zsh-4.0.2

# ./configure
creating cache ./config.cache
configuring for zsh 4.0.2
checking host system type... x86-pc-nto-qnx
checking for gcc... gcc
[... stuff omitted ... ]
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for executable suffix... configure: error: installation or
configuration problem: compiler cannot create executables.


A look in config.log showed the following:

configure:1628: checking for executable suffix
configure:1638: gcc -o conftest  -Wall -Wno-implicit
-Wmissing-prototypes -O2 -D_LARGEFILE_SOURCE undefined  conftest.c
undefined 1>&5
gcc: undefined: No such file or directory
gcc: undefined: No such file or directory

LIBS and LDFLAGS were both getting set to 'undefined'.  Can anyone
explain why?  (Don't know if it matters, but /bin/sh is a link to ksh
on QNX; is this a Korn shell thing?) I was able to get the configure
script to complete by explicitly setting a few variables:

# export LIBS=""
# export LDFLAGS=""

But then the make failed with the following message:

make[3]: Entering directory `/usr/local/src/zsh-4.0.2/Src/Builtins'
gawk -f ./rlimits.awk /usr/include/sys/resource.h /dev/null > rlimits.h
gcc -c -I.  -DHAVE_CONFIG_H -Wall -Wno-implicit -Wmissing-prototypes
-O2 -o rlimits.o rlimits.c
rlimits.c: In function `printulimit':
rlimits.c:200: duplicate case value
rlimits.c:172: this is the first entry for that value
rlimits.c: In function `bin_ulimit':
rlimits.c:558: duplicate case value
rlimits.c:552: this is the first entry for that value
make[3]: *** [rlimits.o] Error 1
make[3]: Leaving directory `/usr/local/src/zsh-4.0.2/Src/Builtins'
make[2]: *** [modobjs] Error 1
make[2]: Leaving directory `/usr/local/src/zsh-4.0.2/Src'
make[1]: *** [modobjs] Error 2
make[1]: Leaving directory `/usr/local/src/zsh-4.0.2/Src'
make: *** [all] Error 1


A look in rlimits.c led me to the conclusion that RLIMIT_VMEM and
RLIMIT_RSS were being #defined to the same thing (namely, the decimal
value '6').  So, I commented out the case statements at line 200 and
558.  After doing so, the make completed successfully.


This is all heavy wizardry to me, so I'm unable to suggest a fix;
however, I'd love to help in any way I can.  Please email me directly
if any further information is required.

Regards,

- Dave Wolfe
  gForce Techologies, Inc.



This is all heavy wizardry to me, so I'm unable to suggest fixes;
however, I'd love to help in any way I can.  Please email me directly
if
any further information is required.

Regards,

- Dave Wolfe
  gForce Techologies, Inc.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Problems building zsh on QNX 6.1
  2002-06-03  1:42 Problems building zsh on QNX 6.1 dwolfe
@ 2002-06-03  5:17 ` Borsenkow Andrej
  2002-06-03 15:10   ` dwolfe
  0 siblings, 1 reply; 5+ messages in thread
From: Borsenkow Andrej @ 2002-06-03  5:17 UTC (permalink / raw)
  To: dwolfe, zsh-workers

> 
> Hello...  I wanted to report some trouble I had building zsh 4.0.2 for
> QNX 6.1. 

could you please try with 4.0.4 just to be sure it still has the same
problems there?


-andrej


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Problems building zsh on QNX 6.1
  2002-06-03  5:17 ` Borsenkow Andrej
@ 2002-06-03 15:10   ` dwolfe
  0 siblings, 0 replies; 5+ messages in thread
From: dwolfe @ 2002-06-03 15:10 UTC (permalink / raw)
  To: zsh-workers

> > Hello...  I wanted to report some trouble I had building zsh 4.0.2
> > for QNX 6.1.

Borsenkow Andrej <Andrej.Borsenkow@mow.siemens.ru> wrote:

> could you please try with 4.0.4 just to be sure it still has the same
> problems there?
>
>
> -andrej


Oh, I'm sorry--I thought I downloaded the latest version.  (The only
version available at the foad.org mirror was zsh-4.0.2.)


The 'configure' script for zsh-4.0.4 works fine under QNX 6.1, but I
still get the following error when I make:

make[3]: Entering directory `/usr/local/src/zsh-4.0.4/Src/Builtins'
gawk -f ./rlimits.awk /usr/include/sys/resource.h /dev/null > rlimits.h
gcc -c -I.  -DHAVE_CONFIG_H -Wall -Wno-implicit -Wmissing-prototypes
-O2 -o rlimits.o rlimits.c
rlimits.c: In function `bin_ulimit':
rlimits.c:569: duplicate case value
rlimits.c:563: this is the first entry for that value
make[3]: *** [rlimits.o] Error 1
make[3]: Leaving directory `/usr/local/src/zsh-4.0.4/Src/Builtins'
make[2]: *** [modobjs] Error 1
make[2]: Leaving directory `/usr/local/src/zsh-4.0.4/Src'
make[1]: *** [modobjs] Error 2
make[1]: Leaving directory `/usr/local/src/zsh-4.0.4/Src'
make: *** [all] Error 1

The following snippet of the output from 'gcc -E rlimit.c':

    if (strcmp(*argv, "unlimited")) {

        rlim_t limit;
        limit = zstrtorlimt(*argv, 0 , 10);

        switch (res) {
        case 1 :
        case 4 :
        limit *= 512;
        break;
        case 2 :
        case 3 :
        case 6  :
        case 7 :
        case 6  :
        limit *= 1024;
        break;
        }

reveals that RLIMIT_RSS and RLIMIT_VMEM are both expanding to '6'.


Please let me know if I can be of any help resolving this...

- Dave


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Problems building zsh on QNX 6.1
  2002-06-04 21:00 David Wolfe
@ 2002-06-05  9:07 ` Peter Stephenson
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Stephenson @ 2002-06-05  9:07 UTC (permalink / raw)
  To: Zsh hackers list, David Wolfe

"David Wolfe" wrote:
> Anyway, I decided to roll up my sleeves and take a crack at fixing this.
> It turns out that someone else had already done all the work!  I merely
> copied a few lines down to where they needed to go.

You're quite right, I fixed it partially for 4.0.4 but didn't have a
suitable system to check it on, so missed the ulimit chunk.  I'll whack
this straight onto both lines.

Thanks.
-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Problems building zsh on QNX 6.1
@ 2002-06-04 21:00 David Wolfe
  2002-06-05  9:07 ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: David Wolfe @ 2002-06-04 21:00 UTC (permalink / raw)
  To: zsh-workers

>  ... RLIMIT_RSS and RLIMIT_VMEM are both expanding to '6'.

Hmm.  I was curious about this, so I checked <sys/resource.h> on QNX 6.1:

#define RLIMIT_AS       6       /* Limit on address space size. */
#define RLIMIT_VMEM     RLIMIT_AS
#define RLIMIT_RSS      RLIMIT_AS


RLIMIT_VMEM, RLIMIT_RSS and RLIMIT_AS are all identical.  I'm guessing
this is because QNX is a realtime OS and doesn't limit how much memory
one process is allowed to use?

Anyway, I decided to roll up my sleeves and take a crack at fixing this.
It turns out that someone else had already done all the work!  I merely
copied a few lines down to where they needed to go.

I humbly submit the following patch.  (Please reply directly with
any comments, as I'm not subscribed to the list...)

- Dave


*** rlimits.c   Tue Jun  4 16:23:08 2002
--- rlimits.c.new   Tue Jun  4 16:27:52 2002
*************** bin_ulimit(char *name, char **argv, char
*** 565,571 ****
  # ifdef RLIMIT_MEMLOCK
        case RLIMIT_MEMLOCK:
  # endif /* RLIMIT_MEMLOCK */
! # ifdef RLIMIT_VMEM
        case RLIMIT_VMEM:
  # endif /* RLIMIT_VMEM */
  # ifdef RLIMIT_AIO_MEM
--- 565,573 ----
  # ifdef RLIMIT_MEMLOCK
        case RLIMIT_MEMLOCK:
  # endif /* RLIMIT_MEMLOCK */
! /* If RLIMIT_VMEM and RLIMIT_RSS are defined and equal, avoid *
!  * duplicate case statement.  Observed on QNX Neutrino 6.1.0. */
! # if defined(RLIMIT_VMEM) && (!defined(RLIMIT_RSS) || RLIMIT_RSS !=
RLIMIT_VMEM)
        case RLIMIT_VMEM:
  # endif /* RLIMIT_VMEM */
  # ifdef RLIMIT_AIO_MEM



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-06-05  9:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-03  1:42 Problems building zsh on QNX 6.1 dwolfe
2002-06-03  5:17 ` Borsenkow Andrej
2002-06-03 15:10   ` dwolfe
2002-06-04 21:00 David Wolfe
2002-06-05  9:07 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).