- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- hp-ux 11.23 ia64 gcc4 including <net/if.h> not pos...
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
Forums
Discussions
Discussions
Discussions
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
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
02-08-2006 03:54 AM
02-08-2006 03:54 AM
What i made:
including #include
compile with gcc4.0.2
result is : /usr/include/machine/sys/getppdp.h:65: error: array type has incomplete element type
As far as I know gcc4 will not compile constructs like the one in /usr/include/machine/sys/getppdp.h:65. But then it is not possible for me to compile something that includes
Does someone know a workaround without dowgrading gcc4 to gcc3.x?
THX a lot for every help on this!!!
Solved! Go to Solution.
- Tags:
- gcc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 12:46 PM
02-08-2006 12:46 PM
SolutionApart from the downgrade you don't want to do, you might consider the HP compilers.
Apart from that, you might extract just those parts of net/if.h you need and put them into your own include file. Not the most "robust" of things to do, but it might get you where you want to go.
WRT the HP compilers, if this is for a one-shot kind of thing, there is www.testdrive.hp.com.
And if you've not already done so, a bug report against gcc would seem to be in order?
- Tags:
- test drive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 06:42 PM
02-08-2006 06:42 PM
Re: hp-ux 11.23 ia64 gcc4 including <net/if.h> not possible
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 11:04 PM
02-08-2006 11:04 PM
Re: hp-ux 11.23 ia64 gcc4 including <net/if.h> not possible
getppdp.h:65:
extern union mpinfou spu_info[];
thats not valid ansi c code.
So I don't know who has to fix the problem. Because it is really an: array type has incomplete element type
If done a "workaround" by simply remove the brackets.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2006 04:21 AM
02-09-2006 04:21 AM
Re: hp-ux 11.23 ia64 gcc4 including <net/if.h> not possible
Do you have the PR number for the GCC bugzilla report you submitted? I could not find it.
As for workarounds, rather than remove the brackets from the header file I would probably add the definition of mpinfou to your source file before the include. This definition is in /usr/include/sys/mp.h. Just including
Another way to fix it would be to modify the GCC specific sys/mp.h header file. GCC creates copies of system header files and you could tweak that instead of changing the real system header file.
If GCC 4.0.2 is installed in /opt/hp-gcc-4.0.2 on ia64-hp-hpux11.23 then the system header file copies would be in /opt/hp-gcc-4.0.2/lib/gcc/ia64-hp-hpux11.23/4.0.2/include. There is probably no sys/mp.h in there but you could copy /usr/include/sys/mp.h there and then move the definition of mpinfou to the front of that file to fix the problem. GCC will automatically pick up the modified header file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2006 07:43 PM
02-09-2006 07:43 PM
Re: hp-ux 11.23 ia64 gcc4 including <net/if.h> not possible
:qoute:
I am not convinced that this is illegal C. The HP compiler takes it and
GCC 3.X takes it. I think GCC 4.0.2 is looking at section 6.2.5 of the
C standard which says you can't construct an array of an incomplete type...
:quote:
I don't know if you are right. The GCC4 has changed its behaviour in handling of such constructs of an array of an incomplete type. Thatswhy it works with GCC3.X but it doesn't work with GCC4.
See also http://gcc.gnu.org/ml/gcc/2005-02/msg00054.html
The Bugzilla number of my bugreport is 26189
I never wanted to change the system lib directly. I did it now like you suggested.