[PPL-devel] [Yap-users] Interfacing Yap with a C++ library

Roberto Bagnara bagnara at cs.unipr.it
Tue Nov 21 18:15:22 CET 2006


Vitor Santos Costa wrote:
> Would it be possible for you to try
> 
> www.cos.ufrj.br/~vitor/Yap-5.1.2-small.tar.gz
> 
> and see if the problem still remains?

Dear Vitor,

the version in the tarfile you provided fails in `make install'
as follows:

...
make[1]: Leaving directory `/usr/local/distrib/Yap-5.1.2/LGPL/clpr'
(cd LGPL/chr ; make install)
make[1]: Entering directory `/usr/local/distrib/Yap-5.1.2/LGPL/chr'
"../../yap" -l chr_swi_bootstrap.yap \
                       -g "chr_compile_step1('chr_translate_bootstrap1.chr','chr_translate_bootstrap1.pl'),halt." \
                       -z 'halt(1).'
../../yap: error while loading shared libraries: libYap.so: cannot open shared object file: No such file or directory
make[1]: *** [chr_translate_bootstrap1.pl] Error 127
make[1]: Leaving directory `/usr/local/distrib/Yap-5.1.2/LGPL/chr'
make: *** [install_data] Error 2

By setting LD_LIBRARY_PATH I was able to let it find the just-generated
libYap.so shared object.

After this, I could run all our regression test programs without any problem.
So the problem that forced us to always configure with --enable-debug-yap
seems solved.  Moreover, with that version, everything works also if the
--enable-dynamic-loading configure option is omitted.

The problem whereby it is not possible to switch off optimizations when
compiling YAP is, however, still there: by configuring with

     CFLAGS="-g" ./configure --enable-dynamic-loading

I obtain

...
ld -shared -export-dynamic -o libYap.so agc.o absmi.o adtdefs.o alloc.o amasm.o analyst.o arrays.o arith0.o arith1.o arith2.o attvar.o bignum.o bb.o cdmgr.o cmppreds.o compiler.o computils.o corout.o cut_c.o dbase.o dlmalloc.o errors.o eval.o exec.o globals.o gprof.o grow.o heapgc.o index.o init.o  inlines.o iopreds.o depth_bound.o mavar.o myddas_mysql.o myddas_odbc.o myddas_shared.o myddas_initialization.o myddas_util.o myddas_statistics.o myddas_top_level.o modules.o other.o parser.o readutil.o save.o scanner.o sort.o stdpreds.o sysbits.o threads.o tracer.o unify.o userpreds.o utilpreds.o write.o ypsocks.o ypstdio.o  load_foreign.o load_dl.o load_dld.o load_dyld.o load_none.o load_aout.o load_aix.o load_dll.o 
load_shl.o c_interface.o opt.memory.o opt.misc.o opt.init.o opt.preds.o or.engine.o or.cowengine.o or.sbaengine.o or.scheduler.o or.cut.o tab.tries.o tab.suspend.o eamamasm.o eam_showcode.o eamindex.o eam_am.o  -lgmp -lreadline -lncurses -ltermcap -lm  -ldl -lnsl
gcc  -rdynamic  -Wl,-R,NONE/lib -o yap yap.o libYap.so -lgmp -lreadline -lncurses -ltermcap -lm  -ldl -lnsl
/usr/bin/ld: yap: hidden symbol `stat' in /usr/lib64/libc_nonshared.a(stat.oS) is referenced by DSO
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make: *** [yap] Error 1

All the best,

    Roberto

-- 
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara at cs.unipr.it



More information about the PPL-devel mailing list