CHR & cygwin problem.

View: New views
8 Messages — Rating Filter:   Alert me  

CHR & cygwin problem.

by Pablo Beltran :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

CHR doesn't can be loaded in a Cygwin environment.

See the details below.

Best regards,
Pablo.

$ yap
YAP version Yap-5.1.3
   ?- use_module(library(chr)).
 % reconsulting /usr/local/share/Yap/chr.yap...
 % including /usr/local/share/Yap/chr.pl...
     ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 47.
     PERMISSION ERROR- consult: modifying static procedure lists:nth/3
     ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 55.
     PERMISSION ERROR- consult: modifying static procedure lists:substitute/4
     ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 63.
     PERMISSION ERROR- consult: modifying static procedure lists:substitute/4
     ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 147.
     PERMISSION ERROR- consult: modifying static procedure lists:sublist/2
     ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 150.
     PERMISSION ERROR- consult: modifying static procedure lists:sublist/2
     ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 158.
     PERMISSION ERROR- consult: modifying static procedure lists:min_list/2
 % /usr/local/share/Yap/chr.pl included in module user, 1996 msec 3070008 bytes
 % reconsulted /usr/local/share/Yap/chr.yap in module chr, 2121 msec 3273136 byt                                                                             es
yes


------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

Re: CHR & cygwin problem.

by Pablo Beltran :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Similar issue occurs in the win32 distribution:

% Restoring file C:/programs/upversion/Yap/lib/startup
YAP version Yap-5.1.3
   ?- use_module(library(chr)).
 % reconsulting C:\programs\upversion\Yap\share\chr.pl...
     ERROR!!  at file C:\programs\upversion\Yap\share\chr\hprolog.pl, near line
157.
     PERMISSION ERROR- consult: modifying static procedure lists:sublist/2
     ERROR!!  at file C:\programs\upversion\Yap\share\chr\hprolog.pl, near line
161.
     PERMISSION ERROR- consult: modifying static procedure lists:sublist/2
 % reconsulted C:\programs\upversion\Yap\share\chr.pl in module chr, 2075 msec 3
062576 bytes
yes

Best regards,
Pablo.

2009/1/12 Pablo Beltran <pbeltranl@...>
Hi,

CHR doesn't can be loaded in a Cygwin environment.

See the details below.

Best regards,
Pablo.

$ yap
YAP version Yap-5.1.3
   ?- use_module(library(chr)).
 % reconsulting /usr/local/share/Yap/chr.yap...
 % including /usr/local/share/Yap/chr.pl...
     ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 47.
     PERMISSION ERROR- consult: modifying static procedure lists:nth/3
     ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 55.
     PERMISSION ERROR- consult: modifying static procedure lists:substitute/4
     ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 63.
     PERMISSION ERROR- consult: modifying static procedure lists:substitute/4
     ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 147.
     PERMISSION ERROR- consult: modifying static procedure lists:sublist/2
     ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 150.
     PERMISSION ERROR- consult: modifying static procedure lists:sublist/2
     ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 158.
     PERMISSION ERROR- consult: modifying static procedure lists:min_list/2
 % /usr/local/share/Yap/chr.pl included in module user, 1996 msec 3070008 bytes
 % reconsulted /usr/local/share/Yap/chr.yap in module chr, 2121 msec 3273136 byt                                                                             es
yes



------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

Re: CHR & cygwin problem.

by Vitor Santos Costa-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Pablo

There was a bug in Windows version of yap2swi that I fixed. The git
master branch should be ok now.

Don't worry too much about the warning messages, CHR was originally
developed for SWI and it assumes some stuf is in places where they are
not :) As long as it compiles to the end it should be ok.

Cheers

Vitor

2009/1/12 Pablo Beltran <pbeltranl@...>:

> Hi,
>
> CHR doesn't can be loaded in a Cygwin environment.
>
> See the details below.
>
> Best regards,
> Pablo.
>
> $ yap
> YAP version Yap-5.1.3
>    ?- use_module(library(chr)).
>  % reconsulting /usr/local/share/Yap/chr.yap...
>  % including /usr/local/share/Yap/chr.pl...
>      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 47.
>      PERMISSION ERROR- consult: modifying static procedure lists:nth/3
>      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 55.
>      PERMISSION ERROR- consult: modifying static procedure
> lists:substitute/4
>      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 63.
>      PERMISSION ERROR- consult: modifying static procedure
> lists:substitute/4
>      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 147.
>      PERMISSION ERROR- consult: modifying static procedure lists:sublist/2
>      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 150.
>      PERMISSION ERROR- consult: modifying static procedure lists:sublist/2
>      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 158.
>      PERMISSION ERROR- consult: modifying static procedure lists:min_list/2
>  % /usr/local/share/Yap/chr.pl included in module user, 1996 msec 3070008
> bytes
>  % reconsulted /usr/local/share/Yap/chr.yap in module chr, 2121 msec 3273136
> byt
> es
> yes
>
>
> ------------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It is the best place to buy or sell services for
> just about anything Open Source.
> http://p.sf.net/sfu/Xq1LFB
> _______________________________________________
> Yap-users mailing list
> Yap-users@...
> https://lists.sourceforge.net/lists/listinfo/yap-users
>
>

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

Re: CHR & cygwin problem.

by Pablo Beltran :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Victor,

I get an error during Yap making:

================================================================================================================
gcc -c -march=i686 -DBP_FREE -fno-gcse -fno-crossjumping -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DHAVE_CONFIG_H -I. -I../H -I../OPTYap -I../BEAM -I../MYDDAS -I../include  ../library/yap2swi/yap2swi.c  -o yap2swi.o
../library/yap2swi/yap2swi.c: In function `S__fillbuf':
../library/yap2swi/yap2swi.c:2425: error: storage size of 'time' isn't known
../library/yap2swi/yap2swi.c:2438: warning: implicit declaration of function `select'
../library/yap2swi/yap2swi.c:2425: warning: unused variable `time'
make: *** [yap2swi.o] Error 1

================================================================================================================

This are the steps that I've followed:

1)  I've downloaded Yap from the CVS repository:

cvs -z3 -d:pserver:yap.anonymous@...:/cvsroot/yap co .

2) ../configure --enable-coroutining --enable-max-performance --enable-cygwin=yes && make

Best regards,
Pablo.

2009/1/14 Vitor Santos Costa <vscosta@...>
Hi Pablo

There was a bug in Windows version of yap2swi that I fixed. The git
master branch should be ok now.

Don't worry too much about the warning messages, CHR was originally
developed for SWI and it assumes some stuf is in places where they are
not :) As long as it compiles to the end it should be ok.

Cheers

Vitor

2009/1/12 Pablo Beltran <pbeltranl@...>:
> Hi,
>
> CHR doesn't can be loaded in a Cygwin environment.
>
> See the details below.
>
> Best regards,
> Pablo.
>
> $ yap
> YAP version Yap-5.1.3
>    ?- use_module(library(chr)).
>  % reconsulting /usr/local/share/Yap/chr.yap...
>  % including /usr/local/share/Yap/chr.pl...
>      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 47.
>      PERMISSION ERROR- consult: modifying static procedure lists:nth/3
>      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 55.
>      PERMISSION ERROR- consult: modifying static procedure
> lists:substitute/4
>      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 63.
>      PERMISSION ERROR- consult: modifying static procedure
> lists:substitute/4
>      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 147.
>      PERMISSION ERROR- consult: modifying static procedure lists:sublist/2
>      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 150.
>      PERMISSION ERROR- consult: modifying static procedure lists:sublist/2
>      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 158.
>      PERMISSION ERROR- consult: modifying static procedure lists:min_list/2
>  % /usr/local/share/Yap/chr.pl included in module user, 1996 msec 3070008
> bytes
>  % reconsulted /usr/local/share/Yap/chr.yap in module chr, 2121 msec 3273136
> byt
> es
> yes
>
>
> ------------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It is the best place to buy or sell services for
> just about anything Open Source.
> http://p.sf.net/sfu/Xq1LFB
> _______________________________________________
> Yap-users mailing list
> Yap-users@...
> https://lists.sourceforge.net/lists/listinfo/yap-users
>
>


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

Re: CHR & cygwin problem.

by Vitor Santos Costa-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Pablo

Can you please try the current version at:

http://gitorious.org/projects/yap-git

This should fix that bug (it was fixed a few days ago, after your
message). It compiled CHR.

I have been trying not to advertise it until I have had a stable home
for git-yap, but it is taking longer that what I had hoped,

Thanks!

Vitor

On Thu, Jan 15, 2009 at 12:14 AM, Pablo Beltran <pbeltranl@...> wrote:

> Hi Victor,
>
> I get an error during Yap making:
>
> ================================================================================================================
> gcc -c -march=i686 -DBP_FREE -fno-gcse -fno-crossjumping -O3
> -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes
> -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DHAVE_CONFIG_H -I.
> -I../H -I../OPTYap -I../BEAM -I../MYDDAS -I../include
> ../library/yap2swi/yap2swi.c  -o yap2swi.o
> ../library/yap2swi/yap2swi.c: In function `S__fillbuf':
> ../library/yap2swi/yap2swi.c:2425: error: storage size of 'time' isn't known
> ../library/yap2swi/yap2swi.c:2438: warning: implicit declaration of function
> `select'
> ../library/yap2swi/yap2swi.c:2425: warning: unused variable `time'
> make: *** [yap2swi.o] Error 1
> ================================================================================================================
>
> This are the steps that I've followed:
>
> 1)  I've downloaded Yap from the CVS repository:
>
> cvs -z3 -d:pserver:yap.anonymous@...:/cvsroot/yap co .
>
> 2) ../configure --enable-coroutining --enable-max-performance
> --enable-cygwin=yes && make
>
> Best regards,
> Pablo.
>
> 2009/1/14 Vitor Santos Costa <vscosta@...>
>>
>> Hi Pablo
>>
>> There was a bug in Windows version of yap2swi that I fixed. The git
>> master branch should be ok now.
>>
>> Don't worry too much about the warning messages, CHR was originally
>> developed for SWI and it assumes some stuf is in places where they are
>> not :) As long as it compiles to the end it should be ok.
>>
>> Cheers
>>
>> Vitor
>>
>> 2009/1/12 Pablo Beltran <pbeltranl@...>:
>> > Hi,
>> >
>> > CHR doesn't can be loaded in a Cygwin environment.
>> >
>> > See the details below.
>> >
>> > Best regards,
>> > Pablo.
>> >
>> > $ yap
>> > YAP version Yap-5.1.3
>> >    ?- use_module(library(chr)).
>> >  % reconsulting /usr/local/share/Yap/chr.yap...
>> >  % including /usr/local/share/Yap/chr.pl...
>> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 47.
>> >      PERMISSION ERROR- consult: modifying static procedure lists:nth/3
>> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 55.
>> >      PERMISSION ERROR- consult: modifying static procedure
>> > lists:substitute/4
>> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 63.
>> >      PERMISSION ERROR- consult: modifying static procedure
>> > lists:substitute/4
>> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 147.
>> >      PERMISSION ERROR- consult: modifying static procedure
>> > lists:sublist/2
>> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 150.
>> >      PERMISSION ERROR- consult: modifying static procedure
>> > lists:sublist/2
>> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 158.
>> >      PERMISSION ERROR- consult: modifying static procedure
>> > lists:min_list/2
>> >  % /usr/local/share/Yap/chr.pl included in module user, 1996 msec
>> > 3070008
>> > bytes
>> >  % reconsulted /usr/local/share/Yap/chr.yap in module chr, 2121 msec
>> > 3273136
>> > byt
>> > es
>> > yes
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Check out the new SourceForge.net Marketplace.
>> > It is the best place to buy or sell services for
>> > just about anything Open Source.
>> > http://p.sf.net/sfu/Xq1LFB
>> > _______________________________________________
>> > Yap-users mailing list
>> > Yap-users@...
>> > https://lists.sourceforge.net/lists/listinfo/yap-users
>> >
>> >
>
>

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

Parent Message unknown Re: CHR & cygwin problem.

by Vitor Santos Costa-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Pablo

The file shouldn't have those many lines. Are you sure you did

cd mainline

after doing the git?

Thanks

Vitor

On Fri, Jan 16, 2009 at 1:12 AM, Pablo Beltran <pbeltranl@...> wrote:

> Hi Vitor,
>
> I get the same error:
>
> ===========================================================================================================
> gcc -c -march=i686 -DBP_FREE -fno-gcse -fno-crossjumping -O3
> -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes
> -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DHAVE_CONFIG_H -I.
> -I../H -I../OPTYap -I../BEAM -I../MYDDAS -I../include
> ../library/yap2swi/yap2swi.c  -o yap2swi.o
> ../library/yap2swi/yap2swi.c: In function `S__fillbuf':
> ../library/yap2swi/yap2swi.c:2430: error: storage size of 'time' isn't known
> ../library/yap2swi/yap2swi.c:2443: warning: implicit declaration of function
> `select'
> ../library/yap2swi/yap2swi.c:2430: warning: unused variable `time'
> make: *** [yap2swi.o] Error 1
> ===========================================================================================================
>
> This time, I've installed git on my Cygwin and downloaded the mainline
> following your link:
>
> $ git clone git://gitorious.org/yap-git/mainline.git
>
> then
>
> $ ../configure --enable-coroutining --enable-max-performance
> --enable-cygwin=yes
>
> -----------------------------------
>
> I've found the timeval struct defined in the "/usr/include/sys/time.h" file.
>
> ===================
> #ifndef _WINSOCK_H
> struct timeval {
>   time_t      tv_sec;
>   suseconds_t tv_usec;
> };
> ...
> ==================
>
> I'm not  C expert but examining the code seems like yap2swi.c includes
> "SWI-Prolog.h" which has:
>
> ===============
> #if HAVE_TIME_H
> #include <time.h>
> #endif
> ==============
>
> Then, I looked for HAVE_TIME_H in the config.log and I've found:
>
> ======================
> #define HAVE_TIME_H 1
> ======================
>
> and
>
> ========================
> #define HAVE_WINSOCK_H 1
> ========================
>
> Therefore, I think time.h is rightly included(HAVE_TIME == 1) but  timeval
> is not defined because WINSOCK_H is present (==1).
>
> Maybe I'm telling some stupidity but I don't look inside C code internals
> since a lot of years. If this is the case then I want to apologise.
>
> Maybe my config.log reveals some environment difference. I send it to you.
>
> Best regards,
> Pablo.
>
>
>
>
> 2009/1/16 Vitor Santos Costa <vscosta@...>
>>
>> Hi Pablo
>>
>> Can you please try the current version at:
>>
>> http://gitorious.org/projects/yap-git
>>
>> This should fix that bug (it was fixed a few days ago, after your
>> message). It compiled CHR.
>>
>> I have been trying not to advertise it until I have had a stable home
>> for git-yap, but it is taking longer that what I had hoped,
>>
>> Thanks!
>>
>> Vitor
>>
>> On Thu, Jan 15, 2009 at 12:14 AM, Pablo Beltran <pbeltranl@...>
>> wrote:
>> > Hi Victor,
>> >
>> > I get an error during Yap making:
>> >
>> >
>> > ================================================================================================================
>> > gcc -c -march=i686 -DBP_FREE -fno-gcse -fno-crossjumping -O3
>> > -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes
>> > -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DHAVE_CONFIG_H -I.
>> > -I../H -I../OPTYap -I../BEAM -I../MYDDAS -I../include
>> > ../library/yap2swi/yap2swi.c  -o yap2swi.o
>> > ../library/yap2swi/yap2swi.c: In function `S__fillbuf':
>> > ../library/yap2swi/yap2swi.c:2425: error: storage size of 'time' isn't
>> > known
>> > ../library/yap2swi/yap2swi.c:2438: warning: implicit declaration of
>> > function
>> > `select'
>> > ../library/yap2swi/yap2swi.c:2425: warning: unused variable `time'
>> > make: *** [yap2swi.o] Error 1
>> >
>> > ================================================================================================================
>> >
>> > This are the steps that I've followed:
>> >
>> > 1)  I've downloaded Yap from the CVS repository:
>> >
>> > cvs -z3 -d:pserver:yap.anonymous@...:/cvsroot/yap co .
>> >
>> > 2) ../configure --enable-coroutining --enable-max-performance
>> > --enable-cygwin=yes && make
>> >
>> > Best regards,
>> > Pablo.
>> >
>> > 2009/1/14 Vitor Santos Costa <vscosta@...>
>> >>
>> >> Hi Pablo
>> >>
>> >> There was a bug in Windows version of yap2swi that I fixed. The git
>> >> master branch should be ok now.
>> >>
>> >> Don't worry too much about the warning messages, CHR was originally
>> >> developed for SWI and it assumes some stuf is in places where they are
>> >> not :) As long as it compiles to the end it should be ok.
>> >>
>> >> Cheers
>> >>
>> >> Vitor
>> >>
>> >> 2009/1/12 Pablo Beltran <pbeltranl@...>:
>> >> > Hi,
>> >> >
>> >> > CHR doesn't can be loaded in a Cygwin environment.
>> >> >
>> >> > See the details below.
>> >> >
>> >> > Best regards,
>> >> > Pablo.
>> >> >
>> >> > $ yap
>> >> > YAP version Yap-5.1.3
>> >> >    ?- use_module(library(chr)).
>> >> >  % reconsulting /usr/local/share/Yap/chr.yap...
>> >> >  % including /usr/local/share/Yap/chr.pl...
>> >> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 47.
>> >> >      PERMISSION ERROR- consult: modifying static procedure
>> >> > lists:nth/3
>> >> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 55.
>> >> >      PERMISSION ERROR- consult: modifying static procedure
>> >> > lists:substitute/4
>> >> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 63.
>> >> >      PERMISSION ERROR- consult: modifying static procedure
>> >> > lists:substitute/4
>> >> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 147.
>> >> >      PERMISSION ERROR- consult: modifying static procedure
>> >> > lists:sublist/2
>> >> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 150.
>> >> >      PERMISSION ERROR- consult: modifying static procedure
>> >> > lists:sublist/2
>> >> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 158.
>> >> >      PERMISSION ERROR- consult: modifying static procedure
>> >> > lists:min_list/2
>> >> >  % /usr/local/share/Yap/chr.pl included in module user, 1996 msec
>> >> > 3070008
>> >> > bytes
>> >> >  % reconsulted /usr/local/share/Yap/chr.yap in module chr, 2121 msec
>> >> > 3273136
>> >> > byt
>> >> > es
>> >> > yes
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > ------------------------------------------------------------------------------
>> >> > Check out the new SourceForge.net Marketplace.
>> >> > It is the best place to buy or sell services for
>> >> > just about anything Open Source.
>> >> > http://p.sf.net/sfu/Xq1LFB
>> >> > _______________________________________________
>> >> > Yap-users mailing list
>> >> > Yap-users@...
>> >> > https://lists.sourceforge.net/lists/listinfo/yap-users
>> >> >
>> >> >
>> >
>> >
>
>

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

Re: CHR & cygwin problem.

by Pablo Beltran :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Vitor,

Yes, I did the cd mainline. Definitely my previous mail is not a complete list of commands that I executed.

Good news are that now I've downloaded the mainline again and it compiles!!!!. Therefore if no changes has been commited since yesterday then I made some mistake building Yap at first time.

Now I've new problems running CHR on Yap:

First is:

?-use_module(library(chr))

     ERROR!! [Thread 0 ]
     PERMISSION ERROR- use_module(user:library(chr)): cannot read from library(chr)

The reason is that chr.pl has been installed in a wrong place. Then I've moved it to the right (?) place:

$  mv /usr/local/share/chr.pl /usr/local/share/Yap/

Second is:

====================================================================================
YAP version Yap-5.1.4
   ?- use_module(library(chr)).
 % reconsulting /usr/local/share/Yap/chr.pl...
% Warning:  at file /usr/local/share/Yap/swi.yap, near line 45.
% Importing private predicate terms:term_variables/2 to swi.
% Warning:  at file /usr/local/share/Yap/swi.yap, near line 45.
% Importing private predicate terms:term_variables/3 to swi.
     ERROR!!  at file /usr/local/share/Yap/swi.yap, near line 116.
     PERMISSION ERROR- in line 116, system predicate term_variables/2: modifying static procedure term_variables/2
     ERROR!!  at file /usr/local/share/Yap/swi.yap, near line 119.
     PERMISSION ERROR- in line 119, system predicate term_variables/3: modifying static procedure term_variables/3
     ERROR!!  at file /usr/local/share/Yap/chr/hprolog.pl, near line 160.
     PERMISSION ERROR- consult: modifying static procedure lists:sublist/2
     ERROR!!  at file /usr/local/share/Yap/chr/hprolog.pl, near line 161.
     PERMISSION ERROR- consult: modifying static procedure lists:sublist/2
 % reconsulted /usr/local/share/Yap/chr.pl in module chr, 3510 msec 3327640 bytes
yes
====================================================================================

You said that warnings were no relevant, but I don't know if these errors can be ignored or not.

Best regards,
Pablo


2009/1/16 Vitor Santos Costa <vscosta@...>
Hi Pablo

The file shouldn't have those many lines. Are you sure you did

cd mainline

after doing the git?

Thanks

Vitor

On Fri, Jan 16, 2009 at 1:12 AM, Pablo Beltran <pbeltranl@...> wrote:
> Hi Vitor,
>
> I get the same error:
>
> ===========================================================================================================
> gcc -c -march=i686 -DBP_FREE -fno-gcse -fno-crossjumping -O3
> -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes
> -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DHAVE_CONFIG_H -I.
> -I../H -I../OPTYap -I../BEAM -I../MYDDAS -I../include
> ../library/yap2swi/yap2swi.c  -o yap2swi.o
> ../library/yap2swi/yap2swi.c: In function `S__fillbuf':
> ../library/yap2swi/yap2swi.c:2430: error: storage size of 'time' isn't known
> ../library/yap2swi/yap2swi.c:2443: warning: implicit declaration of function
> `select'
> ../library/yap2swi/yap2swi.c:2430: warning: unused variable `time'
> make: *** [yap2swi.o] Error 1
> ===========================================================================================================
>
> This time, I've installed git on my Cygwin and downloaded the mainline
> following your link:
>
> $ git clone git://gitorious.org/yap-git/mainline.git
>
> then
>
> $ ../configure --enable-coroutining --enable-max-performance
> --enable-cygwin=yes
>
> -----------------------------------
>
> I've found the timeval struct defined in the "/usr/include/sys/time.h" file.
>
> ===================
> #ifndef _WINSOCK_H
> struct timeval {
>   time_t      tv_sec;
>   suseconds_t tv_usec;
> };
> ...
> ==================
>
> I'm not  C expert but examining the code seems like yap2swi.c includes
> "SWI-Prolog.h" which has:
>
> ===============
> #if HAVE_TIME_H
> #include <time.h>
> #endif
> ==============
>
> Then, I looked for HAVE_TIME_H in the config.log and I've found:
>
> ======================
> #define HAVE_TIME_H 1
> ======================
>
> and
>
> ========================
> #define HAVE_WINSOCK_H 1
> ========================
>
> Therefore, I think time.h is rightly included(HAVE_TIME == 1) but  timeval
> is not defined because WINSOCK_H is present (==1).
>
> Maybe I'm telling some stupidity but I don't look inside C code internals
> since a lot of years. If this is the case then I want to apologise.
>
> Maybe my config.log reveals some environment difference. I send it to you.
>
> Best regards,
> Pablo.
>
>
>
>
> 2009/1/16 Vitor Santos Costa <vscosta@...>
>>
>> Hi Pablo
>>
>> Can you please try the current version at:
>>
>> http://gitorious.org/projects/yap-git
>>
>> This should fix that bug (it was fixed a few days ago, after your
>> message). It compiled CHR.
>>
>> I have been trying not to advertise it until I have had a stable home
>> for git-yap, but it is taking longer that what I had hoped,
>>
>> Thanks!
>>
>> Vitor
>>
>> On Thu, Jan 15, 2009 at 12:14 AM, Pablo Beltran <pbeltranl@...>
>> wrote:
>> > Hi Victor,
>> >
>> > I get an error during Yap making:
>> >
>> >
>> > ================================================================================================================
>> > gcc -c -march=i686 -DBP_FREE -fno-gcse -fno-crossjumping -O3
>> > -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes
>> > -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DHAVE_CONFIG_H -I.
>> > -I../H -I../OPTYap -I../BEAM -I../MYDDAS -I../include
>> > ../library/yap2swi/yap2swi.c  -o yap2swi.o
>> > ../library/yap2swi/yap2swi.c: In function `S__fillbuf':
>> > ../library/yap2swi/yap2swi.c:2425: error: storage size of 'time' isn't
>> > known
>> > ../library/yap2swi/yap2swi.c:2438: warning: implicit declaration of
>> > function
>> > `select'
>> > ../library/yap2swi/yap2swi.c:2425: warning: unused variable `time'
>> > make: *** [yap2swi.o] Error 1
>> >
>> > ================================================================================================================
>> >
>> > This are the steps that I've followed:
>> >
>> > 1)  I've downloaded Yap from the CVS repository:
>> >
>> > cvs -z3 -d:pserver:yap.anonymous@...:/cvsroot/yap co .
>> >
>> > 2) ../configure --enable-coroutining --enable-max-performance
>> > --enable-cygwin=yes && make
>> >
>> > Best regards,
>> > Pablo.
>> >
>> > 2009/1/14 Vitor Santos Costa <vscosta@...>
>> >>
>> >> Hi Pablo
>> >>
>> >> There was a bug in Windows version of yap2swi that I fixed. The git
>> >> master branch should be ok now.
>> >>
>> >> Don't worry too much about the warning messages, CHR was originally
>> >> developed for SWI and it assumes some stuf is in places where they are
>> >> not :) As long as it compiles to the end it should be ok.
>> >>
>> >> Cheers
>> >>
>> >> Vitor
>> >>
>> >> 2009/1/12 Pablo Beltran <pbeltranl@...>:
>> >> > Hi,
>> >> >
>> >> > CHR doesn't can be loaded in a Cygwin environment.
>> >> >
>> >> > See the details below.
>> >> >
>> >> > Best regards,
>> >> > Pablo.
>> >> >
>> >> > $ yap
>> >> > YAP version Yap-5.1.3
>> >> >    ?- use_module(library(chr)).
>> >> >  % reconsulting /usr/local/share/Yap/chr.yap...
>> >> >  % including /usr/local/share/Yap/chr.pl...
>> >> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 47.
>> >> >      PERMISSION ERROR- consult: modifying static procedure
>> >> > lists:nth/3
>> >> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 55.
>> >> >      PERMISSION ERROR- consult: modifying static procedure
>> >> > lists:substitute/4
>> >> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 63.
>> >> >      PERMISSION ERROR- consult: modifying static procedure
>> >> > lists:substitute/4
>> >> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 147.
>> >> >      PERMISSION ERROR- consult: modifying static procedure
>> >> > lists:sublist/2
>> >> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 150.
>> >> >      PERMISSION ERROR- consult: modifying static procedure
>> >> > lists:sublist/2
>> >> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 158.
>> >> >      PERMISSION ERROR- consult: modifying static procedure
>> >> > lists:min_list/2
>> >> >  % /usr/local/share/Yap/chr.pl included in module user, 1996 msec
>> >> > 3070008
>> >> > bytes
>> >> >  % reconsulted /usr/local/share/Yap/chr.yap in module chr, 2121 msec
>> >> > 3273136
>> >> > byt
>> >> > es
>> >> > yes
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > ------------------------------------------------------------------------------
>> >> > Check out the new SourceForge.net Marketplace.
>> >> > It is the best place to buy or sell services for
>> >> > just about anything Open Source.
>> >> > http://p.sf.net/sfu/Xq1LFB
>> >> > _______________________________________________
>> >> > Yap-users mailing list
>> >> > Yap-users@...
>> >> > https://lists.sourceforge.net/lists/listinfo/yap-users
>> >> >
>> >> >
>> >
>> >
>
>


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

Re: CHR & cygwin problem.

by Vitor Santos Costa-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Pablo

I've made a few updates. I found out I was installing chr in the wrong
place, and there was a problem with term_variables: it used to be a
part of the terms library, it is now standard, to be more compatible
with SWI Prolog.

Please tell me if it works now.

Cheers

Vitor

On Fri, Jan 16, 2009 at 11:38 PM, Pablo Beltran <pbeltranl@...> wrote:

> Hi Vitor,
>
> Yes, I did the cd mainline. Definitely my previous mail is not a complete
> list of commands that I executed.
>
> Good news are that now I've downloaded the mainline again and it
> compiles!!!!. Therefore if no changes has been commited since yesterday then
> I made some mistake building Yap at first time.
>
> Now I've new problems running CHR on Yap:
>
> First is:
>
> ?-use_module(library(chr))
>
>      ERROR!! [Thread 0 ]
>      PERMISSION ERROR- use_module(user:library(chr)): cannot read from
> library(chr)
>
> The reason is that chr.pl has been installed in a wrong place. Then I've
> moved it to the right (?) place:
>
> $  mv /usr/local/share/chr.pl /usr/local/share/Yap/
>
> Second is:
>
> ====================================================================================
> YAP version Yap-5.1.4
>    ?- use_module(library(chr)).
>  % reconsulting /usr/local/share/Yap/chr.pl...
> % Warning:  at file /usr/local/share/Yap/swi.yap, near line 45.
> % Importing private predicate terms:term_variables/2 to swi.
> % Warning:  at file /usr/local/share/Yap/swi.yap, near line 45.
> % Importing private predicate terms:term_variables/3 to swi.
>      ERROR!!  at file /usr/local/share/Yap/swi.yap, near line 116.
>      PERMISSION ERROR- in line 116, system predicate term_variables/2:
> modifying static procedure term_variables/2
>      ERROR!!  at file /usr/local/share/Yap/swi.yap, near line 119.
>      PERMISSION ERROR- in line 119, system predicate term_variables/3:
> modifying static procedure term_variables/3
>      ERROR!!  at file /usr/local/share/Yap/chr/hprolog.pl, near line 160.
>      PERMISSION ERROR- consult: modifying static procedure lists:sublist/2
>      ERROR!!  at file /usr/local/share/Yap/chr/hprolog.pl, near line 161.
>      PERMISSION ERROR- consult: modifying static procedure lists:sublist/2
>  % reconsulted /usr/local/share/Yap/chr.pl in module chr, 3510 msec 3327640
> bytes
> yes
> ====================================================================================
>
> You said that warnings were no relevant, but I don't know if these errors
> can be ignored or not.
>
> Best regards,
> Pablo
>
>
> 2009/1/16 Vitor Santos Costa <vscosta@...>
>>
>> Hi Pablo
>>
>> The file shouldn't have those many lines. Are you sure you did
>>
>> cd mainline
>>
>> after doing the git?
>>
>> Thanks
>>
>> Vitor
>>
>> On Fri, Jan 16, 2009 at 1:12 AM, Pablo Beltran <pbeltranl@...>
>> wrote:
>> > Hi Vitor,
>> >
>> > I get the same error:
>> >
>> >
>> > ===========================================================================================================
>> > gcc -c -march=i686 -DBP_FREE -fno-gcse -fno-crossjumping -O3
>> > -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes
>> > -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DHAVE_CONFIG_H -I.
>> > -I../H -I../OPTYap -I../BEAM -I../MYDDAS -I../include
>> > ../library/yap2swi/yap2swi.c  -o yap2swi.o
>> > ../library/yap2swi/yap2swi.c: In function `S__fillbuf':
>> > ../library/yap2swi/yap2swi.c:2430: error: storage size of 'time' isn't
>> > known
>> > ../library/yap2swi/yap2swi.c:2443: warning: implicit declaration of
>> > function
>> > `select'
>> > ../library/yap2swi/yap2swi.c:2430: warning: unused variable `time'
>> > make: *** [yap2swi.o] Error 1
>> >
>> > ===========================================================================================================
>> >
>> > This time, I've installed git on my Cygwin and downloaded the mainline
>> > following your link:
>> >
>> > $ git clone git://gitorious.org/yap-git/mainline.git
>> >
>> > then
>> >
>> > $ ../configure --enable-coroutining --enable-max-performance
>> > --enable-cygwin=yes
>> >
>> > -----------------------------------
>> >
>> > I've found the timeval struct defined in the "/usr/include/sys/time.h"
>> > file.
>> >
>> > ===================
>> > #ifndef _WINSOCK_H
>> > struct timeval {
>> >   time_t      tv_sec;
>> >   suseconds_t tv_usec;
>> > };
>> > ...
>> > ==================
>> >
>> > I'm not  C expert but examining the code seems like yap2swi.c includes
>> > "SWI-Prolog.h" which has:
>> >
>> > ===============
>> > #if HAVE_TIME_H
>> > #include <time.h>
>> > #endif
>> > ==============
>> >
>> > Then, I looked for HAVE_TIME_H in the config.log and I've found:
>> >
>> > ======================
>> > #define HAVE_TIME_H 1
>> > ======================
>> >
>> > and
>> >
>> > ========================
>> > #define HAVE_WINSOCK_H 1
>> > ========================
>> >
>> > Therefore, I think time.h is rightly included(HAVE_TIME == 1) but
>> >  timeval
>> > is not defined because WINSOCK_H is present (==1).
>> >
>> > Maybe I'm telling some stupidity but I don't look inside C code
>> > internals
>> > since a lot of years. If this is the case then I want to apologise.
>> >
>> > Maybe my config.log reveals some environment difference. I send it to
>> > you.
>> >
>> > Best regards,
>> > Pablo.
>> >
>> >
>> >
>> >
>> > 2009/1/16 Vitor Santos Costa <vscosta@...>
>> >>
>> >> Hi Pablo
>> >>
>> >> Can you please try the current version at:
>> >>
>> >> http://gitorious.org/projects/yap-git
>> >>
>> >> This should fix that bug (it was fixed a few days ago, after your
>> >> message). It compiled CHR.
>> >>
>> >> I have been trying not to advertise it until I have had a stable home
>> >> for git-yap, but it is taking longer that what I had hoped,
>> >>
>> >> Thanks!
>> >>
>> >> Vitor
>> >>
>> >> On Thu, Jan 15, 2009 at 12:14 AM, Pablo Beltran <pbeltranl@...>
>> >> wrote:
>> >> > Hi Victor,
>> >> >
>> >> > I get an error during Yap making:
>> >> >
>> >> >
>> >> >
>> >> > ================================================================================================================
>> >> > gcc -c -march=i686 -DBP_FREE -fno-gcse -fno-crossjumping -O3
>> >> > -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes
>> >> > -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DHAVE_CONFIG_H
>> >> > -I.
>> >> > -I../H -I../OPTYap -I../BEAM -I../MYDDAS -I../include
>> >> > ../library/yap2swi/yap2swi.c  -o yap2swi.o
>> >> > ../library/yap2swi/yap2swi.c: In function `S__fillbuf':
>> >> > ../library/yap2swi/yap2swi.c:2425: error: storage size of 'time'
>> >> > isn't
>> >> > known
>> >> > ../library/yap2swi/yap2swi.c:2438: warning: implicit declaration of
>> >> > function
>> >> > `select'
>> >> > ../library/yap2swi/yap2swi.c:2425: warning: unused variable `time'
>> >> > make: *** [yap2swi.o] Error 1
>> >> >
>> >> >
>> >> > ================================================================================================================
>> >> >
>> >> > This are the steps that I've followed:
>> >> >
>> >> > 1)  I've downloaded Yap from the CVS repository:
>> >> >
>> >> > cvs -z3 -d:pserver:yap.anonymous@...:/cvsroot/yap co .
>> >> >
>> >> > 2) ../configure --enable-coroutining --enable-max-performance
>> >> > --enable-cygwin=yes && make
>> >> >
>> >> > Best regards,
>> >> > Pablo.
>> >> >
>> >> > 2009/1/14 Vitor Santos Costa <vscosta@...>
>> >> >>
>> >> >> Hi Pablo
>> >> >>
>> >> >> There was a bug in Windows version of yap2swi that I fixed. The git
>> >> >> master branch should be ok now.
>> >> >>
>> >> >> Don't worry too much about the warning messages, CHR was originally
>> >> >> developed for SWI and it assumes some stuf is in places where they
>> >> >> are
>> >> >> not :) As long as it compiles to the end it should be ok.
>> >> >>
>> >> >> Cheers
>> >> >>
>> >> >> Vitor
>> >> >>
>> >> >> 2009/1/12 Pablo Beltran <pbeltranl@...>:
>> >> >> > Hi,
>> >> >> >
>> >> >> > CHR doesn't can be loaded in a Cygwin environment.
>> >> >> >
>> >> >> > See the details below.
>> >> >> >
>> >> >> > Best regards,
>> >> >> > Pablo.
>> >> >> >
>> >> >> > $ yap
>> >> >> > YAP version Yap-5.1.3
>> >> >> >    ?- use_module(library(chr)).
>> >> >> >  % reconsulting /usr/local/share/Yap/chr.yap...
>> >> >> >  % including /usr/local/share/Yap/chr.pl...
>> >> >> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 47.
>> >> >> >      PERMISSION ERROR- consult: modifying static procedure
>> >> >> > lists:nth/3
>> >> >> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 55.
>> >> >> >      PERMISSION ERROR- consult: modifying static procedure
>> >> >> > lists:substitute/4
>> >> >> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 63.
>> >> >> >      PERMISSION ERROR- consult: modifying static procedure
>> >> >> > lists:substitute/4
>> >> >> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 147.
>> >> >> >      PERMISSION ERROR- consult: modifying static procedure
>> >> >> > lists:sublist/2
>> >> >> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 150.
>> >> >> >      PERMISSION ERROR- consult: modifying static procedure
>> >> >> > lists:sublist/2
>> >> >> >      ERROR!!  at file /usr/local/share/Yap/chr.pl, near line 158.
>> >> >> >      PERMISSION ERROR- consult: modifying static procedure
>> >> >> > lists:min_list/2
>> >> >> >  % /usr/local/share/Yap/chr.pl included in module user, 1996 msec
>> >> >> > 3070008
>> >> >> > bytes
>> >> >> >  % reconsulted /usr/local/share/Yap/chr.yap in module chr, 2121
>> >> >> > msec
>> >> >> > 3273136
>> >> >> > byt
>> >> >> > es
>> >> >> > yes
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > ------------------------------------------------------------------------------
>> >> >> > Check out the new SourceForge.net Marketplace.
>> >> >> > It is the best place to buy or sell services for
>> >> >> > just about anything Open Source.
>> >> >> > http://p.sf.net/sfu/Xq1LFB
>> >> >> > _______________________________________________
>> >> >> > Yap-users mailing list
>> >> >> > Yap-users@...
>> >> >> > https://lists.sourceforge.net/lists/listinfo/yap-users
>> >> >> >
>> >> >> >
>> >> >
>> >> >
>> >
>> >
>
>

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users