Menu

#314 Fix native build for CYGWIN.

v3.x
closed-accepted
nobody
None
bugfix
2021-11-02
2021-10-31
No

At the moment, it is not possible to build an executable using CYGWIN POSIX layer because W32API files conflict with the ones of NEWLIB if they are used together. So, the configure script must distinguish between them. Hopefully, it is an easy task and in my opinion the script can be simplified a bit if using just is_win32 rather than the long list of compilers.
Attached patch describes my solution.

1 Attachments

Discussion

  • Carlo Bramini

    Carlo Bramini - 2021-10-31

    After applying this fix, VICE can be built and executed on CYGWIN with its X server.

    EDIT: this is an example of the errors that you get:

      CC       socketdrv.o
    In file included from /usr/include/w32api/winsock.h:36,
                     from ../../../vice/src/socketdrv/socket-win32-drv.c:30,
                     from ../../../vice/src/socketdrv/socketdrv.c:44:
    /usr/include/w32api/psdk_inc/_fd_types.h:100:2: warning: #warning "fd_set and associated macros have been defined in sys/types.      This can cause runtime problems with W32 sockets" [-Wcpp]
      100 | #warning "fd_set and associated macros have been defined in sys/types.  \
          |  ^~~~~~~
    In file included from ../../../vice/src/socketdrv/socket-win32-drv.c:30,
                     from ../../../vice/src/socketdrv/socketdrv.c:44:
    /usr/include/w32api/winsock.h:299:34: error: conflicting types for select; have int(int,  fd_set *, fd_set *, fd_set *, struct __ms_timeval * const)
      299 |   WINSOCK_API_LINKAGE int WSAAPI select(int nfds,fd_set *readfds,fd_set *writefds,fd_set *exceptfds,const PTIMEVAL timeout);
          |                                  ^~~~~~
    compilation terminated due to -Wfatal-errors.
    
     

    Last edit: Carlo Bramini 2021-10-31
  • gpz

    gpz - 2021-10-31

    Does it actually work complete with sound and hw scaling etc?

     
    • Carlo Bramini

      Carlo Bramini - 2021-10-31

      Here, it works everything fine.
      I configured it with:

      configure --enable-silent-rules --without-alsa --prefix=/home/Carlo/inst_vice
      

      I had to disable ALSA otherwise the configuration process stops.
      After doing "make install", I started pulseaudio with:

      pulseaudio --start
      

      Finally, I started xterm and X server with xlaunch tool, I went into my inst_vice/bin directory and I launched x64sc.exe.
      Audio is working fine.
      Graphic output is also fine (I attached an image with VICE running into a maximized window).
      I tried to load and run some programs from some D64 and they also worked fine. The programs are some BASIC source files that I typed from some old magazines in my hands.

       

      Last edit: Carlo Bramini 2021-10-31
  • Marco van den Heuvel

    Applied in rev 41046, thanks for the patch.

     
  • Marco van den Heuvel

    • status: open --> closed-accepted
     

Log in to post a comment.