From owner-freebsd-hackers Sat Nov 23 06:26:38 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id GAA28053 for hackers-outgoing; Sat, 23 Nov 1996 06:26:38 -0800 (PST) Received: from cyclone.degnet.baynet.de (root@cyclone.degnet.baynet.de [194.95.214.129]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id GAA28048 for ; Sat, 23 Nov 1996 06:26:32 -0800 (PST) Received: from neuron (ppp7 [194.95.214.137]) by cyclone.degnet.baynet.de (8.6.12/8.6.9) with SMTP id QAA02113; Sat, 23 Nov 1996 16:33:56 +0100 Message-ID: <32972409.70FC@degnet.baynet.de> Date: Sat, 23 Nov 1996 15:19:21 -0100 From: Darius Moos Reply-To: moos@degnet.baynet.de X-Mailer: Mozilla 3.0Gold (Win95; I) MIME-Version: 1.0 To: David Nugent CC: freebsd-hackers Subject: Re: Who needs Perl? We do! References: <199611212355.PAA29016@osprey.grizzly.com> <329580BB.7E40@degnet.baynet.de> <3296EAFF.32FF@degnet.baynet.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk The perl-script i want to turn into a binary version is called myfile.pl The perl-binary (5.003) was compiled with -DUNEXEC and the unexec- functionality from emacs was merged in. It compiled without any errors. After some variable-initialisation there is a dump LALA; LALA: in the perlscript. Following is the info you advised me to check. I still have no idea what is going wrong here. I am thankfull for any little hint, that helps to solve the problem. Darius Moos. neuron:~/projects/perltest> neuron:~/projects/perltest> pwd /home/moos/projects/perltest neuron:~/projects/perltest> whoami moos neuron:~/projects/perltest> ll total 764 drwxr-xr-x 2 moos home 512 Nov 23 14:46 ./ drwxr-xr-x 4 moos home 512 Nov 23 14:41 ../ -rwxr-xr-x 1 moos home 8804 Nov 23 14:46 callmyfile* -rw-r--r-- 1 moos home 252 Nov 23 14:41 callmyfile.c -rwxr-x--- 1 moos home 28011 Nov 23 14:44 myfile.pl* neuron:~/projects/perltest> ./myfile.pl neuron:~/projects/perltest> ll total 764 drwxr-xr-x 2 moos home 512 Nov 23 14:50 ./ drwxr-xr-x 4 moos home 512 Nov 23 14:41 ../ -rwxr-xr-x 1 moos home 8804 Nov 23 14:46 callmyfile* -rw-r--r-- 1 moos home 252 Nov 23 14:41 callmyfile.c -rwxr-x--- 1 moos home 28011 Nov 23 14:44 myfile.pl* -rwxr-xr-x 1 moos home 723223 Nov 23 14:50 myfile.pl.perldump* neuron:~/projects/perltest> ./myfile.pl.perldump bash: ./myfile.pl.perldump: cannot execute binary file neuron:~/projects/perltest> echo $? 126 neuron:~/projects/perltest> file ./myfile.pl ./myfile.pl: a /usr/local/bin/perl script text neuron:~/projects/perltest> file ./myfile.pl.perldump ./myfile.pl.perldump: FreeBSD/i386 demand paged dynamically linked executable not stripped neuron:~/projects/perltest> cat ./callmyfile.c #include #include #include extern int errno; int main () { int err; err = execv("/home/moos/projects/perltest/myfile.pl.perldump", NULL); printf("execv-returned %d\nerrno was set to %d\n", err, errno); } neuron:~/projects/perltest> cc ./callmyfile.c -o ./callmyfile neuron:~/projects/perltest> ./callmyfile execv-returned -1 errno was set to 8 neuron:~/projects/perltest> neuron:~/projects/perltest> man errno . . . 8 ENOEXEC Exec format error. A request was made to execute a file that, although it has the appropriate permissions, was not in the for- mat required for an executable file. . . . David Nugent wrote: > > Darius Moos writes: > > I've also merged unexec into perl as far, as it compiles without errors. > > When then using the "dump