in reply to Re: run TreeTagger in Windows
in thread run TreeTagger in Windows

Hi, thank you for the reply. I'm trying to use the same thing that I found at perlipc.
if (system('mkfifo',"$FIFO.in")||system('mkfifo',"$FIFO.out") ) { print STDERR "Cannot create pipes $FIFO.in or $FIFO.in\n"; exit(1); }
This requires that the 'mkfifo' is there somehow. When I try to run the code I get the following error message:
" 'mkfifo' is not recognized as an internal or external command, operable program or batch file. Cannot create pipes /tmp/treetagger_2216.in or ..." From the perlipc I cannot get any clues for how to solve this. It might be that I just don't understands... Any further ideas?
bests,
-lilli.

Replies are listed 'Best First'.
Re^3: run TreeTagger in Windows
by BrowserUk (Patriarch) on Mar 03, 2009 at 14:21 UTC
      I'm using Perl Power Tools (aka the Unix Reconstruction Project) from the ppt-0.14 package which is there to implement the unix commands in perl. And if I understand it right, it should be working on all types of OP's. But when running it I get the following error: POSIX::mkfifo not implemented on this architecture at C:\Perl\site.....
      Any ideas?
      Bests,
      -lilli.
        NOT IMPLEMENTED means you can't have it, its NOT IMPLEMENTED :D
      Windows supports named pipes. They even exist on the file system. I think they are constrained to a pseudo volume, but that probably not an issue in this case. It sounds like a solution could be obtained which wouldn't involve changing the child.

        From my reading of the OPs situation, the other end of the fifo is a pre-existing application. And if that application is using fifos, it must run on unix. Probably on a unix server?

        Short of porting that to Windows, I don't see how the two are going to communicate?

        Even cygwin doesn't provide a mkfifo emulation, and I've never heard of anyone successfully connecting to a unix fifo using a Windows Named Pipe. I guess it might be possible via something like Samba?


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
        Changing what child? Could you maybe be more specific on how a solution could be obtained?
        Bests,
        -lilli.
Re^3: run TreeTagger in Windows
by cdarke (Prior) on Mar 03, 2009 at 15:16 UTC
    Did you download mkfifo from the GNU site? Can you drive it from the Windows command-line?

    I suggest you take a look at the Avis::TreeTagger module code - it does nothing more than run the TreeTagger program attached to named pipes. I would not use it on Windows because it uses UNIX hard-coded path names and fork/exec.

    In theory all you have to do is run the TreeTagger program only use IPC::Open2 instead. You will then have two file handles to anonymous pipes instead of named pipes.