Compiling Macaulay2 from source code

73 views
Skip to first unread message

HL Dao

unread,
Jun 20, 2022, 2:29:50 AM6/20/22
to Macaulay2
I run MacOS Mojave 10.14 and I've been experimenting with compiling the source code using the instructions found on the file M2/INSTALL. 
https://github.com/Macaulay2/M2/blob/master/M2/INSTALL
 
Before trying to compile the source code, I had tried the usual installation method using brew:
brew install Macaulay2/tap/M2
brew install Macaulay2/tap/M2 --head
but the processes were riddled with errors and eventually failed (A pdf file is attached showing the Terminal output). 

I tried to work around this by compiling the source code using the following steps:

1. Clone the git link
into my usr/local/bin

2. Install the programs and libraries needed:
brew update |cat

brew install autoconf automake bdw-gc boost ccache cddlib ctags eigen flint gdbm glpk gmp gnu-tar libatomic_ops libmpc libomp libtool make mpfi mpfr mpir ncurses ninja ntl pkg-config tbb wget xz yasm |cat

3. Execute the following command for MacOS 10.14:
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

So far, no problem. 

4. Compiling step: 
In the directory usr/local/bin/M2/M2, execute 'make' command 
At this step, the following 10 errors appear: 

./VectorArithmetic.hpp:412:31: error: no viable constructor or deduction guide for deduction of template arguments of 'ConcreteVectorArithmetic'
        mConcreteVector = new ConcreteVectorArithmetic
                              ^
./VectorArithmetic.hpp:68:3: note: candidate template ignored: couldn't infer template argument 'ElementArrayType'
  ConcreteVectorArithmetic(const Ring* origR, const RingType* R) : mOriginalRing(origR), mRing(R) {}
  ^
./VectorArithmetic.hpp:24:71: note: candidate function template not viable: requires 1 argument, but 2 were provided
  template<typename RingType, typename ElementArrayType> friend class ConcreteVectorArithmetic;
                                                                      ^
./VectorArithmetic.hpp:56:3: note: candidate function template not viable: requires 0 arguments, but 2 were provided
  ConcreteVectorArithmetic() : mOriginalRing(nullptr), mRing(nullptr) {}
  ^
./VectorArithmetic.hpp:416:31: error: no viable constructor or deduction guide for deduction of template arguments of 'ConcreteVectorArithmetic'
        mConcreteVector = new ConcreteVectorArithmetic
                              ^
./VectorArithmetic.hpp:68:3: note: candidate template ignored: couldn't infer template argument 'ElementArrayType'
  ConcreteVectorArithmetic(const Ring* origR, const RingType* R) : mOriginalRing(origR), mRing(R) {}
  ^
./VectorArithmetic.hpp:24:71: note: candidate function template not viable: requires 1 argument, but 2 were provided
  template<typename RingType, typename ElementArrayType> friend class ConcreteVectorArithmetic;
                                                                      ^
./VectorArithmetic.hpp:56:3: note: candidate function template not viable: requires 0 arguments, but 2 were provided
  ConcreteVectorArithmetic() : mOriginalRing(nullptr), mRing(nullptr) {}
  ^
./VectorArithmetic.hpp:420:31: error: no viable constructor or deduction guide for deduction of template arguments of 'ConcreteVectorArithmetic'
        mConcreteVector = new ConcreteVectorArithmetic
                              ^
./VectorArithmetic.hpp:68:3: note: candidate template ignored: couldn't infer template argument 'ElementArrayType'
  ConcreteVectorArithmetic(const Ring* origR, const RingType* R) : mOriginalRing(origR), mRing(R) {}
  ^
./VectorArithmetic.hpp:24:71: note: candidate function template not viable: requires 1 argument, but 2 were provided
  template<typename RingType, typename ElementArrayType> friend class ConcreteVectorArithmetic;
                                                                      ^
./VectorArithmetic.hpp:56:3: note: candidate function template not viable: requires 0 arguments, but 2 were provided
  ConcreteVectorArithmetic() : mOriginalRing(nullptr), mRing(nullptr) {}
  ^
./VectorArithmetic.hpp:424:31: error: no viable constructor or deduction guide for deduction of template arguments of 'ConcreteVectorArithmetic'
        mConcreteVector = new ConcreteVectorArithmetic
                              ^
./VectorArithmetic.hpp:68:3: note: candidate template ignored: couldn't infer template argument 'ElementArrayType'
  ConcreteVectorArithmetic(const Ring* origR, const RingType* R) : mOriginalRing(origR), mRing(R) {}
  ^
./VectorArithmetic.hpp:24:71: note: candidate function template not viable: requires 1 argument, but 2 were provided
  template<typename RingType, typename ElementArrayType> friend class ConcreteVectorArithmetic;
                                                                      ^
./VectorArithmetic.hpp:56:3: note: candidate function template not viable: requires 0 arguments, but 2 were provided
  ConcreteVectorArithmetic() : mOriginalRing(nullptr), mRing(nullptr) {}
  ^
./VectorArithmetic.hpp:428:31: error: no viable constructor or deduction guide for deduction of template arguments of 'ConcreteVectorArithmetic'
        mConcreteVector = new ConcreteVectorArithmetic
                              ^
./VectorArithmetic.hpp:68:3: note: candidate template ignored: couldn't infer template argument 'ElementArrayType'
  ConcreteVectorArithmetic(const Ring* origR, const RingType* R) : mOriginalRing(origR), mRing(R) {}
  ^
./VectorArithmetic.hpp:24:71: note: candidate function template not viable: requires 1 argument, but 2 were provided
  template<typename RingType, typename ElementArrayType> friend class ConcreteVectorArithmetic;
                                                                      ^
./VectorArithmetic.hpp:56:3: note: candidate function template not viable: requires 0 arguments, but 2 were provided
  ConcreteVectorArithmetic() : mOriginalRing(nullptr), mRing(nullptr) {}
  ^
./VectorArithmetic.hpp:432:31: error: no viable constructor or deduction guide for deduction of template arguments of 'ConcreteVectorArithmetic'
        mConcreteVector = new ConcreteVectorArithmetic
                              ^
./VectorArithmetic.hpp:68:3: note: candidate template ignored: couldn't infer template argument 'ElementArrayType'
  ConcreteVectorArithmetic(const Ring* origR, const RingType* R) : mOriginalRing(origR), mRing(R) {}
  ^
./VectorArithmetic.hpp:24:71: note: candidate function template not viable: requires 1 argument, but 2 were provided
  template<typename RingType, typename ElementArrayType> friend class ConcreteVectorArithmetic;
                                                                      ^
./VectorArithmetic.hpp:56:3: note: candidate function template not viable: requires 0 arguments, but 2 were provided
  ConcreteVectorArithmetic() : mOriginalRing(nullptr), mRing(nullptr) {}
  ^
./VectorArithmetic.hpp:436:31: error: no viable constructor or deduction guide for deduction of template arguments of 'ConcreteVectorArithmetic'
        mConcreteVector = new ConcreteVectorArithmetic
                              ^
./VectorArithmetic.hpp:68:3: note: candidate template ignored: couldn't infer template argument 'ElementArrayType'
  ConcreteVectorArithmetic(const Ring* origR, const RingType* R) : mOriginalRing(origR), mRing(R) {}
  ^
./VectorArithmetic.hpp:24:71: note: candidate function template not viable: requires 1 argument, but 2 were provided
  template<typename RingType, typename ElementArrayType> friend class ConcreteVectorArithmetic;
                                                                      ^
./VectorArithmetic.hpp:56:3: note: candidate function template not viable: requires 0 arguments, but 2 were provided
  ConcreteVectorArithmetic() : mOriginalRing(nullptr), mRing(nullptr) {}
  ^
./VectorArithmetic.hpp:440:31: error: no viable constructor or deduction guide for deduction of template arguments of 'ConcreteVectorArithmetic'
        mConcreteVector = new ConcreteVectorArithmetic
                              ^
./VectorArithmetic.hpp:68:3: note: candidate template ignored: couldn't infer template argument 'ElementArrayType'
  ConcreteVectorArithmetic(const Ring* origR, const RingType* R) : mOriginalRing(origR), mRing(R) {}
  ^
./VectorArithmetic.hpp:24:71: note: candidate function template not viable: requires 1 argument, but 2 were provided
  template<typename RingType, typename ElementArrayType> friend class ConcreteVectorArithmetic;
                                                                      ^
./VectorArithmetic.hpp:56:3: note: candidate function template not viable: requires 0 arguments, but 2 were provided
  ConcreteVectorArithmetic() : mOriginalRing(nullptr), mRing(nullptr) {}
  ^
./VectorArithmetic.hpp:445:33: error: no viable constructor or deduction guide for deduction of template arguments of 'ConcreteVectorArithmetic'
          mConcreteVector = new ConcreteVectorArithmetic{R, R->cast_to_Z_mod()->get_CoeffRing()};
                                ^
./VectorArithmetic.hpp:68:3: note: candidate template ignored: couldn't infer template argument 'ElementArrayType'
  ConcreteVectorArithmetic(const Ring* origR, const RingType* R) : mOriginalRing(origR), mRing(R) {}
  ^
./VectorArithmetic.hpp:24:71: note: candidate function template not viable: requires 1 argument, but 2 were provided
  template<typename RingType, typename ElementArrayType> friend class ConcreteVectorArithmetic;
                                                                      ^
./VectorArithmetic.hpp:56:3: note: candidate function template not viable: requires 0 arguments, but 2 were provided
  ConcreteVectorArithmetic() : mOriginalRing(nullptr), mRing(nullptr) {}
  ^
./VectorArithmetic.hpp:449:35: error: no viable constructor or deduction guide for deduction of template arguments of 'ConcreteVectorArithmetic'
            mConcreteVector = new ConcreteVectorArithmetic{R, R->getCoefficientRingR()};
                                  ^
./VectorArithmetic.hpp:68:3: note: candidate template ignored: couldn't infer template argument 'ElementArrayType'
  ConcreteVectorArithmetic(const Ring* origR, const RingType* R) : mOriginalRing(origR), mRing(R) {}
  ^
./VectorArithmetic.hpp:24:71: note: candidate function template not viable: requires 1 argument, but 2 were provided
  template<typename RingType, typename ElementArrayType> friend class ConcreteVectorArithmetic;
                                                                      ^
./VectorArithmetic.hpp:56:3: note: candidate function template not viable: requires 0 arguments, but 2 were provided
  ConcreteVectorArithmetic() : mOriginalRing(nullptr), mRing(nullptr) {}
  ^
10 errors generated.
make[2]: *** [Makefile.common:33: NCAlgebras/NCF4.o] Error 1
make[2]: Leaving directory '/usr/local/bin/M2/M2/Macaulay2/e'
make[1]: *** [Makefile:15: all-in-e] Error 2
make[1]: Leaving directory '/usr/local/bin/M2/M2/Macaulay2'
make: *** [GNUmakefile:251: all-in-Macaulay2] Error 2
make: Leaving directory '/usr/local/bin/M2/M2'


The process terminates at this step.  

I'd be grateful if someone could guide me in this compilation effort - I have not compiled any program from their source code before and I would like to make this work. 
Many thanks!
HL
install-m2-head-not-working.pdf
Reply all
Reply to author
Forward
0 new messages