Re: Users-prolog Digest, Vol 109, Issue 1

Daniel Diaz <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
Hi Duncan,

thank you for the account on your machine (passwd changed).


Le 03/07/2012 09:31, Duncan Patton a Campbell a écrit :
> Hi Daniel.
>
> ...
>
>>
>> I have increased some static data so maybe there is not enough memory on your machine.
>> Could you try decreasing some stack size. For instance:
>>
>>     export TRAILSZ=10000
>>     export GLOBALSZ=20000
>>
>> (use setenv under csh/tcsh)
>>
>> then:
>>
>>     make
>>
>> Is it better ?
> Yes.  I'm now able to compile on OBSD 386, but the same code will
> not compile and produces the same errors.
Not very clear.. Does gprolog-1.4.1 work now correctly ?
>>> also, on OBSD/AMD64 I get the following when compiling an interpreter
>>> with some additional stuff (that compiles ok on all previous versions)
>>> ....
>>> /tmp/gplcb0nBYB.o(.text+0x7c): In function `darea':
>>> /usr/local/gprolog/Dlib/imacd.c:18: warning: sprintf() is often misused, please use snprintf()
>>> /tmp/gplcrtG2bt.o(.text+0x11): In function `predicate(spliton/4)':
>>> : undefined reference to `Pl_Get_Current_Choice'
>>> /tmp/gplcrtG2bt.o(.text+0x121): In function `predicate(chop_str/3)':
>>> : undefined reference to `Pl_Get_Current_Choice'
>>> /tmp/gplcrtG2bt.o(.text+0x281): In function `predicate(matchRci/3)':
>>> : undefined reference to `Pl_Get_Current_Choice'
>>> /tmp/gplcrtG2bt.o(.text+0x491): In function `predicate(spliton_ci/4)':
>>> : undefined reference to `Pl_Get_Current_Choice'
>>> /tmp/gplcrtG2bt.o(.text+0x5a1): In function `predicate(chop_str_ci/3)':
>>> : undefined reference to `Pl_Get_Current_Choice'
>>> /tmp/gplcrtG2bt.o(.text+0x701): more undefined references to `Pl_Get_Current_Choice' follow
>>> collect2: ld returned 1 exit status
>>> compilation failed
>>> gmake: *** [dpro] Error 1
>>>
>>> This could of course be related to my not having the latest OS revs loaded.
>> This is a new function (when implementing soft-cut I have modified deeply the code handling cut). However, there is nothing architecture-dependent in this code. The function is defined in EnginePl/wam_inst.c (thus in wam_inst.o and lib engine_pl.a)
>>
>> Can you please:
>>
>>     make distclean
>>     ./configure --disable-regs --with-c-flags=debug
>>
>> When you obtain the error, could you check if the symbol is defined in the library ?
>>
>>     cd EnginePl
>>     nm -gop libengine_pl.a | grep Pl_Get_Current_Choice
>>
>> you should obtains something like
>>
>>     libengine_pl.a:wam_inst.o:0000000000001570 T Pl_Get_Current_Choice
> Yes.  it is there.  which might imply some kind of linking error in OBSD,
> except that you say this is new functionality for cut.
>
> The code that won't compile is in /usr/local/gprolog/Dlib/dlib.pl, the Makefile
> and some c-stuff that gets linked is in there too.

I suspect there is a confusion (mix) between libs from 1.4.0 and 1.4.1.
I have tried to compile your code (Dlib), recompiling my own version 
(installed in my home) and using gprolog-1.4.1 (installed in 
/usr/local/gprolog-1.4.1).
Both work. To try for instance:

$ PATH=usr/local/gprolog-1.4.1/bin:$PATH
$ cd Dlib/
$ make clean
rm -f dpro
$ make
gplc  dpro.pl  /usr/local/gprolog/Dlib/distance-0.1/src/*.c 
/usr/local/gprolog/Dlib/distance-0.1/src/*.pl 
/usr/local/gprolog/Dlib/dlib.pl /usr/local/gprolog/Dlib/dfile.pl 
/usr/local/gprolog/Dlib/dfile.c /usr/local/gprolog/Dlib/imacd.c 
/usr/local/gprolog/Dlib/imacd.pl 
/usr/local/gprolog/Dlib/Psql/mysql-cg.pl 
/usr/local/gprolog/Dlib/Psql/mysql-cg.c  -C '-g -Wall 
-I/usr/local/include/mysql ' -L '-L/usr/local/lib/mysql -lmysqlclient -lz'
/usr/local/gprolog/Dlib/distance-0.1/src/distance_natif.c: In function 
'dist_leven_chaine':
/usr/local/gprolog/Dlib/distance-0.1/src/distance_natif.c:47: warning: 
operation on 'i' may be undefined
/usr/local/gprolog/Dlib/dfile.c: In function 'stdin2file':
/usr/local/gprolog/Dlib/dfile.c:64: warning: suggest parentheses around 
assignment used as truth value
/usr/local/gprolog/Dlib/dfile.c: In function 'in2file':
/usr/local/gprolog/Dlib/dfile.c:101: warning: suggest parentheses around 
assignment used as truth value
/usr/local/gprolog/Dlib/dfile.c:101: warning: value computed is not used
/usr/local/gprolog/Dlib/dfile.c: In function 'set_exitime':
/usr/local/gprolog/Dlib/dfile.c:166: warning: passing argument 2 of 
'signal' from incompatible pointer type
/usr/local/gprolog/Dlib/dfile.c:169: warning: passing argument 2 of 
'signal' from incompatible pointer type
/usr/local/gprolog/Dlib/Psql/mysql-cg.c: In function 'sql_query':
/usr/local/gprolog/Dlib/Psql/mysql-cg.c:144: warning: passing argument 4 
of 'Pl_Emit_Syntax_Error' discards qualifiers from pointer target type
/usr/local/gprolog/Dlib/Psql/mysql-cg.c: In function 'sql_store_query':
/usr/local/gprolog/Dlib/Psql/mysql-cg.c:229: warning: passing argument 4 
of 'Pl_Emit_Syntax_Error' discards qualifiers from pointer target type
/dmnt/ds2a/local/gprolog-1.4.1/lib/libbips_pl.a(stream_supp.o)(.text+0x1da0): 
In function `Pl_Stream_Printf':
: warning: vsprintf() is often misused, please use vsnprintf()
/usr/local/lib/mysql/libmysqlclient.so.21.0: warning: stpcpy() is 
dangerous GNU crap; don't use it
/usr/local/lib/mysql/libmysqlclient.so.21.0: warning: strcpy() is almost 
always misused, please use strlcpy()
/tmp/gplcsNiSYB.o(.text+0x7c): In function `darea':
/usr/local/gprolog/Dlib/imacd.c:18: warning: sprintf() is often misused, 
please use snprintf()
$ ./dpro
GNU Prolog 1.4.1
By Daniel Diaz
Copyright (C) 1999-2012 Daniel Diaz
| ?-

If you want to test with my own version set:

$ PATH=/home/danieldiaz/GP/src/src/TopComp/:$PATH

(then make clean; make)

NB: gplc uses PATH to find from where it has been launched (following 
links) and thus where is its install directory. It then use this install 
directory to find its libraries.
I thinks there is a confusion here. You can try using gplc -v flag 
(verbose) to show which directories are used.

>> If you don't find a solution, could you give ma an access to your machine(s) (via ssh). With this I could fix the problem.
> My AMD64 box is 96.52.224.136, there is a danieldiaz/zaidleinad user/pass on it now.
> Please login and change it when you get this.  If you need access to the '386
> let me know.
I'd be happy to also have an access to the ix86 machine (same login+pd).

Thank you

Daniel
>
> Thanks,
>
> Dhu
>
>
>> Daniel
>>
>>
>>
>>> Dhu
>>>
>>>
>>> On Fri, 29 Jun 2012 12:00:36 -0400
>>> [email protected] wrote:
>>>
>>>> Send Users-prolog mailing list submissions to
>>>> 	[email protected]
>>>>
>>>> To subscribe or unsubscribe via the World Wide Web, visit
>>>> 	https://lists.gnu.org/mailman/listinfo/users-prolog
>>>> or, via email, send a message with subject or body 'help' to
>>>> 	[email protected]
>>>>
>>>> You can reach the person managing the list at
>>>> 	[email protected]
>>>>
>>>> When replying, please edit your Subject line so it is more specific
>>>> than "Re: Contents of Users-prolog digest..."
>>>>
>>>>
>>>> Today's Topics:
>>>>
>>>>    1. GNU Prolog 1.4.1 is released (Daniel Diaz)
>>>>
>>>>
>>>> ----------------------------------------------------------------------
>>>>
>>>> Message: 1
>>>> Date: Fri, 29 Jun 2012 16:41:31 +0200
>>>> From: Daniel Diaz <[email protected]>
>>>> To: gnu prolog mailling list <[email protected]>
>>>> Subject: GNU Prolog 1.4.1 is released
>>>> Message-ID: <[email protected]>
>>>> Content-Type: text/plain; charset="us-ascii"
>>>>
>>>> An HTML attachment was scrubbed...
>>>> URL: <http://lists.gnu.org/archive/html/users-prolog/attachments/20120629/c6851780/attachment.html>
>>>>
>>>> ------------------------------
>>>>
>>>> _______________________________________________
>>>> Users-prolog mailing list
>>>> [email protected]
>>>> https://lists.gnu.org/mailman/listinfo/users-prolog
>>>>
>>>>
>>>> End of Users-prolog Digest, Vol 108, Issue 8
>>>> ********************************************
>>>
>>> -- 
>>> Ne obliviscaris, vix ea nostro voco.
>>>
>>> _______________________________________________
>>> Users-prolog mailing list
>>> [email protected]
>>> https://lists.gnu.org/mailman/listinfo/users-prolog
>>>
>>> -- 
>>> Ce message a ete verifie par MailScanner
>>> pour des virus ou des polluriels et rien de
>>> suspect n'a ete trouve.
>>>
>>


-- 
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.
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.