unable to use native functors with gcc 3.4.3?

Filip Konvička filip.konvicka.removethisantispamtoken at logis.cz
Thu May 11 14:33:19 CEST 2006


Hi,

I'm trying to get XRI working on Linux with the following gcc:

gcc (GCC) 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)

and the most recent Mozart 1-3-0-fixes. I get the following when trying 
to load the XRI module:

%****************** Error: native code interface ****************
%**
%** Cannot dynamically link object file
%**
%** File name: /tmp/install2/cache/x-ozlib/ri/ri.so-linux-i486
%** dlerror:   /tmp/install2/cache/x-ozlib/ri/ri.so-linux-i486: 
undefined symbol: _Z14OZ_sCloneBlockPjS_i
%** In statement: {<P/2 INTERNAL.getNative> '#'('/' [116 109 112] '/' 
[105 110 115 116 97 108 108 50] '/' [99 97 99 104 101] '/' [120 45 111 
122 108 105 98] '/' [114 105] ,,,) _}
%**
%** Call Stack:
%** procedure 'Meth_native_win32' in file 
"/usr1/fkonvick/src/mozart/share/lib/init/Resolve.oz", line 63, column 
3, PC = 151162748
%**--------------------------------------------------------------

I did some Googling and I tried to add the line

   _FUNDECL(void ,OZ_sCloneBlock,(OZ_Term *, OZ_Term *,int));

to platform/emulator/mozart.h (I was motivated by and mozart_cpi.hh line 
321 and by http://www.mozart-oz.org/lists/oz-users/2260.html). After 
recompiling both mozart and XRI, the error changed to:

%****************** Error: native code interface ****************
%**
%** Cannot dynamically link object file
%**
%** File name: /tmp/install2/cache/x-ozlib/ri/ri.so-linux-i486
%** dlerror:   /tmp/install2/cache/x-ozlib/ri/ri.so-linux-i486: 
undefined symbol: OZ_sCloneBlock
%** In statement: {<P/2 INTERNAL.getNative> '#'('/' [116 109 112] '/' 
[105 110 115 116 97 108 108 50] '/' [99 97 99 104 101] '/' [120 45 111 
122 108 105 98] '/' [114 105] ,,,) _}
%**
%** Call Stack:
%** procedure 'Meth_native_win32' in file 
"/usr1/fkonvick/src/mozart/share/lib/init/Resolve.oz", line 63, column 
3, PC = 162094972
%**--------------------------------------------------------------

I think that the function is not exported with gcc 3.4.3.

The library works fine on Windows when I cross-compile it using mingw.

Cheers,
Filip




More information about the mozart-hackers mailing list