vectorgraphics / asymptote

2D & 3D TeX-Aware Vector Graphics Language
https://asymptote.sourceforge.io/
GNU General Public License v3.0
542 stars 90 forks source link

Build error #360

Closed ak-ferhat closed 1 year ago

ak-ferhat commented 1 year ago

Hi I tried to build from source and followed the INSTALL instructions:

git clone http://github.com/vectorgraphics/asymptote
cd asymptote
./autogen.sh
./configure
make all
make install

I get the following error:

g++ -DHAVE_CONFIG_H -D_FILE_OFFSET_BIS=64 -DUSEGC  -pthread -DFFTWPP_SINGLE_THREAD -Wall  -I. -Igc-8.2.0/include      -std=c++14 -g -O2 -fno-var-tracking -ILspCpp/include -o exp.o -c exp.cc
exp.cc: In member function 'virtual void absyntax::callExp::createSymMap(AsymptoteLsp::SymbolContext*)':
exp.cc:1099:15: error: 'const class boost::optional<double>' has no member named 'has_value'; did you mean 'value'?
     if (alpha.has_value())
               ^~~~~~~~~
               value
make: *** [Makefile:384: exp.o] Error 1
rm v3dtypes.h v3dheadertypes.h

Even the zip archive from sourceforge.net, I get the same error.

I am on Almalinux 8.7 and gcc 8.5.0

Any help please

Best regards

johncbowman commented 1 year ago

Probably you have an obsolete version of boost. If you don't need LSP, try ./configure --disable-lsp Let us know if that solves your problem so that this issue can be closed.

ak-ferhat commented 1 year ago

Hi This solved the problem of building the binary file and not the doc. When executing asy on any file, I get the following error

Error: /undefined in .setfillconstantalpha
Operand stack:
   1
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1992   1   3   %oparray_pop   1991   1   3   %oparray_pop   1990   1   3   %oparray_pop   --nostringval--   1979   1   3   %oparray_pop   1833   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:733/1123(ro)(G)--   --dict:0/20(G)--   --dict:79/200(L)--
Current allocation mode is local
Current file position is 346
GPL Ghostscript 9.27: Unrecoverable error, exit code 1
  _shipout(prefix,f,currentpatterns,format,wait,view,t);
          ^
/home/myHome/asymptote/share/asymptote/plain_shipout.asy: 116.11: runtime: shipout failed

It was a matter of ghostscript version. Rebuilding and installing ghostscript 9.53.3 from source solved the problem.

Thank you