fatal error: spawn.h: No such file or directory

Bug #1048945 reported by Krzysztof Parjaszewski
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Gearman
Confirmed
Undecided
Brian Aker

Bug Description

This happenes on Cygwin + Windows x86, Windows 7, Gearman
version 1.1.0 Wed Sep 5 08:33:37 PDT 2012

I have gone through the instruction:
http://www.phpvs.net/2010/11/30/installing-gearman-and-gearmand-on-windows-with-cygwin/

And stopped on the make for gearman:

  CXX libgearman/libgearman_libgearman_la-worker.lo
  CXX libgearman/libgearman_libgearman_la-pipe.lo
  CXXLD libgearman/libgearman.la
libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin shared libraries
  CXX libtest/libtest_libtest_la-dns.lo
In file included from ./libtest/server.h:39:0,
                 from ./libtest/test.hpp:57,
                 from ./libtest/common.h:68,
                 from libtest/dns.cc:38:
./libtest/cmdline.h:39:19: fatal error: spawn.h: No such file or directory
compilation terminated.
Makefile:4994: recipe for target `libtest/libtest_libtest_la-dns.lo' failed
make[1]: *** [libtest/libtest_libtest_la-dns.lo] Error 1
make[1]: Leaving directory `/cygdrive/c/cygwin/home/Gearmand'
Makefile:2314: recipe for target `all' failed
make: *** [all] Error 2

Tags: cygwin windows

Related branches

description: updated
Brian Aker (brianaker)
Changed in gearmand:
assignee: nobody → Brian Aker (brianaker)
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

posix_spawn is not implemented in Cygwin

http://cygwin.com/cygwin-api/std-notimpl.html

Changed in gearmand:
status: New → Confirmed
Revision history for this message
Nick Kennedy (nick-kennedy) wrote :

I've got the current stable version of gearmand working in Windows using cygwin. The only references to spawn.h are in libtest, which is not needed for a working installation. To get it to compile, I made the following changes to /Makefile.am :

39c39
< include libtest/include.am
---
> # include libtest/include.am
52c52
< include tests/include.am
---
> # include tests/include.am

I also needed to edit thread.cc in libgearman-server to allow for the unsupported pthread_attr_setscope in cygwin:

391,392c391,395
< (void) pthread_attr_destroy(&attr);
< return gearmand_perror(error, "pthread_attr_setscope");
---
> if (error != 134)
> {
> (void) pthread_attr_destroy(&attr);
> return gearmand_perror(error, "pthread_attr_setscope");
> }

I then reran:
aclocal -I m4
autoconf
automake
./configure
make
make install

Because I was missing some of the dependencies (Sphinx, Postgresql, TokyoCabinet and Memcached), automake complained at me and so I also had to comment out those .am files as needed to get automake to run. There may be a better way of doing this, but otherwise automake complained that the relevant items weren't in AM_CONDITIONAL.

I've tested out gearmand and have used gearman to act as a client and worker on both the same machine and using a Ubuntu VM to connect to the Windows hosted gearman server.

In the long term, it would be better to address the problems with libtest to allow it to run without spawn.h, but that's beyond my current understanding.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.