[KinoSearch] Windows - Kinosearch
Paul-Kenji Cahier
pkc at F1-Photo.com
Mon Sep 8 19:51:23 PDT 2008
> On Sep 8, 2008, at 5:39 PM, Paul-Kenji Cahier wrote:
>> I have been desperatly trying to compile any of the .20_x versions
>> under windows, under both activeperl and strawberry perl but without
>> success.
>> Using activeperl, I was not even able to start any of the compiles
>> using nmake(failing very quickly).
> While Windows is a target for KS, the dev branch has not worked under
> Windows for a long time. I recently did enough work to get KS
> compiling again using MSVC 9 and a manually-compiled Perl 5.10.0.
> However, with that rig I'm getting a bunch of wacky "free to wrong
> pool" memory errors which appear to originate in c_src/KinoSearch/
> Index/PostingPool.c or thereabouts.
> Perhaps it will be easier to get things going with Strawberry Perl.
Strawberry perl actually uses mingw to provide as much unix
compatibility as possible, so it does go easier than activeperl.
> What I see in your output is failure at the linking stage, because
> Windows is fussy about resolving all symbols at link-time. Unixen
> tend to be more forgiving at link-time, throwing runtime errors when a
> symbol cannot be resolved, which is why at least one of the problems
> remained hidden until now.
>> ..\c_src\KinoSearch\Posting\MatchPosting.o:MatchPosting.c:(.text
>> +0x15d): undefined reference to `kino_MatchPostScorer_init'
> That one's easy, and should be fixed by r3844.
> MatchPostingScorer*
> -MatchPostingScorer_init(MatchPostingScorer *self, Similarity *sim,
> +MatchPostScorer_init(MatchPostingScorer *self, Similarity *sim,
> PostingList *plist, Compiler *compiler)
Thanks. That fixed the error.
I had to actually comment out:
typedef __int64 off64_t;
in compat/windows/lfs.h(since mingw already defines it)
I also had to #define DIR_SEP "/"
since apparently mingw doesnt define it.
(but there are mnor changes)
>> ..\c_src\KinoSearch\Util\Compat\ProcessID.o:ProcessID.c:(.text
>> +0x23): undefined reference to `kill'
>> ..\c_src\KinoSearch\Util\Compat\Sleep.o:Sleep.c:(.text+0x5):
>> undefined reference to `sleep'
> Those two are a little more puzzling. Here's the relevant section of
> Sleep.c:
> /********************************* UNIXEN
> *********************************/
> #ifdef CHY_HAS_UNISTD_H
> #include <unistd.h>
> void
> kino_Sleep_sleep(unsigned int seconds)
> {
> sleep(seconds);
> }
> /********************************* WINDOWS
> ********************************/
> #elif defined(CHY_HAS_WINDOWS_H)
> The WINDOWS section invokes "Sleep" rather than "sleep", so we can
> deduce that we're in the UNIXEN section and that unistd.h is present.
> The unistd.h header file should define a sleep() function: <http://opengroup.org/onlinepubs/007908799/xsh/sleep.html
I checked the mingw headers, and there's no sleep function in them, though
they do tell that one should call the win32 sleep or _sleep, which I changed
and worked for the best as it stopped the sleep error.
>>. Is that not the case with this install?
> I imagine something similar is happening with the "kill" reference in
> ProcessID.c, which ought to be provided by signal.h.
Sadly, for this one, I couldnt find an equivalent to kill.
So I tried making it always return true(and not call kill) which
did indeed let it finish compiling completly.
However it seems to be crashing on many tests.
(according to the debugger, it crashes in kinosearch's dll, but I
cant figure where since I dont have debug information)
> Please update to r3845 and let me know whether we've at least begun to
> whittle down our list of obstacles.
> Marvin Humphrey
> Rectangular Research
> http://www.rectangular.com/
> _______________________________________________
> KinoSearch mailing list
> KinoSearch at rectangular.com
> http://www.rectangular.com/mailman/listinfo/kinosearch
More information about the kinosearch
mailing list