Project

General

Profile

Support #266

Compilation on M$Windows: cygwin

Added by Anna Maria Bigatti over 11 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Portability
Target version:
Start date:
17 Oct 2012
Due date:
% Done:

100%

Estimated time:
Spent time:

Description

We should offer all documentation is needed for compiling CoCoALib/CoCoA-5 on MSWindows.
  • We believe it should be easy (is it?) to compile CoCoALib under cygwin. And CoCoA-5? And the GUI?
  • CoCoA-5 has been compiled using MSVC (thanks Bruno Simoes), but the GUI has some mysterious problems. And the textual version? Are all the necessary files in our distribution?

We look for guineapigs. .... Christof? ;-)


Related issues

Related to CoCoA-5 - Feature #270: Distribution for linuxClosed2012-10-18

Related to CoCoA-5 - Support #187: CoCoA-5 (partial) releases: make the process simplerClosed2012-06-13

Related to CoCoALib - Support #302: Compilation on M$Windows: Visual StudioIn Progress2013-02-11

Related to CoCoA-5 - Support #629: Windows-GUI: compilation with MinGWIn Progress2014-09-25

History

#1 Updated by Christof Soeger over 11 years ago

Will try it!

#2 Updated by Christof Soeger over 11 years ago

I will document everything :-)

First my test with cygwin:
installed:
  • libgmp-devel: includes the headers
  • libgmp3, libgmpxx4: the lib and the c++ interface
  • gmp: not sure if it is needed
  • libboost-devel: boost headers and link libraries
    I couldn't find qmake in the cygwin setup so I will skip building the gui.
$ ./configure
Starting configuration process for CoCoALib...

Using GMP version 4.3.2 with gmpxx at system default location

which: no qmake in [long list of paths]

Not using BOOST ==> compilation of CoCoA5+GUI disabled

cc1plus: fatal error: CheckULong2Long.C: Permission denied
compilation terminated.
***ERROR*** [[./cpp-flags-ulong2long.sh]]  Compilation of test program failed
***ERROR*** Customization failed
***ERROR***

Taking the default gmp location works, what a great achievement :)

For boost the search was not successful, the configure script should print information about that! My manual debugging yield:

csoeger@t510-3 ~/cocoa/CoCoALib-0.9952/configuration
$ ./boost-find-hdrs.sh
/usr/include

csoeger@t510-3 ~/cocoa/CoCoALib-0.9952/configuration
$ ./boost-find-lib.sh /usr/include/
WARNING: CoCoA-5 needs the following BOOST sublibraries:  thread system filesystem

libnormaliz just needs the headers, so it should still be possible to compile with libnormaliz.
libboost-devel also installed the runtime libraries (says cygwin) and have these two files releated to the error:
/usr/lib/libboost_filesystem-mt.a
/usr/lib/libboost_filesystem-mt.dll.a
I guess the script needs an adaption for that.

The "permission denied" was caused by strange file permissions. I unpacked the .tgz in windows and all files have no permission at all. Probably it would be wise to unpack it in cygwin.

Changed the permission for that file and now the configure goes through.

And also the make causes no problem now! When the boost location script is updated I will try to build C5.

#3 Updated by Christof Soeger over 11 years ago

--with-libnormaliz test:

Not using BOOST ==> compilation of CoCoA5+GUI disabled

The C++ compiler is g++
The C++ compilation flags are "-Wall -pedantic   -O2" 

OPTIONAL external libraries:
Not using Frobby
Not using GSL
Using Normaliz: /home/csoeger/source/libnormaliz/libnormaliz.a

-------------------------------------------------------
CoCoALib configuration process complete
Configuration info saved in file configuration/autoconf.mk
-------------------------------------------------------

csoeger@t510-3 ~/cocoa/CoCoALib-0.9952
$ make
=======================================================
Compiling CoCoALib-0.9952
  CXX = g++
  CXXFLAGS = -Wall -pedantic   -O2
  CXXFLAGS_DEFINES = -DCoCoA_ULONG2LONG=1     -DCoCoA_WITH_NORMALIZ -Wno-long-long
=======================================================

So it seems to work even when it says no boost. And it indeed does, test and example work!

#4 Updated by John Abbott over 11 years ago

  • Status changed from New to In Progress
  • Target version set to CoCoA-5.0.3
  • % Done changed from 0 to 20

I have added a new file INSTALL-cygwin in the CoCoA root directory; it contains a summary of various hints for preparing Cygwin to build CoCoALib and CoCoA-5. At the moment it is in italian. It seems to cover most points Christof mentioned.

#5 Updated by Christof Soeger about 11 years ago

  • % Done changed from 20 to 30

After a fresh install I can confirm it still works as before. :-)

The INSTALL-cygwin file is indeed helpful. It says to create symbolic links for the boost libs. Can the configure script be changed to also find the libs in the cygwin setup?

For compilation with MSVS I will create a new issue since it is quite different. Can you upadate the title of this topic?

#6 Updated by Anna Maria Bigatti about 11 years ago

  • Subject changed from Compilation on M$Windows to Compilation on M$Windows: cygwin

#7 Updated by Anna Maria Bigatti almost 11 years ago

I think I managed to compile the textual version and prepare a distribution for it!
it is available on the web page (5.0.3-text-win)

Most of the work done by John Abbott in preparing the configuration.
Thanks to Alessandro Cartatone for all the assistance on the virtual machine.

#8 Updated by Anna Maria Bigatti over 9 years ago

  • Assignee set to Anna Maria Bigatti
  • % Done changed from 30 to 100

what was done, was done (now closing)

#9 Updated by Anna Maria Bigatti over 9 years ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF