- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- SIZE_MAX undefined
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2011 09:10 AM
тАО06-14-2011 09:10 AM
SIZE_MAX undefined
I'm trying to compile some software on HP-UX B.11.11.
Things like coreutils and bash compile without problems, but gcc-4.5.2 and ruby-1.9.2-p180 fail and complain about "SIZE_MAX" being undefined.
Any idea what the reason for this might be, and how to fix them?
Did anyone manage to compile gcc and ruby on such a system? What did you do to let it work?
There are two different cc installed on the system. Is there a way to tell what kind of compiler they are? (There seems not to be something like --version.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2011 09:59 AM
тАО06-14-2011 09:59 AM
Re: SIZE_MAX undefined
their actual output might be more helpful
than vague descriptions or interpretations.
Around here:
dy # uname -a
HP-UX dy B.11.11 U 9000/785 2012616114 unlimited-user license
dy # gcc -v
Using built-in specs.
Target: hppa2.0w-hp-hpux11.11
Configured with: ../gcc-4.4.2/configure
Thread model: posix
gcc version 4.4.2 (GCC)
SIZE_MAX is not defined everywhere. Does
your newer GCC really demand it?
> Did anyone manage to compile gcc [...]
My notes suggest that I needed to install GNU
"bison", "m4", and "sed", and then
export PATH="/usr/local/bin:${PATH}"
before doing the "configure" step. But I
don't recall any complaints about SIZE_MAX.
> There are two different cc installed on the
> system. [...]
Where?
> Is there a way [...]?
man cc
The old, bundled compiler may not be very
informative:
dy # /usr/bin/cc -v
(Bundled) cc: NLSPATH is /usr/lib/nls/msg/%L/%N.cat:/usr/lib/nls/msg/C/%N.cat:
(Bundled) cc: CCOPTS is not set.
(Bundled) cc: INCLUDIR is INCLUDIR=/usr/include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2011 12:44 AM
тАО06-15-2011 12:44 AM
Re: SIZE_MAX undefined
This is in stdint.h on 11.23.
There is SSIZE_MAX in limits.h.
>Is there a way to tell what kind of compiler they are?
Have you tried what(1) or -V?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2012 10:27 AM
тАО05-04-2012 10:27 AM
Re: SIZE_MAX undefined
A little late, here, but maybe it will prove useful to someone in the future.
I ran into the same problem using the AllianceONE build of GCC 4.6.3 on HP-UX 11.11 just yesterday. This definition, as well as INTPTR_MAX and UINTPTR_MAX, are not present in the 11.11 include files with the latest December 2009 Gold Quality pack.
gbrhpq$ find /usr/include -type f -print | xargs egrep '[^A-Z_]SIZE_MAX'
gbrhpq$
The fix for it is to add the following to the code:
#ifdef __hpux
#ifndef SIZE_MAX
#define SIZE_MAX ((size_t)-1)
#endif
#endif
For the other two, which are defined but null:
#ifdef __hpux
#if !defined(INTPTR_MAX) || (defined(INTPTR_MAX) && !(INTPTR_MAX+0))
#ifdef __LP64__
#define INTPTR_MAX INT64_MAX
#else
#define INTPTR_MAX INT32_MAX
#endif
#endif