Operating System - HP-UX
1836171 Members
3577 Online
110096 Solutions
New Discussion

Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

 
SOLVED
Go to solution
Kalin Evtimov
Regular Advisor

Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

I want to compile Perl from scratch in order to get it work better with my system (HP-UX 11.23). I installed gcc 3.4.3-depot from HP. Than I downloaded the Perl-sources (stable) from perl.com and I tried:
$ sh Configure -Dcc=gcc -d
this was Okay, then
$ make
I get this:


$ make
`sh cflags "optimize='-g -O'" miniperlmain.o` miniperlmain.c
CCCMD = gcc -DPERL_CORE -c -D_HPUX_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O -Wall
In file included from perl.h:4112,
from miniperlmain.c:36:
/usr/include/sys/ipc.h:51: error: parse error before "cid_t"
/usr/include/sys/ipc.h:56: error: parse error before '}' token
In file included from perl.h:4113,
from miniperlmain.c:36:
/usr/include/sys/sem.h:91: error: field `sem_perm' has incomplete type
*** Error exit code 1

Stop.

Ealrier I got this error trying to install some Perl-Module, but I do not understand this error message. Can anybody give me an advice?
10x a lot!
23 REPLIES 23
Stephen Keane
Honored Contributor
Solution

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

Can you post lines 40 - 60 of /usr/include/sys/ipc.h

might give us a clue
T G Manikandan
Honored Contributor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

which make you are using,

use the gnu version of make from

http://hpux.cs.utah.edu/hppd/hpux/Gnu/make-3.80/
Kalin Evtimov
Regular Advisor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

Here is the part from 40-56. The datatype sid is included from types.h

40
41 mode_t mode; /* access modes */
42 unsigned short __seq16;/* OLD slot usage sequence number */
43 key_t key; /* key */
44
45 unsigned short __ndx; /* NOT USED; was ndx of proc who has loc
k */
46 unsigned short __wait; /* waits, wanted, lock bits; reserved fo
r
47 specific ipc facilities */
48
49 unsigned int seq; /* slot usage sequence number */
50 # ifdef _INCLUDE_HPUX_SOURCE
51 cid_t cid; /* Compartment ID */
52 # else
53 int __cpad; /* pad for non-hp code */
54 # endif /* _INCLUDE_HPUX_SOURCE */
55 char pad[12];/* room for future expansion */
56 };
Stephen Keane
Honored Contributor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

Can you post the definition of cid_t from types.h (if it is in there) including any wrapping #ifdef type stuff. I don't have an Itanium, so my header files are different and don't include the cid_t type at all!
Kalin Evtimov
Regular Advisor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

make responds to all calls with:
No arguments or desription file

How can I use the GNU make by default?
T G Manikandan
Honored Contributor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

To use GNU make Install GNU make and add it at the beginning of the PATH variable.

Kalin Evtimov
Regular Advisor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

I posted the types.h as attachment. 10x for helping.

Stephen Keane
Honored Contributor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

Looks like you are going to need an additional -D_INCLUDE_POSIX_SOURCE in your makefile to make it work.
Kalin Evtimov
Regular Advisor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

About gmake: It gave the same error

If I knew what -D_INCLUDE_POSIX_SOURCE is, I would also complete the make file. But my C knowledge..hm..
Is there any other general approach for getting Perl on my machine (but not as depot, because depots are precompiled with ANSI C and I don't have it and this makes some other installations impossible :( )

Stephen Keane
Honored Contributor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

Edit the make file, usually called makefile, or Makefile or something.mak

You should see a line which says something like CXXFLAGS = blah

where blah will contain -DDEBUGGING etc

add -D_INCLUDE_POSIX_SOURCE to the end of that line with a single space separating it from the last entry on the line.

If it doesn't work, you can always remove it!
Kalin Evtimov
Regular Advisor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

It would be very kind of you if you have a little time to look at the Makefile (attached), because I didn't find any Flags as described..
Thank you
Stephen Keane
Honored Contributor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

Just to see if it works, in makefile change

perlmain$(OBJ_EXT): perlmain.c
$(CCCMD) $(PLDLFLAGS) $*.c

to

perlmain$(OBJ_EXT): perlmain.c
$(CCCMD) $(PLDLFLAGS) -D_INCLUDE_POSIX_SOURCE $*.c

Note that is a tab character, just to make it clear as the ITRC forum sometimes strips spaces etc.

If it doesn't work, you can always remove it.

Kalin Evtimov
Regular Advisor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

Still the same error...**seufz**
H.Merijn Brand (procura
Honored Contributor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

Can I get a ssh access?

HP's testdrive systems hang in the configuration process.

Enjoy, Have FUN! H.Merijn [ who now almost can't wait to fix this ]
Enjoy, Have FUN! H.Merijn
Kalin Evtimov
Regular Advisor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

Access to the system? I think you can't..This is just a Sandbox I'm trying to learn on. I have no idea of any configuration, because I didn't make it. All that shouldn't happen just at the beginning :(

Kalin Evtimov
Regular Advisor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

But, I think the problem is not the Perl, but gcc, because I first tried to compile a Perl Module, and then I tried to compile Perl, and both times I got the same error. So, it must be a gcc-error. How can I compile gcc?
Kalin Evtimov
Regular Advisor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

H.Merijn,
gcc and perl on your web-site are all for RISC, aren't they? How can I use them on my IA64?
H.Merijn Brand (procura
Honored Contributor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

You can't :(

I don't have IA64 (yet).
I'm currently building gcc-4.0.0 on the spe176, one of HP's testdrive systems, to see if my scripts can help you rebuild gcc from scratch.
Looks good so far. System ain't terribly fast though.

I'll come back on this when I either fail or succeed.

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
H.Merijn Brand (procura
Honored Contributor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

YEAAAHHHHHHHHHH!

I just successfully rebuilt gcc-4.0.0 gcc and g++ from scratch on an IA64 machine.
Thanks HP, for giving use the TestDrives!

Assuming your current gcc is installed on /usr/local/bin, and your new install path is /house/procura/IA64
These two path's may be the same

# cd /work (or any folder you have with enough space)

# mkdir GNU
# cd GNU
# wget ftp://ftp.nluug.nl/mirror/languages/gcc/releases/gcc-4.0.0/gcc-4.0.0.tar.bz2
# bzip2 -d # ln -s gcc-4.0.0 src
# export CONFIG_SITE=
# export CC=gcc
# export PATH=.:/usr/local/bin:$PATH
# mkdir obj
# cd obj
# ../src/configure \
--enable-languages=c,c++ \
--prefix=/house/procura/IA64/ --with-local-prefix=/house/procura/IA64 \
--with-gnu-as --with-as=/usr/local/bin/as \
--disable-shared \
--disable-nls
# make bootstrap-lean
# make install

I've tested the installed gcc version, which - on Itanium, HP-UX 11.23 - is able to produce both 32 and 64bit code

# cat >xx.c <int main (int argc, char *argv[])
{
return (0);
} /* main */
EOC
#

# cc -O -o xx xx.c
# file xx
xx: ELF-32 executable object file - IA64
# cc -O +DD64 -o xx xx.c
# file xx
xx: ELF-64 executable object file - IA64
# gcc -O -o xx xx.c
# file xx
xx: ELF-32 executable object file - IA64
# gcc -O -mlp64 -o xx xx.c
# file xx
xx: ELF-64 executable object file - IA64
#

Enjoy, Have FUN! H.Merijn [ Who just did a bit of dancin' ]
Enjoy, Have FUN! H.Merijn
H.Merijn Brand (procura
Honored Contributor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

FWIW I fetched the distribution to my local system, so I would be able to upload somewhere. I just have to check if it actually refers to /house/procura/IA64

I have no admin rights on the testdrive boxes (which I think is good looking though the other user's eyes :) ), so I had to choose a location where I *could* write

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

Hey Merijn, can we expect to see this gcc posted on your site?

Duncan

I am an HPE Employee
Accept or Kudo
H.Merijn Brand (procura
Honored Contributor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

Not very likely, because the path to it seems to be fixed to /house/procura/IA64, which is a very unusual place

If you want to have it anyway, I can make it available, but I'd prefer not to, because it is so very different.

Furthermore, my build does not include binutils, which I think should be included

Now that I know how to re-build from scratch, and that I have been able to verify that gcc-4 only needs a single binary to be able to generate both 32bit and 64bit objects on Itanium 2, I could add a small piece of proza to my site to describe how I did it. (just re-read my previous post)

If someone would give me ssh access to a Itanium2 machine (with less restrictions than I have in the testdrive environment), and write rights in the /usr/local tree, I would probably be willing to use that system to extend my download section on my site with Itanium2 builds for perl and gcc.
If it is too much trouble for me to get around on such a system, I can assure you that I won't do it, since the base to this all is only twofold: 1. FUN! 2. Curiousity (mainly to find out why others have trouble, and if it's doable at all)

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Kalin Evtimov
Regular Advisor

Re: Error compiling Perl 5.8.6 with gcc 3.4.3 on IA64

Well, on Friday I am going to try this. It's a pity that I cannot give you access to the Itanium, but I am not admin, I should only install a small programm on the UNIX :)
The only thing I can give you access to is my old Celeron 466, but I don't believe this would make things better.
**JOKE**

Thank you for doing all this work!