cygwin issues

107 views
Skip to first unread message

mscdex

unread,
Oct 3, 2010, 5:41:56 AM10/3/10
to nodejs
So I have cygwin and all the necessary build tools installed and the
necessary config.h files in place for libev and libeio, but I'm unable
to build (at least) libev due to a compiler error (on 48d7a1e):

/usr/include/stdio.h:53 error: parse error before "fpos_t"

Following that are about half a dozen other similar messages involving
fpos_t or the '*' token, etc. That is with the latest version of gcc
available with cygwin (3.4.4).

Using a custom build of gcc (4.4.3) under cygwin gives a few less
errors, but about the same thing: /usr/include/stdio.h:53 error:
expected '=', ',', ';', 'asm', '__attribute__' before 'fpos_t'

Again, several errors after that complaining about expected tokens.

I've never previously tried to build node on cygwin before tonight.
Any cygwin experts have any ideas?

Bert Belder

unread,
Oct 3, 2010, 6:26:38 PM10/3/10
to nodejs
Does building from the v0.2 branch work?
I can't build the latest master either, apparently the config.h files
for libeio and libev are missing.

mscdex

unread,
Oct 3, 2010, 6:52:36 PM10/3/10
to nodejs
On Oct 3, 6:26 pm, Bert Belder <bertbel...@gmail.com> wrote:
> I can't build the latest master either, apparently the config.h files
> for libeio and libev are missing.

Yes, I've generated those and stuck them in the correct directories
for libev and libeio. You can find the config.h files here:
http://groups.google.com/group/nodejs-dev/msg/676331b46f5494ba

I have not tried 0.2 yet. I was testing the master branch mainly
because I wanted to test the new cygwin config.h files.

Raffaele Sena

unread,
Oct 3, 2010, 7:04:11 PM10/3/10
to nod...@googlegroups.com

ok, the problem is the file path cygwin/config.h

This is overriding the file /usr/include/cygwin/config.h, that has the "magic" to force the definition of _fpos64_t.

The most ugly solution I could think to verify that I could build was to add the following include to to libev/libeio cygwin/config.h

#include "/usr/include/cygwin/config.h"

This works but it's really really bad.

A better solution is what it's done for c-ares (that I think already had a cygwin port) :

wscript:
node.includes += ' deps/c-ares deps/c-ares/' + bld.env['DEST_OS'] + '-' + bld.env['DEST_CPU']

In this case the platform depended folder is called cygwin-x86 instead of cygwin (of course doing this would force creating processor specific folders for each OS, even if they all contain the same config.h file)

Maybe there is a better way to organize the include directories so that this doesn't happen but right now I can't think of anything else.

-- Raffaele


On Oct 3, 2010 8:44am, raf...@gmail.com wrote:
> I am getting the same errors and I am looking into it.
>
> Note that even without these errors you will not be able to compile node with gcc 3.x.
> Recent changes to v8 require gcc 4 (that actually has always been a requirement for v8, but until the last update things would compile with gcc 3.x too)
>
> -- Raffaele

>
> On Oct 3, 2010 2:41am, mscdex msc...@gmail.com> wrote:
> > So I have cygwin and all the necessary build tools installed and the
> >
> > necessary config.h files in place for libev and libeio, but I'm unable
> >
> > to build (at least) libev due to a compiler error (on 48d7a1e):
> >
> >
> >
> > /usr/include/stdio.h:53 error: parse error before "fpos_t"
> >
> >
> >
> > Following that are about half a dozen other similar messages involving
> >
> > fpos_t or the '*' token, etc. That is with the latest version of gcc
> >
> > available with cygwin (3.4.4).
> >
> >
> >
> > Using a custom build of gcc (4.4.3) under cygwin gives a few less
> >
> > errors, but about the same thing: /usr/include/stdio.h:53 error:
> >
> > expected '=', ',', ';', 'asm', '__attribute__' before 'fpos_t'
> >
> >
> >
> > Again, several errors after that complaining about expected tokens.
> >
> >
> >
> > I've never previously tried to build node on cygwin before tonight.
> >
> > Any cygwin experts have any ideas?
> >
> >
> >
> > --
> >
> > You received this message because you are subscribed to the Google Groups "nodejs" group.
> >
> > To post to this group, send email to nod...@googlegroups.com.
> >
> > To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> >
> > For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
> >
> >
> >

mscdex

unread,
Oct 3, 2010, 7:28:16 PM10/3/10
to nodejs
On Oct 3, 7:04 pm, Raffaele Sena <raff...@gmail.com> wrote:
> A better solution is what it's done for c-ares (that I think already had a
> cygwin port) :
>
> wscript:
> node.includes += ' deps/c-ares deps/c-ares/' + bld.env['DEST_OS'] + '-' +
> bld.env['DEST_CPU']
>
> In this case the platform depended folder is called cygwin-x86 instead of
> cygwin (of course doing this would force creating processor specific folders
> for each OS, even if they all contain the same config.h file)
>
> Maybe there is a better way to organize the include directories so that this
> doesn't happen but right now I can't think of anything else.

Yeah, this was directory format ry originally had but later changed it
because the config.h files aren't dependent on the cpu arch. Maybe
reverting back to that then, otherwise there will need to be an
explicit exception for cygwin in the wscript.

Also, as an update to my previous post: 0.2.3 compiled just fine with
gcc 4.4.3 on cygwin.

Raffaele Sena

unread,
Oct 3, 2010, 7:56:28 PM10/3/10
to nod...@googlegroups.com
The other option would be to have a config folder in deps and do something like this:

deps/config:
  linux:
     libev:
       config.h
     libeio
       config.h
  cygwin:
     libev:
       config.h
     libeio:
       config.h

Again, the purpose here is to not override the system cygwin/config.h with one of those local cygwin/config.h files

--
Reply all
Reply to author
Forward
0 new messages