vectorgraphics / asymptote

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

does not compile on ubuntu 20.04 #277

Closed Akuli closed 2 years ago

Akuli commented 2 years ago

With latest version from git (bf21a3428f7dcf3466fa78a10ab01b1c01fa8486), I try to compile:

wget https://github.com/ivmai/bdwgc/releases/download/v8.0.4/gc-8.0.4.tar.gz
wget http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-7.6.10.tar.gz
./autogen.sh
./configure
make -j2

This ends in an error like this:

make: *** No rule to make target 'gc.h', needed by 'stack.o'.  Stop.
make: *** Waiting for unfinished jobs....

Because gc.h is in ./gc-8.0.4/include instead of ., I just remove the dependencies so I can continue compiling:

sed -i s/'gc.h gc_allocator.h gc_cpp.h'// *.d
make -j2

But then I get a huge linker error about PRETRANSLATED_SYMBOL_foo symbols in runtime.o:

``` if test -n ""; then \ g++ -Wall -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -DUSEGC -pthread -DFFTWPP_SINGLE_THREAD -I. -Igc-8.0.4/include -I/usr/include/tirpc -std=c++14 -g -O3 -fno-var-tracking -o asy camperror.o path.o drawpath.o drawlabel.o picture.o psfile.o texfile.o util.o settings.o guide.o flatguide.o knot.o drawfill.o path3.o drawpath3.o drawsurface.o beziercurve.o bezierpatch.o pen.o pipestream.o types.o builtin.o gsl.o runtime.o runbacktrace.o runpicture.o runlabel.o runhistory.o runarray.o runfile.o runsystem.o runpair.o runtriple.o runpath.o runpath3d.o runstring.o runmath.o env.o genv.o stm.o dec.o errormsg.o callable.o name.o symbol.o entry.o exp.o newexp.o stack.o camp.tab.o lex.yy.o access.o virtualfieldaccess.o absyn.o record.o interact.o fileio.o fftw++asy.o simpson.o coder.o coenv.o impdatum.o locate.o parser.o program.o application.o varinit.o fundec.o refaccess.o envcompleter.o process.o constructor.o array.o Delaunay.o predicates.o PRCbitStream.o oPRCFile.o PRCdouble.o writePRC.o glrender.o tr.o shaders.o jsfile.o v3dfile.o main.o revision.o asy.o glew.o -lGLX -lglut -lrt -lz -ltinfo -ltermcap -lfftw3 -lGL gc-8.0.4/.libs/libgc.a -lwolfssl -lgdi32 -lwinmm -s -static; \ else \ ln -sf GUI/xasy.py xasy; \ g++ -Wall -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -DUSEGC -pthread -DFFTWPP_SINGLE_THREAD -I. -Igc-8.0.4/include -I/usr/include/tirpc -std=c++14 -g -O3 -fno-var-tracking -o asy camperror.o path.o drawpath.o drawlabel.o picture.o psfile.o texfile.o util.o settings.o guide.o flatguide.o knot.o drawfill.o path3.o drawpath3.o drawsurface.o beziercurve.o bezierpatch.o pen.o pipestream.o types.o builtin.o gsl.o runtime.o runbacktrace.o runpicture.o runlabel.o runhistory.o runarray.o runfile.o runsystem.o runpair.o runtriple.o runpath.o runpath3d.o runstring.o runmath.o env.o genv.o stm.o dec.o errormsg.o callable.o name.o symbol.o entry.o exp.o newexp.o stack.o camp.tab.o lex.yy.o access.o virtualfieldaccess.o absyn.o record.o interact.o fileio.o fftw++asy.o simpson.o coder.o coenv.o impdatum.o locate.o parser.o program.o application.o varinit.o fundec.o refaccess.o envcompleter.o process.o constructor.o array.o Delaunay.o predicates.o PRCbitStream.o oPRCFile.o PRCdouble.o writePRC.o glrender.o tr.o shaders.o jsfile.o v3dfile.o main.o revision.o glew.o -lGLX -lglut -lrt -lz -ltinfo -lncurses -lfftw3 -lGL gc-8.0.4/.libs/libgc.a; \ fi /usr/bin/ld: runtime.o: in function `trans::gen_runtime_venv(trans::venv&)': /home/a/asymptote/runtime.in:241: undefined reference to `PRETRANSLATED_SYMBOL_isnan' /usr/bin/ld: /home/a/asymptote/runtime.in:339: undefined reference to `PRETRANSLATED_SYMBOL_resetdefaultpen' /usr/bin/ld: /home/a/asymptote/runtime.in:345: undefined reference to `PRETRANSLATED_SYMBOL_defaultpen' /usr/bin/ld: /home/a/asymptote/runtime.in:350: undefined reference to `PRETRANSLATED_SYMBOL_defaultpen' /usr/bin/ld: /home/a/asymptote/runtime.in:355: undefined reference to `PRETRANSLATED_SYMBOL_invisible' /usr/bin/ld: /home/a/asymptote/runtime.in:360: undefined reference to `PRETRANSLATED_SYMBOL_invisible' /usr/bin/ld: /home/a/asymptote/runtime.in:365: undefined reference to `PRETRANSLATED_SYMBOL_gray' /usr/bin/ld: /home/a/asymptote/runtime.in:371: undefined reference to `PRETRANSLATED_SYMBOL_rgb' /usr/bin/ld: /home/a/asymptote/runtime.in:377: undefined reference to `PRETRANSLATED_SYMBOL_cmyk' /usr/bin/ld: runtime.o: in function `types::formal::formal(types::ty*, sym::symbol, bool, bool)': /home/a/asymptote/types.h:307: undefined reference to `PRETRANSLATED_SYMBOL_r' /usr/bin/ld: runtime.o: in function `trans::gen_runtime_venv(trans::venv&)': /home/a/asymptote/runtime.in:388: undefined reference to `PRETRANSLATED_SYMBOL_rgb' /usr/bin/ld: /home/a/asymptote/runtime.in:393: undefined reference to `PRETRANSLATED_SYMBOL_cmyk' /usr/bin/ld: runtime.o: in function `types::formal::formal(types::ty*, sym::symbol, bool, bool)': /home/a/asymptote/types.h:307: undefined reference to `PRETRANSLATED_SYMBOL_gray' /usr/bin/ld: runtime.o: in function `trans::gen_runtime_venv(trans::venv&)': /home/a/asymptote/runtime.in:398: undefined reference to `PRETRANSLATED_SYMBOL_gray' /usr/bin/ld: /home/a/asymptote/runtime.in:436: undefined reference to `PRETRANSLATED_SYMBOL_byte' /usr/bin/ld: /home/a/asymptote/runtime.in:441: undefined reference to `PRETRANSLATED_SYMBOL_colorspace' /usr/bin/ld: /home/a/asymptote/runtime.in:448: undefined reference to `PRETRANSLATED_SYMBOL_pattern' /usr/bin/ld: /home/a/asymptote/runtime.in:453: undefined reference to `PRETRANSLATED_SYMBOL_pattern' /usr/bin/ld: runtime.o: in function `types::formal::formal(types::ty*, sym::symbol, bool, bool)': /home/a/asymptote/types.h:307: undefined reference to `PRETRANSLATED_SYMBOL_blend' /usr/bin/ld: runtime.o: in function `trans::gen_runtime_venv(trans::venv&)': /home/a/asymptote/runtime.in:483: undefined reference to `PRETRANSLATED_SYMBOL_blend' /usr/bin/ld: runtime.o: in function `types::formal::formal(types::ty*, sym::symbol, bool, bool)': /home/a/asymptote/types.h:307: undefined reference to `PRETRANSLATED_SYMBOL_adjust' /usr/bin/ld: /home/a/asymptote/types.h:307: undefined reference to `PRETRANSLATED_SYMBOL_scale' /usr/bin/ld: /home/a/asymptote/types.h:307: undefined reference to `PRETRANSLATED_SYMBOL_pattern' /usr/bin/ld: runtime.o: in function `trans::gen_runtime_venv(trans::venv&)': /home/a/asymptote/runtime.in:488: undefined reference to `PRETRANSLATED_SYMBOL_linetype' /usr/bin/ld: /home/a/asymptote/runtime.in:499: undefined reference to `PRETRANSLATED_SYMBOL_linetype' /usr/bin/ld: /home/a/asymptote/runtime.in:510: undefined reference to `PRETRANSLATED_SYMBOL_scale' /usr/bin/ld: /home/a/asymptote/runtime.in:515: undefined reference to `PRETRANSLATED_SYMBOL_adjust' /usr/bin/ld: /home/a/asymptote/runtime.in:520: undefined reference to `PRETRANSLATED_SYMBOL_adjust' /usr/bin/ld: /home/a/asymptote/runtime.in:525: undefined reference to `PRETRANSLATED_SYMBOL_linecap' /usr/bin/ld: /home/a/asymptote/runtime.in:530: undefined reference to `PRETRANSLATED_SYMBOL_linecap' /usr/bin/ld: /home/a/asymptote/runtime.in:535: undefined reference to `PRETRANSLATED_SYMBOL_linejoin' /usr/bin/ld: /home/a/asymptote/runtime.in:540: undefined reference to `PRETRANSLATED_SYMBOL_linejoin' /usr/bin/ld: /home/a/asymptote/runtime.in:545: undefined reference to `PRETRANSLATED_SYMBOL_miterlimit' /usr/bin/ld: /home/a/asymptote/runtime.in:550: undefined reference to `PRETRANSLATED_SYMBOL_miterlimit' /usr/bin/ld: /home/a/asymptote/runtime.in:555: undefined reference to `PRETRANSLATED_SYMBOL_linewidth' /usr/bin/ld: /home/a/asymptote/runtime.in:560: undefined reference to `PRETRANSLATED_SYMBOL_linewidth' /usr/bin/ld: /home/a/asymptote/runtime.in:565: undefined reference to `PRETRANSLATED_SYMBOL_fontcommand' /usr/bin/ld: /home/a/asymptote/runtime.in:570: undefined reference to `PRETRANSLATED_SYMBOL_font' /usr/bin/ld: runtime.o: in function `types::formal::formal(types::ty*, sym::symbol, bool, bool)': /home/a/asymptote/types.h:307: undefined reference to `PRETRANSLATED_SYMBOL_lineskip' /usr/bin/ld: runtime.o: in function `trans::gen_runtime_venv(trans::venv&)': /home/a/asymptote/runtime.in:575: undefined reference to `PRETRANSLATED_SYMBOL_fontsize' /usr/bin/ld: /home/a/asymptote/runtime.in:581: undefined reference to `PRETRANSLATED_SYMBOL_fontsize' /usr/bin/ld: /home/a/asymptote/runtime.in:586: undefined reference to `PRETRANSLATED_SYMBOL_lineskip' /usr/bin/ld: /home/a/asymptote/runtime.in:591: undefined reference to `PRETRANSLATED_SYMBOL_overwrite' /usr/bin/ld: /home/a/asymptote/runtime.in:597: undefined reference to `PRETRANSLATED_SYMBOL_overwrite' /usr/bin/ld: /home/a/asymptote/runtime.in:602: undefined reference to `PRETRANSLATED_SYMBOL_basealign' /usr/bin/ld: /home/a/asymptote/runtime.in:607: undefined reference to `PRETRANSLATED_SYMBOL_basealign' /usr/bin/ld: /home/a/asymptote/runtime.in:612: undefined reference to `PRETRANSLATED_SYMBOL_transform' /usr/bin/ld: /home/a/asymptote/runtime.in:617: undefined reference to `PRETRANSLATED_SYMBOL_nib' /usr/bin/ld: /home/a/asymptote/runtime.in:622: undefined reference to `PRETRANSLATED_SYMBOL_makepen' /usr/bin/ld: /home/a/asymptote/runtime.in:627: undefined reference to `PRETRANSLATED_SYMBOL_colorless' /usr/bin/ld: /home/a/asymptote/runtime.in:633: undefined reference to `PRETRANSLATED_SYMBOL_interactive' /usr/bin/ld: /home/a/asymptote/runtime.in:640: undefined reference to `PRETRANSLATED_SYMBOL_uptodate' /usr/bin/ld: /home/a/asymptote/runtime.in:645: undefined reference to `PRETRANSLATED_SYMBOL_system' /usr/bin/ld: /home/a/asymptote/runtime.in:664: undefined reference to `PRETRANSLATED_SYMBOL_asydir' /usr/bin/ld: /home/a/asymptote/runtime.in:675: undefined reference to `PRETRANSLATED_SYMBOL_abort' /usr/bin/ld: /home/a/asymptote/runtime.in:681: undefined reference to `PRETRANSLATED_SYMBOL_exit' /usr/bin/ld: /home/a/asymptote/runtime.in:686: undefined reference to `PRETRANSLATED_SYMBOL_assert' /usr/bin/ld: /home/a/asymptote/runtime.in:697: undefined reference to `PRETRANSLATED_SYMBOL_sleep' /usr/bin/ld: runtime.o: in function `types::formal::formal(types::ty*, sym::symbol, bool, bool)': /home/a/asymptote/types.h:307: undefined reference to `PRETRANSLATED_SYMBOL_microseconds' /usr/bin/ld: runtime.o: in function `trans::gen_runtime_venv(trans::venv&)': /home/a/asymptote/runtime.in:703: undefined reference to `PRETRANSLATED_SYMBOL_usleep' /usr/bin/ld: runtime.o: in function `types::formal::formal(types::ty*, sym::symbol, bool, bool)': /home/a/asymptote/types.h:307: undefined reference to `PRETRANSLATED_SYMBOL_interactivewrite' /usr/bin/ld: /home/a/asymptote/types.h:307: undefined reference to `PRETRANSLATED_SYMBOL_embedded' /usr/bin/ld: runtime.o: in function `trans::gen_runtime_venv(trans::venv&)': /home/a/asymptote/runtime.in:709: undefined reference to `PRETRANSLATED_SYMBOL__eval' /usr/bin/ld: runtime.o: in function `types::formal::formal(types::ty*, sym::symbol, bool, bool)': /home/a/asymptote/types.h:307: undefined reference to `PRETRANSLATED_SYMBOL_embedded' /usr/bin/ld: runtime.o: in function `trans::gen_runtime_venv(trans::venv&)': /home/a/asymptote/runtime.in:722: undefined reference to `PRETRANSLATED_SYMBOL__eval' /usr/bin/ld: /home/a/asymptote/runtime.in:738: undefined reference to `PRETRANSLATED_SYMBOL_xasyKEY' /usr/bin/ld: /home/a/asymptote/runtime.in:745: undefined reference to `PRETRANSLATED_SYMBOL_xasyKEY' /usr/bin/ld: /home/a/asymptote/runtime.in:749: undefined reference to `PRETRANSLATED_SYMBOL_toplocation' /usr/bin/ld: /home/a/asymptote/runtime.in:753: undefined reference to `PRETRANSLATED_SYMBOL_location' /usr/bin/ld: /home/a/asymptote/runtime.in:765: undefined reference to `PRETRANSLATED_SYMBOL_cd' /usr/bin/ld: runtime.o: in function `types::formal::formal(types::ty*, sym::symbol, bool, bool)': /home/a/asymptote/types.h:307: undefined reference to `PRETRANSLATED_SYMBOL_imports' /usr/bin/ld: runtime.o: in function `trans::gen_runtime_venv(trans::venv&)': /home/a/asymptote/runtime.in:776: undefined reference to `PRETRANSLATED_SYMBOL_list' /usr/bin/ld: runtime.o: in function `types::formal::formal(types::ty*, sym::symbol, bool, bool)': /home/a/asymptote/types.h:307: undefined reference to `PRETRANSLATED_SYMBOL_tok' /usr/bin/ld: /home/a/asymptote/types.h:307: undefined reference to `PRETRANSLATED_SYMBOL_spec' /usr/bin/ld: /home/a/asymptote/types.h:307: undefined reference to `PRETRANSLATED_SYMBOL_tin' /usr/bin/ld: /home/a/asymptote/types.h:307: undefined reference to `PRETRANSLATED_SYMBOL_tout' /usr/bin/ld: /home/a/asymptote/types.h:307: undefined reference to `PRETRANSLATED_SYMBOL_zin' /usr/bin/ld: /home/a/asymptote/types.h:307: undefined reference to `PRETRANSLATED_SYMBOL_zout' /usr/bin/ld: runtime.o: in function `trans::gen_runtime_venv(trans::venv&)': /home/a/asymptote/runtime.in:929: undefined reference to `PRETRANSLATED_SYMBOL_dirSpecifier' /usr/bin/ld: /home/a/asymptote/runtime.in:941: undefined reference to `PRETRANSLATED_SYMBOL_controlSpecifier' /usr/bin/ld: /home/a/asymptote/runtime.in:958: undefined reference to `PRETRANSLATED_SYMBOL_tensionSpecifier' /usr/bin/ld: /home/a/asymptote/runtime.in:968: undefined reference to `PRETRANSLATED_SYMBOL_curlSpecifier' /usr/bin/ld: /home/a/asymptote/runtime.in:1035: undefined reference to `PRETRANSLATED_SYMBOL__cputime' /usr/bin/ld: /home/a/asymptote/runtime.in:1150: undefined reference to `PRETRANSLATED_SYMBOL_shiftless' /usr/bin/ld: /home/a/asymptote/runtime.in:1175: undefined reference to `PRETRANSLATED_SYMBOL_xscale' /usr/bin/ld: /home/a/asymptote/runtime.in:1180: undefined reference to `PRETRANSLATED_SYMBOL_yscale' /usr/bin/ld: /home/a/asymptote/runtime.in:1185: undefined reference to `PRETRANSLATED_SYMBOL_scale' /usr/bin/ld: /home/a/asymptote/runtime.in:1190: undefined reference to `PRETRANSLATED_SYMBOL_scale' /usr/bin/ld: /home/a/asymptote/runtime.in:1195: undefined reference to `PRETRANSLATED_SYMBOL_slant' /usr/bin/ld: /home/a/asymptote/runtime.in:1200: undefined reference to `PRETRANSLATED_SYMBOL_rotate' /usr/bin/ld: /home/a/asymptote/runtime.in:1205: undefined reference to `PRETRANSLATED_SYMBOL_reflect' /usr/bin/ld: /home/a/asymptote/runtime.in:1210: undefined reference to `PRETRANSLATED_SYMBOL_isometry' collect2: error: ld returned 1 exit status make: *** [Makefile:126: asy] Error 1 ```

Am I doing something really dumb?

For context, I'm trying to compile asymptote myself, because the version from apt (2.62) doesn't work this file:

import three;
unitsize(1.7cm);
currentprojection = perspective(camera=(5,-10,6), up=Z);
draw(surface(unitsquare), opacity(0.8));

with this command: asy -f png -render=0 problem.asy works fine without opacity(0.8) (different error without -render=0) but i would like to run asymptote with opacity on github actions.

johncbowman commented 2 years ago

You should have done a make clean first; that was the cause of the initial error. At this point, you would be best to start over again in a new directory.

Akuli commented 2 years ago

Thanks! I find it a bit weird to have to run make clean after ./configure, but works.