RPM Community Forums

Mailing List Message of <rpm-devel>

Re: perl building in rpm5 rpmxs.c

From: Jeff Johnson <n3npq@mac.com>
Date: Tue 20 Nov 2007 - 14:33:48 CET
Message-Id: <C3093542-DB8A-4A40-8A73-65BBD83F9AC9@mac.com>

On Nov 20, 2007, at 12:38 AM, David Halik wrote:

>
> I've had some issues in rpmxs.c with Sun Studio in Solaris 9 and  
> 5.0a2. The first prob was missing symbols in the build process:
>
> "rpmxs.c", line 192: undefined symbol: rpmBuildFlags
> "rpmxs.c", line 192: syntax error before or at: buildflags
> "rpmxs.c", line 193: undefined symbol: buildflags
> "rpmxs.c", line 193: undefined symbol: RPMBUILD_NONE
> "rpmxs.c", line 194: warning: implicit function declaration: buildSpec
> "rpmxs.c", line 194: undefined symbol: buildflags
> "rpmxs.c", line 195: cannot recover from previous errors
>
> This was solved with adding "rpmbuild.h" to the include in rpmxs.c.  
> The build process is able to move forward past this, but now I'm  
> having perl problems. Do you require a specific version of perl? It  
> looks like the version that is shipped with Solaris 9 is too old:
>

rpmbuild.h needs to be added, yes.

Its likeley that a specific, and fairly recent, version of perl is  
needed.
This the minuimum version of perl needed listed in INSTALL:

Perl            mandatory 5.8.0   5.8.8   http://www.perl.com/

> "rpmxs.c", line 129: warning: implicit function declaration: rpmdsN
> "rpmxs.c", line 129: warning: improper pointer/integer combination:  
> arg #2
> "rpmxs.c", line 132: warning: implicit function declaration:  
> rpmdsNVRMatchesDep
> "rpmxs.c", line 140: warning: implicit function declaration:  
> rpmdsAnyMatchesDep
> "rpmxs.c", line 177: warning: implicit function declaration:  
> rpmtsSetSpec
> "rpmxs.c", line 177: warning: improper pointer/integer combination:  
> op "="
> /usr/local/bin/perl /usr/perl5/5.6.1/lib/ExtUtils/xsubpp  -typemap / 
> usr/perl5/5.6.1/lib/ExtUtils/typemap -typemap typemap  RPM.xs >  
> RPM.xsc && mv RPM.xsc RPM.c
> Error: 'const char *' not in typemap in RPM.xs, line 133
> gmake[3]: *** [RPM.c] Error 1
>

It sounds like disabling the includes in rpmconstant.h to fix
rpmconstant.c linkage may have caused other issues.

Adding
     #include <rpmds.h>
     #include <rpmts.h>
should supply the additional symbols.

> I grepped in /usr/perl5/5.6.1/lib/ExtUtils/typemap and 'const char  
> *' is indeed missing. Is there a way around this?
>

Hmmm, dunno perl bindings well enough to hazard a guess. But
I'd be surprised if perl-5.6.1 did not have some mens to bind a
"const char *" string.

hth

73 de Jeff
Received on Tue Nov 20 14:34:16 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.