On Wed, Jul 17, 2019 at 9:45 AM Иван Трусков <tru...@gmail.com> wrote:
>
> But there is a compilation error if compilation is attempted without all/any 
> threads? IIRC, there is an #error directive to that effect in ecl.h
>
> In any case, could you share configuration flags?

First of all, I am talking about a recent Cygwin64.
(Not sure how far you can get with 32-bit Cygwin).
And I don't run Windows myself, so the following is not tested and
might not work.

To get a general picture of how sagemath is built on Cygwin64, see
https://trac.sagemath.org/wiki/Cygwin64Port

You need to apply patches from
https://github.com/sagemath/sage/tree/master/build/pkgs/ecl/patches
You need Cygwin's gmp and readline. We also use gc which does not come from ECL,
but version 7.6.4. (Perhaps the stock version of gc in Cygwin will
work, I don't know, and it would
be interesting to know, in fact).

the ECL build script is here:
https://github.com/sagemath/sage/blob/master/build/pkgs/ecl/spkg-install
It's a bit crypic, though.
To translate it to "usual" shell, I think, you need

export CFLAGS="-g -O2 $CFLAGS -D_GNU_SOURCE"
export CXXFLAGS="-g -O2 $CXXFLAGS -D_GNU_SOURCE"
# you might also need to put newer versions of config.guess and config.sub
# (something that autotools provide, into ECL's src/

./configure --disable-threads --enable-unicode=yes
touch build/TAGS # apparently it's problematic
make
make install

Please feel free to ask for more details.
Dima

>
> ср, 17 июл. 2019 г. в 11:40, Dima Pasechnik <dimpase+...@gmail.com>:
>>
>> sagemath (sagemath.org) uses ecl 16.1.2 to compile and run Maxima (and not 
>> only it) on Cygwin, so it is certainly possible. we turn threads off, 
>> however.
>> As well, we add -D_GNU_SOURCE to C and CXX flags.
>>
>>
>>
>>
>> On Mon, 15 Jul 2019 at 10:14, Иван Трусков <tru...@gmail.com> wrote:
>>>
>>> Hello
>>> I am trying to build and use ECL on windows machine under cygwin environment
>>> However, evter it is built, there arises a problem when i try to compile 
>>> any lisp files, for example when running examples/build/readme.lisp
>>> Inspecting with gsb gives the picture of stack overflow on handling some 
>>> exception across threads, overflow occuring in the bad case of circular 
>>> calls to acquiring thread-local data (pthreads_getspecific) and processing 
>>> error message from failure of it.
>>>
>>> is there recommended configuration for cygwin that would allow to overcome 
>>> that kind of problem? Alternatively, what data exactly are needed for a 
>>> full bug report? I would gladly provide everything relevant

Reply via email to