[p4perl] Problems building P4-Client module
Tony Smith
tony at smee.org
Wed Mar 30 01:33:40 PST 2005
On Wednesday 30 March 2005 01:48, Tara Hernandez wrote:
> Updated the p4api package, still seeing the same error. Any other ideas
> for me?
> >>clientuserperl.cc: In member function `virtual void
> >> ClientUserPerl::Diff(FileSys*, FileSys*, int, char*, Error*)':
> >>clientuserperl.cc:518: error: no matching function for call to
> >>`Diff::SetInput(
> >> FileSys*&, FileSys*&, char*&, Error*&)'
> >>/pixar/d2/sets/tools-00/lib/p4/diff.h:38: error: candidates are: void
> >> Diff::SetInput(const char*, const char*, const char*, Error*)
> >>make[1]: *** [clientuserperl.o] Error 1
> >>make: *** [lib/libp4.a] Error 2
The prototype for Diff::SetInput is:
void SetInput( FileSys *fx, FileSys *fy, const DiffFlags &flags, Error *e );
so the call in ClientUserperl::Diff() is correct. What's surprising is the
prototype that your compiler thinks is correct. It seems to have converted
all the 'FileSys *' arguments into 'const char *', and that's not going to
work. Looks like something has #define'd FileSys to 'const char'.
You could try putting a line like this at the top of all the .cc files in
P4Perl:
#undef FileSys
and see if that helps.
> >>I had no problem building it out for Red Hat 7.1 and Fedora core 2, and
> >>sadly there are no hints listed for this platform in the package.
I have ported P4Ruby (though not P4Perl) to Mac OS X, but there's a really
nasty gotcha which means it will remain unsupported for the forseeable
future. You'll have the same problem with P4Perl once you get over your
current hurdle. The same workaround should work:
http://public.perforce.com/guest/tony_smith/perforce/API/Ruby/main/README.DARWIN
(note that the current Darwin API build is now built with gcc 3.1 so you
shouldn't need to build Perl).
Note also that P4Perl on Mac OS X will also be unsupported until the problem
with the dynamic loader is resolved.
> >>Anybody had any luck with this configuration? For Fedora, I'm
> >>specifying these compiler options and it works great:
> >>
> >>-fPIC -DOS_LINUX -Dconst_char='%const_char' -D_BSD_SOURCE -D_SVID_SOURCE
That should be -Dconst_char='const char'
Tony
More information about the p4perl
mailing list