Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

KinoSearch Installation errors

by archimca (Novice)
on Mar 28, 2011 at 18:19 UTC ( #895989=perlquestion: print w/replies, xml ) Need Help??
archimca has asked for the wisdom of the Perl Monks concerning the following question:

Hi There, I am trying to install Kinosearch-0.311 on windows XP SP3 with twiki 4.1.0. I have activestate (Active perl 5.8.9 build 827) on my machine every module is installed including MinGW, Module::Build,dmake and all other related to this search other then Text::Iconv. Now i am trying to install kinosearch module but i am getting errors. I am sending you the full log for your convenience and looking for your help and advise me to fix this problem and make it work. Thanks in advance.
C:\Temp\newTwikiSearch\KinoSearch-0.311>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: In function 'kino_FSDH_do_open': core\KinoSearch\Store\FSDirHandle.c:62:5: warning: implicit declaratio +n of funct ion 'opendir' core\KinoSearch\Store\FSDirHandle.c:62:25: warning: assignment makes p +ointer fro m integer without a cast core\KinoSearch\Store\FSDirHandle.c: In function 'kino_FSDH_next': core\KinoSearch\Store\FSDirHandle.c:75:35: warning: implicit declarati +on of func tion 'readdir' core\KinoSearch\Store\FSDirHandle.c:83:35: error: dereferencing pointe +r to incom plete type core\KinoSearch\Store\FSDirHandle.c:87:38: error: dereferencing pointe +r to incom plete type core\KinoSearch\Store\FSDirHandle.c:91:52: error: dereferencing pointe +r to incom plete type core\KinoSearch\Store\FSDirHandle.c: In function 'kino_FSDH_entry_is_s +ymlink': core\KinoSearch\Store\FSDirHandle.c:143:36: error: 'S_IFLNK' undeclare +d (first u se in this function) core\KinoSearch\Store\FSDirHandle.c:143:36: note: each undeclared iden +tifier is reported only once for each function it appears in core\KinoSearch\Store\FSDirHandle.c: In function 'kino_FSDH_close': core\KinoSearch\Store\FSDirHandle.c:160:9: warning: implicit declarati +on of func tion 'closedir' error building dll file from 'core/KinoSearch/Store/FSDirHandle.c' at +C:/Perl/si te/lib/ExtUtils/CBuilder/Platform/ line 130.

Replies are listed 'Best First'.
Re: KinoSearch Installation errors
by Anonymous Monk on Mar 29, 2011 at 01:42 UTC
    Why not try the PPM version?
      I can try PPM version but i have firewall issue. so it's not going thru properly :)
Re: KinoSearch Installation errors
by ikegami (Pope) on Mar 28, 2011 at 19:00 UTC

    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>
      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); ...


      /********************************** 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 #elif defined(CHY_HAS_WINDOWS_H) ...bbb... #endif


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

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://895989]
Approved by ikegami
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2017-12-12 12:29 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (332 votes). Check out past polls.