Re: [sage-devel] Re: conditional install of optional package

2020-05-27 Thread Thierry
Hi,

thanks for the answer.

On Tue, May 26, 2020 at 04:01:15PM +0100, Dima Pasechnik wrote:
[...]
> yes, this would install everything in  (assumning there
> are no contradicting options
> such as mpir vs gmp, no dependencies --- which is actually the biggest
> problem in this, as deps can't be easilty controlled with a plain list
> of packages--- etc), but would be slower than first building the
> string to call ./configure with,
> then calling configure once, and finally "make build" once.

I am not sure to understand: the build/pkgs/*/dependencies files are not
taken into account in that build process ? What wrong could happen with
dependencies ?

> It might fail at some point, but your loop might fail just as well, right?

Yes, i want the procedure to stop when there is a failure, while keeping
what was done until then, i do not want parallel build for optional
packages.

> yes, or, better if foo won't build you can
> 
> ./configure --disable-foo
> 
> to get rid of exactly the request to build foo.
> So in your loop you may have a check for the condition of
> `make build` and call
> ./configure --disable-${i}
> if it failed.
> 

OK, i will disable packages once they are built.

Ciao,
Thierry

> 
> there is also a funtionality of tox available fot testing things, but
> I am not familiar with it.
> 
> HTH
> Dima
> 
> 
> 
> >
> >
> > Also, what should i do if i want to run self tests at the same time ? I
> > used to do:
> >
> > sage -i -c foo
> >
> > is there a ./configure replacement for that ?
> 
> no, but there is always
> 
> export SAGE_CHECK=yes
> 
> to effect package's self-tests
> 
> 
> >
> > Ciao,
> > Thierry
> >
> > [1]
> > https://trac.sagemath.org/query?keywords=~sdl&col=id&col=summary&col=status&col=type&col=priority&col=milestone&col=component&order=priority
> >
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "sage-devel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to sage-devel+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/sage-devel/20200526134643.p7z3gxhirpr5e5ds%40metelu.net.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/CAAWYfq0pCH0dhxqTAQ-R_HS0v7ZEE36jMLFCY%2B--EhdzF7mA-A%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/20200526155548.yssafewdulplik7a%40metelu.net.


Re: [sage-devel] Re: conditional install of optional package

2020-05-27 Thread Thierry
Hi,

On Tue, May 26, 2020 at 08:46:42AM -0700, Matthias Koeppe wrote:
> In general, to add a configure option, you can always do the following:
> 
>   ./configure $(./config.status --config) --enable-bar

Nice tip, tanks !

Thierry


> 
> Matthias
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/d0d81021-58da-45ec-a2e7-cf5cc69f58a8%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/20200526155842.ebkwa5a7kmzg4brw%40metelu.net.


Re: [sage-devel] Re: conditional install of optional package

2020-05-26 Thread Matthias Koeppe
On Tuesday, May 26, 2020 at 6:46:48 AM UTC-7, Thierry 
(sage-googlesucks@xxx) wrote:
>
>
> On Mon, May 25, 2020 at 09:51:20PM -0700, Matthias Koeppe wrote: 
> > ./configure --enable-cbc && make 
>
> OK thanks. I notice that if i do 
>
>./configure --enable-foo 
>./configure --enable-bar 
>make build 
>
> it seems that only bar is installed, right ? 
>

That's correct.

In standard configure scripts, one would have to do "./configure 
--enable-foo --enable-bar". 
 

> If i want to make a progressive loop over packages, i should iterate 
> like that : 
>
> for i in  ; do 
> /configure --enable-${i} 
> make build 
> done 
>
> Correct ? 
>

Yes, that will work for Sage because of a particular feature: Packages that 
are already installed in the prefix are automatically enabled.

In general, to add a configure option, you can always do the following:

  ./configure $(./config.status --config) --enable-bar

Matthias


-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/d0d81021-58da-45ec-a2e7-cf5cc69f58a8%40googlegroups.com.


Re: [sage-devel] Re: conditional install of optional package

2020-05-26 Thread Dima Pasechnik
On Tue, May 26, 2020 at 2:46 PM Thierry  wrote:
>
> Hi,
>
> On Mon, May 25, 2020 at 09:51:20PM -0700, Matthias Koeppe wrote:
> > ./configure --enable-cbc && make
>
> OK thanks. I notice that if i do
>
>./configure --enable-foo
>./configure --enable-bar
>make build
>
> it seems that only bar is installed, right ?

yes, this is totally standard behaviour of ./configure scripts.
They don't cache parameters they are called with, more precisely, they
store them in config.status.


>
>
> If i want to make a progressive loop over packages, i should iterate
> like that :
>
> for i in  ; do
> /configure --enable-${i}
> make build
> done
>
> Correct ?
yes, this would install everything in  (assumning there
are no contradicting options
such as mpir vs gmp, no dependencies --- which is actually the biggest
problem in this, as deps can't be easilty controlled with a plain list
of packages--- etc), but would be slower than first building the
string to call ./configure with,
then calling configure once, and finally "make build" once.
It might fail at some point, but your loop might fail just as well, right?

>
> Note that i make checkpoints, since i am used encounter problems in
> building/testing packages for SDL (which is 32bit) [1], and i did not
> build SDL for a while so i am expecting some issues.  Hence, i can not
> do a single run like:
>
> ./configure --enable-foo --enable-bar [...]
>
>
> Now, since ./configure --enable-foo seems to modify the following bunch
> of files:
>
> ./build/make/Makefile-auto
> ./build/make/Makefile
> ./build/bin/sage-build-env-config
> ./build/pkgs/sage_conf/src/setup.cfg
> ./build/pkgs/sage_conf/src/sage_conf.py
> ./logs/pkgs/config.log
> ./config.status
> ./src/bin/sage-env-config
> ./src/Makefile
>
> should i end with a bare
>
> ./configure
>
> to let those file return in a kind of "default state" ?

yes, or, better if foo won't build you can

./configure --disable-foo

to get rid of exactly the request to build foo.
So in your loop you may have a check for the condition of
`make build` and call
./configure --disable-${i}
if it failed.



there is also a funtionality of tox available fot testing things, but
I am not familiar with it.

HTH
Dima



>
>
> Also, what should i do if i want to run self tests at the same time ? I
> used to do:
>
> sage -i -c foo
>
> is there a ./configure replacement for that ?

no, but there is always

export SAGE_CHECK=yes

to effect package's self-tests


>
> Ciao,
> Thierry
>
> [1]
> https://trac.sagemath.org/query?keywords=~sdl&col=id&col=summary&col=status&col=type&col=priority&col=milestone&col=component&order=priority
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/20200526134643.p7z3gxhirpr5e5ds%40metelu.net.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAAWYfq0pCH0dhxqTAQ-R_HS0v7ZEE36jMLFCY%2B--EhdzF7mA-A%40mail.gmail.com.


Re: [sage-devel] Re: conditional install of optional package

2020-05-26 Thread Thierry
Hi,

On Mon, May 25, 2020 at 09:51:20PM -0700, Matthias Koeppe wrote:
> ./configure --enable-cbc && make

OK thanks. I notice that if i do

   ./configure --enable-foo
   ./configure --enable-bar
   make build

it seems that only bar is installed, right ?


If i want to make a progressive loop over packages, i should iterate
like that :

for i in  ; do
/configure --enable-${i}
make build
done

Correct ?

Note that i make checkpoints, since i am used encounter problems in
building/testing packages for SDL (which is 32bit) [1], and i did not
build SDL for a while so i am expecting some issues.  Hence, i can not
do a single run like:

./configure --enable-foo --enable-bar [...]


Now, since ./configure --enable-foo seems to modify the following bunch
of files:

./build/make/Makefile-auto
./build/make/Makefile
./build/bin/sage-build-env-config
./build/pkgs/sage_conf/src/setup.cfg
./build/pkgs/sage_conf/src/sage_conf.py
./logs/pkgs/config.log
./config.status
./src/bin/sage-env-config
./src/Makefile

should i end with a bare 

./configure

to let those file return in a kind of "default state" ?


Also, what should i do if i want to run self tests at the same time ? I
used to do:

sage -i -c foo

is there a ./configure replacement for that ?

Ciao,
Thierry

[1]
https://trac.sagemath.org/query?keywords=~sdl&col=id&col=summary&col=status&col=type&col=priority&col=milestone&col=component&order=priority

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/20200526134643.p7z3gxhirpr5e5ds%40metelu.net.


[sage-devel] Re: conditional install of optional package

2020-05-25 Thread Matthias Koeppe
On Monday, May 25, 2020 at 8:12:31 PM UTC-7, Thierry (sage-googlesucks@xxx) 
wrote:
>
> i am on the way to build a version of Sage Debian Live for 9.1. I would 
> like to benefit from the spkg-configure.m4 feature when installing 
> optional packages, as much as possible. 
>
> Say, i want to install cbc, looking at build/pkgs/cbc/distros/debian.txt 
> i install coinor-cbc coinor-libcbc-dev from the distro. 
>
> However, when i do 
>
> sage -i cbc 
>
> it still installs cbc from Sage spkg, which i would like to avoid. What 
> is the command that installs cbc (say) only if the distro replacements 
> are not installed on the system ? 
>
>
./configure --enable-cbc && make

 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/b0840bf9-737c-4222-8bfe-5ce4ce72c10e%40googlegroups.com.