Re: Compiling swi-prolog 6.2.6 on OpenIndiana

Dmitry Geurkov <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 7/6/13 1:00 AM, Dmitry Geurkov wrote:
> My system is
> SunOS server 5.11 oi_151a6 i86pc i386 i86pc Solaris
>
> When i try to compile swi-prolog 6.2.6 from source i get this error 
> during swipl linking phase
>
>
> rm -f ../lib/i386-solaris2.11/libswipl.a
> ar r ../lib/i386-solaris2.11/libswipl.a pl-atom.o pl-wam.o pl-arith.o 
> pl-bag.o pl-error.o pl-comp.o pl-rc.o pl-dwim.o pl-ext.o pl-flag.o 
> pl-funct.o pl-gc.o pl-privitf.o pl-list.o pl-load.o pl-modul.o pl-op.o 
> pl-prims.o pl-pro.o pl-proc.o pl-prof.o pl-read.o pl-rec.o pl-setup.o 
> pl-sys.o pl-trace.o pl-util.o pl-wic.o pl-write.o pl-term.o 
> pl-thread.o pl-xterm.o pl-beos.o pl-attvar.o pl-gvar.o pl-btree.o 
> pl-init.o pl-gmp.o pl-segstack.o pl-hash.o pl-version.o pl-codetable.o 
> pl-supervisor.o pl-dbref.o pl-termhash.o pl-variant.o pl-copyterm.o 
> pl-debug.o os/pl-buffer.o os/pl-ctype.o os/pl-file.o os/pl-files.o 
> os/pl-glob.o os/pl-os.o os/pl-stream.o os/pl-string.o os/pl-table.o 
> os/pl-text.o os/pl-utf8.o os/pl-fmt.o os/pl-dtoa.o os/pl-option.o 
> os/pl-cstack.o os/pl-codelist.o os/pl-prologflag.o os/pl-rl.o 
> os/pl-tai.o rc/access.o rc/build.o rc/html.o rc/util.o 
> libtai/caltime_utc.o libtai/caltime_tai.o libtai/leapsecs_sub.o 
> libtai/leapsecs_add.o libtai/caldate_fmjd.o libtai/caldate_mjd.o 
> libtai/leapsecs_init.o libtai/leapsecs_read.o libtai/tai_pack.o 
> libtai/tai_unpack.o
> ar: creating ../lib/i386-solaris2.11/libswipl.a
> ranlib ../lib/i386-solaris2.11/libswipl.a
> gcc -rdynamic -lc -O2 -pthread   -o swipl pl-main.o 
> -L../lib/i386-solaris2.11 -lswipl -lrt -lreadline -lncursesw -lm -lrt -ldl
> Undefined                       first referenced
>  symbol                             in file
> getwd ../lib/i386-solaris2.11/libswipl.a(pl-os.o)  (symbol scope 
> specifies local binding)
> ld: fatal: symbol referencing errors. No output written to swipl
> collect2: ld returned 1 exit status
>
> I've tried linking it with -lc option but still getting the same error
It seems that removing 3 lines starting from line 1516 in ./src/os/pl-os.c

   #if defined(HAVE_GETWD) && (defined(__sun__) || defined(__sun))
   #undef HAVE_GETCWD
   #endif

Solved my compilation problem




-------------- next part --------------
HTML attachment scrubbed and removed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3367 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.iai.uni-bonn.de/pipermail/swi-prolog/attachments/20130706/67e2641c/attachment.bin>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.