- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- compiling problem in Perl module in HP UNIX 11i
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
11-26-2007 08:31 PM
11-26-2007 08:31 PM
compiling problem in Perl module in HP UNIX 11i
We have installed avtive perl 5.8.8 in HP UNIX 11i machine.
This is the thread which was closed explicitly by HP i didnt understood why it was closed.
Any how i am posting it with different subject line.
I want to call a perl subroutine from my C/C++ code.
For this i tried perldoc perlembed,
There is a good man page available there.
i am using the cc command given in that
but if i try to compile the code it gives lot of errors i think some libraries which ae specific to HP UNIX are missing can some one tell me where i can get the libraried related to this topic.
thanks and regars
Vikram
- Tags:
- Perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2007 08:49 PM
11-26-2007 08:49 PM
Re: compiling problem in Perl module in HP UNIX 11i
Which? This is still there:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1180226
>but if i try to compile the code it gives lot of errors. i think some libraries which are specific to HP UNIX are missing
What are your errors?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2007 10:00 PM
11-26-2007 10:00 PM
Re: compiling problem in Perl module in HP UNIX 11i
Hi Dennis,
Below are some errors i am getting if i try to compile the insert program given in the perldoc perlembed man pages.
/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/perlvars.h", line 69: error #2757:
variable "EXT" is not a type name
PERLVARI(Gcsighandlerp, Sighandler_t, Perl_csighandler) /* Pointer to C-level sighandler */
^
"/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/perlvars.h", line 69: error #2065:
expected a ";"
PERLVARI(Gcsighandlerp, Sighandler_t, Perl_csighandler) /* Pointer to C-level sighandler */
^
"/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/perlvars.h", line 73: error #2077-D:
this declaration has no storage class or type specifier
PERLVARI(Guse_safe_putenv, int, 1)
^
"/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/perlvars.h", line 73: error #2065:
expected a ";"
PERLVARI(Guse_safe_putenv, int, 1)
^
"/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/reentr.inc", line 234: error #2757:
variable "PerlInterpreter" is not a type name
dTHX;
^
"/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/reentr.inc", line 234: error #2029:
expected an expression
dTHX;
^
"/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/reentr.inc", line 234: error #2018:
expected a ")"
dTHX;
I dont know ehat all libraries i should include or i shoud reinstall the PERL ????
Please let me know your feedback
thnaks and regards
Vikram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2007 03:31 AM
11-27-2007 03:31 AM
Re: compiling problem in Perl module in HP UNIX 11i
".../perlvars.h", line 69: error #2757: variable "EXT" is not a type name
PERLVARI(Gcsighandlerp, Sighandler_t, Perl_csighandler)
These look like macro errors.
You need to compile with -E -.i to see if you see anything obvious.
>I don't know what all libraries i should include or i should reinstall the PERL????
You haven't gotten to the link stage so it has nothing to do with libs yet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2007 04:46 PM
11-27-2007 04:46 PM
Re: compiling problem in Perl module in HP UNIX 11i
I compiled the code with -E option, i am using following Makefile to compile the code
I didnt got any error or warning messages what exactily do you man by something is obvious.
Please let me know your views.
INC = -I/opt/perl/lib/5.8.8/PA-RISC1.1-thread-multi/CORE/ \
-I/opt/perl/lib/5.8.8 \
-I/opt/perl/lib/5.8.8/PA-RISC1.1-thread-multi \
-I/usr/local/xibin
LIB = -L/usr/lib/hpux32/ \
-L/opt/perl/lib/5.8.8/PA-RISC1.1-thread-multi/CORE/ \
-L/opt/perl/lib/5.8.8
#LFLAGS = -E
src=HelloWorld.c
all : $(SRC)
cc $(LFLAGS) $(INC) -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings +Z -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(LIB) $(SRC) -lperl -lm
#cc $(INC) $(LFLAGS) -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings +Z -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(LIB) -o Hello $(SRC) -lperl -lm
My perl Installation resides in /opt/perl/
thanks and regards
Vikram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2007 06:05 PM
11-27-2007 06:05 PM
Re: compiling problem in Perl module in HP UNIX 11i
I don't see any compiles with "-E -.i"?
This will create a HelloWorld.i for each HelloWorld.c.
>I didn't got any error or warning messages what exactly do you mean by something is obvious.
Compiling with -E bypasses the compile stage but lets you look at the macro expansion.
You would then have to look at the corresponding line to "perlvars.h", line 69".
You could try bypassing this step by not adding "-E -.i" and instead use "+legacy_cpp" and then the error messages may point right at the macro expansion.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2007 11:16 PM
11-27-2007 11:16 PM
Re: compiling problem in Perl module in HP UNIX 11i
I am referring to the man pages and deifining all the flags needed as indicated in the perl -V command output.
I tried with +legacy_cpp but cc is not recognising this flag.
I think i am missing some path settings and switches that should be defined .
Because in the error i am also getting this kind of errors
cc: "/opt/perl/lib/5.8.8/PA-RISC1.1-thread-multi/CORE/perl.h", line 3464: error 1000: Unexpected symbol: "char".
I am not understanding how to go with these kinf of errors .
Please let me know your inputs this .
thanks and regards
Vikram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2007 11:21 PM
11-27-2007 11:21 PM
Re: compiling problem in Perl module in HP UNIX 11i
In the latter case, you could as well stop immediately, as perl needs a full-ANSI C compiler.
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2007 12:03 AM
11-28-2007 12:03 AM
Re: compiling problem in Perl module in HP UNIX 11i
If I give man cc
It displays
Requires Optional ansi C compiler
Do you mean the compiler i am using is not ANSI C from this.
If yes after installing the ANSI C compiler i should reinstall PERL as it should be compiled with ANSI C Compiler?
thanks and regards
Vikram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2007 04:05 AM
11-28-2007 04:05 AM
Re: compiling problem in Perl module in HP UNIX 11i
I can't see how it wouldn't. From your error message format above, it seems you are using aCC6 on IPF. What version?( Or cadvise?)
>I think i am missing some path settings and switches that should be defined.
Possible.
>Because in the error i am also getting this kind of errors
cc: ".../perl.h", line 3464: error 1000: Unexpected symbol: "char".
This error style is the PA C compiler, no longer IPF. What's changing??
>I am not understanding how to go with these kind of errors.
Compile with -E and redirect stdout to a file foo.i. Then use vi to look at that file around line 3464 for perl.h. You'll have to look at the #number entries for perl.h and interpolate where 3464 is.
>H.Merijn: Do you use the ANSI C-compiler
It seems like it.
>If I give man cc
Requires Optional ansi C compiler
It looks like you have it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2007 04:14 AM
11-28-2007 04:14 AM
Re: compiling problem in Perl module in HP UNIX 11i
/u/usr/merijn 101 > cc --version
cc: HP C/aC++ B3910B A.06.15 [May 16 2007]
/u/usr/merijn 102 > ls -l /usr/bin/cc
lr-xr-xr-t 1 root sys 15 Nov 28 13:30 /usr/bin/cc -> /opt/aCC/bin/cc
The bundled compiler is like
/u/usr/merijn 103 > ls -l /usr/ccs/bin/cc
lrwxr-xr-x 1 iwww 191 12 Jan 4 2006 /usr/ccs/bin/cc -> ./cc_bundled
That one is useless.
On a totally different path, why do you use the ActivePerl builds? And do you really want a 32bit perl?
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2007 04:20 AM
11-28-2007 04:20 AM
Re: compiling problem in Perl module in HP UNIX 11i
> This is the thread which was closed explicitly by HP i didnt understood why it was closed. Any how i am posting it with different subject line.
You posted the same thread twice, no doubt when the forum was slow or thowing posting errors. Thus, I asked that the modeerators remove the duplicate thread before there were any replies posted to both copies.
I responded, as did others, to your initial query here:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1180226
For continuity and completeness of this entire dialog, it would have been better to have had this thread a part of the aforementioned first one.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2007 04:37 AM
11-28-2007 04:37 AM
Re: compiling problem in Perl module in HP UNIX 11i
>That one is useless.
Quite the contrary. On IPF the bundled C compiler can't do K&R, so what's left? :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2007 07:18 PM
11-28-2007 07:18 PM
Re: compiling problem in Perl module in HP UNIX 11i
Not necessary i have to use perl_32 i have installed the Active Perl newly in /opt/perl/.... with this perl version also i am getting the same errors .
I also tried the same thing in Linux - 9i also there also the same errors are coming.
Any inputs please.
One thing from my side is i will install the ANSI C compiler and install perl newly on that and try and i will update the results.
thanks and regards
Vikram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2007 05:44 PM
12-01-2007 05:44 PM
Re: compiling problem in Perl module in HP UNIX 11i
If you attach your HelloWorld.i I can take a look at it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2007 12:10 AM
12-02-2007 12:10 AM
Re: compiling problem in Perl module in HP UNIX 11i
I tried with ANSI C compiler,
Still i get same errors.
I tried with gcc on Linux on my PC there also same errors are coming.
I am attaching my HelloWorld.c and also here is my Makefile
Please change the L Path and I Paths if you are using the Makefile.
INC = -I/opt/perl/lib/5.8.8/PA-RISC1.1-thread-multi/CORE/EXTERN.h \
-I/opt/perl/lib/5.8.8/PA-RISC1.1-thread-multi/CORE/INTERN.h \
-I/opt/perl/lib/5.8.8/PA-RISC1.1-thread-multi/CORE/perl.h \
-I/opt/perl/lib/5.8.8 \
-I/opt/perl/lib/5.8.8/PA-RISC1.1-thread-multi \
-I/usr/local/xibin
INCPATH = -I/opt/perl/lib/5.8.8/PA-RISC1.1-thread-multi/CORE/
LIBPATH = -L/opt/perl/lib/5.8.8/PA-RISC1.1-thread-multi/CORE/
LIB = -L/usr/lib/hpux32/ \
-L/opt/perl/lib/5.8.8/PA-RISC1.1-thread-multi/CORE/ \
-L/opt/perl/lib/5.8.8
LFLAGS = -O2 -Olimit 2900
src=HelloWorld.c
all : $(SRC)
cc $(LFLAGS) $(INCPATH) -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings +Z -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(LIBPATH) -o Hello $(SRC) -lperl -lm
#cc $(INC) $(LFLAGS) -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings +Z -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(LIB) -o Hello $(SRC) 'perl -MExtUtils::Embed -e ccopts -e ldopts'
thanks and regards
Vikram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2007 12:21 PM
12-02-2007 12:21 PM
Re: compiling problem in Perl module in HP UNIX 11i
Can you please attach the HelloWorld.i created by -E.
-I/opt/perl/lib/5.8.8/PA-RISC1.1-thread-multi/CORE/EXTERN.h
-I/opt/perl/lib/5.8.8/PA-RISC1.1-thread-multi/CORE/INTERN.h
-I/opt/perl/lib/5.8.8/PA-RISC1.1-thread-multi/CORE/perl.h
-I are directory paths, not file paths, remove these three. (But this is only used in the commented out command.)
>LFLAGS = -O2 -Olimit 2900
2900 isn't valid for HP's compiler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2007 06:38 AM
12-03-2007 06:38 AM
Re: compiling problem in Perl module in HP UNIX 11i
Sorry for the late reply.
Please find the Preprocessor output file attached.
thanks and regards
Vikram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2007 11:40 AM
12-03-2007 11:40 AM
Re: compiling problem in Perl module in HP UNIX 11i
Can you redo that -E compile but add -Wp,-C,-G and attach that .i file.
Also /opt/perl/lib/5.8.8/PA-RISC1.1-thread-multi/CORE/EXTERN.h.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2007 04:40 PM
12-03-2007 04:40 PM
Re: compiling problem in Perl module in HP UNIX 11i
>Can you redo that -E compile but add -Wp,-C,-G and attach that .i file.
Ok, I did this. Your problem is that you have a lemon HelloWorld.c, where did you get this?
Looking at my perldoc perlembed for "5.8.0" clearly shows this order:
#include
#include
I didn't see any mention of
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2007 04:54 PM
12-03-2007 04:54 PM
Re: compiling problem in Perl module in HP UNIX 11i
http://perldoc.perl.org/perlembed.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2007 09:50 PM
12-03-2007 09:50 PM
Re: compiling problem in Perl module in HP UNIX 11i
I have removed the INTERN.h and also perlapi.h from my program and if i give -Wp the compiler complains that "-Wp" unknown option.
Any how i am attaching both the files with Wp and without Wp flag in the Makefile.
Please have a look at it and let me know your feedback.
thanks and regards
Vikram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2007 09:51 PM
12-03-2007 09:51 PM
Re: compiling problem in Perl module in HP UNIX 11i
oops i forgot to attch one more file .
Signs of Old Age as u mentioned earlier !!!!!!!!!
Please find it attached now.
thanks and regards
Vikram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2007 10:31 PM
12-03-2007 10:31 PM
Re: compiling problem in Perl module in HP UNIX 11i
Then it should just work. No need to use debugging options after I solved it.
>if i give -Wp the compiler complains that "-Wp" unknown option.
You used?: -Wp,-C,-G
You seemed to replace "," by space.
>Please have a look at it and let me know your feedback.
The problem was already solved when I could make it myself and moved EXTERN.h up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2007 09:21 PM
12-05-2007 09:21 PM
Re: compiling problem in Perl module in HP UNIX 11i
Thank you very for your support .
Yes the problem was in the Header file inclusion i included
#include
before perl.h
The code is compiling now.
But, it is having some problems with the linking the output file (Hello the executable)it is generating is not having the executablr permissions.
If i do that file manually executable, it created a core dump.
If i open the core through wdb,
the debugger stops at the line
PL_exit_flags |= PERL_EXIT_DESTRUCT_END ;
in source code i think i have to go through in detail what exactly these flags are doing.
If i get a solution i will update in the forum .
If you already know the solution please let me know.
Also, the same code if i try to compile on LINUX machine, it says,
stray error 226
I dont what is this stray ERROR .
Please let me know if you have got any knowledge of this.
thanks and regards
Vikram