Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: resourcebits.h problem
  1997-03-30  0:36 resourcebits.h problem Steven Kokinos
@ 1997-03-29 16:31 ` Al Potter
  1997-03-30  3:00 ` I remember this problem now ( was Re: resourcebits.h problem ) Terry L. Ridder
  1997-03-30  5:26 ` resourcebits.h problem Michal Jaegermann
  2 siblings, 0 replies; 4+ messages in thread
From: Al Potter @ 1997-03-29 16:31 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----

Content-Type: text/plain; charset=us-ascii

> I have the file installed, and all of the appropriate stuff.  Here is a 
> snippet from the error I was receiving when trying to compile msql 2.0B5. 
>  I have seen the exact thing with a number of other packages when trying 
> to compile.  Thanks for any help.:

<kotter><arnold><Ooh!>

	OK, finally one I've figured out!

> In file included from /usr/local/include/sys/resource.h:27,
>                 from msqld.c:54:

This is the first hint of trouble, so, look in msqld.c, on line 54 and you 
should see #include <sys/resource.h> or something similar (working from 
memory).

Before this line, insert #include <asm/resource.h.orig> and it should compile. 
 You may run into this in other files in the same "package" as well.

Hope this helps.....

</kotter></arnold></Ooh!>
<!-- If you don't get it, you don't get it.....   -->

AL
- -- 
+--------------------------------------------------------------------------+
|  Al Potter                             Senior Systems Analyst, SysAdmin  |
|                          Science Applications International Corporation  |
|                                                                          |
|  #include <std_disclaimer.h>                         apotter @ epix.net  |
|  #include <anti_spam.h>                       Remove the spaces to reply |
+--------------------------------------------------------------------------+

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3
Charset: noconv

iQCVAwUBMz3QYUaL+7tV5upJAQHSGAQAncfxoGg8XzCBq8yPF6A/uQE7hBu9MzFO
E2XrxAf8zS+YYz1qz7CqOulwIlfAdiiW1CSS5TFJuLZXaQ8oZ4o7moQf3lT41Evu
p9LiBpC8LuQTbZFPS1Ml7CEmvIjpwx7kBUghaun7FIr/vijoIKA/etzYOgeFefTz
VF5ZWaWT6zE=
=UW4T
-----END PGP SIGNATURE-----

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

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

* Re: resourcebits.h problem
@ 1997-03-30  0:36 Steven Kokinos
  1997-03-29 16:31 ` Al Potter
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Steven Kokinos @ 1997-03-30  0:36 UTC (permalink / raw)


>You should find the file 'resourcebits.h' in /usr/include.
>If it is not there I would suggest re-installing the glibc, & gcc rpm's.

I have the file installed, and all of the appropriate stuff.  Here is a 
snippet from the error I was receiving when trying to compile msql 2.0B5. 
 I have seen the exact thing with a number of other packages when trying 
to compile.  Thanks for any help.:

make[3]: Entering directory 
`/home/root/msql-2.0-B5/targets/Linux-2.0.18-alpha/m
sql'
gcc -O -I../ -DHAVE_CONFIG_H -DHAVE_SSIZE_T -DHAVE_U_INT -DHAVE_BIT_TYPES 
 -DHAV
E_DIRENT_H -DHAVE_DIRENT -DHAVE_MMAP   -DINST_DIR='"/usr/local/Hughes"' 
-DTARGET
='"Linux-2.0.18-alpha"'  -c msqld.c
In file included from /usr/local/include/sys/resource.h:27,
                 from msqld.c:54:
/usr/local/include/resourcebits.h:31: `RLIMIT_CPU' undeclared here (not 
in a fun
ction)
/usr/local/include/resourcebits.h:31: enumerator value for `_RLIMIT_CPU' 
not int
eger constant
/usr/local/include/resourcebits.h:37: `RLIMIT_FSIZE' undeclared here (not 
in a f
unction)
/usr/local/include/resourcebits.h:37: enumerator value for 
`_RLIMIT_FSIZE' not i
nteger constant
/usr/local/include/resourcebits.h:43: `RLIMIT_DATA' undeclared here (not 
in a fu
nction)
/usr/local/include/resourcebits.h:43: enumerator value for `_RLIMIT_DATA' 
not in
teger constant
/usr/local/include/resourcebits.h:49: `RLIMIT_STACK' undeclared here (not 
in a f
unction)

It seems that although the file is there, it is having some sort of 
problem.  I checked it, and did a diff with the same file from the new 
glibc distribution and it is ok.

-Steve

--
Steven Kokinos - Web Developers Network - http://www.webdevelop.com/
steve@webdevelop.com - 60 Day free trial for developers!
Industry leading development environment, multiple T1 network.

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

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

* I remember this problem now ( was Re: resourcebits.h problem )
  1997-03-30  0:36 resourcebits.h problem Steven Kokinos
  1997-03-29 16:31 ` Al Potter
@ 1997-03-30  3:00 ` Terry L. Ridder
  1997-03-30  5:26 ` resourcebits.h problem Michal Jaegermann
  2 siblings, 0 replies; 4+ messages in thread
From: Terry L. Ridder @ 1997-03-30  3:00 UTC (permalink / raw)


On Sat, 29 Mar 1997, Steven Kokinos wrote:

<snip>

I remember this problem.

For some reason the asm-alpha/resource.h file is different from 
all the other resource.h files.

If you look at the following files you will see what I mean.
/usr/src/linux/include/asm-i386/resource.h
/usr/src/linux/include/asm-mips/resource.h
/usr/src/linux/include/asm-alpha/resource.h <--- different from the others.
/usr/src/linux/include/asm-m68k/resource.h
/usr/src/linux/include/asm-ppc/resource.h

Now look at /usr/include/features.h at the line
     77 #undef  __KERNEL_STRICT_NAMES
     78
     79 /* Suppress kernel-name space pollution unless user expressedly asks
     80    for it.  */
     81 #ifndef _LOOSE_KERNEL_NAMES
     82 # define __KERNEL_STRICT_NAMES
     83 #endif

Now look at /usr/include/linux/resource.h

     63 #ifndef __KERNEL_STRICT_NAMES
     64 # define RLIMIT_CPU     __KERNEL_RLIMIT_CPU
     65 # define RLIMIT_FSIZE   __KERNEL_RLIMIT_FSIZE
     66 # define RLIMIT_DATA    __KERNEL_RLIMIT_DATA
     67 # define RLIMIT_STACK   __KERNEL_RLIMIT_STACK
     68 # define RLIMIT_CORE    __KERNEL_RLIMIT_CORE
     69 # define RLIMIT_RSS     __KERNEL_RLIMIT_RSS
     70 # define RLIMIT_NOFILE  __KERNEL_RLIMIT_NOFILE
     71 # define RLIMIT_AS      __KERNEL_RLIMIT_AS
     72 # define RLIMIT_NPROC   __KERNEL_RLIMIT_NPROC
     73 # define RLIMIT_MEMLOCK __KERNEL_RLIMIT_MEMLOCK
     74
     75 # define RLIM_NLIMITS   __KERNEL_RLIM_NLIMITS
     76
     77 # define RLIM_INFINITY  __KERNEL_RLIM_INFINITY
     78
     79 # define RUSAGE_SELF    __KERNEL_RUSAGE_SELF
     80 # define RUSAGE_CHILDREN __KERNEL_RUSAGE_CHILDREN
     81 # define RUSAGE_BOTH    __KERNEL_RUSAGE_BOTH
     82
     83 # define PRIO_MIN       __KERNEL_PRIO_MIN
     84 # define PRIO_MAX       __KERNEL_PRIO_MAX
     85
     86 # define PRIO_PROCESS   __KERNEL_PRIO_PROCESS
     87 # define PRIO_PGRP      __KERNEL_PRIO_PGRP
     88 # define PRIO_USER      __KERNEL_PRIO_USER
     89 #endif /* __KERNEL_STRICT_NAMES */

There are three solutions:

1. Edit all the source files to use the Alpha definitions instead of the 'normal'
definitions.

2. Edit /usr/include/features.h and make sure that KERNEL_STRICT_NAMES is undef'd.
instead of:
     77 #undef  __KERNEL_STRICT_NAMES
     78
     79 /* Suppress kernel-name space pollution unless user expressedly asks
     80    for it.  */
     81 #ifndef _LOOSE_KERNEL_NAMES
     82 # define __KERNEL_STRICT_NAMES
     83 #endif

have

     77 #undef  __KERNEL_STRICT_NAMES
     78
     79 /* Suppress kernel-name space pollution unless user expressedly asks
     80    for it.  */
     81 #ifndef _LOOSE_KERNEL_NAMES
     82 # undef __KERNEL_STRICT_NAMES  <--- NOTICE THE CHANGE HERE
     83 #endif

3. Somewhere after where '#include <features.h>' is in the source files
add the following line:

'#undef __KERNEL_STRICT_NAMES'

I guess a question would be "Why is the Alpha /usr/src/linux/include/asm-alpha/resource.h file
different from all the other asm resource.h files?"

> 
> It seems that although the file is there, it is having some sort of 
> problem.  I checked it, and did a diff with the same file from the new 
> glibc distribution and it is ok.
> 
> -Steve
> 
> 
> --
> Steven Kokinos - Web Developers Network - http://www.webdevelop.com/
> steve@webdevelop.com - 60 Day free trial for developers!
> Industry leading development environment, multiple T1 network.
> 
> 

Terry L. Ridder
Blue Danube Software (Blaue Donau Software)
"We do not write software, we compose it."

"And every hour of every day I'm learning more
the more I learn, the less I know about before
the less I know, the more I want to look around
digging deep for clues on higher ground."
==Higher Ground== UB40

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

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

* Re: resourcebits.h problem
  1997-03-30  0:36 resourcebits.h problem Steven Kokinos
  1997-03-29 16:31 ` Al Potter
  1997-03-30  3:00 ` I remember this problem now ( was Re: resourcebits.h problem ) Terry L. Ridder
@ 1997-03-30  5:26 ` Michal Jaegermann
  2 siblings, 0 replies; 4+ messages in thread
From: Michal Jaegermann @ 1997-03-30  5:26 UTC (permalink / raw)


> 
> >You should find the file 'resourcebits.h' in /usr/include.
> >If it is not there I would suggest re-installing the glibc, & gcc rpm's.
> 
> I have the file installed, and all of the appropriate stuff.

But as it is easy to notice kernel sources on alpha were/are
changing quite fast.

> In file included from /usr/local/include/sys/resource.h:27,
>                  from msqld.c:54:
> /usr/local/include/resourcebits.h:31: `RLIMIT_CPU' undeclared here (not 
                                       ^^^^^^^^^^^^^^
                            It looks like this constant was not defined.

It is easy to search for a definition with a command like that:

$ find /usr/include -follow -type f | xargs grep RLIMIT_CPU

I am using kernel 2.0.29, but on my system this results in something
like that:

/usr/include/asm/resource.h:#define __KERNEL_RLIMIT_CPU 0       /* CPU time in ms */
/usr/include/asm/resource.h:    {LONG_MAX, LONG_MAX}, /* RLIMIT_CPU */        \
/usr/include/linux/resource.h:# define RLIMIT_CPU __KERNEL_RLIMIT_CPU
/usr/include/resourcebits.h:  _RLIMIT_CPU = RLIMIT_CPU,
/usr/include/resourcebits.h:#undef RLIMIT_CPU
/usr/include/resourcebits.h:  RLIMIT_CPU = _RLIMIT_CPU,
/usr/include/resourcebits.h:#define RLIMIT_CPU RLIMIT_CPU

In 2.0.29 <resource.h> includes <asm/resource.h>, so RLIMIT_CPU will
be defined, but maybe this is not true in 2.0.18.  If not then include
this missing header explicitely and likely this will solve the problem.
It is hard to check for me as I do not keep kernels 11 patchlevels back -
especially that in the meantime a number of problems on Alpha was detected
and fixed.

  Michal

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

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

end of thread, other threads:[~1997-03-30  5:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-03-30  0:36 resourcebits.h problem Steven Kokinos
1997-03-29 16:31 ` Al Potter
1997-03-30  3:00 ` I remember this problem now ( was Re: resourcebits.h problem ) Terry L. Ridder
1997-03-30  5:26 ` resourcebits.h problem Michal Jaegermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox