[mercury-users] compilation problem, all, some

Maurizio Colucci seguso.forever at tin.it
Sat Jul 17 02:41:22 AEST 2004


Hello,

I have sent three messages but they don't appear on the list. I am trying 
again...

1)

I am having difficulties getting in touch with Mercury. I've read 
the tutorial, the reference and the prolog transition guide, and there is no 
example how to use "all" and "some". Therefore I must knock at your door :-) 

I need to translate this predicate from prolog:

% Intuitively, a verb V is visible if for all O in SelectedObjects 
% there is a predicate P in V's requirements such that P(O).

the_verb_is_visible(V, SelectedObjs):-
    verb_get_requirements(V, Reqs),
    forall( member(O, SelectedObjs),
            ( member(P, Reqs),
              call(P, O))).

verb_get_requirements( verb(_, R), R).

Thanks :-)

2)

On Suse 9.1, with gcc 3.3.3, if  I try to compile "hello world" with the 
stable release (0.11.0), I get the following errors:
> cd /dat/pub/src/by-mau/tests/mercury/
> mmc main.m
> main_init.o(.text+0x133): In function `mercury_init':
> : undefined reference to `<predicate 'main'/2 mode 0>'
> /usr/local/mercury-0.11.0/lib/mercury/lib/asm_fast.gc/i686-pc-linux-gnu/libmer_std.a(lexer.o)
(.text+0xcd44): In function `<predicate 'lexer:get_float_decimals'/4 mode 
0>':
> : undefined reference to `__ctype_b'
> /usr/local/mercury-0.11.0/lib/mercury/lib/asm_fast.gc/i686-pc-linux-gnu/libmer_std.a(lexer.o)
(.text+0xcf95): In function `<predicate 'lexer:get_float_decimals'/4 mode 
0>':
> : undefined reference to `__ctype_b'
> /usr/local/mercury-0.11.0/lib/mercury/lib/asm_fast.gc/i686-pc-linux-gnu/libmer_std.a(lexer.o)
(.text+0xd231): In function `<predicate 'lexer:string_get_float_decimals'/7 
mode 0>':
> : undefined reference to `__ctype_b'
> /usr/local/mercury-0.11.0/lib/mercury/lib/asm_fast.gc/i686-pc-linux-gnu/libmer_std.a(lexer.o)
(.text+0xd35d): In function `<predicate 'lexer:string_get_float_decimals'/7 
mode 0>':
> : undefined reference to `__ctype_b'
> /usr/local/mercury-0.11.0/lib/mercury/lib/asm_fast.gc/i686-pc-linux-gnu/libmer_std.a(lexer.o)
(.text+0xd644): In function `<predicate 'lexer:get_float_exponent'/4 mode 
0>':
> : undefined reference to `__ctype_b'
> /usr/local/mercury-0.11.0/lib/mercury/lib/asm_fast.gc/i686-pc-linux-gnu/libmer_std.a(lexer.o)
(.text+0xddbe): more undefined references to `__ctype_b' follow
> collect2: ld returned 1 exit status
> 

Is this a problem with glibc? Is it solvable?

3)

 If I try to compile hello world with the _unstable_ rpm, I get these errors:

mmc main.m
main_init.c: In function `mercury_init':
main_init.c:776: warning: dereferencing type-punned pointer will break 
strict-aliasing rules
main_init.c:778: warning: dereferencing type-punned pointer will break 
strict-aliasing rules
main_init.c:780: warning: dereferencing type-punned pointer will break 
strict-aliasing rules
main_init.c:782: warning: dereferencing type-punned pointer will break 
strict-aliasing rules
main_init.c:784: warning: dereferencing type-punned pointer will break 
strict-aliasing rules
main_init.c:786: warning: dereferencing type-punned pointer will break 
strict-aliasing rules
main_init.o(.text+0x179): In function `mercury_init':
: undefined reference to `<predicate 'main'/2 mode 0>'


Thanks for any help.

Maurizio
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list