Project

General

Profile

Support #618

Instructions for compiling libnormaliz

Added by Anna Maria Bigatti over 9 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
High
Category:
Portability
Target version:
Start date:
09 Sep 2014
Due date:
% Done:

100%

Estimated time:
2.55 h
Spent time:

Description

Collection of instructions for compiling normaliz.
(keep up-to-date)


Related issues

Related to CoCoA-5 - Feature #1367: CoCoA-5.3.0: release linked with more recent version of normalizClosed2019-11-24

Related to CoCoALib - Support #1591: Compilation of NormalizClosed2021-04-30

History

#1 Updated by Anna Maria Bigatti over 9 years ago

  • Category set to Portability
  • Target version set to CoCoALib-0.99534 Seoul14
  • % Done changed from 0 to 30
  • Estimated time set to 2.00 h

This is what I did (on Mac)
- create a build dir, cd into it, run cmake.
This is what I did

cd source/
mkdir BUILD
cd BUILD
CC=gcc CXX=g++ cmake ..

I got some errors because I have a personal installation of some libraries, so I had to tweak the configuration using ccmake:
ccmake .
---- then set (Press [enter] to edit option)
 GMPXX_INCLUDE_DIR                /Users/bigatti/0.99/gmp         
 GMPXX_LIBRARIES                  /Users/bigatti/0.99/gmp/.libs/libgmpxx.a
 GMPXX_STATIC_LIBRARIES           /Users/bigatti/0.99/gmp/.libs/libgmpxx.a
 GMP_INCLUDE_DIR                  /Users/bigatti/0.99/gmp         
 GMP_LIBRARIES                    /Users/bigatti/0.99/gmp/.libs/libgmp.a
 GMP_LIBRARIES_DIR                /Users/bigatti/0.99/gmp/.libs
 GMP_STATIC_LIBRARIES             /Users/bigatti/0.99/gmp/.libs/libgmp.a

 NMZ_BUILD_STATIC  --> ON
 NMZ_OPENMP        --> OFF

---- (Press [t] to toggle advanced mode)
 Boost_INCLUDE_DIR --> /Users/bigatti/0.99/boost

 CMAKE_CXX_FLAGS   --> -m64
 CMAKE_C_FLAGS     --> -m64

---- (Press [c] to configure)
---- (Press [g] to generate and exit)

make
mv libnormaliz/libnormaliz.a ../libnormaliz/

#2 Updated by Anna Maria Bigatti over 9 years ago

  • Status changed from New to In Progress
  • Estimated time changed from 2.00 h to 3.00 h

#3 Updated by Anna Maria Bigatti over 9 years ago

  • Target version changed from CoCoALib-0.99534 Seoul14 to CoCoALib-0.99536 June 2015

#4 Updated by Anna Maria Bigatti over 8 years ago

  • Assignee set to Anna Maria Bigatti
  • Target version changed from CoCoALib-0.99536 June 2015 to CoCoALib-0.99540 Feb 2016

Normaliz is making a new release and we will refine the configuration in September (in Aarhus)

#5 Updated by Anna Maria Bigatti about 8 years ago

  • Target version changed from CoCoALib-0.99540 Feb 2016 to CoCoALib-1.0

#6 Updated by John Abbott about 8 years ago

This is * OBSOLETE * -- see next comment!

Here are the notes I have made for myself (compiling using make rather than cmake). These notes refer to Normaliz 2.x; I don't know about Normaliz 3.x (which uses C++11 features).

To compile Normaliz on abbottpb (old MacBook Pro with Intel core2 processor)

Edit Normaliz2.11/source/Makefile.configuration

Compiler should be defined like this (for my MacBook):
[the flags are to be compatible with 64-bit GMP library]
CXX = g++ -m64 -mtune=core2 -march=core2

Add this line
CXXFLAGS += -Wno-long-long

Remove line about
CXXFLAGS += --std=c++0x

Edit the "static" flags for MacOS (at the bottom of Makefile.configuration);
comment out one line, and remove comment at start of another line.

Finally, in the Normaliz/source/ directory, run the command
make OPENMP=no

The built (static) library will be in Normaliz2.11/source/libnormaliz/libnormaliz.a

#7 Updated by John Abbott about 4 years ago

Here is what I did:

cd normaliz-3.8.3
./configure
make   #  took about 5 mins' CPU
--> result is in source/.libs/libnormaliz.a

Note that I do have gmp-6.2.1 installed in /usr/local/include & /usr/local/lib

Everything seems to work fine (even compilation with CoCoA).
Note sure what "adventures" Anna will have with a non-installed GMP.

#8 Updated by John Abbott about 4 years ago

  • Target version changed from CoCoALib-1.0 to CoCoALib-0.99700
  • % Done changed from 30 to 60

#9 Updated by John Abbott about 4 years ago

  • Priority changed from Normal to High
  • Target version changed from CoCoALib-0.99700 to CoCoALib-0.99800

#10 Updated by John Abbott about 4 years ago

  • Related to Feature #1367: CoCoA-5.3.0: release linked with more recent version of normaliz added

#11 Updated by John Abbott about 3 years ago

Anna will check what happens on her (new) computer.
Hope we can close this soon.

Update website too!

#12 Updated by John Abbott about 2 years ago

  • % Done changed from 60 to 70

This probably needs changing after issue #1655.
How does this issue differ from #1591 ?

#13 Updated by John Abbott about 2 years ago

#14 Updated by John Abbott about 2 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 70 to 100
  • Estimated time changed from 3.00 h to 2.55 h

This is effectively superseded by issue #1591.
Closing -- the info here seems rather out of date.

Also available in: Atom PDF