openSUSE Forums > Programming/Scripting » Location (or version) of limits.h

Go Back   openSUSE Forums > Programming/Scripting
Forums FAQ Members List Search Today's Posts Mark Forums Read


Programming/Scripting Questions about programming, bash scripts, perl, php, cron jobs, ruby, python, etc.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-Nov-2009, 09:38
Puzzled Penguin
 
Join Date: Nov 2009
Posts: 6
smorrisWXM hasn't been rated much yet
Default Location (or version) of limits.h

Hello; I wonder if anyone can help with this.

I have installed OpenSuse 11.1 so that I can compile my Qt applications in Linux. However, having installed Qt Creator, I find that I cannot even compile the examples supplied by Nokia without getting the error:

linux/limits.h: No such file or directory

After trawling through many posts in many forums, I have worked out that (a) there is supposed to be a limits.h file in the /usr/lib/gcc/i586-suse-linux/4.3/include directory, but (b) the limits.h file is actually located in /usr/lib/gcc/i586-suse-linux/4.3/include-fixed, along with "syslimits.h" and a "README" file that I can't make head nor tail of.

If I try simply to copy the files from 'include-fixed' to 'include', it doesn't let me; it doesn't even ask for an admin password, I just get a dialog saying "Access denied" and a 'Cancel' button.

So, how can I fix this?
Reply With Quote
  #2 (permalink)  
Old 07-Nov-2009, 10:15
microchip8's Avatar
Shaman Penguin
 
Join Date: Jun 2008
Location: /dev/belgium
Posts: 2,180
microchip8 is a reputation jewel in the roughmicrochip8 is a reputation jewel in the roughmicrochip8 is a reputation jewel in the roughmicrochip8 is a reputation jewel in the roughmicrochip8 is a reputation jewel in the rough
Default Re: Location (or version) of limits.h

you need the kernel limits.h header, not the one in gcc or something else. limits.h is provided by the linux-kernel-headers package and it contains, among other header files, the file limits.h which is located in /usr/include/linux

it is even tell you that it needs a file called limits.h and is looking in the directory linux (which is really /usr/include/linux)
__________________
My site: http://microchip.bplaced.net
My repo: http://download.opensuse.org/repositories/home:/microchip8
SUSE Unbound Forum: http://suseunbound.lefora.com


Do coders dream of sheep() ?
Reply With Quote
  #3 (permalink)  
Old 07-Nov-2009, 10:15
Puzzled Penguin
 
Join Date: Nov 2009
Posts: 6
smorrisWXM hasn't been rated much yet
Default Re: Location (or version) of limits.h

Quote:
Originally Posted by smorrisWXM View Post

If I try simply to copy the files from 'include-fixed' to 'include', it doesn't let me; it doesn't even ask for an admin password, I just get a dialog saying "Access denied" and a 'Cancel' button.
Actually, I found that if I logged in as Admin (rather than simply using sudo to give Admin privileges to my normal user name), I could move the files. It hasn't made any difference, however; I still see the same error message when I try to compile in Qt.

It's almost as if Qt is using another installation of gcc somewhere on the hard disk, but if so then I haven't been able to locate it.
Reply With Quote
  #4 (permalink)  
Old 07-Nov-2009, 10:18
Puzzled Penguin
 
Join Date: Nov 2009
Posts: 6
smorrisWXM hasn't been rated much yet
Default Re: Location (or version) of limits.h

Quote:
Originally Posted by microchip8 View Post
you need the kernel limits.h header, not the one in gcc or something else. limits.h is provided by the linux-kernel-headers package and it contains, among other header files, the file limits.h which is located in /usr/include/linux
Thank you. Unfortunately, I don't seem to have a /usr/inlcude/linux directory; maybe that is my problem! Where can I find the means to install it?
Reply With Quote
  #5 (permalink)  
Old 07-Nov-2009, 10:20
microchip8's Avatar
Shaman Penguin
 
Join Date: Jun 2008
Location: /dev/belgium
Posts: 2,180
microchip8 is a reputation jewel in the roughmicrochip8 is a reputation jewel in the roughmicrochip8 is a reputation jewel in the roughmicrochip8 is a reputation jewel in the roughmicrochip8 is a reputation jewel in the rough
Default Re: Location (or version) of limits.h

Quote:
Originally Posted by smorrisWXM View Post
Thank you. Unfortunately, I don't seem to have a /usr/inlcude/linux directory; maybe that is my problem! Where can I find the means to install it?
I told you already. Install package linux-kernel-headers which contains and dumps headers in /usr/include/linux

on my system:

neutrino@neutrino:~> rpm -qf /usr/include/linux/limits.h
linux-kernel-headers-2.6.27-2.28
__________________
My site: http://microchip.bplaced.net
My repo: http://download.opensuse.org/repositories/home:/microchip8
SUSE Unbound Forum: http://suseunbound.lefora.com


Do coders dream of sheep() ?
Reply With Quote
  #6 (permalink)  
Old 07-Nov-2009, 10:28
vodoo's Avatar
Explorer Penguin
 
Join Date: Jan 2009
Location: Switzerland
Posts: 243
vodoo hasn't been rated much yet
Default Re: Location (or version) of limits.h

Hi and WELCOME

Please make sure that the packages 'linux-kernel-headers' and 'glibc-devel' are installed. The former one will provide /usr/include/linux/limits.h

SORRY, did not check that this has already been answered by others.

Last edited by vodoo; 07-Nov-2009 at 10:29. Reason: Added SORRY line
Reply With Quote
  #7 (permalink)  
Old 07-Nov-2009, 10:36
Puzzled Penguin
 
Join Date: Nov 2009
Posts: 6
smorrisWXM hasn't been rated much yet
Default Re: Location (or version) of limits.h

Quote:
Originally Posted by vodoo View Post
Hi and WELCOME

Please make sure that the packages 'linux-kernel-headers' and 'glibc-devel' are installed. The former one will provide /usr/include/linux/limits.h

SORRY, did not check that this has already been answered by others.
Thank you both; according to YaST2, both packages are installed already.

Unfortunately, it's essential that I leave the office in a few minutes and won't be back till Tuesday. I'll have another look at it then.
Reply With Quote
  #8 (permalink)  
Old 07-Nov-2009, 10:39
Puzzled Penguin
 
Join Date: Nov 2009
Posts: 6
smorrisWXM hasn't been rated much yet
Default Re: Location (or version) of limits.h

Quote:
Originally Posted by smorrisWXM View Post
Thank you both; according to YaST2, both packages are installed already.
Correction; kernel-headers isn't showing as installed, only as 'available'. First thing on Tuesday morning I'll try to figure out how to install it.
Reply With Quote
  #9 (permalink)  
Old 07-Nov-2009, 10:41
microchip8's Avatar
Shaman Penguin
 
Join Date: Jun 2008
Location: /dev/belgium
Posts: 2,180
microchip8 is a reputation jewel in the roughmicrochip8 is a reputation jewel in the roughmicrochip8 is a reputation jewel in the roughmicrochip8 is a reputation jewel in the roughmicrochip8 is a reputation jewel in the rough
Default Re: Location (or version) of limits.h

Quote:
Originally Posted by smorrisWXM View Post
Correction; kernel-headers isn't showing as installed, only as 'available'. First thing on Tuesday morning I'll try to figure out how to install it.
zypper in linux-kernel-headers

__________________
My site: http://microchip.bplaced.net
My repo: http://download.opensuse.org/repositories/home:/microchip8
SUSE Unbound Forum: http://suseunbound.lefora.com


Do coders dream of sheep() ?
Reply With Quote
  #10 (permalink)  
Old 07-Nov-2009, 10:48
Puzzled Penguin
 
Join Date: Nov 2009
Posts: 6
smorrisWXM hasn't been rated much yet
Default Re: Location (or version) of limits.h

Quote:
Originally Posted by microchip8 View Post
zypper in linux-kernel-headers

YaST2 installed it automatically before shutting down. Now my application compiles

...and now I'm late

Thank you very much for your help.
Reply With Quote
Reply

Bookmarks

Tags
compilation, development, gcc, paths


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2