[Cygwin] bug on SVN

I am getting a bug building Cygwin on latest SVN :-

llvm[1]: Compiling Process.cpp for Debug build
In file included from /home/ang/git/workbench/lib/System/Process.cpp:29:
/home/ang/git/workbench/lib/System/Unix/Process.inc: In function ‘unsigned int g
etColumns(int)’:
/home/ang/git/workbench/lib/System/Unix/Process.inc:209: error: aggregate ‘winsi
ze ws’ has incomplete type and cannot be defined
/home/ang/git/workbench/lib/System/Unix/Process.inc:210: error: ‘TIOCGWINSZ’ was
not declared in this scope
make[1]: *** [/home/ang/build/workbench/lib/System/Debug/Process.o] Error 1
make[1]: Leaving directory `/home/ang/build/workbench/lib/System’
make: *** [all] Error 1

Having IOCTL.H does not seem to be a strict enough test for struct winsize’es presence.

#ifdef HAVE_SYS_IOCTL_H
// Try to determine the width of the terminal.
struct winsize ws;
if (ioctl(FileID, TIOCGWINSZ, &ws) == 0)
Columns = ws.ws_col;
#endif

I could not see any changes in Process.cpp’s SVN that could have caused this.

Anyone got a clue ?

Aaron

It’s my change, here:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090511/077380.html

Is struct winsize declared anywhere in the Cygwin headers?

  • Doug

I am getting a bug building Cygwin on latest SVN :-

    llvm[1]: Compiling Process.cpp for Debug build
    In file included from /home/ang/git/workbench/lib/System/Process.cpp:29:
    /home/ang/git/workbench/lib/System/Unix/Process.inc: In function 'unsigned int g
    etColumns(int)':
    /home/ang/git/workbench/lib/System/Unix/Process.inc:209: error: aggregate 'winsi
    ze ws' has incomplete type and cannot be defined
    /home/ang/git/workbench/lib/System/Unix/Process.inc:210: error: 'TIOCGWINSZ' was
     not declared in this scope
    make[1]: *** [/home/ang/build/workbench/lib/System/Debug/Process.o] Error 1
    make[1]: Leaving directory `/home/ang/build/workbench/lib/System'
    make: *** [all] Error 1

    Having IOCTL.H does not seem to be a strict enough test for struct winsize'es presence.

    #ifdef HAVE_SYS_IOCTL_H
      // Try to determine the width of the terminal.
      struct winsize ws;
      if (ioctl(FileID, TIOCGWINSZ, &ws) == 0)
        Columns = ws.ws_col;
    #endif

    I could not see any changes in Process.cpp's SVN that could have caused this.

    Anyone got a clue ?

  >It's my change, here:

  >http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090511/077380.html

  >Is struct winsize declared anywhere in the Cygwin headers?

  Doug,

  It is declared in <sys/termios.h>

  Aaron

It is declared in <sys/termios.h>

... which is included by <termios.h>, which might be a bit more
standard? At least, only <termios.h> is listed here:

http://www.opengroup.org/onlinepubs/007908775/headix.html

Cheers,
Jay.

It is declared in <sys/termios.h>

... which is included by <termios.h>, which might be a bit more
standard? At least, only <termios.h> is listed here:

Headers Issue 5 - Index

Cheers Jay, Cygwin has 'termios.h'.

Aaron

Hi Doug,

LLVM is still not building on cygwin. Can you fix it, please?

Thanks,
Jay.

Okay, we’re now checking for <termios.h> in addition to <sys/ioctl.h>. Hopefully, things are working again on Cygwin with r72018 (but I can’t test it here).

  • Doug

Doug,

Thanks, I will be in a position to check it again tomorrow.

Aaron

Okay, we're now checking for <termios.h> in addition to <sys/ioctl.h>.
Hopefully, things are working again on Cygwin with r72018 (but I can't test
it here).

It's still building here, but it definitely gets further than it used
to. Thanks Doug!

Jay.

Okay, we're now checking for <termios.h> in addition to <sys/ioctl.h>.
Hopefully, things are working again on Cygwin with r72018 (but I can't test
it here).

It's still building here, but it definitely gets further than it used
to. Thanks Doug!

Jay,

Do you mean it does not build or does build ?

I had freeked it and added a #include <termios.h> to Cygwins include/sys/ioctrl.h and it built fine.

Aaron

Do you mean it does not build or does build ?

It does build. Sorry if I was unclear.

Thanks,
Jay.

Do you mean it does not build or does build ?

It does build. Sorry if I was unclear.

Builds here fine too.

Thanks Doug,

Aaron