[mercury-users] my problems with parsing.mkEncoding

Tudor Holton taholt at csse.unimelb.edu.au
Thu Nov 3 18:35:26 AEDT 2005


I did workaround #1, added -static and my test case compiles! :-)

However, when I do it to my real code and do a realclean, depends, and 
mmake, I get the following error on compiling:
%%%%%%%%%
ml --make-shared-lib --grade asm_fast.gc             -static      
-R/home/pgrad/taholt/mercury/extras/lib/mercury/lib/asm_fast.gc 
-R/home/pgrad/taholt/mercury/extras/lib/mercury/lib 
-L/home/pgrad/taholt/mercury/extras/lib/mercury/lib/asm_fast.gc 
-L/home/pgrad/taholt/mercury/extras/lib/mercury/lib 
--init-file-directory 
/home/pgrad/taholt/mercury/extras/lib/mercury/modules --     -o 
libxml_easy.so \        xml_easy.pic_o \
            -lxml
ld: warning: option -d appears more than once, first setting taken
ld: fatal: option -dn and -G are incompatible
ld: fatal: Flags processing errors
collect2: ld returned 1 exit status
gmake: *** [libxml_easy.so] Error 1
%%%%%%%%%%

Peter speculated that some part of the mmake control process code may 
not be stripping the -G option to the linker when more than one library 
is being linked and -static is specified.  This may explain this 
behaviour.  I couldn't possibly comment. :-)

Cheers,
Tudor.

P.S.  I really don't want to do workaround #2, it seems too messy and 
may result in people saying "Oh yes, Tudor's code will only compile with 
version 0.12.20051031 of mercury!"  Peter points out that this will get 
my project moving again, but still....  :-)

Julien Fischer wrote:
------- snip ------

>Nope, it looks like a problem with Mercury libraries on Solaris :-(
>
>Workaround #1: Add the following to your Mmakefile
>
>MLFLAGS=-static
>
>Workaround #2:
>
>Don't use the XML parser as a library, i.e copy the source
>files to the same directory and compile it at the same time
>as your program.
>
>Cheers,
>Julien.
>--------------------------------------------------------------------------
>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
>--------------------------------------------------------------------------
>  
>

--------------------------------------------------------------------------
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