Take the 2-minute tour ×

I am a very new to porting.

I was trying to port perl to a netbsd system. Since its a custom made build, we wont be able to run configure or make on the target netbsd system. So we are trying to cross-compile it in a host pc and copy the binary over target machine. And in order to do so, we have to make a makefile from scratch, since the format for the makefile in our build is different.

I have some basic doubts regarding this,

  1. Firstly, In order to create a perl makefile for my custom build, what are the basic things will come. Such as ccflags, library paths etc.,?

  2. There are some files like DynaLoader, uudmap.h, myConfig, Config.pm which gets generated while "make". How can i generate them using custum makefile.

  3. How to set various library paths and what are they ? The @INC, shows the perl search paths, how can i create it ?

  4. Where exactly Perl modules get installed and when it happens?

share|improve this question
Do you really need to build your own Perl package? I'd be surprised if NetBSD doesn't have a pre-built Perl package. In fact, I'd be surprised if it wasn't already installed. –  Dave Cross Dec 13 '11 at 10:43
Same as stackoverflow.com/questions/8442219/… –  daxim Dec 13 '11 at 14:53
add comment

2 Answers

A perl build normally involves building a stripped down version of perl named miniperl, which is then used extensively in the remainder of the process of building perl and the bundled modules.

There are two basic approaches to cross-compiling: to build miniperl for the target machine and build the modules, etc., there, or to build miniperl for the host and use it to build perl and modules for the target.

The WinCE port uses the latter approach; the rudimentary (last I knew, anyway) support for a -Dusecrosscompile switch to Configure uses the former.

I recommend you ask for advice and help on the perl5-porters mailing list: http://lists.perl.org/list/perl5-porters.html And be prepared for hard work.

share|improve this answer
hi @ysth, Thanks for replying. Your second approach for cross-compiling says: Build miniperl for the host and use it to build Perl and modules for the target. Can you give me some more inputs on this? How exactly the main Perl and its bundled modules are built with the help of miniperl which was built on host? BTW I am trying to port Perl-5.14.2. –  Shyama Dec 15 '11 at 10:58
@Shyama: ah, looks like there's been a little bit of progress made since I last knew anything about it. look at README.new and other files in the Cross directory. I don't know anything more than you will be able to see looking there. –  ysth Dec 16 '11 at 4:11
add comment

NetBSD's pkgsrc system has perl in it already and has the ability to generate binary packages that you can then install on a target machine.

share|improve this answer
add comment

Your Answer


