Stas Bekman <[EMAIL PROTECTED]> [27-04-2004 06:30]:
> Radoslaw Zielinski wrote:
>> Stas Bekman <[EMAIL PROTECTED]> [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 <[EMAIL PROTECTED]>
[ GPG key: http://radek.karnet.pl/ ]
diff -ur GTop-0.13/config.pl GTop-0.13.new/config.pl
--- GTop-0.13/config.pl 2004-04-27 01:51:05.000000000 +0200
+++ GTop-0.13.new/config.pl     2004-04-27 07:01:54.937378080 +0200
@@ -30,10 +30,10 @@
         $gver = '';
     }
 
-    my $inc  = join " ", $GTOP_INCLUDE, $gver, $ginc, $config{incs};
+    my $inc  = join " ", $GTOP_INCLUDE, $ginc, $config{incs};
     my $libs = join " ", $GTOP_LIB, $config{libs};
 
-    return ($inc, $libs);
+    return ($inc, $libs, $gver);
 }
 
 sub get_glibtop_config_core {
Tylko w GTop-0.13.new: GTop.pod
diff -ur GTop-0.13/Makefile.PL GTop-0.13.new/Makefile.PL
--- GTop-0.13/Makefile.PL       2004-04-27 01:50:26.000000000 +0200
+++ GTop-0.13.new/Makefile.PL   2004-04-27 07:06:23.588536896 +0200
@@ -247,7 +247,7 @@
 }
 
 require "./config.pl";
-my($inc, $libs) = get_glibtop_config();
+my($inc, $libs, $defines) = get_glibtop_config();
 
 if (DEBUG) {
     warn "Using INC: $inc\n";
@@ -260,6 +260,7 @@
    VERSION_FROM => 'lib/GTop.pm',
    INC          => $inc,
    LIBS         => [$libs],
+   DEFINE       => $defines,
    TYPEMAPS     => [qw(typemap.gtop typemap)],
    PREREQ_PM    => \%prereq,
    clean        => {
diff -ur GTop-0.13/Server/Makefile.PL GTop-0.13.new/Server/Makefile.PL
--- GTop-0.13/Server/Makefile.PL        2004-04-27 01:44:13.000000000 +0200
+++ GTop-0.13.new/Server/Makefile.PL    2004-04-27 07:05:13.446200152 +0200
@@ -26,13 +26,14 @@
 close CONST;
 
 require "../config.pl";
-my($inc, $libs) = get_glibtop_config();
+my($inc, $libs, $defines) = get_glibtop_config();
 
 WriteMakefile(
     NAME => "GTop::Server",
     VERSION_FROM => "Server.pm",
     INC  => $inc,
     LIBS => [split /\s+/, $libs],
+    DEFINE => $defines,
     OBJECT => 'io.o main.o gnuserv.o version.o access.o Server.o',
     clean   => {
        FILES => "server_config_flags.h constants.c",

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to