Mailing List Archive

[Bricolage-General] Fwd: Error to set variables
Begin forwarded message:

> From: "miqbal" <miqbal@windowstomalaysia.com.my>
> Date: Wed Mar 27, 2002 06:07:26 PM US/Pacific
> To: <david@wheeler.net>
> Cc: <miqbal@windowstomalaysia.com.my>
> Subject: Error to set variables
>
> Is this right I set the variables in Makefile.PL but still error
>  
>  
> #$Id: Makefile.PL,v 1.22 1999/09/29 20:30:23 mergl Exp $
>  
> use ExtUtils::MakeMaker;
> use Config;
> use strict;
> use DBI 1.00;
> use DBI::DBD;
>  
>
> print "Configuring Pg\n";
> print "Remember to actually read the README file !\n";
>  
>
> my $POSTGRES_INCLUDE = '/usr/local/pgsql/include';
> my $POSTGRES_LIB = '/usr/local/pgsql/lib';
>  
>  
>  
> if ((!$ENV{POSTGRES_INCLUDE} or !$ENV{POSTGRES_LIB}) and
> !$ENV{POSTGRES_HOME}) {
>     die "please set environment variables POSTGRES_INCLUDE and
> POSTGRES_LIB !\n";
> } elsif ((!$ENV{POSTGRES_INCLUDE} or !$ENV{POSTGRES_LIB}) and
> $ENV{POSTGRES_HOME}) {
>     $POSTGRES_INCLUDE = "$ENV{POSTGRES_HOME}/include";
>     $POSTGRES_LIB     = "$ENV{POSTGRES_HOME}/lib";
> } else {
>     $POSTGRES_INCLUDE = "$ENV{POSTGRES_INCLUDE}";
>     $POSTGRES_LIB     = "$ENV{POSTGRES_LIB}";
> }
>  
> my $os = $^O;
> print "OS: $os\n";
>  
> my $dbi_arch_dir;
> if ($os eq 'MSWin32') {
>     $dbi_arch_dir = "\$(INSTALLSITEARCH)/auto/DBI";
> } else {
>     $dbi_arch_dir = dbd_dbi_arch_dir();
> }
>  
> my %opts = (
>     NAME         => 'DBD::Pg',
>     VERSION_FROM => 'Pg.pm',
>     INC          => "-I$POSTGRES_INCLUDE -I$dbi_arch_dir",
>     OBJECT       => "Pg\$(OBJ_EXT) dbdimp\$(OBJ_EXT)",
>     LIBS         => ["-L$POSTGRES_LIB -lpq"],
>     AUTHOR       => 'Edmund Mergl (E.Mergl@bawue.de)',
>     ABSTRACT     => 'PostgreSQL database driver for the DBI module',
> );
>  
> if ($os eq 'hpux') {
>     my $osvers = $Config{osvers};
>     if ($osvers < 10) {
>         print "Warning: Forced to build static not dynamic on $os $osvers.
> \a\n";
>         $opts{LINKTYPE} = 'static';
>     }
> }
>  
> if ($Config{dlsrc} =~ /dl_none/) {
>     $opts{LINKTYPE} = 'static';
> }
>  
>
> WriteMakefile(%opts);
>  
> exit(0);
>  
> # end of Makefile.PL
Re: [Bricolage-General] Fwd: Error to set variables [ In reply to ]
Hi miqbal,

I was just at this place in the installation yesterday. I think that
$POSTGRES_INCLUDE is a different thing than $ENV{POSTGRES_INCLUDE}.
If you want to set the variables in the Makefile.PL script, you
probably want to remove or comment out the next lines of the script:

>>if ((!$ENV{POSTGRES_INCLUDE} or !$ENV{POSTGRES_LIB}) and
>>!$ENV{POSTGRES_HOME}) {
>> die "please set environment variables POSTGRES_INCLUDE and
>>POSTGRES_LIB !\n";
>>} elsif ((!$ENV{POSTGRES_INCLUDE} or !$ENV{POSTGRES_LIB}) and
>>$ENV{POSTGRES_HOME}) {
>> $POSTGRES_INCLUDE = "$ENV{POSTGRES_HOME}/include";
>> $POSTGRES_LIB = "$ENV{POSTGRES_HOME}/lib";
>>} else {
>> $POSTGRES_INCLUDE = "$ENV{POSTGRES_INCLUDE}";
>> $POSTGRES_LIB = "$ENV{POSTGRES_LIB}";
}

(I have never before seen an install that wants you to set
environment variables instead of editing a script, but I am very very
new.)

-Robert Wise

>Begin forwarded message:
>
>>From: "miqbal" <miqbal@windowstomalaysia.com.my>
>>Date: Wed Mar 27, 2002 06:07:26 PM US/Pacific
>>To: <david@wheeler.net>
>>Cc: <miqbal@windowstomalaysia.com.my>
>>Subject: Error to set variables
>>
>>Is this right I set the variables in Makefile.PL but still error
>>
>>
>>#$Id: Makefile.PL,v 1.22 1999/09/29 20:30:23 mergl Exp $
>>
>>use ExtUtils::MakeMaker;
>>use Config;
>>use strict;
>>use DBI 1.00;
>>use DBI::DBD;
>>
>>
>>print "Configuring Pg\n";
>>print "Remember to actually read the README file !\n";
>>
>>
>>my $POSTGRES_INCLUDE = '/usr/local/pgsql/include';
>>my $POSTGRES_LIB = '/usr/local/pgsql/lib';
>>
>>
>>
>>if ((!$ENV{POSTGRES_INCLUDE} or !$ENV{POSTGRES_LIB}) and
>>!$ENV{POSTGRES_HOME}) {
>> die "please set environment variables POSTGRES_INCLUDE and
>>POSTGRES_LIB !\n";
>>} elsif ((!$ENV{POSTGRES_INCLUDE} or !$ENV{POSTGRES_LIB}) and
>>$ENV{POSTGRES_HOME}) {
>> $POSTGRES_INCLUDE = "$ENV{POSTGRES_HOME}/include";
>> $POSTGRES_LIB = "$ENV{POSTGRES_HOME}/lib";
>>} else {
>> $POSTGRES_INCLUDE = "$ENV{POSTGRES_INCLUDE}";
>> $POSTGRES_LIB = "$ENV{POSTGRES_LIB}";
>>}
>>
>>my $os = $^O;
>>print "OS: $os\n";
>>
>>my $dbi_arch_dir;
>>if ($os eq 'MSWin32') {
>> $dbi_arch_dir = "\$(INSTALLSITEARCH)/auto/DBI";
>>} else {
>> $dbi_arch_dir = dbd_dbi_arch_dir();
>>}
>>
>>my %opts = (
>> NAME => 'DBD::Pg',
>> VERSION_FROM => 'Pg.pm',
>> INC => "-I$POSTGRES_INCLUDE -I$dbi_arch_dir",
>> OBJECT => "Pg\$(OBJ_EXT) dbdimp\$(OBJ_EXT)",
>> LIBS => ["-L$POSTGRES_LIB -lpq"],
>> AUTHOR => 'Edmund Mergl (E.Mergl@bawue.de)',
>> ABSTRACT => 'PostgreSQL database driver for the DBI module',
>>);
>>
>>if ($os eq 'hpux') {
>> my $osvers = $Config{osvers};
>> if ($osvers < 10) {
>> print "Warning: Forced to build static not dynamic on $os
>>$osvers.\a\n";
>> $opts{LINKTYPE} = 'static';
>> }
>>}
>>
>>if ($Config{dlsrc} =~ /dl_none/) {
>> $opts{LINKTYPE} = 'static';
>>}
>>
>>
>>WriteMakefile(%opts);
>>
>>exit(0);
>>
>># end of Makefile.PL


--

_______________________________________________
Bricolage-General mailing list
Bricolage-General@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bricolage-general