On 06/ 6/10 09:45 AM, William Stein wrote:
On Sun, Jun 6, 2010 at 1:14 AM, Dr. David Kirkby
<david.kir...@onetel.net> wrote:
I've tried twice to build Sage on a machine in which 'flex' was not in the
path. It has both times failed with:
make install in Singular
make[4]: Entering directory
`/export/home/drkirkby/32/sage-4.4.3/spkg/build/singular-3-1-0-4-20100214/src/Singular'
sh flexer.sh -I -Pyylp -t libparse.l>libparse.cc.lmp
flexer.sh: flex: not found
flexer.sh: test: argument expected
make[4]: *** [libparse.cc] Error 1
So is flex a requirement to build Sage? If it is, then I'll add to the
'prereq' script a test for flex. If, which I doubt, it is only needed on
Solaris, then I'll make the test specific to Solaris.
The Solaris system has 'lex' in the path, and whilst 'flex' comes as part of
Solaris, it is in a directory (/usr/sfw/bin) which was not in the path on
this particular attempt at building.
I want to avoid forcing everyone to have flex installed if it is possible to
build Sage without flex, though I doubt that is the case.
Flex and bison used to be required to build Sage. But they definitely haven't
been required for years on Linux, etc. I'm not sure what's going on
with Solaris.
William
Interesting.
Certainly adding /usr/sfw/bin to the path, where 'flex' is, results in a
successful build of Singular
drkir...@swan:~/32/sage-4.4.3$ ls spkg/installed/sin*
spkg/installed/singular-3-1-0-4-20100214
drkir...@swan:~/32/sage-4.4.3$
singular-3-1-0-4-20100214/src/Singular/flexer.sh
is the file which calls 'flex;.
In Singular's 'configure.in' I see some checks around 'lex' and 'flex'. It may
be that it will build without 'lex', but fails to build with 'lex'. (Remember,
flex is a GNU replacement for 'lex'). On Solaris 'lex' was in my path, but not
'flex'.
There's also a check for bison.
# bison
AC_CHECK_PROGS(BISON, bison)
if test "${BISON+set}" != set; then
AC_MSG_WARN(did not find bison -- make might fail)
fi
So it is perhaps not wise to build without bison.
I note from the comment on sage-support about the package 'LiE' that bison is
required to install that.
Do these two checks make sense to add to 'prereq'?
1) 'file' - on all platforms. That is currently used in 'prereq' anyway.
I'm surprised Cygwin does not come with the 'file' command, since it's a POSIX
requirement. It's also an amazingly useful command.
2) 'flex' - only check for that on Solaris.
Dave
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org