is cygwin port supported?

28 views
Skip to first unread message

Dmitry Semikin

unread,
Sep 29, 2011, 7:38:26 AM9/29/11
to fricas...@googlegroups.com
Dear fricas developers,

can you, please, tell, if fricas cygwin port is supported at the moment. I.e. can latest trunk version be built in cygwin?

I've tried to build it by following the instructions in INSTALL.CYGWIN, but failed. Even after fixing locale problems (which caused build to fail right after clisp is started) and rebasing I've come to the same error several times.

The last lines of the error are given bellow.

The question is: am I doing something wrong, or current trunk version of fricas cannot be built uder cygwin (using procedure from INSTALL.CYGWIN)? (available binary downloads are quite outdated. and latest cygwin related posts in mail-list are not so recent, so I decided, that possibly cygwin port was dropped... hope, it is not).

latest lines of error message:

cp ../../../fricas/src/algebra/xpoly.spad.pamphlet /home/semikin/builds/fricas_110929/fricas-build/target/i686-pc-cygwin/src/algebra/xpoly.spad.pamphlet
cp ../../../fricas/src/algebra/ystream.spad.pamphlet /home/semikin/builds/fricas_110929/fricas-build/target/i686-pc-cygwin/src/algebra/ystream.spad.pamphlet
cp ../../../fricas/src/algebra/zerodim.spad.pamphlet /home/semikin/builds/fricas_110929/fricas-build/target/i686-pc-cygwin/src/algebra/zerodim.spad.pamphlet
touch stamp-spadsrc
/home/semikin/builds/fricas_110929/fricas-build/build/scripts/document --output=A1AGG.spad --tangle="category A1AGG OneDimensionalArrayAggregate" ../../../fricas/src/algebra/aggcat.spad.pamphlet
/home/semikin/builds/fricas_110929/fricas-build/build/scripts/document: line 266: /home/semikin/builds/fricas_110929/fricas-build/build/i686-pc-cygwin/bin/notangle: No such file or directory
make[3]: *** [A1AGG.spad] Error 127
make[3]: Leaving directory `/home/semikin/builds/fricas_110929/fricas-build/src/algebra'
make[2]: *** [all-ax] Error 2
make[2]: Leaving directory `/home/semikin/builds/fricas_110929/fricas-build/src/algebra'
make[1]: *** [all-algebra] Error 2
make[1]: Leaving directory `/home/semikin/builds/fricas_110929/fricas-build/src'

make: *** [all-src] Error 2

Thanks in advance,
Dmitry Semikin.

Ralf Hemmecke

unread,
Sep 29, 2011, 8:13:46 AM9/29/11
to fricas...@googlegroups.com
Since I don't use cygwin, I cannot say, but this line

> /home/semikin/builds/fricas_110929/fricas-build/build/i686-pc-cygwin/bin/notangle:
> No such file or directory

looks somehow suspicious. You obviously don't have noweb installed.
Noweb is only in the distributed fricas packages but not in the source
tree, you if you compile from trunk you have to make sure that noweb is
otherwise installed.

Ralf

Dmitry Semikin

unread,
Sep 29, 2011, 9:39:04 AM9/29/11
to fricas...@googlegroups.com
Thanks, Ralf,
 
/home/semikin/builds/fricas_110929/fricas-build/build/i686-pc-cygwin/bin/notangle:
No such file or directory

looks somehow suspicious. You obviously don't have noweb installed. Noweb is only in the distributed fricas packages but not in the source tree, you if you compile from trunk you have to make sure that noweb is otherwise installed.

It looks, as the problems are related to noweb indeed. But the instructions in the INSTALL.CYGWIN discuss this topic. The instructions tell, that source tarball should be put in 'zips' directory within fricas sources root (link for download is given in the file). And I've done this. But this do not work.

I've just tried to build from 'full tarboll' downloaded from sourceforge download page, but I've got the same error.

Installation instructions mention, that there will be error, which has word 'noweb' somwhere in it. But instructions say, that I should just 'touch' stamp-noweb and 'make' further. It looks like this is why noweb is not built...

Now I'm looking into Makefile, generated by configure and try to find out, what happens there.
If somebody have solved this problem, please, give some hints.

By the way. When 'configure'-ation is completed, it prompts to run 'gmake'. But if I run 'gmake' if fails immediately. But with 'make' I get errors, discussed above. If it is known thing, it would be good to mention in the INSTALL.CYGWIN instructions.

Thanks in advance.

Dmitry Semikin

unread,
Sep 29, 2011, 9:53:51 AM9/29/11
to fricas...@googlegroups.com
Hello, once again.

Now I've looked onto error I've got, and I see, that there is problem, while makeing noweb.
Althogh one problem ending with [stamp-noweb] is mentioned in INSTALL.CYGWIN, but this is another problem (that problem is with elisp). But I've got the following error, when try to build noweb:

Making in noweb
( mkdir noweb && \
          cd noweb && \
          tar -zxf "/home/semikin/builds/fricas_110929/fricas-1.1.3/zips/noweb-2.10a.tgz" && \
          cd src && \
          cat Makefile \
              | sed -e "s|^BIN=.*|BIN=/home/semikin/builds/fricas_110929/fricas-1.1.3-build/build/i686-pc-cygwin/bin|" \
                    -e "s|^LIB=.*|LIB=/home/semikin/builds/fricas_110929/fricas-1.1.3-build/build/i686-pc-cygwin/lib|" \
                    -e "s|^MAN=.*|MAN=/home/semikin/builds/fricas_110929/fricas-1.1.3-build/build/i686-pc-cygwin/man|" \
                    -e "s|^TEXINPUTS=.*|TEXINPUTS=/home/semikin/builds/fricas_110929/fricas-1.1.3-build/target/i686-pc-cygwin/share/texmf/tex|" \
                    -e 's/ make / $\(MAKE\) /' \
                    -e "s,c/nt,c/nt.exe," \
                    -e "s,c/markup,c/markup.exe," \
                    -e "s,c/mnt,c/mnt.exe," \
                    -e "s,c/finduses,c/finduses.exe," \
              > Makefile.tmp && mv Makefile.tmp Makefile && \
          ./awkname gawk && make -j 1 all install )
make[1]: Entering directory `/home/semikin/builds/fricas_110929/fricas-1.1.3-build/noweb/src'
cd c; make "CC=gcc -ansi -pedantic" "CFLAGS=" all
make[2]: Entering directory `/home/semikin/builds/fricas_110929/fricas-1.1.3-build/noweb/src/c'
gcc -ansi -pedantic    -c -o notangle.o notangle.c
In file included from notangle.nw:28:
getline.h:4: error: conflicting types for 'getline'
/usr/include/sys/stdio.h:37: error: previous declaration of 'getline' was here
getline.h:4: error: conflicting types for 'getline'
/usr/include/sys/stdio.h:37: error: previous declaration of 'getline' was here
make[2]: *** [notangle.o] Error 1
make[2]: Leaving directory `/home/semikin/builds/fricas_110929/fricas-1.1.3-build/noweb/src/c'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/semikin/builds/fricas_110929/fricas-1.1.3-build/noweb/src'
make: *** [stamp-noweb] Error 2



May be there some problems with gcc options? or gcc version? (I use gcc 3.4.4 - default one)

Thanks in advance.

Dmitry Semikin

unread,
Sep 29, 2011, 10:51:03 AM9/29/11
to fricas...@googlegroups.com
Finally, it looks, as this is standard problem with getline() function on cygwin
here is several words about this:


I did not tried it yet, but it looks reasonable. If it'll work, I think it should be included to the installation instructions for cygwin.

Dmitry.

Waldek Hebisch

unread,
Sep 29, 2011, 11:04:27 AM9/29/11
to fricas...@googlegroups.com
Looks like bug in Cygwin 'stdio.h': ANSI C says that stdio.h is not
allowed to define symbols not mentioned in the standard and I could
not see 'getline' in the standard. And via '-ansi' we request strict
ANSI compliance, so all extensions should be deactivated.
Anyway, there was no change to nowed and it did compile on Cygwin,
so that must be relatively recent Cygwin change.

However, given broken Cygwin 'stdio.h' it seems that the only solution
is to rename getline in noweb to new name, say 'noweb_getline'.

--
Waldek Hebisch
heb...@math.uni.wroc.pl

Gabriel Dos Reis

unread,
Sep 29, 2011, 12:37:53 PM9/29/11
to fricas...@googlegroups.com
Waldek Hebisch <heb...@math.uni.wroc.pl> writes:

[...]

| However, given broken Cygwin 'stdio.h' it seems that the only solution
| is to rename getline in noweb to new name, say 'noweb_getline'.

OpenAxiom got rid of noweb a while ago. Do you still need it?

-- Gaby

Waldek Hebisch

unread,
Sep 29, 2011, 12:41:33 PM9/29/11
to fricas...@googlegroups.com

Yes, noweb is used to unwrap content of algebra, etc and input
subdirectories.

--
Waldek Hebisch
heb...@math.uni.wroc.pl

Gabriel Dos Reis

unread,
Sep 29, 2011, 1:06:03 PM9/29/11
to fricas...@googlegroups.com
Waldek Hebisch <heb...@math.uni.wroc.pl> writes:

| >
| > Waldek Hebisch <heb...@math.uni.wroc.pl> writes:
| >
| > [...]
| >
| > | However, given broken Cygwin 'stdio.h' it seems that the only solution
| > | is to rename getline in noweb to new name, say 'noweb_getline'.
| >
| > OpenAxiom got rid of noweb a while ago. Do you still need it?
| >
|
| Yes, noweb is used to unwrap content of algebra, etc and input
| subdirectories.

Yes, I understand. What I meant is that OpenAxiom developed its own
tangling/untangling tool to make these build issues and dependencies
evaporate.

-- Gaby

Dmitry Semikin

unread,
Sep 29, 2011, 3:41:00 PM9/29/11
to fricas...@googlegroups.com
After commenting out getline() function in stdio.h, the noweb was built successfully.

So, I propose to at least mention this thing in the INSTALL.CYGWIN document. Of course, the better way is to change filename to the noweb sources, but I do not understand the development process of it (although the sources are available, but there is no open repository). May be it is possible to write letter to developers of noweb for them to solve this issue.

Although noweb is now available, the build did not succeed. Now the process failed somewhere in the middle of building Algebra. Namely, on building EVALAB (Evalable) category. If somebody have some ideas, how to overcome this, please, help.

Bellow is the error message:

 ;; Compiling file /home/dmitry_semikin/builds/fricas_110929/fricas-build/src/algebra/AGG.NRLIB/AGG.lsp ...
;; Wrote file /home/dmitry_semikin/builds/fricas_110929/fricas-build/src/algebra/AGG.NRLIB/AGG.fas
0 errors, 0 warnings
------------------------------------------------------------------------
   Aggregate is already explicitly exposed in frame initial
   Aggregate will be automatically loaded when needed from
      /home/dmitry_semikin/builds/fricas_110929/fricas-build/src/algebra/AGG.NRLIB/AGG

)compile EVALAB.spad

   Compiling FriCAS source code from file
      /home/dmitry_semikin/builds/fricas_110929/fricas-build/src/algebra/EVALAB.spad
      using old system compiler.
   EVALAB abbreviates category Evalable
------------------------------------------------------------------------
   initializing NRLIB EVALAB for Evalable
   compiling into NRLIB EVALAB

;;;     ***       |Evalable| REDEFINED
WARNING: DEFUN/DEFMACRO: redefining function |Evalable| in top-level, was
         defined in
         /home/dmitry_semikin/builds/fricas_110929/fricas-build/src/algebra/EVALAB.NRLIB/EVALAB.fas
WARNING: DEFUN/DEFMACRO: redefining function |Evalable;| in top-level, was
         defined in
         /home/dmitry_semikin/builds/fricas_110929/fricas-build/src/algebra/EVALAB.NRLIB/EVALAB.fas
Time: 0 SEC.


   >> System error:
   LOAD: A file with name /home/dmitry_semikin/builds/fricas_110929/fricas-build/src/algebra/IEVALAB.NRLIB/IEVALAB does not exist

(1) ->
mv: cannot stat `browse.daase': No such file or directory
mv: cannot stat `category.daase': No such file or directory
mv: cannot stat `compress.daase': No such file or directory
mv: cannot stat `interp.daase': No such file or directory
mv: cannot stat `operation.daase': No such file or directory
make[3]: *** [stamp-db] Error 1
make[3]: Leaving directory `/home/dmitry_semikin/builds/fricas_110929/fricas-build/src/algebra'
make[2]: *** [all-ax] Error 2
make[2]: Leaving directory `/home/dmitry_semikin/builds/fricas_110929/fricas-build/src/algebra'
make[1]: *** [all-algebra] Error 2
make[1]: Leaving directory `/home/dmitry_semikin/builds/fricas_110929/fricas-build/src'

Dmitry Semikin

unread,
Sep 29, 2011, 5:03:24 PM9/29/11
to fricas...@googlegroups.com
Now I've tried to build source tarball (full) from sourceforge. It built ok, (so, it looks, like previous problems were introduced recently).

 it runs with HyperDoc... but some problems exists with compiler now.

When I try to compile package, it fails to rename package from *.erlib to *.NRLIB (and fails to load it consequently). In the same session I cannot rename directory with )system mv ... But I can do it from bash or with the same )system mv ... command but after restart of fricas. It seems, that some file handles are not freed after the compilation.

Do somebody has some ideas, what can be the cause and how it can be fixed?

Thanks in advance.

Dmitry Semikin

unread,
Sep 29, 2011, 5:35:22 PM9/29/11
to fricas...@googlegroups.com
Just one more question:

Do fricas support source uninstall with command like 'make uninstall'?

Some details about my configuration:
fricas version: 1.1.3
OS: Windows 7 x64

Ralf Hemmecke

unread,
Sep 30, 2011, 2:17:16 AM9/30/11
to fricas...@googlegroups.com
Since we are at it... I also wrote a little tool

https://github.com/hemmecke/prolitex

Then .pamphlet would really be .tex (thanks to the powerful listings
package). The format change would be from

<<NAME>>=
code here
@

to

\begin{chunk}{NAME}
code here
\end{chunk}

and an option to select if you want <<...>> or any other delimiters for
a reference to another chunk inside the code chunk.

weaving is not necessary anymore.
tangling is done by a little awk script.

I was, however, not yet eager enough to propose such a change to the
fricas sources.

Ralf

Ralf Hemmecke

unread,
Sep 30, 2011, 3:00:11 AM9/30/11
to fricas...@googlegroups.com
> Do fricas support source uninstall with command like 'make uninstall'?

No. I tried to start adding automake to fricas where all the standard
targets would be for free, but it's not that easy, because the build is
not so standard and automake rather supports .c compilation better than
.boot or .lisp. So you'll have to wait a bit.

However, if you look into the "install" target in the top-level
Makefile.in, you'll find that you can do a uninstall manually quite easily.

First, find your previous install path.

Look at the top of the fricas script. There is a variable AXIOM.
It will point to the installed files of FriCAS.
It ends in something similar to this...

..../lib/fricas/target/x86_64-unknown-linux

Remove the whole fricas directory.
Remove there the fricas and efricas scripts. From the bin directory
(which should be at the same level as the lib dir).

That's it.

Ralf

Dmitry Semikin

unread,
Sep 30, 2011, 9:10:59 AM9/30/11
to fricas...@googlegroups.com
Thanks,

It is really pretty simple. I've saw this in more evident way, when I've installed fricas into custom location. It have resulted in two items (which are to be considered while "uninstall" process):

$prefix/bin/fricas
$prefix/bin/efricas
$prefix/lib/fricas/

the last one is the directory filled with only fricas staff, so it can be removed as a whole.

Dmitry.

Dmitry Semikin

unread,
Sep 30, 2011, 9:20:18 AM9/30/11
to fricas...@googlegroups.com
Considering buliding fricas with cygwin with clisp without aldor I've just finished with following results:

1. In "/usr/include/sys/stdio.h" the "getline" function must be commented for noweb to be built successfully.

2. Yesterday trunk version did not build, resulting in some errors related to missing DAAS files

3. Source tarbal fricas-full-1.1.3 has built, but has problems with compilation (after compilation *.erlib dir cannot be renamed to *.NRLIB)

4. Source tarbal fricas-full-1.1.2 has built successfully and works normally (as I can see)

If there are some test-suites, I can run it under cygwin and return logs, if it is of interest.

Dmitry.

Waldek Hebisch

unread,
Sep 30, 2011, 12:16:10 PM9/30/11
to fricas...@googlegroups.com

Use

make all-input

to run the tests. It should take about 15-30 minutes and produce
about 2.5 Mb of results. The results are printed to standard output,
but also go to files (src/input/*.output in the build directory).
Some tests print statistics about results but for the other (most)
one has to compare the results with results from other runs.

--
Waldek Hebisch
heb...@math.uni.wroc.pl

Dmitry Semikin

unread,
Oct 2, 2011, 6:59:37 PM10/2/11
to fricas...@googlegroups.com
Once more about building trunk version under cygwin.

I've tried to it one more time and finished with following situation:

Build failed with the error:

   >> System error:
   LOAD: A file with name /home/dmitry_semikin/builds/fricas-trunk/fricas-build/src/algebra/IEVALAB.NRLIB/IEVALAB does not exist

(1) -> 
mv: не удалось выполнить stat для «browse.daase»: No such file or directory
mv: не удалось выполнить stat для «category.daase»: No such file or directory
mv: не удалось выполнить stat для «compress.daase»: No such file or directory
mv: не удалось выполнить stat для «interp.daase»: No such file or directory
mv: не удалось выполнить stat для «operation.daase»: No such file or directory
make[3]: *** [stamp-db] Ошибка 1
make[3]: Leaving directory `/home/dmitry_semikin/builds/fricas-trunk/fricas-build/src/algebra'
make[2]: *** [all-ax] Ошибка 2
make[2]: Leaving directory `/home/dmitry_semikin/builds/fricas-trunk/fricas-build/src/algebra'
make[1]: *** [all-algebra] Ошибка 2
make[1]: Leaving directory `/home/dmitry_semikin/builds/fricas-trunk/fricas-build/src'
make: *** [all-src] Ошибка 2


Sorry for the Russian output, I run build on machine with russian locale, but hope major things can be taken from this (Ошибка = Error).

As it can be seen, the system cannot find the file IEVALAB.NRLIB/IEVALAB

I looked at that directory and found, that there is IEVALAB.erlib directory and IEVALAB-.NRLIB (with dash at the end). So, for some reason compiler added dash at the end of IEVALAB, while creating .NRLIB directory and all files within it.

I tried to look into the source spad files, but did not find there any differences from other spad files (the only thing I've noticed is that after )abbrev line there is '--' comment (second line in file)... but I do not think, it can play so (although I did not try to build without this line to make sure, that it is not important)

So, I wonder if sombody has any idea about why this can happen (dash '-' sign is appended to the name of .erlib, when converted to .NRLIB)? Or may be somebody can give some hints about how this can be debugged... I'll try to think about it myself, but I'm not quite familiar with fricas building process and compiler internals yet.

Waldek Hebisch

unread,
Oct 3, 2011, 9:30:54 AM10/3/11
to fricas...@googlegroups.com
Dmitry Semikin wrote:
>
> --20cf303bffd208055f04ae58d0f5
> Content-Type: text/plain; charset=KOI8-R
> Content-Transfer-Encoding: quoted-printable

>
> Once more about building trunk version under cygwin.
>
> I've tried to it one more time and finished with following situation:
>
> Build failed with the error:
>
> >> System error:
> LOAD: A file with name
> /home/dmitry_semikin/builds/fricas-trunk/fricas-build/src/algebra/IEVALAB.N=
> RLIB/IEVALAB
> does not exist
>
> directory
> make[3]: *** [stamp-db] =EF=DB=C9=C2=CB=C1 1

> make[3]: Leaving directory
> `/home/dmitry_semikin/builds/fricas-trunk/fricas-build/src/algebra'
>
> As it can be seen, the system cannot find the file IEVALAB.NRLIB/IEVALAB
>
> I looked at that directory and found, that there is IEVALAB.erlib directory
> and IEVALAB-.NRLIB (with dash at the end). So, for some reason compiler
> added dash at the end of IEVALAB, while creating .NRLIB directory and all
> files within it.
>

IEVALAB-.NRLIB is OK. Spad compiler should create both IEVALAB-.NRLIB
and IEVALAB.NRLIB.



> I tried to look into the source spad files, but did not find there any

> differences from other spad files (the only thing I've noticed is that afte=
> r


> )abbrev line there is '--' comment (second line in file)... but I do not
> think, it can play so (although I did not try to build without this line to
> make sure, that it is not important)
>
> So, I wonder if sombody has any idea about why this can happen (dash '-'

> sign is appended to the name of .erlib, when converted to .NRLIB)? Or may b=
> e


> somebody can give some hints about how this can be debugged... I'll try to
> think about it myself, but I'm not quite familiar with fricas building
> process and compiler internals yet.
>

One possibility is to capture all messages to a file (for sucessful
full build expect about 18 Mb of messages). After failure search
for messages about compilation of IEVALAB.spad. If there is an
error message it may explain what is happening. If this does not
help there is possibility to run compiler by hand. The failing stage
can be re-run by going to 'src/algebra' subdirectory, running
(note setting environment variables, otherwise interpsys will
not start)

AXIOM=./axp DAASE=./r1 ../../build/arch/bin/interpsys

where 'arch' is your build architecture (probably i386-pc-cygwin)
and typing

)set break break
)read "boo_db.input"

to the interpsys prompt. Note: ')set break break' is so that
on error you will get into Lisp debugger. Unfortunately,
the failing stage is doing a lot of work that has to be done
sequentlialy in single run.

--
Waldek Hebisch
heb...@math.uni.wroc.pl

Dmitry Semikin

unread,
Oct 4, 2011, 2:30:17 AM10/4/11
to fricas...@googlegroups.com
Waldek, 

Thanks for your directions. I'll try to do it this way in some near future. 

One more thing I want to try is to build fricas under ubuntu with clisp.
The build under ubuntu was successfull with SBCL. So if with
clisp I'll got the same error, then the problem relates to clisp.

Dmitry.

Waldek Hebisch

unread,
Oct 4, 2011, 8:52:22 AM10/4/11
to fricas...@googlegroups.com

FYI, I regularly test with clisp on Linux. The last time I tested
with clisp-2.48 on 64-bit Debian 6.0.

--
Waldek Hebisch
heb...@math.uni.wroc.pl

Reply all
Reply to author
Forward
0 new messages