LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 02-08-2006, 11:15 PM   #1
Ammad
Member
 
Registered: Apr 2004
Distribution: redhat 9.0, fc4, redhat as 4
Posts: 517

Rep: Reputation: 31
perl and linux commands


getting problem when i run compiled perl binary

#!/usr/bin/perl

print(`ls -l`);

when i run this using
root#perl first.pl
it works

as i compile
compile messages on prompt
pccdS4YP.c: In function 'perl_init_aaaaa':
pccdS4YP.c:1162: warning: this decimal constant is unsigned only in ISO C90
root#
root#./a.out
panic: invalid pad in pad_sv: 0x8eacb04[0x8eb9ab8] at o line 3.

whats the problem and how to resolve
 
Old 02-09-2006, 08:43 PM   #2
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 41
It sounds like your C compiler disagrees with the code that the Perl compiler generates. I tried this myself with Perl 5.8.7 and GCC 3.4.4 and it works, using just "perlcc test.pl" to generate the binary. It worked for me, so I think it's probably a Perl/CC dispute that might be fixed by switching versions. Check the "perlcompile" manpage for more info. What versions of Perl and your C compiler are you using?
 
Old 02-09-2006, 09:48 PM   #3
rjcrews
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 193

Rep: Reputation: 30
I had a simiiar problem that I corrected by updating perl and the gcc compiler.
 
Old 02-11-2006, 01:38 PM   #4
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 31
Code:
my $foo = `ls -l`;
print $foo, "\n";
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl question: Anyway to invoke Linux commands... STAGED Programming 8 02-03-2006 12:57 PM
Suse Linux Commands For These Aix Commands? Vaskar Guha Linux - Software 2 12-19-2005 12:45 AM
[Perl] brainstorming with pipes & commands patator Programming 3 06-25-2004 04:17 AM
2 Questions: java calling system commands? PERL vs Java? randomx Programming 28 11-28-2003 08:24 PM
vim commands in perl JohanLingen Programming 5 01-08-2003 04:43 AM


All times are GMT -5. The time now is 10:29 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration