hi,
I'm using libserialport from git to acquire a spectro-photometer that has a classical serial interface and I need to be cross platform.

On Linux all work well.
On MSYS2/mingw64 seems all work well (as now not extensively tested).
On Cygwin64 after the configure step, the make fail with error below.

What I'm missing?

thank you,
Valerio


$ ./configure
...
libserialport configuration summary:

 - Package version................. 0.1.1
 - Library ABI version............. 1:0:1
 - Prefix.......................... /usr/local
 - Building on..................... x86_64-unknown-cygwin
 - Building for.................... x86_64-unknown-cygwin
 - Building shared / static........ yes / yes

Compile configuration:
 - C compiler...................... gcc
 - C compiler version.............. gcc (GCC) 7.4.0
 - C compiler flags................ -g -O2
 - Linker flags....................

user@HOST /cygdrive/d/AMBIENTE/Documents/c/libserialport
$ make
make  all-am
  CC       serialport.lo
serialport.c: In function 'sp_get_port_by_name':
serialport.c:85:14: warning: implicit declaration of function 'realpath'; did you mean 'realloc'? [-Wimplicit-function-declaration]
  char *res = realpath(portname, pathbuf);
              ^~~~~~~~
              realloc
serialport.c:85:14: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
serialport.c: In function 'sp_blocking_write':
serialport.c:811:2: error: unknown type name 'fd_set'; did you mean 'nfds_t'?
  fd_set fds;
  ^~~~~~
  nfds_t
serialport.c:821:3: warning: implicit declaration of function 'timeradd'; did you mean 'timegm'? [-Wimplicit-function-declaration]
   timeradd(&start, &delta, &end);
   ^~~~~~~~
   timegm
serialport.c:824:2: warning: implicit declaration of function 'FD_ZERO' [-Wimplicit-function-declaration]
  FD_ZERO(&fds);
  ^~~~~~~
serialport.c:825:2: warning: implicit declaration of function 'FD_SET'; did you mean 'F_SETLK'? [-Wimplicit-function-declaration]
  FD_SET(port->fd, &fds);
  ^~~~~~
  F_SETLK
serialport.c:836:8: warning: implicit declaration of function 'timercmp'; did you mean 'timegm'? [-Wimplicit-function-declaration]
    if (timercmp(&now, &end, >))
        ^~~~~~~~
        timegm
serialport.c:836:29: error: expected expression before '>' token
    if (timercmp(&now, &end, >))
                             ^
serialport.c:839:4: warning: implicit declaration of function 'timersub'; did you mean 'utimes'? [-Wimplicit-function-declaration]
    timersub(&end, &now, &delta);
    ^~~~~~~~
    utimes
serialport.c:841:12: warning: implicit declaration of function 'select'; did you mean 'sleep'? [-Wimplicit-function-declaration] result = select(port->fd + 1, NULL, &fds, NULL, timeout_ms ? &delta : NULL);
            ^~~~~~
            sleep
serialport.c: In function 'sp_blocking_read':
serialport.c:1037:2: error: unknown type name 'fd_set'; did you mean 'nfds_t'?
  fd_set fds;
  ^~~~~~
  nfds_t
serialport.c:1062:29: error: expected expression before '>' token
    if (timercmp(&now, &end, >))
                             ^
serialport.c: In function 'sp_blocking_read_next':
serialport.c:1174:2: error: unknown type name 'fd_set'; did you mean 'nfds_t'?
  fd_set fds;
  ^~~~~~
  nfds_t
serialport.c:1199:29: error: expected expression before '>' token
    if (timercmp(&now, &end, >))
                             ^
serialport.c: In function 'sp_output_waiting':
serialport.c:1334:22: error: 'TIOCOUTQ' undeclared (first use in this function); did you mean 'TIOCPKT'?
  if (ioctl(port->fd, TIOCOUTQ, &bytes_waiting) < 0)
                      ^~~~~~~~
                      TIOCPKT
serialport.c:1334:22: note: each undeclared identifier is reported only once for each function it appears in
serialport.c: In function 'sp_wait':
serialport.c:1502:29: error: expected expression before '>' token
    if (timercmp(&now, &end, >)) {
                             ^
serialport.c:1507:57: error: expected expression before '>' token
    if ((timeout_overflow = timercmp(&delta, &max_delta, >)))
                                                         ^
make[1]: *** [Makefile:528: serialport.lo] Error 1
make: *** [Makefile:399: all] Error 2


user@HOST /cygdrive/d/AMBIENTE/Documents/c/libserialport
$ uname -a
CYGWIN_NT-6.1 HOST 3.0.4(0.338/5/3) 2019-03-16 09:50 x86_64 Cygwin

user@HOST /cygdrive/d/AMBIENTE/Documents/c/libserialport
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: /cygdrive/i/szsz/tmpp/gcc/gcc-7.4.0-1.x86_64/src/gcc-7.4.0/configure --srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-7.4.0-1.x86_64/src/gcc-7.4.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libcilkrts --enable-libgomp --enable-libitm --enable-libquadmath --enable-libquadmath-support --disable-libssp --enable-libada --disable-symvers --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible --enable-libstdcxx-filesystem-ts
Thread model: posix
gcc version 7.4.0 (GCC)

--
Valerio


_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to