Opened 11 years ago

Closed 11 years ago

#476 closed bug (fixed)

Singular always link to ncurses on Cygwin

Reported by: jpflori@… Owned by: somebody
Priority: major Milestone: 3-2-0 and higher
Component: singular-kernel Version: 3-1-5
Keywords: cygwin libs ncurses termcap Cc:

Description

Reported at Sage's ticket #14033.

Singular/Makefile?.in does not use the configure generated NEED_LIBS but hardcoded ones which include ncurses. Therefore we cannot build Singular if let's say only termcap is available.

Change History (12)

comment:1 Changed 11 years ago by jpflori@…

I see that automake seems to be used in Singular git now. So the problem might be gone, testing singular 3.1.6 now.

comment:2 Changed 11 years ago by jpflori@…

At least in the 3-1-6 tarball, although the LIBS and LIBSG line changed and now include NEED_LIBS/G the inclusion of ncurses is still hardcoded.

comment:3 Changed 11 years ago by jpflori@…

Sorry for some of the noise here, I just remarked github did not put me on the master branch by default. In the master one, there is no switch to automake.

comment:4 Changed 11 years ago by jpflori@…

Just for info, using just NEED_LIBS/G there at least built fine and singular starts.

comment:5 Changed 11 years ago by Oleksandr

If possible could you please also experiment with the development version (spielwiese) of Singular - e.g. without ncurses and/or curses + with and without termcap (if a combination makes sense)?

comment:6 Changed 11 years ago by Oleksandr

Any problems building spielwiese under Cygwin?

comment:7 Changed 11 years ago by Jean-Pierre Flori <jpflori@…>

I'll give spielwiese a shot.

FYI the original problem with Sage might get masked by the horrible hack from ticket #12725 on Sage's trac.

comment:8 Changed 11 years ago by anonymous

Ive just tried an install with the spielwiese sources on the same setup and it correclty detected it should link to termcap rather than ncurses. It's building now, I'll report when finished.

So the autotools build system makes the issue disappear although a simple fix as I suggested might be useful till then. I'll use it on Sage (although it might not be really needed since our hack from #12725).

comment:9 Changed 11 years ago by jpflori@…

Please note you should pass -no-undefined (one dash, that's a libtool flag) in the right *_la_LDFLAGS to libtool to let it build shared libraries on Cygwin. That should not be harmful unless you leave undefined symbols in your libs and rely on dynamic lookup (let's say you use extern char * * environ which is not available on Mac OS).

comment:10 Changed 11 years ago by Jean-Pierre Flori <jpflori@…>

FYI we integrated the simple fix I proposed into Sage (although we surely don't really need it anymore since for other reasons (i.e. not fixing Python build system which would be much harder to fix than Singular's one) we copy libtermcap.a to libncurses.a which is horrible...).

And as far as I remebmber the spielwiese autotools build system mitigated this issue on Cygwin, but the build failed later for completely different reason (whereas the old pathed build system is fine). Don't really remember the details buut when you choose to integrate officially the new build system I'll surely rant again :)!

comment:11 in reply to:  10 Changed 11 years ago by ren

We fixed the Cygwin build system for spielwiese, so it should work now. Could you please give it another try and see if everything's fine?

comment:12 Changed 11 years ago by barakat

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.