Operating System - Linux
1748123 Members
3354 Online
108758 Solutions
New Discussion юеВ

Re: Compiling perl 5.8.6 and later on HP-UX 11.23

 
SOLVED
Go to solution

Compiling perl 5.8.6 and later on HP-UX 11.23

Hi:

I would like to reopen this case, as it would there be new issues to solve the problem.

I have gcc 3.4.4 installed on HP-UX 11.23 box. When trying to build perl 5.8.7 from source (CPAN)

sh Configure -Dcc=gcc -d

works fine, but then gmake fails:

`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:4368,
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:4369,
from miniperlmain.c:36:
/usr/include/sys/sem.h:91: error: field `sem_perm' has incomplete type
gmake: *** [miniperlmain.o] Error 1


A workaround to thism problem I found in this forum consist on temporary replacing /usr/include/sys/ipc.h which the version for HP-UX 11.11. It really works, but of course it is not a good idea for keeping a stable system, and you have to switch the file every time you plan to upgrade perl and/or modules.

If you have found a permanent way to correct these (Configure options, editing config.sh, compiler version, etc) please let me know. Thanks in advance (and points granted) for your comments.

Jose Enrique
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: Compiling perl 5.8.6 and later on HP-UX 11.23

What about the depot on http://software.hp.com ?

Search for PERL5

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
H.Merijn Brand (procura
Honored Contributor

Re: Compiling perl 5.8.6 and later on HP-UX 11.23

Make the fix permanent, and don't forget to poke HP to make it permanent in the next ExtSW/Goldpack

Remember that include/header files on impact on files being compiled. A running system is NOT influenced by changes in include files (thank god :) )

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

Re: Compiling perl 5.8.6 and later on HP-UX 11.23

You are quite right, my friend Merijn, but... you must restore include files to their original versions after compiling Perl or modules, as they are required to compile the kernel. And switch the file is very ugly to document it, don't you agree?

I know you were able to build gcc-4.0 in an Itanium test drive. Could you succesfully build Perl on it? If so, I'd appreciate a million your comments. Thanks.
H.Merijn Brand (procura
Honored Contributor

Re: Compiling perl 5.8.6 and later on HP-UX 11.23

Once I built gcc, building perl was not a real problem. IIRC almost out-of-the-box

GNU gcc caused me some headaches, but they were no showstoppers.

If you want a real temptation that causes headaches, try to build gcc-4.1 on AIX. It took me a week. But building perl with that was a breaze.

HP's testdrive systems have been moved to another phisical location and currentle are not as accessible to me as they used to be. And I have less time to experiment with Open Source on the testdrives.

I still think that fixing the include file can be done in a safe way. When building the kernel (if building it actually uses that file, which I'm not too sure of), it most likely has some other defines as well, like IN_KERNEL or something.

Try to find that our, put the original code in #ifdef IN_KERNEL and the correct code in the #else, and you're safe.

I hereby ask other people to tell the correct #ifdef if they know it. I do not have a 11.23 handy :)

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Ermin Borovac
Honored Contributor
Solution

Re: Compiling perl 5.8.6 and later on HP-UX 11.23

You are missing definition for cid_t which is in /usr/include/sys/types.h.

is included in /usr/include/sys/ipc.h. However, gcc will pick up its private copy of types.h instead of /usr/include/sys/types.h.

On my system gcc's private copy of types.h is found in

/usr/local/lib/gcc/hppa2.0w-hp-hpux11.23/4.0.0/include/sys/types.h

Of course your path will be different but you can make an educated guess.

Examine gcc's types.h and check if it has definition of cid_t. It should look like

# ifndef _CMPTID_T
# define _CMPTID_T
typedef int32_t cid_t; /* For compartment IDs */
typedef cid_t cmpt_t;
# endif /* _CMPTID_T */

If definition is not there add it. It's better then editing files in /usr/include.

Or better still download gcc for 11.23 from http://www.hp.com/go/gcc.

Re: Compiling perl 5.8.6 and later on HP-UX 11.23

Thank you, Ermin. Your comment has shown to be completely usefull. I have tried edit gcc's types.h and it worked almost fine... I got a coredump later in making, but I think I can fix it. If not, I will try gcc from HP Software Depot.