While trying to compile X86_64 Mac OS r6712 CSL reduce.app, compilation fails with the following error messages
~/sw/reduce-algebra/trunk/csl/cslbase/flatten.cpp:93:24: error: use of undeclared identifier 'nullptr'
if (incFile == nullptr)
^
~/sw/reduce-algebra/trunk/csl/cslbase/flatten.cpp:110:39: error: use of undeclared identifier 'nullptr'
if ((source = fopen(src, "r")) == nullptr)
^
~/sw/reduce-algebra/trunk/csl/cslbase/flatten.cpp:114:45: error: use of undeclared identifier 'nullptr'
if ((destination = fopen(dest, "w")) == nullptr)
^
3 errors generated.
gmake[2]: *** [Makefile:6601: ~/sw/reduce-algebra/trunk/csl/cslbase/flatten] Error 1
gmake[2]: uscita dalla directory «~/sw/reduce-algebra/trunk/cslbuild/x86_64-mac_11_big_sur-darwin20.6.0/csl»
gmake[1]: *** [Makefile:1440: all] Error 2
gmake[1]: uscita dalla directory «~/sw/reduce-algebra/trunk/cslbuild/x86_64-mac_11_big_sur-darwin20.6.0/csl»
Reduce build tasks finished: Highest return code 2
make: [all] Error 2 (ignored)
Marco Ferraris
Thank you for your report. It is very hard for me to check because
although I have tried fairly hard I have not been able to get a scheme
that lets me run historical versions of operating systems in virtual
machines on a Mac, and that applied especially to Intel versions.
I have to note that your info suggests that you are running on Big Sur
and my understanding is that that went out of support from Apple on 11
Sept 2023.
nullprt is a C++ keyword introduced with C++11. So possibly it not being
accepted will be down to the version of Xcode you have installed. Again I
can not check that but my first suggestion would be that you check Xcode.
Again a web search tells me that any release of that beyond 13.2 needs a
newer OS than Big Sur.
Compiling the CSL version of Reduce needs a C++ compiler that support
C++17 these days.
Please report if an Xcode update sorts things out for you!
HOWEVER there is another possiblilty that may mbe more down to me. The
jiffy utility flatten is compiled without passing any special flags to the
C++ compiler - and perhaps (even probably!) the one you have needs a
"-std=c++17" added to the command to build flatten in Makefile (derived
from Makefile.am). I will put that in anyway!
Arthur
On Sat, 10 Feb 2024, Marco Ferraris wrote:
Related
Bugs: #160
Hi Arthur,
There are several csl source files in which the identifier 'nullptr' is used. Whether implicitly or explicitly, in all of them, the prolog of the file contain the instructions:
include <cstdlib></cstdlib>
include <cstddef></cstddef>
In flatten.cpp one has only
include <cstdlib></cstdlib>
and adding
include <cstddef></cstddef>
solves the problem.
Best regards
Marco
Related
Bugs: #160