On 2/21/19 2:15 PM, Pierre Labastie via blfs-dev wrote:
Hi,
With GC-8.0.2, I get:
--------------
if test -n ""; then \
g++ -Wall -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -DUSEGC
-pthread -DF
FTWPP_SINGLE_THREAD -I/opt/texlive/2018/include/gc -I/usr/include/gc
-I/usr/inc
lude/tirpc -std=c++11 -g -O3 -fno-var-tracking -o asy camperror.o path.o
drawpat
h.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
runpictur
e.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 v
arinit.o fundec.o refaccess.o envcompleter.o process.o constructor.o
array.o Del
aunay.o predicates.o PRCbitStream.o oPRCFile.o PRCdouble.o writePRC.o
glrender.o
tr.o arcball.o algebra3.o quaternion.o main.o revision.o asy.o
-lOSMesa -lgl
ut -lGLU -lGL -lfftw3 -ltirpc -lreadline -lrt -lsigsegv -lz -lm
-L/opt/texlive/2
018/lib -lgc -ltermcap -s -static; \
else \
ln -sf GUI/xasy.py xasy; \
g++ -Wall -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -DUSEGC -pthread
-DFFTWPP_SI
NGLE_THREAD -I/opt/texlive/2018/include/gc -I/usr/include/gc
-I/usr/include/tirpc -std=c++11 -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
arcball.o algebra3.o quaternion.o main.o revision.o -lOSMesa -lglut
-lGLU -lGL -lfftw3 -ltirpc -lreadline -lrt -lsigsegv -lz -lm
-L/opt/texlive/2018/lib -lgc -lncurses ; \
fi
/usr/bin/ld: picture.o: in function `operator new(unsigned long,
GCPlacement, void (*)(void*, void*), void*)':
/usr/include/gc/gc_cpp.h:545: undefined reference to `GC_throw_bad_alloc()'
/usr/bin/ld: settings.o: in function `operator new(unsigned long,
GCPlacement, void (*)(void*, void*), void*)':
/usr/include/gc/gc_cpp.h:545: undefined reference to `GC_throw_bad_alloc()'
/usr/bin/ld: /usr/include/gc/gc_cpp.h:545: undefined reference to
`GC_throw_bad_alloc()'
/usr/bin/ld: settings.o: in function `gc::operator new(unsigned long)':
/usr/include/gc/gc_cpp.h:410: undefined reference to `GC_throw_bad_alloc()'
/usr/bin/ld: /usr/include/gc/gc_cpp.h:410: undefined reference to
`GC_throw_bad_alloc()'
/usr/bin/ld: settings.o:/usr/include/gc/gc_cpp.h:410: more undefined
references to `GC_throw_bad_alloc()' follow
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:114: asy] Error 1
---------------
There is a commit:
https://github.com/vectorgraphics/asymptote/commit/38a59370dc5ac720c29e1424614a10f7384b943f
This can be done with a sed:
sed -i '$a\
#ifdef USEGC\
GC_API void GC_CALL GC_throw_bad_alloc() {\
std::bad_alloc();\
}\
#endif' main.cc
I'll commit that if nobody objects
My first reaction was to ask where the sed is applied. Perhaps
cat >> main.cc << EOF
#ifdef USEGC
GC_API void GC_CALL GC_throw_bad_alloc() {
std::bad_alloc();
}
#endif
EOF
would be more obvious.
-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page