[KinoSearch] Windows - Kinosearch

Marvin Humphrey marvin at rectangular.com
Mon Sep 8 19:02:44 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.

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)

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

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/




More information about the kinosearch mailing list