Coder Social home page Coder Social logo

mlba-team / xdispatch Goto Github PK

View Code? Open in Web Editor NEW
76.0 19.0 24.0 4.05 MB

Unmaintained. See https://github.com/emzeat/xdispatch2 for successor project.

Home Page: http://opensource.mlba-team.de/xdispatch

License: Apache License 2.0

Shell 0.28% C 68.99% C++ 21.71% Objective-C 0.12% CMake 4.19% Makefile 0.06% Roff 4.64%
concurrency cpp gcd libdispatch threadpool xdispatch

xdispatch's Issues

master missing build directory contents

The master branch appears to have a placeholder for the build directory rather than the directory and its contents.

Using the build directory from the stable branch almost works, but cmake stops due to a missing definition for "mz_auto_format".

unable to build for Windows

Using msys2 under Windows 10, the following warnings and errors are given, preventing the build of the library.

$ git clone https://github.com/mlba-team/xdispatch.git
Cloning into 'xdispatch'...
remote: Counting objects: 7405, done.
remote: Total 7405 (delta 0), reused 0 (delta 0), pack-reused 7405
Receiving objects: 100% (7405/7405), 4.02 MiB | 3.20 MiB/s, done.
Resolving deltas: 100% (4211/4211), done.
Checking out files: 100% (489/489), done.

$ cd xdispatch

$ git submodule update --init
Submodule 'build' (https://github.com/mlba-team/mz-cmaketools.git) registered for path 'build'
Cloning into '/home/sabine/xdispatch/build'...
Submodule path 'build': checked out '7adb690b7dd9dd08cc8a1edf26092c4354a3d7b6'

$ cmake -G "MSYS Makefiles"
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe
-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/msys64/mingw64/bin/g++.exe
-- Check for working CXX compiler: C:/msys64/mingw64/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: C:/msys64/usr/bin/git.exe (found version "2.19.0")
-- version information for '0.8.0~devel (devel)'
-- running mz compiler detection tools
-- GCC compatible compiler found
-- compiler version 82
-- C++11 support detected
-- 64bit platform
-- Today is: 2018-10-03T19:45:28Z (Year 2018)
-- User is: sabine
-- Compiler version is: 82
-- forcing C++11 support on this platform
-- configuring for build type:
-- Looking for strip utility
-- Looking for strip utility - found
-- Setting binary output path: C:/msys64/home/sabine/xdispatch/bin/
-- Looking for include file sys/event.h
-- Looking for include file sys/event.h - not found
-- Looking for include file kqueue/sys/event.h
-- Looking for include file kqueue/sys/event.h - not found
-- Looking for include file pthread_workqueue.h
-- Looking for include file pthread_workqueue.h - not found
-- Looking for include file dispatch/dispatch.h
-- Looking for include file dispatch/dispatch.h - not found
CMake Warning at CMakeLists.txt:91 (find_package):
  By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5Core", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5Core" with any
  of the following names:

    Qt5CoreConfig.cmake
    qt5core-config.cmake

  Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH or set
  "Qt5Core_DIR" to a directory containing one of the above files.  If
  "Qt5Core" provides a separate development package or SDK, be sure it has
  been installed.


-- adding library libkqueue
-- Looking for EPOLLRDHUP
-- Looking for EPOLLRDHUP - not found
-- Looking for ppoll
-- Looking for ppoll - not found
-- Looking for include file sys/epoll.h
-- Looking for include file sys/epoll.h - not found
-- Looking for include file sys/event.h
-- Looking for include file sys/event.h - not found
-- Looking for include file sys/eventfd.h
-- Looking for include file sys/eventfd.h - not found
-- Looking for include file sys/inotify.h
-- Looking for include file sys/inotify.h - not found
-- Looking for include file sys/signalfd.h
-- Looking for include file sys/signalfd.h - not found
-- Looking for include file sys/timerfd.h
-- Looking for include file sys/timerfd.h - not found
-- building libkqueue as static lib
-- adding library libpthread_workqueue
-- building libpthread_workqueue as static lib
-- adding library dispatch
-- Looking for include file mach/mach_time.h
-- Looking for include file mach/mach_time.h - not found
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for include file crtdbg.h
-- Looking for include file crtdbg.h - found
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for getprogname
-- Looking for getprogname - not found
-- Looking for getexecname
-- Looking for getexecname - not found
-- Looking for program_invocation_short_name
-- Looking for program_invocation_short_name - not found
-- Looking for CLOCK_UPTIME
-- Looking for CLOCK_UPTIME - not found
-- Looking for CLOCK_MONOTONIC
-- Looking for CLOCK_MONOTONIC - found
-- Looking for sysconf
-- Looking for sysconf - not found
-- linking dispatch with: pthread_workqueue;kqueue;ws2_32
-- adding library xdispatch
-- linking xdispatch with: dispatch
-- Configuring done
-- Generating done
-- Build files have been written to: C:/msys64/home/sabine/xdispatch

$ make
Scanning dependencies of target kqueue
[  1%] Building C object libkqueue/CMakeFiles/kqueue.dir/src/common/filter.c.obj
In file included from C:/msys64/home/sabine/xdispatch/libkqueue/src/common/private.h:37,
                 from C:/msys64/home/sabine/xdispatch/libkqueue/src/common/filter.c:24:
C:/msys64/home/sabine/xdispatch/libkqueue/src/windows/platform.h:22: warning: "_WIN32_WINNT" redefined
 #define _WIN32_WINNT 0x0501

In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/crtdefs.h:10,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/assert.h:15,
                 from C:/msys64/home/sabine/xdispatch/libkqueue/src/common/filter.c:17:
C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h:232: note: this is the location of the previous definition
 #define _WIN32_WINNT 0x601

In file included from C:/msys64/home/sabine/xdispatch/libkqueue/src/windows/platform.h:43,
                 from C:/msys64/home/sabine/xdispatch/libkqueue/src/common/private.h:37,
                 from C:/msys64/home/sabine/xdispatch/libkqueue/src/common/filter.c:24:
C:/msys64/home/sabine/xdispatch/libkqueue/include/sys/event.h:179:8: error: redefinition of 'struct timespec'
 struct timespec {
        ^~~~~~~~
In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/sys/stat.h:26,
                 from C:/msys64/home/sabine/xdispatch/libkqueue/src/windows/platform.h:34,
                 from C:/msys64/home/sabine/xdispatch/libkqueue/src/common/private.h:37,
                 from C:/msys64/home/sabine/xdispatch/libkqueue/src/common/filter.c:24:
C:/msys64/mingw64/x86_64-w64-mingw32/include/sys/types.h:89:8: note: originally defined here
 struct timespec {
        ^~~~~~~~
In file included from C:/msys64/home/sabine/xdispatch/libkqueue/src/common/private.h:37,
                 from C:/msys64/home/sabine/xdispatch/libkqueue/src/common/filter.c:24:
C:/msys64/home/sabine/xdispatch/libkqueue/src/windows/platform.h:132:13: error: conflicting types for 'pid_t'
 typedef int pid_t;
             ^~~~~
In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/sys/stat.h:26,
                 from C:/msys64/home/sabine/xdispatch/libkqueue/src/windows/platform.h:34,
                 from C:/msys64/home/sabine/xdispatch/libkqueue/src/common/private.h:37,
                 from C:/msys64/home/sabine/xdispatch/libkqueue/src/common/filter.c:24:
C:/msys64/mingw64/x86_64-w64-mingw32/include/sys/types.h:68:16: note: previous declaration of 'pid_t' was here
 typedef _pid_t pid_t;
                ^~~~~
In file included from C:/msys64/home/sabine/xdispatch/libkqueue/src/common/filter.c:24:
C:/msys64/home/sabine/xdispatch/libkqueue/src/common/private.h:38:11: fatal error: ../common/queue.h: No such file or directory
 # include "../common/queue.h"
           ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [libkqueue/CMakeFiles/kqueue.dir/build.make:63: libkqueue/CMakeFiles/kqueue.dir/src/common/filter.c.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:987: libkqueue/CMakeFiles/kqueue.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Can't build for msvc2013

cmake's output:

== running global configuration
-- determining working directory: y:\Work\xdispatch\Build

== configuring target system 'VS13(Testing)/Windows(Debug)'
-- The C compiler identification is MSVC 18.0.30501.0
-- The CXX compiler identification is MSVC 18.0.30501.0
-- Check for working C compiler using: Visual Studio 12 2013
-- Check for working C compiler using: Visual Studio 12 2013 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 12 2013
-- Check for working CXX compiler using: Visual Studio 12 2013 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found Git: C:/Program Files (x86)/Git/cmd/git.exe (found version "1.8.5.2.msysgit.0")
-- version information for '0.8.0~devel (devel)'
-- running mz compiler detection tools
-- Microsoft Visual Studio Compiler found
-- 32bit platform
-- Today is:
-- User is: username
-- configuring for build type: Debug
-- Setting binary output path: Y:/Work/xdispatch/build/VS13_ProjectFiles/bin/
-- Looking for include file sys/event.h
-- Looking for include file sys/event.h - not found
-- Looking for include file kqueue/sys/event.h
-- Looking for include file kqueue/sys/event.h - not found
-- Looking for include file pthread_workqueue.h
-- Looking for include file pthread_workqueue.h - not found
-- Looking for include file dispatch/dispatch.h
-- Looking for include file dispatch/dispatch.h - not found
-- adding library libkqueue
-- Looking for EPOLLRDHUP
-- Looking for EPOLLRDHUP - not found
-- Looking for ppoll
-- Looking for ppoll - not found
-- Looking for include file sys/epoll.h
-- Looking for include file sys/epoll.h - not found
-- Looking for include file sys/event.h
-- Looking for include file sys/event.h - not found
-- Looking for include file sys/eventfd.h
-- Looking for include file sys/eventfd.h - not found
-- Looking for include file sys/inotify.h
-- Looking for include file sys/inotify.h - not found
-- Looking for include file sys/signalfd.h
-- Looking for include file sys/signalfd.h - not found
-- Looking for include file sys/timerfd.h
-- Looking for include file sys/timerfd.h - not found
-- building libkqueue as static lib
-- adding library libpthread_workqueue
-- building libpthread_workqueue as static lib
-- adding library dispatch
-- Looking for include file mach/mach_time.h
-- Looking for include file mach/mach_time.h - not found
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for include file crtdbg.h
-- Looking for include file crtdbg.h - found
-- Looking for include file pthread.h
-- Looking for include file pthread.h - not found
-- Looking for getprogname
-- Looking for getprogname - not found
-- Looking for getexecname
-- Looking for getexecname - not found
-- Looking for program_invocation_short_name
-- Looking for program_invocation_short_name - not found
-- Looking for CLOCK_UPTIME
-- Looking for CLOCK_UPTIME - not found
-- Looking for CLOCK_MONOTONIC
-- Looking for CLOCK_MONOTONIC - not found
-- Looking for sysconf
-- Looking for sysconf - not found
-- linking dispatch with: pthread_workqueue;kqueue
-- adding library xdispatch
-- linking xdispatch with: dispatch
-- Configuring done
-- Generating done
-- Build files have been written to: Y:/Work/xdispatch/build/VS13_ProjectFiles
All DONE
Press any key to continue . . .

Build dispatch project output:

1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
1>  Checking Build System
1>  CMake does not need to re-run because Y:/Work/xdispatch/build/VS13_ProjectFiles/CMakeFiles/generate.stamp is up-to-date.
1>  CMake does not need to re-run because Y:/Work/xdispatch/build/VS13_ProjectFiles/libkqueue/CMakeFiles/generate.stamp is up-to-date.
1>  CMake does not need to re-run because Y:/Work/xdispatch/build/VS13_ProjectFiles/libpthread_workqueue/CMakeFiles/generate.stamp is up-to-date.
1>  CMake does not need to re-run because Y:/Work/xdispatch/build/VS13_ProjectFiles/libdispatch/CMakeFiles/generate.stamp is up-to-date.
1>  CMake does not need to re-run because Y:/Work/xdispatch/build/VS13_ProjectFiles/libxdispatch/CMakeFiles/generate.stamp is up-to-date.
2>------ Build started: Project: kqueue, Configuration: Debug Win32 ------
3>------ Build started: Project: pthread_workqueue, Configuration: Debug Win32 ------
2>  Building Custom Rule y:/Work/xdispatch/libkqueue/CMakeLists.txt
2>  CMake does not need to re-run because Y:\Work\xdispatch\build\VS13_ProjectFiles\libkqueue\CMakeFiles\generate.stamp is up-to-date.
3>  Building Custom Rule y:/Work/xdispatch/libpthread_workqueue/CMakeLists.txt
3>  CMake does not need to re-run because Y:\Work\xdispatch\build\VS13_ProjectFiles\libpthread_workqueue\CMakeFiles\generate.stamp is up-to-date.
2>  platform.c
3>  manager.c
3>  platform.c
2>y:\work\xdispatch\libkqueue\src\windows\../common/private.h(38): fatal error C1083: Cannot open include file: '../common/queue.h': No such file or directory
2>  read.c
2>y:\work\xdispatch\libkqueue\src\windows\../common/private.h(38): fatal error C1083: Cannot open include file: '../common/queue.h': No such file or directory
2>  timer.c
3>y:\work\xdispatch\libpthread_workqueue\src\windows\../private.h(118): fatal error C1189: #error :  Need to define _hardware_pause() for this architure (..\..\..\libpthread_workqueue\src\windows\platform.c)
3>y:\work\xdispatch\libpthread_workqueue\src\windows\../private.h(118): fatal error C1189: #error :  Need to define _hardware_pause() for this architure (..\..\..\libpthread_workqueue\src\windows\manager.c)
3>  thread_info.c
3>  thread_rt.c
3>  api.c
3>  witem_cache.c
2>y:\work\xdispatch\libkqueue\src\windows\../common/private.h(38): fatal error C1083: Cannot open include file: '../common/queue.h': No such file or directory
2>  user.c
3>y:\work\xdispatch\libpthread_workqueue\src\private.h(118): fatal error C1189: #error :  Need to define _hardware_pause() for this architure (..\..\..\libpthread_workqueue\src\api.c)
2>y:\work\xdispatch\libkqueue\src\windows\../common/private.h(38): fatal error C1083: Cannot open include file: '../common/queue.h': No such file or directory
2>  map.c
3>y:\work\xdispatch\libpthread_workqueue\src\private.h(118): fatal error C1189: #error :  Need to define _hardware_pause() for this architure (..\..\..\libpthread_workqueue\src\witem_cache.c)
2>y:\work\xdispatch\libkqueue\src\common\private.h(38): fatal error C1083: Cannot open include file: '../common/queue.h': No such file or directory
2>  filter.c
2>y:\work\xdispatch\libkqueue\src\common\private.h(38): fatal error C1083: Cannot open include file: '../common/queue.h': No such file or directory
2>  knote.c
2>y:\work\xdispatch\libkqueue\src\common\private.h(38): fatal error C1083: Cannot open include file: '../common/queue.h': No such file or directory
2>  kevent.c
2>y:\work\xdispatch\libkqueue\src\common\private.h(38): fatal error C1083: Cannot open include file: '../common/queue.h': No such file or directory
2>  kqueue.c
2>y:\work\xdispatch\libkqueue\src\common\private.h(38): fatal error C1083: Cannot open include file: '../common/queue.h': No such file or directory
2>  Generating Code...
4>------ Build started: Project: dispatch, Configuration: Debug Win32 ------
4>  Building Custom Rule y:/Work/xdispatch/libdispatch/CMakeLists.txt
4>  CMake does not need to re-run because Y:\Work\xdispatch\build\VS13_ProjectFiles\libdispatch\CMakeFiles\generate.stamp is up-to-date.
4>  apply.c
4>  benchmark.c
4>  blocks.c
4>  continuation_cache.c
4>  debug.c
4>  legacy.c
4>  object.c
4>  once.c
4>  protocolServer.c
4>  protocolUser.c
4>  queue.c
4>  queue_kevent.c
4>  semaphore.c
4>  shared_constructor.c
4>  source.c
4>..\..\..\libdispatch\src\shared_constructor.c(56): warning C4013: 'libkqueue_thread_attach' undefined; assuming extern returning int
4>..\..\..\libdispatch\src\shared_constructor.c(72): warning C4013: 'libkqueue_thread_detach' undefined; assuming extern returning int
4>  source_kevent.c
4>  mach.c
4>  tsd.c
4>  platform.c
4>  time.c
4>  time.c
4>LINK : fatal error LNK1104: cannot open file '..\bin\Debug\pthread_workqueueD.lib'
5>------ Build started: Project: xdispatch, Configuration: Debug Win32 ------
5>  Building Custom Rule y:/Work/xdispatch/libxdispatch/CMakeLists.txt
5>  CMake does not need to re-run because Y:\Work\xdispatch\build\VS13_ProjectFiles\libxdispatch\CMakeFiles\generate.stamp is up-to-date.
5>  base.cpp
5>  execution.cpp
5>y:\work\xdispatch\libxdispatch\src\../include/xdispatch/platform.h(101): fatal error C1083: Cannot open include file: 'tr1/functional': No such file or directory (..\..\..\libxdispatch\src\base.cpp)
5>  group.cpp
5>y:\work\xdispatch\libxdispatch\src\../include/xdispatch/platform.h(101): fatal error C1083: Cannot open include file: 'tr1/functional': No such file or directory (..\..\..\libxdispatch\src\execution.cpp)
5>  once.cpp
5>y:\work\xdispatch\libxdispatch\src\../include/xdispatch/platform.h(101): fatal error C1083: Cannot open include file: 'tr1/functional': No such file or directory (..\..\..\libxdispatch\src\group.cpp)
5>  queue.cpp
5>y:\work\xdispatch\libxdispatch\src\../include/xdispatch/platform.h(101): fatal error C1083: Cannot open include file: 'tr1/functional': No such file or directory (..\..\..\libxdispatch\src\once.cpp)
5>  semaphore.cpp
5>y:\work\xdispatch\libxdispatch\src\../include/xdispatch/platform.h(101): fatal error C1083: Cannot open include file: 'tr1/functional': No such file or directory (..\..\..\libxdispatch\src\queue.cpp)
5>  shared_constructor.cpp
5>y:\work\xdispatch\libxdispatch\src\../include/xdispatch/platform.h(101): fatal error C1083: Cannot open include file: 'tr1/functional': No such file or directory (..\..\..\libxdispatch\src\semaphore.cpp)
5>  source.cpp
5>y:\work\xdispatch\libxdispatch\src\../include/xdispatch/platform.h(101): fatal error C1083: Cannot open include file: 'tr1/functional': No such file or directory (..\..\..\libxdispatch\src\shared_constructor.cpp)
5>  source_internal.cpp
5>y:\work\xdispatch\libxdispatch\src\../include/xdispatch/platform.h(101): fatal error C1083: Cannot open include file: 'tr1/functional': No such file or directory (..\..\..\libxdispatch\src\source.cpp)
5>  synchronized.cpp
5>y:\work\xdispatch\libxdispatch\src\../include/xdispatch/platform.h(101): fatal error C1083: Cannot open include file: 'tr1/functional': No such file or directory (..\..\..\libxdispatch\src\source_internal.cpp)
5>  timer.cpp
5>y:\work\xdispatch\libxdispatch\src\../include/xdispatch/platform.h(101): fatal error C1083: Cannot open include file: 'tr1/functional': No such file or directory (..\..\..\libxdispatch\src\synchronized.cpp)
5>y:\work\xdispatch\libxdispatch\src\../include/xdispatch/platform.h(101): fatal error C1083: Cannot open include file: 'tr1/functional': No such file or directory (..\..\..\libxdispatch\src\timer.cpp)
========== Build: 1 succeeded, 4 failed, 0 up-to-date, 0 skipped ==========

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.