First class propagators: Linux to Windows

Kevin Glynn glynn at info.ucl.ac.be
Thu Jan 26 12:42:48 CET 2006


Harmon Nine writes:
 > Now that I've gotten the fcp and reflect contrib modules to work in
 > Linux, and have reproduced some of Tobias Muller's results, I assumed

cool.  when you are happy ith your changes we should fold them into
cvs.  Either 

- post them here
- make a bug rreport with the patches
- ask us for cvs write privileges :-)

 > that getting fcp and reflect to work on Windows (XP) would be relatively
 > straightforward.
 > 
 >  
 > 
 > This was an invalid assumption.
 > 

oh dear :-(

 > 
 > I've made progress by revamping the contrib/reflect/Makefile.in to look
 > more like the other makefiles in contrib, i.e. the ones that compile.
 > However, when trying to link reflect.so-$(PLATFORM), the linker keeps
 > complaining that the some of the object modules have undefined symbols.
 > 
 >  
 > 
 > I've traced (some of) the undefined symbols to the file
 > platform/emulator/atoms.cc, which is compiled into emulator.dll.
 > 
 >  
 > 
 > I'd like to compile reflect.so-$(PLATFORM) so that the linker (ld)
 > "looks at" emulator.dll for the symbols it requires.  Does anyone know
 > the option (or procedure) for doing this?
 > 
 > 

I am not knowledgable about building apps under windows (so I hope I
don't mislead here) but I did play around with our windows
build. AFAIU you are correctly linking against your emulator.dll (to
see the commandline that is being invoked by oztool pass it the
-verbose option).

I believe the problem is that these symbols aren't being exported from
emulator.dll.  Under windows the only symbols that are exported are
those marked with __declspec(dllexport). This happens e.g. if the
prototype is marked with the FUNDECL macro as happens in mozart.h.

This should be enough to let you solve the problem (you will need to
rebuild mozart though to get the extra symbols).  We should have a
further discussion about what the right longe term solution is:

- Add these symbols to mozart.h
- Stop building reflect as a native functor and make it part of mozart
- something else ....

k

 > 
 > Here's some of the output:
 > 
 >  
 > 
 > OZTOOL_LD="g++  -mno-cygwin" \
 > 
 > c:/cygwin/home/hnine/WindowsNative/tmp/build/mozart-build/platform/mswin
 > dows/oztool.exe ld -inc
 > /home/hnine/WindowsNative/tmp/build/mozart-build/platform/emulator -o
 > reflect.so-win32-i486 reflect.o builtins.o reflect_prop.o reflect_var.o
 > reflect_space.o -L/home/hnine/WindowsNative/opt/packages/lib -lgmp
 > 
 >  
 > 
 > builtins.o:builtins.cc:(.text+0xd1): undefined reference to
 > `typeError(int, char*, char*)'
 > 
 > builtins.o:builtins.cc:(.text+0x180): undefined reference to
 > `oz_addSuspendVarList(unsigned int*)'
 > 
 > builtins.o:builtins.cc:(.text+0x476): undefined reference to
 > `__StaticNameTable'
 > 
 >  
 > 
 > TIA
 > 
 >  
 > 
 > -- Harmon
 > 




More information about the mozart-hackers mailing list