You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Stas Bekman <st...@stason.org> on 2004/04/27 02:04:17 UTC

new version Re: GTop-0.12 compile and installation problems

Ok, please try this candidate:
http://apache.org/~stas/GTop-0.13.tar.gz

I have tested it only with 2.6.0. I hope it is still working with earlier ones.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: new version Re: GTop-0.12 compile and installation problems

Posted by Pete Geenhuizen <pg...@carolina.rr.com>.
This is my first attempt at GTop.

Unfortunately Solaris doesn't support a recursive grep, and equally
unfortunately I wan't able to find u_init64_t anywhere.

With some Googleing around I came across this fix to compiling libgtop on
Solaris 8 and 9

" For the meantime, I patched glibtop.h to have

#ifndef u_int64_t
#define u_int64_t unsigned long long int
#endif "

I applied the above to glibtop.h and that allowed GTop to finally compile.

With that done, back to what started this whole thing, Apache::VMonitor. 
Using cpan the compile works, but the tests fail with this error which
causes the install to fail.

waiting 60 seconds for server to start: ...glibtop: kvm_open(): Error 0
(126)Cannot assign requested address: make_sock: could not bind to address
[::1]:8531
no listening sockets available, shutting down
Unable to open logs

...........................................................
waiting 60 seconds for server to start: not ok
[  error] giving up after 61 secs. If you think that your system
is slow or overloaded try again with a longer timeout value.
by setting the environment variable APACHE_TEST_STARTUP_TIMEOUT
to a high value (e.g. 360) and repeat the last command.

[  error] server failed to start! (t/logs/error_log wasn't created, start
the server in the debug mode)
make: *** [run_tests] Error 1
  /usr/local/bin/make test -- NOT OK
Running make install
  make test had returned bad status, won't install without force

So I installed VMonitor without the test and was able to point my browser
at it and got a nice display.

Unfortunately the system function doesn't appear to be working, I don't
know if that is related to the u_int64_t cludge, but here's what it shows.

CPU:   0.0% user, 0.0% nice, 0.0% sys, 0.0% idle
Mem:   768M av,  455M used,  313M free,    0K shared,    0K buff
Swap:  325K av,   30K used,  295K free,     0 pagein,     0 pageout

Not sure if any of this helps, but this what I have now.

Pete

-- 
"Unencumbered by the thought process"
--1992-2000 Click and Clack presidential campaign slogan

Stas Bekman said:
> Pete Geenhuizen wrote:
>> Well a little headway, the Server compiles but not GTop.  In case it
>> matters, Solaris 9 doesn't have pkgconfig, it does have pkg-config.
>
> Yes, it was a typo in the email, it uses pkg-config everywhere. The
> configuration works fine for you.
>
>> Here's the output from the build and make.
> [...]
>> /usr/local/bin/perl /usr/local/lib/perl5/5.8.2/ExtUtils/xsubpp  -typemap
>> /usr/local/lib/perl5/5.8.2/ExtUtils/typemap -typemap typemap.gtop
>> -typemap typemap -typemap typemap  GTop.xs > GTop.xsc && mv GTop.xsc
>> GTop.c
>> cc -c  -I/usr/local/include/libgtop-2.0 -I/usr/local/include/glib-2.0
>> -I/usr/local/lib/glib-2.0/include   -fno-strict-aliasing
>> -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O
>> -DVERSION=\"0.13\" -DXS_VERSION=\"0.13\" -fPIC
>> "-I/usr/local/lib/perl5/5.8.2/sun4-solaris/CORE"  -DGTOP_2_5_PLUS GTop.c
>> GTop.xs: In function `XS_GTop_field_u_int64_t':
>> GTop.xs:120: error: `u_int64_t' undeclared (first use in this function)
>
> Well, nothing has changed in GTop itself. Were you able to build GTop
> before
> on Solaris? On linux u_int64_t is defined in:
>
> /usr/include/sys/types.h:__extension__ typedef unsigned long long int
> u_int64_t;
>
> Can you figure out where yours is defined and include that header in
> GTop.xs?
> To find that header I did:
>
> grep -Ir u_int64_t /usr/include/ | grep typedef
>
>
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
>


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: new version Re: GTop-0.12 compile and installation problems

Posted by Pete Geenhuizen <pg...@carolina.rr.com>.
If I manage to find the solution to the libgtop I'll let you know.

Like I said thanks for all your help.

Pete
-- 
"Unencumbered by the thought process"
--1992-2000 Click and Clack presidential campaign slogan

Stas Bekman said:
> Pete Geenhuizen wrote:
>> Don't know what happened to this email originally, any way here's what I
>> sent.
>>
>> Stas,
>> What I just found is that Solaris has init64_t.  I don't know
>> any more about it, I noticed that during a configure of libgtop that
>> u_init64_t wasn't found, but init64_t was, don't know if that helps or
>> is
>> significant.
>
> I guess it doesn't exist then. Oh well, I'll just have that original
> ifndef
> that you've sent and release a new version. If someone finds that define a
> problem it'll be fixed.
>
>> You are correct getting the latest version of Apache-Test solved the
>> test
>> problem.
>
> Good. I'll change it to require that version.
>
>> I'm still working on the libgtop problem.
>>
>> So at this point I'd say that the issues that I had with GTop are
>> solved,
>> it's working.  I'll keep on trying to figure out how to get libgtop
>> functioning.
>
> Good luck, Pete.
>
>> Thx for all your help.
>
> ;)
>
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
>


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: new version Re: GTop-0.12 compile and installation problems

Posted by Stas Bekman <st...@stason.org>.
Pete Geenhuizen wrote:
> Don't know what happened to this email originally, any way here's what I
> sent.
> 
> Stas,
> What I just found is that Solaris has init64_t.  I don't know
> any more about it, I noticed that during a configure of libgtop that
> u_init64_t wasn't found, but init64_t was, don't know if that helps or is
> significant.

I guess it doesn't exist then. Oh well, I'll just have that original ifndef 
that you've sent and release a new version. If someone finds that define a 
problem it'll be fixed.

> You are correct getting the latest version of Apache-Test solved the test
> problem.

Good. I'll change it to require that version.

> I'm still working on the libgtop problem.
> 
> So at this point I'd say that the issues that I had with GTop are solved,
> it's working.  I'll keep on trying to figure out how to get libgtop
> functioning.

Good luck, Pete.

> Thx for all your help.

;)

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: new version Re: GTop-0.12 compile and installation problems

Posted by Pete Geenhuizen <pg...@carolina.rr.com>.
Don't know what happened to this email originally, any way here's what I
sent.

Stas,
What I just found is that Solaris has init64_t.  I don't know
any more about it, I noticed that during a configure of libgtop that
u_init64_t wasn't found, but init64_t was, don't know if that helps or is
significant.

You are correct getting the latest version of Apache-Test solved the test
problem.

I'm still working on the libgtop problem.

So at this point I'd say that the issues that I had with GTop are solved,
it's working.  I'll keep on trying to figure out how to get libgtop
functioning.

Thx for all your help.
Pete
-- 
"Unencumbered by the thought process"
--1992-2000 Click and Clack presidential campaign slogan

Stas Bekman said:
> Stas Bekman wrote:
>> Pete Geenhuizen wrote:
>>
>>> This is my first attempt at GTop.
>>>
>>> Unfortunately Solaris doesn't support a recursive grep, and equally
>>> unfortunately I wan't able to find u_init64_t anywhere.
>>>
>>> With some Googleing around I came across this fix to compiling libgtop
>>> on Solaris 8 and 9
>>>
>>> " For the meantime, I patched glibtop.h to have
>>>
>>> #ifndef u_int64_t
>>> #define u_int64_t unsigned long long int
>>> #endif "
>>>
>>> I applied the above to glibtop.h and that allowed GTop to finally
>>> compile.
>>
>>
>> It should have been applied to GTop.xs, as it has nothing to do with
>> glibtop itself I believe. I'll apply it.
>
> Actually i'm not sure how safe it is.
> http://www.opensource.apple.com/darwinsource/10.3/OpenSSH-39/openssh/defines.h
> does:
>
> #ifndef HAVE_U_INT64_T
> # if (SIZEOF_LONG_INT == 8)
> typedef unsigned long int u_int64_t;
> #   define HAVE_U_INT64_T 1
> # else
> #  if (SIZEOF_LONG_LONG_INT == 8)
> typedef unsigned long long int u_int64_t;
> #  endif
> # endif
> #endif
>
> Though this is from darwin, so Solaris may have a different flag. Googling
> for
> "Solaris u_int64_t typedef" gives quite a lot of hits, one using
> HAVE_INT64_T.
> So try to google with these words and I hope you will find the most
> correct
> ifdef setting. Thanks.
>
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
>


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: new version Re: GTop-0.12 compile and installation problems

Posted by Stas Bekman <st...@stason.org>.
Stas Bekman wrote:
> Pete Geenhuizen wrote:
> 
>> This is my first attempt at GTop.
>>
>> Unfortunately Solaris doesn't support a recursive grep, and equally 
>> unfortunately I wan't able to find u_init64_t anywhere.
>>
>> With some Googleing around I came across this fix to compiling libgtop 
>> on Solaris 8 and 9
>>
>> " For the meantime, I patched glibtop.h to have
>>
>> #ifndef u_int64_t
>> #define u_int64_t unsigned long long int
>> #endif "
>>
>> I applied the above to glibtop.h and that allowed GTop to finally 
>> compile.
> 
> 
> It should have been applied to GTop.xs, as it has nothing to do with 
> glibtop itself I believe. I'll apply it.

Actually i'm not sure how safe it is.
http://www.opensource.apple.com/darwinsource/10.3/OpenSSH-39/openssh/defines.h
does:

#ifndef HAVE_U_INT64_T
# if (SIZEOF_LONG_INT == 8)
typedef unsigned long int u_int64_t;
#   define HAVE_U_INT64_T 1
# else
#  if (SIZEOF_LONG_LONG_INT == 8)
typedef unsigned long long int u_int64_t;
#  endif
# endif
#endif

Though this is from darwin, so Solaris may have a different flag. Googling for 
"Solaris u_int64_t typedef" gives quite a lot of hits, one using HAVE_INT64_T. 
So try to google with these words and I hope you will find the most correct 
ifdef setting. Thanks.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: new version Re: GTop-0.12 compile and installation problems

Posted by Stas Bekman <st...@stason.org>.
Pete Geenhuizen wrote:
> This is my first attempt at GTop.
> 
> Unfortunately Solaris doesn't support a recursive grep, and equally 
> unfortunately I wan't able to find u_init64_t anywhere.
> 
> With some Googleing around I came across this fix to compiling libgtop on 
> Solaris 8 and 9
> 
> " For the meantime, I patched glibtop.h to have
> 
> #ifndef u_int64_t
> #define u_int64_t unsigned long long int
> #endif "
> 
> I applied the above to glibtop.h and that allowed GTop to finally compile.

It should have been applied to GTop.xs, as it has nothing to do with glibtop 
itself I believe. I'll apply it.

> With that done, back to what started this whole thing, Apache::VMonitor.  Using 
> cpan the compile works, but the tests fail with this error which causes the 
> install to fail.
> 
> waiting 60 seconds for server to start: ...glibtop: kvm_open(): Error 0
> (126)Cannot assign requested address: make_sock: could not bind to address 
> [::1]:8531
> no listening sockets available, shutting down
> Unable to open logs

Hmm, please upgrade your Apache-Test to the latest version and try again. It's 
a known IPv6 issue with Apache-Test, fixed in the latest release.

> So I installed VMonitor without the test and was able to point my browser at it 
> and got a nice display.
> 
> Unfortunately the system function doesn't appear to be working, I don't know if 
> that is related to the u_int64_t cludge, but here's what it shows.
> 
> CPU:   0.0% user, 0.0% nice, 0.0% sys, 0.0% idle
> Mem:   768M av,  455M used,  313M free,    0K shared,    0K buff
> Swap:  325K av,   30K used,  295K free,     0 pagein,     0 pageout
> 
> Not sure if any of this helps, but this what I have now.

I guess libgtop is just not fully functioning under Solaris. That's not GTop's 
problem, but the underlying C libgtop library. You may need to ask whoever 
supports it (which I could never find).

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: new version Re: GTop-0.12 compile and installation problems

Posted by Stas Bekman <st...@stason.org>.
Pete Geenhuizen wrote:
> Well a little headway, the Server compiles but not GTop.  In case it
> matters, Solaris 9 doesn't have pkgconfig, it does have pkg-config.

Yes, it was a typo in the email, it uses pkg-config everywhere. The 
configuration works fine for you.

> Here's the output from the build and make.
[...]
> /usr/local/bin/perl /usr/local/lib/perl5/5.8.2/ExtUtils/xsubpp  -typemap /usr/local/lib/perl5/5.8.2/ExtUtils/typemap -typemap typemap.gtop -typemap typemap -typemap typemap  GTop.xs > GTop.xsc && mv GTop.xsc GTop.c
> cc -c  -I/usr/local/include/libgtop-2.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include   -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O   -DVERSION=\"0.13\" -DXS_VERSION=\"0.13\" -fPIC "-I/usr/local/lib/perl5/5.8.2/sun4-solaris/CORE"  -DGTOP_2_5_PLUS GTop.c
> GTop.xs: In function `XS_GTop_field_u_int64_t':
> GTop.xs:120: error: `u_int64_t' undeclared (first use in this function)

Well, nothing has changed in GTop itself. Were you able to build GTop before 
on Solaris? On linux u_int64_t is defined in:

/usr/include/sys/types.h:__extension__ typedef unsigned long long int u_int64_t;

Can you figure out where yours is defined and include that header in GTop.xs? 
To find that header I did:

grep -Ir u_int64_t /usr/include/ | grep typedef


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: new version Re: GTop-0.12 compile and installation problems

Posted by Pete Geenhuizen <pg...@carolina.rr.com>.
Well a little headway, the Server compiles but not GTop.  In case it
matters, Solaris 9 doesn't have pkgconfig, it does have pkg-config.

Here's the output from the build and make.

Pete
-- 
"Unencumbered by the thought process"
--1992-2000 Click and Clack presidential campaign slogan

Stas Bekman said:
>
>> That line contains "if ()..."; our evil operator is used few lines later
>> in corresponding elsif, which belongs to the same #line from perl's
>> point of view.
>
> Ah cool, I've committed the fix, thanks!
>
>> Reporting it would IMHO be a waste of bits, as it's (at least somehow)
>> documented; man ExtUtils::MakeMaker:
>>
>>   PREREQ_PM
>>   [...]
>>     desired version is the value. If the required version number is 0,
>> we
>>     only check if any version is installed already.
>
> Yeah, but when you get a huge chunk of code that you didn't write and need
> to
> figure out where this warning is coming from, it is helpful for the core
> application to give you the hint. At least set to call Carp::cluck. but
> never
> mind :)
>
> so if you are happy with it now, I'll post a release candidate and release
> a
> new version tomorrow, unless someone complains (e.g. i haven't tested it
> with
> pre-2.5.0, which the changes may have broken, I hope not :)
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
>

Re: new version Re: GTop-0.12 compile and installation problems

Posted by Stas Bekman <st...@stason.org>.
> That line contains "if ()..."; our evil operator is used few lines later
> in corresponding elsif, which belongs to the same #line from perl's
> point of view.

Ah cool, I've committed the fix, thanks!

> Reporting it would IMHO be a waste of bits, as it's (at least somehow)
> documented; man ExtUtils::MakeMaker:
> 
>   PREREQ_PM
>   [...]
>     desired version is the value. If the required version number is 0, we
>     only check if any version is installed already.

Yeah, but when you get a huge chunk of code that you didn't write and need to 
figure out where this warning is coming from, it is helpful for the core 
application to give you the hint. At least set to call Carp::cluck. but never 
mind :)

so if you are happy with it now, I'll post a release candidate and release a 
new version tomorrow, unless someone complains (e.g. i haven't tested it with 
pre-2.5.0, which the changes may have broken, I hope not :)
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: new version Re: GTop-0.12 compile and installation problems

Posted by Radoslaw Zielinski <ra...@karnet.pl>.
Stas Bekman <st...@stason.org> [27-04-2004 07:59]:
> Radoslaw Zielinski wrote:
[...]
>>  t/threads....ok 5/6Attempt to free unreferenced scalar: SV 0x822f660 
>>  during global destruction.
>>  t/threads....ok                                                          
>>  All tests successful.
> That's a bug in perl:
[...]

Uh.

>> BTW #2: `perl -w Makefile.PL` looks rather messy... ;-)
> Yeah, thanks. fixed all but this one:

> Argument "" isn't numeric in numeric lt (<) at 
> /usr/lib/perl5/5.8.3/ExtUtils/MakeMaker.pm line 390.

--- Makefile.PL~        2004-04-27 07:49:29.000000000 +0200
+++ Makefile.PL 2004-04-27 08:11:16.996648896 +0200
@@ -9,7 +9,7 @@
 use constant DEBUG => 1;
 
 my %prereq = (
-    "Test::More" => "",
+    "Test::More" => 0,
 );
 
 my %interface = (

> There is no numeric lt at that line. If you can take a look and report a 
> bug to the makemaker list that would be great.

That line contains "if ()..."; our evil operator is used few lines later
in corresponding elsif, which belongs to the same #line from perl's
point of view.

Reporting it would IMHO be a waste of bits, as it's (at least somehow)
documented; man ExtUtils::MakeMaker:

  PREREQ_PM
  [...]
    desired version is the value. If the required version number is 0, we
    only check if any version is installed already.

-- 
Radosław Zieliński <ra...@karnet.pl>
[ GPG key: http://radek.karnet.pl/ ]

Re: new version Re: GTop-0.12 compile and installation problems

Posted by Stas Bekman <st...@stason.org>.
Radoslaw Zielinski wrote:
[...]
>>define doesn't work for you. Check Server/Makefile.PL it loads config.pl 
>>and calls the code that should insert -DGTOP_2_5_PLUS define.
> 
> 
> It works, error was elsewhere.  I didn't built it "by hand", but by
> changing the version in the .spec file.  It contained:
> 
>   GTOP_LIB="`pkg-config --libs libgtop-2.0`" \
>   GTOP_INCLUDE="`pkg-config --cflags libgtop-2.0`" \
>   %{__perl} Makefile.PL \
>           INSTALLDIRS=vendor
>   %{__make} \
>           OPTIMIZE="%{rpmcflags}" \
>           INC="`pkg-config --cflags libgtop-2.0`" \
>           EXTRALIBS="`pkg-config --libs libgtop-2.0`
> 
> After removing all (but INSTALLDIRS and OPTIMIZE) variable definitions,
> it worked fine.  You assigned the -DGTOP_2_5_PLUS to INC; this caused
> the problem, as it was overwritten...  I'd suggest using the DEFINE
> argument for WriteMakefile; patch attached.

An excellent suggestion, merged with a few tiny tweaks into the yet another 
snapshot (same url :)
http://apache.org/~stas/GTop-0.13.tar.gz

> BTW #1: I never touched XS, but things like this always turn my "search
> for memory leaks" warning on...
>   PERL_DL_NONLAZY=1 /usr/bin/perl5.8.4 [...]
>   t/basic......ok                                                              
>   t/threads....ok 3/6Attempt to free unreferenced scalar: SV 0x8219bb8 during global destruction.
>   t/threads....ok 4/6Attempt to free unreferenced scalar: SV 0x8258008 during global destruction.
>   t/threads....ok 5/6Attempt to free unreferenced scalar: SV 0x822f660 during global destruction.
>   t/threads....ok                                                              
>   All tests successful.

That's a bug in perl:
http://rt.perl.org:80/rt3/Ticket/Display.html?id=24660
(the only way to see the ticket is by logging in :(

> BTW #2: `perl -w Makefile.PL` looks rather messy... ;-)

Yeah, thanks. fixed all but this one:

Argument "" isn't numeric in numeric lt (<) at 
/usr/lib/perl5/5.8.3/ExtUtils/MakeMaker.pm line 390.

There is no numeric lt at that line. If you can take a look and report a bug 
to the makemaker list that would be great.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: new version Re: GTop-0.12 compile and installation problems

Posted by Radoslaw Zielinski <ra...@karnet.pl>.
Stas Bekman <st...@stason.org> [27-04-2004 06:30]:
> Radoslaw Zielinski wrote:
>> Stas Bekman <st...@stason.org> [27-04-2004 02:04]:
>>> Ok, please try this candidate:
[...]
>>> I have tested it only with 2.6.0. I hope it is still working with earlier 
>>> ones.
>> Doesn't work with 2.6.0 (unless you have the xmalloc.h from some old
>> installation).
[...]
>>   daemon.h:34:29: glibtop/xmalloc.h: Nie ma takiego pliku ani katalogu
[...]
> Nie ma, tak nie ma :) This means that my hack to insert -DGTOP_2_5_PLUS 

Oops, forgotten locale ;-)

> define doesn't work for you. Check Server/Makefile.PL it loads config.pl 
> and calls the code that should insert -DGTOP_2_5_PLUS define.

It works, error was elsewhere.  I didn't built it "by hand", but by
changing the version in the .spec file.  It contained:

  GTOP_LIB="`pkg-config --libs libgtop-2.0`" \
  GTOP_INCLUDE="`pkg-config --cflags libgtop-2.0`" \
  %{__perl} Makefile.PL \
          INSTALLDIRS=vendor
  %{__make} \
          OPTIMIZE="%{rpmcflags}" \
          INC="`pkg-config --cflags libgtop-2.0`" \
          EXTRALIBS="`pkg-config --libs libgtop-2.0`

After removing all (but INSTALLDIRS and OPTIMIZE) variable definitions,
it worked fine.  You assigned the -DGTOP_2_5_PLUS to INC; this caused
the problem, as it was overwritten...  I'd suggest using the DEFINE
argument for WriteMakefile; patch attached.

BTW #1: I never touched XS, but things like this always turn my "search
for memory leaks" warning on...
  PERL_DL_NONLAZY=1 /usr/bin/perl5.8.4 [...]
  t/basic......ok                                                              
  t/threads....ok 3/6Attempt to free unreferenced scalar: SV 0x8219bb8 during global destruction.
  t/threads....ok 4/6Attempt to free unreferenced scalar: SV 0x8258008 during global destruction.
  t/threads....ok 5/6Attempt to free unreferenced scalar: SV 0x822f660 during global destruction.
  t/threads....ok                                                              
  All tests successful.

BTW #2: `perl -w Makefile.PL` looks rather messy... ;-)

-- 
Rados�aw Zieli�ski <ra...@karnet.pl>
[ GPG key: http://radek.karnet.pl/ ]

Re: new version Re: GTop-0.12 compile and installation problems

Posted by Stas Bekman <st...@stason.org>.
Radoslaw Zielinski wrote:
> Stas Bekman <st...@stason.org> [27-04-2004 02:04]:
> 
>>Ok, please try this candidate:
>>http://apache.org/~stas/GTop-0.13.tar.gz
> 
> 
>>I have tested it only with 2.6.0. I hope it is still working with earlier 
>>ones.
> 
> 
> Doesn't work with 2.6.0 (unless you have the xmalloc.h from some old
> installation).
> 
>   [...]
>   athlon-pld-linux-gcc -c  -I/usr/include/libgtop-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=athlon   -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fPIC "-I/usr/lib/perl5/5.8.4/athlon-pld-linux-thread-multi/CORE"   io.c
>   In file included from io.c:24:
>   daemon.h:34:29: glibtop/xmalloc.h: Nie ma takiego pliku ani katalogu
>   [...]

Nie ma, tak nie ma :) This means that my hack to insert -DGTOP_2_5_PLUS define 
doesn't work for you. Check Server/Makefile.PL it loads config.pl and calls 
the code that should insert -DGTOP_2_5_PLUS define.

On my machine it runs:

cc -c  -DGTOP_2_5_PLUS  -I/usr/include/libgtop-2.0 -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include   -DDEBUGGING -fno-strict-aliasing 
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-I/usr/include/gdbm -g   -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fpic 
"-I/home/stas/perl/5.8.1/lib/5.8.1/i686-linux/CORE"   io.c

And the autogenerated Server/Makefile has:

#   MakeMaker Parameters:

#     INC => q[ -DGTOP_2_5_PLUS  -I/usr/include/libgtop-2.0 
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  ]
#     LIBS => [q[], q[-L/usr/lib], q[-L/usr/X11R6/lib], q[-lXau], 
q[-lgtop-2.0], q[-lglib-2.0]]
#     NAME => q[GTop::Server]
#     OBJECT => q[io.o main.o gnuserv.o version.o access.o Server.o]
#     VERSION_FROM => q[Server.pm]
#     clean => { FILES=>q[server_config_flags.h constants.c] }

please take a look at config.pl and check why it doesn't work. My guess is 
that pkgconfig --modversion is not working for you.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: new version Re: GTop-0.12 compile and installation problems

Posted by Radoslaw Zielinski <ra...@karnet.pl>.
Stas Bekman <st...@stason.org> [27-04-2004 02:04]:
> Ok, please try this candidate:
> http://apache.org/~stas/GTop-0.13.tar.gz

> I have tested it only with 2.6.0. I hope it is still working with earlier 
> ones.

Doesn't work with 2.6.0 (unless you have the xmalloc.h from some old
installation).

  [...]
  athlon-pld-linux-gcc -c  -I/usr/include/libgtop-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=athlon   -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fPIC "-I/usr/lib/perl5/5.8.4/athlon-pld-linux-thread-multi/CORE"   io.c
  In file included from io.c:24:
  daemon.h:34:29: glibtop/xmalloc.h: Nie ma takiego pliku ani katalogu
  [...]

-- 
Radosław Zieliński <ra...@karnet.pl>
[ GPG key: http://radek.karnet.pl/ ]