Re: Compiling perl pkg_* to c

2005-10-17 Thread Marc Espie
On Fri, Oct 14, 2005 at 10:24:51AM +0200, Rickard Dahlstrand wrote:
 Hi,
 
 I'm working on a installation where I can't install perl and I need to
 be able to install packages using pkg_add, pkg_delete etc.
 
 There are two solutions to my problem:
 1. If anyone have a c-based pkg_add or pkg_delete that works, this would
 be great. (It seems like this was done in c a while back)

And C was abandonned because the tools were buggy, hard to fix, and really
hard to extend. The new tools do an incredible amount of work compared to
the old ones.  Rewriting the same thing in C is a *large* endeavor.
What's going on is only very superficially similar...


 2. Try to compile the perl-source into a c-application using perlcc.

The perlcc compiler is experimental at best, as your try shows. Good luck...

You haven't actually justfied at any point why you can't install perl, from
a technical point of view. Even if that's true, the new package tools support
installing stuff in a chroot, specifically so that you can prepare an 
installation in a full OpenBSD setup that you're going to reuse on a limited
setup later on...



Compiling perl pkg_* to c

2005-10-14 Thread Rickard Dahlstrand
Hi,

I'm working on a installation where I can't install perl and I need to
be able to install packages using pkg_add, pkg_delete etc.

There are two solutions to my problem:
1. If anyone have a c-based pkg_add or pkg_delete that works, this would
be great. (It seems like this was done in c a while back)
2. Try to compile the perl-source into a c-application using perlcc.

So, the best thing would be to get a c-version, does anyone have one of
these?

My second option seems to fail with a core dump:

# perlcc -c
pkg_add  
/usr/bin/perlcc: pkg_add did not compile, which can't happen:
Starting compile
 Walking tree
 OpenBSD::PackingElement::SpecialFile saved (it is in
OpenBSD::PackingElement::FMTREE_DIRS's @ISA)
 OpenBSD::PackingElement::Unique saved (it is in
OpenBSD::PackingElement::SpecialFile's @ISA)
 OpenBSD::PackingElement::Meta saved (it is in
OpenBSD::PackingElement::Unique's @ISA)
 OpenBSD::PackingElement saved (it is in OpenBSD::PackingElement::Meta's
@ISA)
 Exporter saved (it is in Symbol's @ISA)
 OpenBSD::PackingElement::DirBase saved (it is in
OpenBSD::PackingElement::Dir's @ISA)
 OpenBSD::PackingElement::DirlikeObject saved (it is in
OpenBSD::PackingElement::DirBase's @ISA)
 OpenBSD::PackingElement::FileObject saved (it is in
OpenBSD::PackingElement::DirlikeObject's @ISA)
 OpenBSD::PackingElement::Object saved (it is in
OpenBSD::PackingElement::FileObject's @ISA)
 OpenBSD::PackingElement::Action saved (it is in
OpenBSD::PackingElement::ExeclikeAction's @ISA)
 OpenBSD::PackageLocation saved (it is in
OpenBSD::PackageLocation::SCP's @ISA)
 OpenBSD::PackageLocation::FTPorSCP saved (it is in
OpenBSD::PackageLocation::SCP's @ISA)
 OpenBSD::PackingElement::Option saved (it is in
OpenBSD::PackingElement::NoDefaultConflict's @ISA)
 OpenBSD::PackingElement::Annotation saved (it is in
OpenBSD::PackingElement::Ignore's @ISA)
 OpenBSD::PackingElement::Sample saved (it is in
OpenBSD::PackingElement::Sampledir's @ISA)
 OpenBSD::PackingElement::Comment saved (it is in
OpenBSD::PackingElement::ExtraInfo's @ISA)
 OpenBSD::PackingElement::Extra saved (it is in
OpenBSD::PackingElement::Extradir's @ISA)
 IO::Handle saved (it is in IO::File's @ISA)
 OpenBSD::PackageLocation::HTTPorFTP saved (it is in
OpenBSD::PackageLocation::HTTP's @ISA)
 Prescan
 Saving methods
 Bootstrap File::Glob /usr/libdata/perl5/i386-openbsd/5.8.6/XSLoader.pm
 Segmentation fault (core dumped)

#

Rickard.