[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mzscheme extension problems
Quoting Stephane Letz:
> First i compiled and load successfully the extension in Drscheme. Some
> functions worked, but because the external code open OS threads, i've got
> several segmentation fault.
>
> Using the 103 distribution, I compiled the system with OS threads, but had
> to hack the linux_thread.c file to make it compile (Linux kernel 2.4.3
> Mandrake 8.0 distribution)
Do the OS threads created by the extension call back into Scheme?
I ask because we're planning to discontinue support for MzScheme
threads as OS threads in the next release, and I wonder whether there's
another way around the seg faults.
> I tried to load again the extension but now get the error : "undefined
> symbol : scheme_current_process"
>
> I tried also to link the mzdyn.o file into my .so extension but get the error :
> "multiple definition : scheme-initialiez-internal"
To make an extension work with an OS-thread MzScheme, it needs to be
compiled specifically for OS threads. When compiling the extension, add
-DLINUX_THREADS -D_REENTRANT to the compiler's command line. If you're using mzc, then:
mzc ... ++ccf -DLINUX_THREADS ++ccf -D_REENTRANT
Matthew