gear-lib icon indicating copy to clipboard operation
gear-lib copied to clipboard

Doesn't build on Cygwin!

Open shlwapi opened this issue 1 year ago • 1 comments

Administrator@Admin ~/gear-lib/build_cygwin
$ cmake ..
-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is GNU 11.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- ============= Compile Env =============
--  CPU Info:    x86_64
--   OS Info:    CYGWIN-3.3.6-341.x86_64
-- Host Info:    CYGWIN
-- C COMPILER:   GNU-11.3.0
-- ============= Compile Env =============
-- ============= Project Info =============
-- src directory:          /home/Administrator/gear-lib
-- binary output path:     /home/Administrator/gear-lib/build_cygwin
-- executable output path: /home/Administrator/gear-lib/build_cygwin/build/bin
-- library output path:    /home/Administrator/gear-lib/build_cygwin/build/lib
-- ============= Project Info =============
-- check env unknown CYGWIN
-- Configuring done
-- Generating done
-- Build files have been written to: /home/Administrator/gear-lib/build_cygwin

Administrator@Admin ~/gear-lib/build_cygwin
$ make -j4
[  1%] Building C object gear-lib/libposix/CMakeFiles/posix.dir/libposix.c.o
[  2%] Building C object gear-lib/libstrex/CMakeFiles/strex.dir/libstrex.c.o
[  4%] Building C object gear-lib/libdarray/CMakeFiles/darray.dir/libdarray.c.o
[  5%] Building C object gear-lib/libdict/CMakeFiles/dict.dir/libdict.c.o
[  7%] Linking C static library ../../build/lib/libposix.a
[ 10%] Building C object gear-lib/libdict/CMakeFiles/dict.dir/test_libdict.c.o
[ 10%] Building C object gear-lib/libstrex/CMakeFiles/strex.dir/test_libstrex.c.o
[ 11%] Building C object gear-lib/libdarray/CMakeFiles/darray.dir/libdstring.c.o
[ 13%] Built target posix
[ 13%] Linking C static library ../../build/lib/libstrex.a
[ 14%] Linking C static library ../../build/lib/libdict.a
[ 16%] Building C object gear-lib/libqueue/CMakeFiles/queue.dir/libqueue.c.o
[ 17%] Building C object gear-lib/libdarray/CMakeFiles/darray.dir/libserializer.c.o
[ 17%] Built target strex
[ 17%] Built target dict
/home/Administrator/gear-lib/gear-lib/libqueue/libqueue.c:31:10: fatal error: sys/eventfd.h: No such file or directory
   31 | #include <sys/eventfd.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [gear-lib/libqueue/CMakeFiles/queue.dir/build.make:76: gear-lib/libqueue/CMakeFiles/queue.dir/libqueue.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:487: gear-lib/libqueue/CMakeFiles/queue.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 19%] Building C object gear-lib/libdarray/CMakeFiles/darray.dir/test_libdarray.c.o
[ 20%] Building C object gear-lib/libthread/CMakeFiles/thread.dir/liblock.c.o
[ 22%] Building C object gear-lib/libgevent/CMakeFiles/gevent.dir/libgevent.c.o
[ 23%] Building C object gear-lib/libthread/CMakeFiles/thread.dir/libthread.c.o
[ 25%] Linking C static library ../../build/lib/libdarray.a
/home/Administrator/gear-lib/gear-lib/libgevent/libgevent.c: In function ‘gevent_base_create’:
/home/Administrator/gear-lib/gear-lib/libgevent/libgevent.c:116:20: warning: implicit declaration of function ‘eventfd’ [-Wimplicit-function-declaration]
  116 |     eb->inner_fd = eventfd(0, 0);
      |                    ^~~~~~~
[ 26%] Linking C static library ../../build/lib/libgevent.a
[ 28%] Linking C static library ../../build/lib/libthread.a
[ 28%] Built target darray
[ 28%] Built target gevent
[ 28%] Built target thread
make: *** [Makefile:91: all] Error 2

shlwapi avatar Sep 11 '22 03:09 shlwapi

thansk for your practice,the each libxxx which compile failed should be stubbed until fix compile error. the eventfd is linux native api, and should be porting to windows or mingw well

gozfree avatar Sep 12 '22 02:09 gozfree