in reply to KinoSearch Installation errors

It doesn't appear to be Windows-compatible. You should be talking to the KinoSearch people.

error: 'S_IFLNK' undeclared

Windows doesn't support symbolic links, so it doesn't implement S_IFLNK which isn't even in POSIX.

In core/KinoSearch/Store/FSDirHandle.c, replace the FSDH_entry_is_symlink definition with

bool_t FSDH_entry_is_symlink(FSDirHandle *self) { return false; }

warning: implicit declaration of function 'opendir'
warning: implicit declaration of function 'readdir'
warning: implicit declaration of function 'closedir'
error: dereferencing pointer to incomplete type

They didn't include a necessary include file.

In core/KinoSearch/Store/FSDirHandle.c, add

#include <dirent.h>

Replies are listed 'Best First'.
Re^2: KinoSearch Installation errors
by Eliya (Vicar) on Mar 28, 2011 at 19:16 UTC
    It doesn't appear to be Windows-compatible

    Interestingly, there are two separate sections in FSDirHandle.c:

    /********************************** UNIXEN *************************** +******/ #ifdef CHY_HAS_DIRENT_H #include <dirent.h> FSDirHandle* FSDH_do_open(FSDirHandle *self, const CharBuf *dir) { char *dir_path_ptr = (char*)CB_Get_Ptr8(dir); DH_init((DirHandle*)self, dir); self->sys_dir_entry = NULL; self->fullpath = NULL; self->sys_dirhandle = opendir(dir_path_ptr); ...

    and

    /********************************** Windows ************************** +******/ #elif defined(CHY_HAS_WINDOWS_H) #include <windows.h> FSDirHandle* FSDH_do_open(FSDirHandle *self, const CharBuf *dir) { ...

    but apparently, the ifdefs haven't been figured out correctly...

      I missed that.

      The defines are correct — a dirent.h is present or we'd get an include error — but they're misused. Testing for dirent.h is not what they want to do.

      The OP could change

      #ifdef CHY_HAS_DIRENT_H ...aaa... #elif defined(CHY_HAS_WINDOWS_H) ...bbb... #endif

      to

      #ifdef defined(CHY_HAS_WINDOWS_H) ...bbb... #elif CHY_HAS_DIRENT_H ...aaa... #endif

      (This is a fix for the OP. It's not suitable for incorporation into KinoSearch as is.)

        Thanks, we'll consider that suggestion. The possibility that dirent.h would be present on Windows hadn't been taken into account.

        For what it's worth, official releases of KS have typically been tested under Windows using an MSVC custom-compiled Perl. It used to be that if we could get KS to build and pass tests under MSVC, it would also build and pass tests under Cygwin and Strawberry Perl. Recently, we've been having some difficulties -- but Windows is definitely a target OS, and we look forward to resolving these problems.

        What does OP means? One more thing...I also have cygwin install on my machine. Do you think that is the cause of this error?
        Ok After doing these changes i am getting following errors...
        C:\Temp\newTwikiSearch\KinoSearch-0.313>perl Build Set up gcc environment - 4.5.2 Set up gcc environment - 4.5.2 Set up gcc environment - 4.5.2 Building KinoSearch C:/Perl/bin/MinGW/bin/gcc.exe -c -I"." -I"core" -I"autogen" -I"xs" -I" +charmonize r\src" -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_ +HASH_SEED -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPE +RL_IMPLICI T_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -fno-strict-al +iasing -mm s-bitfields -std=gnu99 -D_GNU_SOURCE -O2 -I"C:\Perl\lib\CORE" -I"\incl +ude" -o "c ore\KinoSearch\Store\FSDirHandle.o" "core\KinoSearch\Store\FSDirHandle +.c" core\KinoSearch\Store\FSDirHandle.c:49:15: warning: extra tokens at en +d of #ifde f directive core\KinoSearch\Store\FSDirHandle.c:170:23: error: #elif with no expre +ssion error building dll file from 'core/KinoSearch/Store/FSDirHandle.c' at +C:/Perl/si te/lib/ExtUtils/CBuilder/Platform/Windows.pm line 130.