You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by "Philip M. Gollucci" <pg...@liquidation.com> on 2005/09/09 11:12:42 UTC
[PATCH] add ldd/otool output to bug reports
For both mp2bug and A-T
Question, why does A-T call it OSX and mp2 call it DARWIN ... should we sync one way or the other ?
Index: lib/ModPerl/Config.pm
===================================================================
--- lib/ModPerl/Config.pm (revision 279736)
+++ lib/ModPerl/Config.pm (working copy)
@@ -18,9 +18,11 @@
use Apache2::Build ();
use Apache::TestConfig ();
+use Apache::TestConfigData ();
use File::Spec ();
use constant WIN32 => Apache2::Build::WIN32;
+use constant DARWIN => Apache2::Build::WIN32;
sub as_string {
my $build = Apache2::Build->build_config;
@@ -53,8 +55,19 @@
$command = "$httpd -V";
$cfg .= "\n\n*** $command\n";
$cfg .= qx{$command};
- }
- else {
+
+ # Add the dynamic link information
+ # For now, assume its in our path... its there a better way ?
+ if (DARWIN) {
+ $command = "otool $httpd";
+ }
+ else {
+ $command = "ldd $httpd";
+ }
+
+ $cfg .= "\n*** $command\n";
+ $cfg .= qx{$command};
+ } else {
$cfg .= "\n\n*** The httpd binary was not found\n";
}
Index: Apache-Test/lib/Apache/TestConfig.pm
===================================================================
--- Apache-Test/lib/Apache/TestConfig.pm (revision 279734)
+++ Apache-Test/lib/Apache/TestConfig.pm (working copy)
@@ -1837,7 +1837,19 @@
$command = "$httpd -V";
$cfg .= "\n*** $command\n";
$cfg .= qx{$command};
- }
+
+ # Add the dynamic link information
+ # For now, assume its in our path... its there a better way ?
+ if (OSX) {
+ $command = "otool $httpd";
+ }
+ else {
+ $command = "ldd $httpd";
+ }
+
+ $cfg .= "\n*** $command\n";
+ $cfg .= qx{$command};
+ }
else {
$cfg .= "\n\n*** The httpd binary was not found\n";
}
--
END
-----------------------------------------------------------------------------
Philip M. Gollucci
Senior Developer - Liquidity Services Inc.
Phone: 202.558.6268 (Direct)
Cell: 301.254.5198
E-Mail: pgollucci@liquidation.com
Web: http://www.liquidityservicesinc.com
http://www.liquidation.com
http://www.uksurplus.com
http://www.govliquidation.com
http://www.gowholesale.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [PATCH] add ldd/otool output to bug reports
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Mon, 12 Sep 2005, Philip M. Gollucci wrote:
>> If this point was reached, it would break Win32, plus
>> any other system which didn't have an ldd in the PATH.
>> Perhaps Apache::TestConfig::which() could be used to
>> see if an ldd() [or otool()] is present, and skip this
>> part if it's not found?
>>
> I guess qx{} is different on win32 ?
> Take from example on my FBSD box which does not have 'otool'
>
> % perl -e 'my $command = "otool -L /bin/ls"; qx{$command}; print "\ndone.\n"'
>
> done.
>
> I don't think it matters, but at rate, Apache::TestConfig::which() will
> better find ldd/otool.
I think the use of which() is better - what would have
happened before is that a message:
'ldd' is not recognized as an internal or external
command, operable program, or batch file.
would appear with Win32, which would be confusing.
> Does win32 have an equivalent?
There are utilities on Win32 that give extra information
like this; I'll take a look later at them to see which
might be useful. But for now, I'd suggest doing it without
Win32, as you have it. Thanks.
--
best regards,
randy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [PATCH] add ldd/otool output to bug reports
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Mon, 12 Sep 2005, Philip M. Gollucci wrote:
>> If this point was reached, it would break Win32, plus
>> any other system which didn't have an ldd in the PATH.
>> Perhaps Apache::TestConfig::which() could be used to
>> see if an ldd() [or otool()] is present, and skip this
>> part if it's not found?
>>
> I guess qx{} is different on win32 ?
> Take from example on my FBSD box which does not have 'otool'
>
> % perl -e 'my $command = "otool -L /bin/ls"; qx{$command}; print "\ndone.\n"'
>
> done.
>
> I don't think it matters, but at rate, Apache::TestConfig::which() will
> better find ldd/otool.
I think the use of which() is better - what would have
happened before is that a message:
'ldd' is not recognized as an internal or external
command, operable program, or batch file.
would appear with Win32, which would be confusing.
> Does win32 have an equivalent?
There are utilities on Win32 that give extra information
like this; I'll take a look later at them to see which
might be useful. But for now, I'd suggest doing it without
Win32, as you have it. Thanks.
--
best regards,
randy
Re: [PATCH] add ldd/otool output to bug reports
Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
> If this point was reached, it would break Win32, plus
> any other system which didn't have an ldd in the PATH.
> Perhaps Apache::TestConfig::which() could be used to
> see if an ldd() [or otool()] is present, and skip this
> part if it's not found?
>
I guess qx{} is different on win32 ?
Take from example on my FBSD box which does not have 'otool'
% perl -e 'my $command = "otool -L /bin/ls"; qx{$command}; print "\ndone.\n"'
done.
I don't think it matters, but at rate, Apache::TestConfig::which() will better find ldd/otool.
Does win32 have an equivalent? Also, I fixed the DARWIN constant from the previous patch.
If this looks good, I'll make similar for A-T and apply both.
pgollucci@pgollucci.internal.liquidation.com /home/pgollucci/dev/repos/asf/perl/modperl/trunk rv=0 142 >svn diff
lib/ModPerl/Config.pm
Index: lib/ModPerl/Config.pm
===================================================================
--- lib/ModPerl/Config.pm (revision 279773)
+++ lib/ModPerl/Config.pm (working copy)
@@ -21,6 +21,7 @@
use File::Spec ();
use constant WIN32 => Apache2::Build::WIN32;
+use constant DARWIN => Apache2::Build::DARWIN;
sub as_string {
my $build = Apache2::Build->build_config;
@@ -53,6 +54,22 @@
$command = "$httpd -V";
$cfg .= "\n\n*** $command\n";
$cfg .= qx{$command};
+
+ my $command;
+
+ if (DARWIN) {
+ my $otool = Apache::TestConfig::which('otool');
+ $command = " -L $otool" if $otool;
+ }
+ elsif (!WIN32) {
+ my $ldd = Apache::TestConfig::which('ldd');
+ $command = "$ldd $httpd" if $ldd;
+ }
+
+ if ($command) {
+ $cfg .= "\n*** $command\n";
+ $cfg .= qx{$command};
+ }
}
else {
$cfg .= "\n\n*** The httpd binary was not found\n";
--
END
------------------------------------------------------------
What doesn't kill us can only make us stronger.
Nothing is impossible.
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
http://www.liquidityservicesinc.com
http://www.liquidation.com
http://www.uksurplus.com
http://www.govliquidation.com
http://www.gowholesale.com
Re: [PATCH] add ldd/otool output to bug reports
Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
> If this point was reached, it would break Win32, plus
> any other system which didn't have an ldd in the PATH.
> Perhaps Apache::TestConfig::which() could be used to
> see if an ldd() [or otool()] is present, and skip this
> part if it's not found?
>
I guess qx{} is different on win32 ?
Take from example on my FBSD box which does not have 'otool'
% perl -e 'my $command = "otool -L /bin/ls"; qx{$command}; print "\ndone.\n"'
done.
I don't think it matters, but at rate, Apache::TestConfig::which() will better find ldd/otool.
Does win32 have an equivalent? Also, I fixed the DARWIN constant from the previous patch.
If this looks good, I'll make similar for A-T and apply both.
pgollucci@pgollucci.internal.liquidation.com /home/pgollucci/dev/repos/asf/perl/modperl/trunk rv=0 142 >svn diff
lib/ModPerl/Config.pm
Index: lib/ModPerl/Config.pm
===================================================================
--- lib/ModPerl/Config.pm (revision 279773)
+++ lib/ModPerl/Config.pm (working copy)
@@ -21,6 +21,7 @@
use File::Spec ();
use constant WIN32 => Apache2::Build::WIN32;
+use constant DARWIN => Apache2::Build::DARWIN;
sub as_string {
my $build = Apache2::Build->build_config;
@@ -53,6 +54,22 @@
$command = "$httpd -V";
$cfg .= "\n\n*** $command\n";
$cfg .= qx{$command};
+
+ my $command;
+
+ if (DARWIN) {
+ my $otool = Apache::TestConfig::which('otool');
+ $command = " -L $otool" if $otool;
+ }
+ elsif (!WIN32) {
+ my $ldd = Apache::TestConfig::which('ldd');
+ $command = "$ldd $httpd" if $ldd;
+ }
+
+ if ($command) {
+ $cfg .= "\n*** $command\n";
+ $cfg .= qx{$command};
+ }
}
else {
$cfg .= "\n\n*** The httpd binary was not found\n";
--
END
------------------------------------------------------------
What doesn't kill us can only make us stronger.
Nothing is impossible.
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
http://www.liquidityservicesinc.com
http://www.liquidation.com
http://www.uksurplus.com
http://www.govliquidation.com
http://www.gowholesale.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [PATCH] add ldd/otool output to bug reports
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Fri, 9 Sep 2005, Philip M. Gollucci wrote:
> For both mp2bug and A-T
>
> Question, why does A-T call it OSX and mp2 call it DARWIN ... should we sync
> one way or the other ?
>
>
> Index: lib/ModPerl/Config.pm
> ===================================================================
> --- lib/ModPerl/Config.pm (revision 279736)
> +++ lib/ModPerl/Config.pm (working copy)
> @@ -18,9 +18,11 @@
>
> use Apache2::Build ();
> use Apache::TestConfig ();
> +use Apache::TestConfigData ();
> use File::Spec ();
>
> use constant WIN32 => Apache2::Build::WIN32;
> +use constant DARWIN => Apache2::Build::WIN32;
>
> sub as_string {
> my $build = Apache2::Build->build_config;
> @@ -53,8 +55,19 @@
> $command = "$httpd -V";
> $cfg .= "\n\n*** $command\n";
> $cfg .= qx{$command};
> - }
> - else {
> +
> + # Add the dynamic link information
> + # For now, assume its in our path... its there a better way ?
> + if (DARWIN) {
> + $command = "otool $httpd";
> + }
> + else {
> + $command = "ldd $httpd";
> + }
> +
> + $cfg .= "\n*** $command\n";
> + $cfg .= qx{$command};
> + } else {
> $cfg .= "\n\n*** The httpd binary was not found\n";
> }
>
> Index: Apache-Test/lib/Apache/TestConfig.pm
> ===================================================================
> --- Apache-Test/lib/Apache/TestConfig.pm (revision 279734)
> +++ Apache-Test/lib/Apache/TestConfig.pm (working copy)
> @@ -1837,7 +1837,19 @@
> $command = "$httpd -V";
> $cfg .= "\n*** $command\n";
> $cfg .= qx{$command};
> - }
> +
> + # Add the dynamic link information
> + # For now, assume its in our path... its there a better way ?
> + if (OSX) {
> + $command = "otool $httpd";
> + }
> + else {
> + $command = "ldd $httpd";
> + }
> +
> + $cfg .= "\n*** $command\n";
> + $cfg .= qx{$command};
> + }
> else {
> $cfg .= "\n\n*** The httpd binary was not found\n";
> }
If this point was reached, it would break Win32, plus
any other system which didn't have an ldd in the PATH.
Perhaps Apache::TestConfig::which() could be used to
see if an ldd() [or otool()] is present, and skip this
part if it's not found?
--
best regards,
randy
Re: [PATCH] add ldd/otool output to bug reports
Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
> That should be
> use constant DARWIN => Apache2::Build::DARWIN;
Yeesh.. I'll have to go sleep and look over all these again.
Thanks!
--
END
------------------------------------------------------------
What doesn't kill us can only make us stronger.
Nothing is impossible.
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
http://www.liquidityservicesinc.com
http://www.liquidation.com
http://www.uksurplus.com
http://www.govliquidation.com
http://www.gowholesale.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [PATCH] add ldd/otool output to bug reports
Posted by Nikolay Ananiev <an...@thegdb.com>.
"Philip M. Gollucci" <pg...@liquidation.com> wrote in message
news:4321520A.80707@liquidation.com...
> For both mp2bug and A-T
>
> Question, why does A-T call it OSX and mp2 call it DARWIN ... should we
sync one way or the other ?
I think both should be called DARWIN.
>
> [...]
> use constant WIN32 => Apache2::Build::WIN32;
> +use constant DARWIN => Apache2::Build::WIN32;
That should be
use constant DARWIN => Apache2::Build::DARWIN;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [PATCH] add ldd/otool output to bug reports
Posted by Vivek Khera <kh...@kcilink.com>.
On Sep 9, 2005, at 5:12 AM, Philip M. Gollucci wrote:
> + # For now, assume its in our path... its there a better way ?
> + if (DARWIN) {
> + $command = "otool $httpd";
> + }
> + else {
>
You want "otool -L". otool without any flags returns a help screen.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D. MailerMailer, LLC Rockville, MD
http://www.MailerMailer.com/ +1-301-869-4449 x806
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [PATCH] add ldd/otool output to bug reports
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Fri, 9 Sep 2005, Philip M. Gollucci wrote:
> For both mp2bug and A-T
>
> Question, why does A-T call it OSX and mp2 call it DARWIN ... should we sync
> one way or the other ?
>
>
> Index: lib/ModPerl/Config.pm
> ===================================================================
> --- lib/ModPerl/Config.pm (revision 279736)
> +++ lib/ModPerl/Config.pm (working copy)
> @@ -18,9 +18,11 @@
>
> use Apache2::Build ();
> use Apache::TestConfig ();
> +use Apache::TestConfigData ();
> use File::Spec ();
>
> use constant WIN32 => Apache2::Build::WIN32;
> +use constant DARWIN => Apache2::Build::WIN32;
>
> sub as_string {
> my $build = Apache2::Build->build_config;
> @@ -53,8 +55,19 @@
> $command = "$httpd -V";
> $cfg .= "\n\n*** $command\n";
> $cfg .= qx{$command};
> - }
> - else {
> +
> + # Add the dynamic link information
> + # For now, assume its in our path... its there a better way ?
> + if (DARWIN) {
> + $command = "otool $httpd";
> + }
> + else {
> + $command = "ldd $httpd";
> + }
> +
> + $cfg .= "\n*** $command\n";
> + $cfg .= qx{$command};
> + } else {
> $cfg .= "\n\n*** The httpd binary was not found\n";
> }
>
> Index: Apache-Test/lib/Apache/TestConfig.pm
> ===================================================================
> --- Apache-Test/lib/Apache/TestConfig.pm (revision 279734)
> +++ Apache-Test/lib/Apache/TestConfig.pm (working copy)
> @@ -1837,7 +1837,19 @@
> $command = "$httpd -V";
> $cfg .= "\n*** $command\n";
> $cfg .= qx{$command};
> - }
> +
> + # Add the dynamic link information
> + # For now, assume its in our path... its there a better way ?
> + if (OSX) {
> + $command = "otool $httpd";
> + }
> + else {
> + $command = "ldd $httpd";
> + }
> +
> + $cfg .= "\n*** $command\n";
> + $cfg .= qx{$command};
> + }
> else {
> $cfg .= "\n\n*** The httpd binary was not found\n";
> }
If this point was reached, it would break Win32, plus
any other system which didn't have an ldd in the PATH.
Perhaps Apache::TestConfig::which() could be used to
see if an ldd() [or otool()] is present, and skip this
part if it's not found?
--
best regards,
randy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org