sw icon indicating copy to clipboard operation
sw copied to clipboard

Building sw on macOS - error: incomplete type; error: cannot initialize object parameter

Open SamuelMarks opened this issue 3 years ago • 19 comments

Describe the bug Last output of sw build -static after running on 7ce601e30bffd31598b746831a439b181eaa6b04:

[830/833] generate: ".sw/storage/pkg/8e/71/b3e2/obj/bld/591737/bd/options_cl.generated.cpp", ".sw/storage/pkg/8e/71/b3e2/obj/bld/591737/bd/options_cl.generated.h"
[831/833] [config pch]
Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:764, function execute1: When executing: [config pch]
In file included from <built-in>:433:
<command line>:151:9: warning: 'SW_BUILDER_API' macro redefined [-Wmacro-redefined]
#define SW_BUILDER_API 
        ^
<command line>:150:9: note: previous definition is here
#define SW_BUILDER_API SW_EXPORT
        ^
<command line>:153:9: warning: 'SW_CORE_API' macro redefined [-Wmacro-redefined]
#define SW_CORE_API 
        ^
<command line>:152:9: note: previous definition is here
#define SW_CORE_API SW_EXPORT
        ^
<command line>:155:9: warning: 'SW_DRIVER_CPP_API' macro redefined [-Wmacro-redefined]
#define SW_DRIVER_CPP_API 
        ^
<command line>:154:9: note: previous definition is here
#define SW_DRIVER_CPP_API SW_EXPORT
        ^
<command line>:160:9: warning: 'SW_MANAGER_API' macro redefined [-Wmacro-redefined]
#define SW_MANAGER_API 
        ^
<command line>:159:9: note: previous definition is here
#define SW_MANAGER_API SW_EXPORT
        ^
<command line>:163:9: warning: 'SW_SUPPORT_API' macro redefined [-Wmacro-redefined]
#define SW_SUPPORT_API 
        ^
<command line>:162:9: note: previous definition is here
#define SW_SUPPORT_API SW_EXPORT
        ^
In file included from .sw/storage/tmp/pch/28/sw.1.a2a6fd.c270ea.h:1:
In file included from .sw/storage/pkg/8e/71/b3e2/src/sdir/src/sw/driver/sw.h:7:
In file included from .sw/storage/pkg/8e/71/b3e2/src/sdir/src/sw/driver/build.h:6:
In file included from .sw/storage/pkg/8e/71/b3e2/src/sdir/src/sw/driver/checks_storage.h:6:
In file included from .sw/storage/pkg/8e/71/b3e2/src/sdir/src/sw/driver/checks.h:6:
In file included from .sw/storage/pkg/8e/71/b3e2/src/sdir/src/sw/driver/options.h:6:
In file included from .sw/storage/pkg/8e/71/b3e2/src/sdir/src/sw/driver/dependency.h:9:
In file included from .sw/storage/pkg/9d/ae/0e34/src/sdir/src/sw/core/target.h:8:
.sw/storage/pkg/0b/f8/87ab/src/sdir/src/sw/builder/command.h:167:10: error: incomplete type 'std::__1::thread' named in nested name specifier
    std::thread::id tid;
    ~~~~~^~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__threading_support:404:24: note: forward declaration of 'std::__1::thread'
class _LIBCPP_TYPE_VIS thread;
                       ^
In file included from .sw/storage/tmp/pch/28/sw.1.a2a6fd.c270ea.h:1:
In file included from .sw/storage/pkg/8e/71/b3e2/src/sdir/src/sw/driver/sw.h:7:
In file included from .sw/storage/pkg/8e/71/b3e2/src/sdir/src/sw/driver/build.h:6:
In file included from .sw/storage/pkg/8e/71/b3e2/src/sdir/src/sw/driver/checks_storage.h:6:
In file included from .sw/storage/pkg/8e/71/b3e2/src/sdir/src/sw/driver/checks.h:6:
In file included from .sw/storage/pkg/8e/71/b3e2/src/sdir/src/sw/driver/options.h:6:
In file included from .sw/storage/pkg/8e/71/b3e2/src/sdir/src/sw/driver/dependency.h:9:
In file included from .sw/storage/pkg/9d/ae/0e34/src/sdir/src/sw/core/target.h:8:
.sw/storage/pkg/0b/f8/87ab/src/sdir/src/sw/builder/command.h:273:38: error: cannot initialize object parameter of type 'const sw::builder::Command' with an expression of type 'sw::builder::CommandSequence'
        auto c = std::make_shared<C>(getContext(), std::forward<Args>(args)...);
                                     ^~~~~~~~~~
In file included from .sw/storage/tmp/pch/28/sw.1.a2a6fd.c270ea.h:1:
In file included from .sw/storage/pkg/8e/71/b3e2/src/sdir/src/sw/driver/sw.h:15:
.sw/storage/pkg/9d/ae/0e34/src/sdir/src/sw/core/sw_context.h:70:20: error: incomplete type 'std::__1::thread' named in nested name specifier
    void stop(std::thread::id);
              ~~~~~^~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__threading_support:404:24: note: forward declaration of 'std::__1::thread'
class _LIBCPP_TYPE_VIS thread;
                       ^
In file included from .sw/storage/tmp/pch/28/sw.1.a2a6fd.c270ea.h:1:
In file included from .sw/storage/pkg/8e/71/b3e2/src/sdir/src/sw/driver/sw.h:15:
.sw/storage/pkg/9d/ae/0e34/src/sdir/src/sw/core/sw_context.h:92:19: error: incomplete type 'std::__1::thread' named in nested name specifier
    std::map<std::thread::id, SwBuild *> active_operations;
             ~~~~~^~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__threading_support:404:24: note: forward declaration of 'std::__1::thread'
class _LIBCPP_TYPE_VIS thread;
                       ^
5 warnings and 4 errors generated.
command failed: exit code = 1
Total errors: 1

Expected behavior It to build without error (warnings are ok I guess…)

To Reproduce Run on macOS

Information:

  • Paste sw --version output.
sw.client.sw version 1.0.0
git revision 22757a4388a99010ffdee79011fbde5af50cee17 plus 8 modified files
assembled on
22.03.2021 10:40:40 UTC
22.03.2021 21:40:40 AEDT
  • Write OS, its version (host/target) macOS 11.1 (20C69)
  • Describe your compiler, its version
$ clang --version
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin20.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

SamuelMarks avatar Apr 06 '21 11:04 SamuelMarks

I've pushed a fix, but there are more issues probably. I'm crosscompiling to macos from windows, so some issues may be hidden for me.

egorpugin avatar Apr 06 '21 11:04 egorpugin

It seems github CI uses macos-10.15. See green status https://github.com/SoftwareNetwork/sw/runs/2277395294

egorpugin avatar Apr 06 '21 11:04 egorpugin

Added 11.0 CI https://github.com/SoftwareNetwork/sw/runs/2277798754

egorpugin avatar Apr 06 '21 11:04 egorpugin

Interesting. I suppose Travis CI could be used? - I can port your GitHub Actions for you on the weekend if you like?

EDIT: Great to see GitHub Actions does have a config option for that :)

SamuelMarks avatar Apr 06 '21 11:04 SamuelMarks

No, I removed travis and appveyor some time ago. Travis-CI is not in a very good shape now.

egorpugin avatar Apr 06 '21 11:04 egorpugin

Try now with -sd flag. It should update packages db.

egorpugin avatar Apr 07 '21 10:04 egorpugin

CMakeLists.txt

cmake_minimum_required(VERSION 3.2)
project(pp VERSION 0.0.0 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 14)

file(DOWNLOAD https://raw.githubusercontent.com/ocornut/imgui/6a161b8/examples/example_allegro5/main.cpp src/main.cpp
     EXPECTED_HASH SHA256=1138d4b862d4349beeaea984005b958c185c44ef4edba6a96db7d8c6bde33cb4)

set(src ${CMAKE_CURRENT_BINARY_DIR}/src/main.cpp)

find_package(SW REQUIRED)
sw_add_package(org.sw.demo.ocornut.imgui)
sw_execute()

add_executable(${PROJECT_NAME} ${src})
target_link_libraries(${PROJECT_NAME} PRIVATE org.sw.demo.ocornut.imgui)

sh

$ sudo sw --self-upgrade -sd
$ sw --self-upgrade -sd
$ rm -rf build && mkdir $_ && cd $_
$ cmake ..
/tmp/imgui3/build $ cmake ..
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found SW: /usr/local/bin/sw  
-- sw: processing dependencies
Downloading database from origin remote
Downloading: [org.sw.demo.google.grpc.proto-1.37.0]/[Source Archive]
Downloading: [org.sw.demo.google.grpc.core.tsi-1.37.0]/[Source Archive]
Downloading: [org.sw.demo.google.grpc.core.plugin_registry-1.37.0]/[Source Archive]
Downloading: [org.sw.sw.client.builder-0.4.2]/[Source Archive]
Downloading: [org.sw.demo.google.grpc.cpp-1.37.0]/[Source Archive]
Downloading: [org.sw.demo.google.grpc.core.lib-1.37.0]/[Source Archive]
Downloading: [org.sw.sw.client.protos-0.4.2]/[Source Archive]
Downloading: [org.sw.sw.client.manager-0.4.2]/[Source Archive]
Downloading: [org.sw.sw.client.core-0.4.2]/[Source Archive]
Downloading: [org.sw.demo.google.abseil-2021.3.24.0]/[Source Archive]
Unpacking  : [org.sw.demo.google.grpc.core.plugin_registry-1.37.0]/[Source Archive]
Downloading: [org.sw.sw.client.driver.cpp-0.4.2]/[Source Archive]
Unpacking  : [org.sw.sw.client.builder-0.4.2]/[Source Archive]
Downloading: [org.sw.demo.google.grpc.plugin_support-1.37.0]/[Source Archive]
Unpacking  : [org.sw.sw.client.protos-0.4.2]/[Source Archive]
Unpacking  : [org.sw.demo.google.grpc.cpp-1.37.0]/[Source Archive]
Downloading: [org.sw.demo.google.grpc.cpp.plugin-1.37.0]/[Source Archive]
Unpacking  : [org.sw.sw.client.core-0.4.2]/[Source Archive]
Unpacking  : [org.sw.demo.google.grpc.core.tsi-1.37.0]/[Source Archive]
Downloading: [org.sw.demo.google.grpc.third_party.address_sorting-1.37.0]/[Source Archive]
Downloading: [org.sw.sw.client.driver.cpp.self_builder-0.4.2]/[Source Archive]
Unpacking  : [org.sw.sw.client.manager-0.4.2]/[Source Archive]
Downloading: [org.sw.sw.client.driver.cpp.cl_generator-0.4.2]/[Source Archive]
Downloading: [org.sw.sw.client.support-0.4.2]/[Source Archive]
Unpacking  : [org.sw.demo.google.grpc.core.lib-1.37.0]/[Source Archive]
Downloading: [org.sw.demo.google.grpc.core.ext-1.37.0]/[Source Archive]
Unpacking  : [org.sw.demo.google.grpc.plugin_support-1.37.0]/[Source Archive]
Unpacking  : [org.sw.sw.client.driver.cpp.cl_generator-0.4.2]/[Source Archive]
Unpacking  : [org.sw.sw.client.support-0.4.2]/[Source Archive]
Unpacking  : [org.sw.sw.client.driver.cpp-0.4.2]/[Source Archive]
Unpacking  : [org.sw.demo.google.abseil-2021.3.24.0]/[Source Archive]
Unpacking  : [org.sw.demo.google.grpc.third_party.address_sorting-1.37.0]/[Source Archive]
Unpacking  : [org.sw.sw.client.driver.cpp.self_builder-0.4.2]/[Source Archive]
Unpacking  : [org.sw.demo.google.grpc.core.ext-1.37.0]/[Source Archive]
Unpacking  : [org.sw.demo.google.grpc.proto-1.37.0]/[Source Archive]
Unpacking  : [org.sw.demo.google.grpc.cpp.plugin-1.37.0]/[Source Archive]
[22/150] [org.sw.sw.client.driver.cpp.cl_generator-0.4.2]/src/sw/driver/tools/cl_generator.cpp
[146/150] [org.sw.sw.client.driver.cpp.cl_generator-0.4.2]
[147/150] generate: ".sw/storage/pkg/8e/71/b3e2/obj/bld/591737/bd/options_cl.generated.cpp", ".sw/storage/pkg/8e/71/b3e2/obj/bld/591737/bd/options_cl.generated.h"
[148/150] [config pch]
[149/150] .sw/storage/pkg/8e/51/3b0b/src/sdir/sw.cpp
[150/150] .sw/storage/tmp/cfg/591737/libloc.sw.self.191eb4-0.0.28.dylib
Downloading: [org.sw.demo.stb.all-master]/[Source Archive]
Unpacking  : [org.sw.demo.stb.all-master]/[Source Archive]
[140/150] .sw/storage/pkg/eb/20/82cc/src/sdir/sw.cpp
[150/150] .sw/storage/tmp/cfg/591737/libloc.sw.self.d06fce-0.0.28.dylib
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/imgui3/build
/tmp/imgui3/build $ cmake --build .
[ 33%] sw: building dependencies
[ 66%] Building CXX object CMakeFiles/pp.dir/src/main.cpp.o
/tmp/imgui3/build/src/main.cpp:6:10: fatal error: 'allegro5/allegro.h' file not found
#include <allegro5/allegro.h>
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/pp.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/pp.dir/all] Error 2
make: *** [all] Error 2

SamuelMarks avatar Apr 08 '21 06:04 SamuelMarks

You did not provide allegro5 dependency.

egorpugin avatar Apr 08 '21 08:04 egorpugin

Okay so I need to explicitly? - Now getting a different error:

CMakeLists.txt

cmake_minimum_required(VERSION 3.2)
project(pp VERSION 0.0.0 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 14)

file(DOWNLOAD https://raw.githubusercontent.com/ocornut/imgui/6a161b8/examples/example_allegro5/main.cpp src/main.cpp
     EXPECTED_HASH SHA256=1138d4b862d4349beeaea984005b958c185c44ef4edba6a96db7d8c6bde33cb4)

set(src ${CMAKE_CURRENT_BINARY_DIR}/src/main.cpp)

find_package(SW REQUIRED)
sw_add_package(org.sw.demo.ocornut.imgui)
sw_add_package(org.sw.demo.liballeg.allegro5)
sw_execute()

add_executable(${PROJECT_NAME} ${src})
target_link_libraries(${PROJECT_NAME} PRIVATE org.sw.demo.ocornut.imgui org.sw.demo.liballeg.allegro5)

sh

$ rm -rf build && mkdir $_ && cd $_
$ cmake ..
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found SW: /usr/local/bin/sw  
-- sw: processing dependencies
Downloading database from origin remote
Downloading: [org.sw.demo.liballeg.allegro5-5.2.7.0]/[Source Archive]
Unpacking  : [org.sw.demo.liballeg.allegro5-5.2.7.0]/[Source Archive]
Downloading: [org.sw.demo.unicode.icu.stub.genccode-69.1.0]/[Source Archive]
Downloading: [org.sw.demo.unicode.icu.stub.common-69.1.0]/[Source Archive]
Downloading: [org.sw.demo.unicode.icu.stub.toolutil-69.1.0]/[Source Archive]
Downloading: [org.sw.demo.unicode.icu.data-69.1.0]/[Source Archive]
Downloading: [org.sw.demo.unicode.icu.stub.data-69.1.0]/[Source Archive]
Downloading: [org.sw.demo.unicode.icu.common-69.1.0]/[Source Archive]
Downloading: [org.sw.demo.unicode.icu.i18n-69.1.0]/[Source Archive]
Downloading: [org.sw.demo.unicode.icu.stub.i18n-69.1.0]/[Source Archive]
Unpacking  : [org.sw.demo.unicode.icu.stub.data-69.1.0]/[Source Archive]
Unpacking  : [org.sw.demo.unicode.icu.stub.genccode-69.1.0]/[Source Archive]
Unpacking  : [org.sw.demo.unicode.icu.stub.toolutil-69.1.0]/[Source Archive]
Unpacking  : [org.sw.demo.unicode.icu.common-69.1.0]/[Source Archive]
Unpacking  : [org.sw.demo.unicode.icu.stub.common-69.1.0]/[Source Archive]
Unpacking  : [org.sw.demo.unicode.icu.i18n-69.1.0]/[Source Archive]
Unpacking  : [org.sw.demo.unicode.icu.stub.i18n-69.1.0]/[Source Archive]
Unpacking  : [org.sw.demo.unicode.icu.data-69.1.0]/[Source Archive]
[143/152] .sw/storage/pkg/44/82/9c04/src/sdir/sw.cpp
[152/152] .sw/storage/tmp/cfg/591737/libloc.sw.self.1c2241-0.0.28.dylib
Performing 13 check(s): org.sw.demo.liballeg.allegro5-5.2.7.0 (x), config 808281
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/imgui3/build
$ cmake --build .
[ 33%] sw: building dependencies
[1/76] [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/mousenu.c
[2/76] [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/cpu.c
[3/76] [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/bitmap_type.c
[4/76] [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/timernu.c
[5/76] [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/threads.c
[6/76] [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/macosx/hidjoy.m
[7/76] [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/bitmap_pixel.c
[8/76] [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/config.c
[9/76] [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/macosx/system.m
[11/76] [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/unix/uxthread.c
Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:764, function execute1: When executing: [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/cpu.c
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/cpu.c:18:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/allegro.h:26:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/base.h:50:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/alconfig.h:53:5: [0m[0;1;31merror: [0m[1mplatform not supported[0m
   #error platform not supported
[0;1;32m    ^
[0m1 error generated.
command failed: exit code = 1
Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:764, function execute1: When executing: [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/mousenu.c
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/mousenu.c:24:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/allegro.h:26:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/base.h:50:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/alconfig.h:53:5: [0m[0;1;31merror: [0m[1mplatform not supported[0m
   #error platform not supported
[0;1;32m    ^
[0mIn file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/mousenu.c:26:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_bitmap.h:9:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_display.h:8:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_events.h:4:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:4:10: [0m[0;1;31merror: [0m[1mexpected "FILENAME" or <FILENAME>[0m
#include ALLEGRO_INTERNAL_THREAD_HEADER
[0;1;32m         ^
[0mIn file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/mousenu.c:26:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_bitmap.h:9:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_display.h:8:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_events.h:16:14: [0m[0;1;31merror: [0m[1mfield has incomplete type '_AL_MUTEX' (aka 'struct _AL_MUTEX')[0m
   _AL_MUTEX mutex;
[0;1;32m             ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:12:16: [0m[0;1;30mnote: [0mforward declaration of 'struct _AL_MUTEX'[0m
typedef struct _AL_MUTEX _AL_MUTEX;
[0;1;32m               ^
[0m3 errors generated.
command failed: exit code = 1
Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:764, function execute1: When executing: [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/macosx/system.m
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/system.m:19:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/allegro.h:26:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/base.h:50:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/alconfig.h:53:5: [0m[0;1;31merror: [0m[1mplatform not supported[0m
   #error platform not supported
[0;1;32m    ^
[0mIn file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/system.m:20:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:23:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_system.h:5:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_display.h:8:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_events.h:4:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:4:10: [0m[0;1;31merror: [0m[1mexpected "FILENAME" or <FILENAME>[0m
#include ALLEGRO_INTERNAL_THREAD_HEADER
[0;1;32m         ^
[0mIn file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/system.m:20:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:23:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_system.h:5:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_display.h:8:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_events.h:16:14: [0m[0;1;31merror: [0m[1mfield has incomplete type '_AL_MUTEX' (aka 'struct _AL_MUTEX')[0m
   _AL_MUTEX mutex;
[0;1;32m             ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:12:16: [0m[0;1;30mnote: [0mforward declaration of 'struct _AL_MUTEX'[0m
typedef struct _AL_MUTEX _AL_MUTEX;
[0;1;32m               ^
[0mIn file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/system.m:20:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:49:2: [0m[0;1;31merror: [0m[1mCannot target OS X versions before 10.4[0m
#error Cannot target OS X versions before 10.4
[0;1;32m ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:121:44: [0m[0;1;31merror: [0m[1munknown type name 'NSEvent'[0m
void _al_osx_keyboard_handler(int pressed, NSEvent *event, ALLEGRO_DISPLAY*);
[0;1;32m                                           ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:125:35: [0m[0;1;31merror: [0m[1munknown type name 'NSEvent'[0m
void _al_osx_mouse_generate_event(NSEvent*, ALLEGRO_DISPLAY*);
[0;1;32m                                  ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:126:28: [0m[0;1;31merror: [0m[1munknown type name 'NSEvent'[0m
void _al_osx_mouse_handler(NSEvent*);
[0;1;32m                           ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:142:34: [0m[0;1;31merror: [0m[1ma parameter list without types is only allowed in a function definition[0m
void _al_osx_mouse_was_installed(BOOL);
[0;1;32m                                 ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:147:37: [0m[0;1;31merror: [0m[1ma parameter list without types is only allowed in a function definition[0m
void _al_osx_keyboard_was_installed(BOOL);
[0;1;32m                                    ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:151:1: [0m[0;1;31merror: [0m[1munknown type name 'NSView'[0m
NSView* _al_osx_view_from_display(ALLEGRO_DISPLAY*);
[0;1;32m^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:153:1: [0m[0;1;31merror: [0m[1munknown type name 'NSImage'[0m
NSImage* NSImageFromAllegroBitmap(ALLEGRO_BITMAP* bmp);
[0;1;32m^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/system.m:25:5: [0m[0;1;31merror: [0m[1msomething is wrong with the makefile[0m
   #error something is wrong with the makefile
[0;1;32m    ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/system.m:56:1: [0m[0;1;31merror: [0m[1munknown type name 'NSBundle'[0m
NSBundle *_al_osx_bundle = NULL;
[0;1;32m^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/system.m:67:35: [0m[0;1;31merror: [0m[1muse of undeclared identifier 'kCurrentProcess'[0m
   ProcessSerialNumber psn = { 0, kCurrentProcess };
[0;1;32m                                  ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/system.m:68:4: [0m[0;1;31merror: [0m[1mimplicit declaration of function 'TransformProcessType' is invalid in C99 [-Werror,-Wimplicit-function-declaration][0m
   TransformProcessType(&psn, kProcessTransformToForegroundApplication);
[0;1;32m   ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/system.m:68:31: [0m[0;1;31merror: [0m[1muse of undeclared identifier 'kProcessTransformToForegroundApplication'[0m
   TransformProcessType(&psn, kProcessTransformToForegroundApplication);
[0;1;32m                              ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/system.m:69:6: [0m[0;1;31merror: [0m[1muse of undeclared identifier 'NSApplication'[0m
   [[NSApplication sharedApplication] performSelectorOnMainThread: @selector(activateIgnoringOtherApps:)
[0;1;32m     ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/system.m:158:4: [0m[0;1;31merror: [0m[1muse of undeclared identifier 'CGDirectDisplayID'[0m
   CGDirectDisplayID display;
[0;1;32m   ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/system.m:166:4: [0m[0;1;31merror: [0m[1muse of undeclared identifier 'display'[0m
   display = CGMainDisplayID();
[0;1;32m   ^
[0m[0;1;31mfatal error: [0mtoo many errors emitted, stopping now [-ferror-limit=][0m
20 errors generated.
command failed: exit code = 1
Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:764, function execute1: When executing: [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/bitmap_pixel.c
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/bitmap_pixel.c:17:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/allegro.h:26:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/base.h:50:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/alconfig.h:53:5: [0m[0;1;31merror: [0m[1mplatform not supported[0m
   #error platform not supported
[0;1;32m    ^
[0mIn file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/bitmap_pixel.c:18:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_bitmap.h:9:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_display.h:8:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_events.h:4:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:4:10: [0m[0;1;31merror: [0m[1mexpected "FILENAME" or <FILENAME>[0m
#include ALLEGRO_INTERNAL_THREAD_HEADER
[0;1;32m         ^
[0mIn file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/bitmap_pixel.c:18:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_bitmap.h:9:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_display.h:8:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_events.h:16:14: [0m[0;1;31merror: [0m[1mfield has incomplete type '_AL_MUTEX' (aka 'struct _AL_MUTEX')[0m
   _AL_MUTEX mutex;
[0;1;32m             ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:12:16: [0m[0;1;30mnote: [0mforward declaration of 'struct _AL_MUTEX'[0m
typedef struct _AL_MUTEX _AL_MUTEX;
[0;1;32m               ^
[0m3 errors generated.
command failed: exit code = 1
Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:764, function execute1: When executing: [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/macosx/hidjoy.m
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/hidjoy.m:19:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/allegro.h:26:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/base.h:50:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/alconfig.h:53:5: [0m[0;1;31merror: [0m[1mplatform not supported[0m
   #error platform not supported
[0;1;32m    ^
[0mIn file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/hidjoy.m:20:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:23:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_system.h:5:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_display.h:8:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_events.h:4:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:4:10: [0m[0;1;31merror: [0m[1mexpected "FILENAME" or <FILENAME>[0m
#include ALLEGRO_INTERNAL_THREAD_HEADER
[0;1;32m         ^
[0mIn file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/hidjoy.m:20:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:23:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_system.h:5:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_display.h:8:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_events.h:16:14: [0m[0;1;31merror: [0m[1mfield has incomplete type '_AL_MUTEX' (aka 'struct _AL_MUTEX')[0m
   _AL_MUTEX mutex;
[0;1;32m             ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:12:16: [0m[0;1;30mnote: [0mforward declaration of 'struct _AL_MUTEX'[0m
typedef struct _AL_MUTEX _AL_MUTEX;
[0;1;32m               ^
[0mIn file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/hidjoy.m:20:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:49:2: [0m[0;1;31merror: [0m[1mCannot target OS X versions before 10.4[0m
#error Cannot target OS X versions before 10.4
[0;1;32m ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:121:44: [0m[0;1;31merror: [0m[1munknown type name 'NSEvent'[0m
void _al_osx_keyboard_handler(int pressed, NSEvent *event, ALLEGRO_DISPLAY*);
[0;1;32m                                           ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:125:35: [0m[0;1;31merror: [0m[1munknown type name 'NSEvent'[0m
void _al_osx_mouse_generate_event(NSEvent*, ALLEGRO_DISPLAY*);
[0;1;32m                                  ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:126:28: [0m[0;1;31merror: [0m[1munknown type name 'NSEvent'[0m
void _al_osx_mouse_handler(NSEvent*);
[0;1;32m                           ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:142:34: [0m[0;1;31merror: [0m[1ma parameter list without types is only allowed in a function definition[0m
void _al_osx_mouse_was_installed(BOOL);
[0;1;32m                                 ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:147:37: [0m[0;1;31merror: [0m[1ma parameter list without types is only allowed in a function definition[0m
void _al_osx_keyboard_was_installed(BOOL);
[0;1;32m                                    ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:151:1: [0m[0;1;31merror: [0m[1munknown type name 'NSView'[0m
NSView* _al_osx_view_from_display(ALLEGRO_DISPLAY*);
[0;1;32m^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/platform/aintosx.h:153:1: [0m[0;1;31merror: [0m[1munknown type name 'NSImage'[0m
NSImage* NSImageFromAllegroBitmap(ALLEGRO_BITMAP* bmp);
[0;1;32m^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/hidjoy.m:26:2: [0m[0;1;31merror: [0m[1msomething is wrong with the makefile[0m
#error something is wrong with the makefile
[0;1;32m ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/hidjoy.m:68:8: [0m[0;1;31merror: [0m[1munknown type name 'IOHIDManagerRef'; did you mean 'IOHIDValueRef'?[0m
static IOHIDManagerRef hidManagerRef;
[0;1;32m       ^~~~~~~~~~~~~~~
[0m[0;32m       IOHIDValueRef
[0m[1m/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/hid/IOHIDBase.h:49:51: [0m[0;1;30mnote: [0m'IOHIDValueRef' declared here[0m
typedef struct CF_BRIDGED_TYPE(id) __IOHIDValue * IOHIDValueRef;
[0;1;32m                                                  ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/hidjoy.m:148:23: [0m[0;1;31merror: [0m[1mimplicit declaration of function 'IOHIDElementGetName' is invalid in C99 [-Werror,-Wimplicit-function-declaration][0m
   CFStringRef name = IOHIDElementGetName(elem);
[0;1;32m                      ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/hidjoy.m:148:16: [0m[0;1;35mwarning: [0m[1mincompatible integer to pointer conversion initializing 'CFStringRef' (aka 'const struct __CFString *') with an expression of type 'int' [-Wint-conversion][0m
   CFStringRef name = IOHIDElementGetName(elem);
[0;1;32m               ^      ~~~~~~~~~~~~~~~~~~~~~~~~~
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/hidjoy.m:200:19: [0m[0;1;31merror: [0m[1mimplicit declaration of function 'IOHIDElementGetUsage' is invalid in C99 [-Werror,-Wimplicit-function-declaration][0m
      int usage = IOHIDElementGetUsage(elem);
[0;1;32m                  ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/hidjoy.m:201:11: [0m[0;1;31merror: [0m[1mimplicit declaration of function 'IOHIDElementGetType' is invalid in C99 [-Werror,-Wimplicit-function-declaration][0m
      if (IOHIDElementGetType(elem) == kIOHIDElementTypeInput_Button) {
[0;1;32m          ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/hidjoy.m:201:11: [0m[0;1;30mnote: [0mdid you mean 'IOHIDElementGetUsage'?[0m
[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/hidjoy.m:200:19: [0m[0;1;30mnote: [0m'IOHIDElementGetUsage' declared here[0m
      int usage = IOHIDElementGetUsage(elem);
[0;1;32m                  ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/hidjoy.m:215:21: [0m[0;1;31merror: [0m[1mimplicit declaration of function 'IOHIDElementGetLogicalMin' is invalid in C99 [-Werror,-Wimplicit-function-declaration][0m
         long min = IOHIDElementGetLogicalMin(elem);
[0;1;32m                    ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/hidjoy.m:216:21: [0m[0;1;31merror: [0m[1mimplicit declaration of function 'IOHIDElementGetLogicalMax' is invalid in C99 [-Werror,-Wimplicit-function-declaration][0m
         long max = IOHIDElementGetLogicalMax(elem);
[0;1;32m                    ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/hidjoy.m:216:21: [0m[0;1;30mnote: [0mdid you mean 'IOHIDElementGetLogicalMin'?[0m
[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/hidjoy.m:215:21: [0m[0;1;30mnote: [0m'IOHIDElementGetLogicalMin' declared here[0m
         long min = IOHIDElementGetLogicalMin(elem);
[0;1;32m                    ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/macosx/hidjoy.m:221:18: [0m[0;1;31merror: [0m[1muse of undeclared identifier 'kHIDUsage_GD_X'[0m
            case kHIDUsage_GD_X:
[0;1;32m                 ^
[0m[0;1;31mfatal error: [0mtoo many errors emitted, stopping now [-ferror-limit=][0m
1 warning and 20 errors generated.
command failed: exit code = 1
Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:764, function execute1: When executing: [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/bitmap_type.c
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/bitmap_type.c:17:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/allegro.h:26:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/base.h:50:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/alconfig.h:53:5: [0m[0;1;31merror: [0m[1mplatform not supported[0m
   #error platform not supported
[0;1;32m    ^
[0mIn file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/bitmap_type.c:19:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_bitmap.h:9:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_display.h:8:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_events.h:4:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:4:10: [0m[0;1;31merror: [0m[1mexpected "FILENAME" or <FILENAME>[0m
#include ALLEGRO_INTERNAL_THREAD_HEADER
[0;1;32m         ^
[0mIn file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/bitmap_type.c:19:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_bitmap.h:9:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_display.h:8:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_events.h:16:14: [0m[0;1;31merror: [0m[1mfield has incomplete type '_AL_MUTEX' (aka 'struct _AL_MUTEX')[0m
   _AL_MUTEX mutex;
[0;1;32m             ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:12:16: [0m[0;1;30mnote: [0mforward declaration of 'struct _AL_MUTEX'[0m
typedef struct _AL_MUTEX _AL_MUTEX;
[0;1;32m               ^
[0m3 errors generated.
command failed: exit code = 1
Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:764, function execute1: When executing: [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/timernu.c
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/timernu.c:21:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/allegro.h:26:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/base.h:50:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/alconfig.h:53:5: [0m[0;1;31merror: [0m[1mplatform not supported[0m
   #error platform not supported
[0;1;32m    ^
[0mIn file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/timernu.c:24:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_events.h:4:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:4:10: [0m[0;1;31merror: [0m[1mexpected "FILENAME" or <FILENAME>[0m
#include ALLEGRO_INTERNAL_THREAD_HEADER
[0;1;32m         ^
[0mIn file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/timernu.c:24:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_events.h:16:14: [0m[0;1;31merror: [0m[1mfield has incomplete type '_AL_MUTEX' (aka 'struct _AL_MUTEX')[0m
   _AL_MUTEX mutex;
[0;1;32m             ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:12:16: [0m[0;1;30mnote: [0mforward declaration of 'struct _AL_MUTEX'[0m
typedef struct _AL_MUTEX _AL_MUTEX;
[0;1;32m               ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/timernu.c:102:12: [0m[0;1;31merror: [0m[1mimplicit declaration of function '_al_get_thread_should_stop' is invalid in C99 [-Werror,-Wimplicit-function-declaration][0m
   while (!_al_get_thread_should_stop(self)) {
[0;1;32m           ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/timernu.c:102:12: [0m[0;1;30mnote: [0mdid you mean 'al_get_thread_should_stop'?[0m
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/threads.h:47:15: [0m[0;1;30mnote: [0m'al_get_thread_should_stop' declared here[0m
AL_FUNC(bool, al_get_thread_should_stop, (ALLEGRO_THREAD *outer));
[0;1;32m              ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/alconfig.h:177:57: [0m[0;1;30mnote: [0mexpanded from macro 'AL_FUNC'[0m
   #define AL_FUNC(type, name, args)               type name args
[0;1;32m                                                        ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/timernu.c:213:35: [0m[0;1;31merror: [0m[1minvalid application of 'sizeof' to an incomplete type '_AL_THREAD' (aka 'struct _AL_THREAD')[0m
         timer_thread = al_malloc(sizeof(_AL_THREAD));
[0;1;32m                                  ^     ~~~~~~~~~~~~
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/memory.h:43:29: [0m[0;1;30mnote: [0mexpanded from macro 'al_malloc'[0m
   (al_malloc_with_context((n), __LINE__, __FILE__, __func__))
[0;1;32m                            ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:11:16: [0m[0;1;30mnote: [0mforward declaration of 'struct _AL_THREAD'[0m
typedef struct _AL_THREAD _AL_THREAD;
[0;1;32m               ^
[0m5 errors generated.
command failed: exit code = 1
Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:764, function execute1: When executing: [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/threads.c
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:19:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/allegro.h:26:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/base.h:50:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/alconfig.h:53:5: [0m[0;1;31merror: [0m[1mplatform not supported[0m
   #error platform not supported
[0;1;32m    ^
[0mIn file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:21:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:4:10: [0m[0;1;31merror: [0m[1mexpected "FILENAME" or <FILENAME>[0m
#include ALLEGRO_INTERNAL_THREAD_HEADER
[0;1;32m         ^
[0mIn file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:22:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_system.h:5:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_display.h:8:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_events.h:16:14: [0m[0;1;31merror: [0m[1mfield has incomplete type '_AL_MUTEX' (aka 'struct _AL_MUTEX')[0m
   _AL_MUTEX mutex;
[0;1;32m             ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:12:16: [0m[0;1;30mnote: [0mforward declaration of 'struct _AL_MUTEX'[0m
typedef struct _AL_MUTEX _AL_MUTEX;
[0;1;32m               ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:38:15: [0m[0;1;31merror: [0m[1mfield has incomplete type '_AL_THREAD' (aka 'struct _AL_THREAD')[0m
   _AL_THREAD thread;
[0;1;32m              ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:11:16: [0m[0;1;30mnote: [0mforward declaration of 'struct _AL_THREAD'[0m
typedef struct _AL_THREAD _AL_THREAD;
[0;1;32m               ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:39:14: [0m[0;1;31merror: [0m[1mfield has incomplete type '_AL_MUTEX' (aka 'struct _AL_MUTEX')[0m
   _AL_MUTEX mutex;
[0;1;32m             ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:12:16: [0m[0;1;30mnote: [0mforward declaration of 'struct _AL_MUTEX'[0m
typedef struct _AL_MUTEX _AL_MUTEX;
[0;1;32m               ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:40:13: [0m[0;1;31merror: [0m[1mfield has incomplete type '_AL_COND' (aka 'struct _AL_COND')[0m
   _AL_COND cond;
[0;1;32m            ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:13:16: [0m[0;1;30mnote: [0mforward declaration of 'struct _AL_COND'[0m
typedef struct _AL_COND _AL_COND;
[0;1;32m               ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:49:14: [0m[0;1;31merror: [0m[1mfield has incomplete type '_AL_MUTEX' (aka 'struct _AL_MUTEX')[0m
   _AL_MUTEX mutex;
[0;1;32m             ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:12:16: [0m[0;1;30mnote: [0mforward declaration of 'struct _AL_MUTEX'[0m
typedef struct _AL_MUTEX _AL_MUTEX;
[0;1;32m               ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:54:13: [0m[0;1;31merror: [0m[1mfield has incomplete type '_AL_COND' (aka 'struct _AL_COND')[0m
   _AL_COND cond;
[0;1;32m            ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:13:16: [0m[0;1;30mnote: [0mforward declaration of 'struct _AL_COND'[0m
typedef struct _AL_COND _AL_COND;
[0;1;32m               ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:71:4: [0m[0;1;31merror: [0m[1mimplicit declaration of function '_al_mutex_lock' is invalid in C99 [-Werror,-Wimplicit-function-declaration][0m
   _al_mutex_lock(&outer->mutex);
[0;1;32m   ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:71:4: [0m[0;1;30mnote: [0mdid you mean '_al_mutex_init'?[0m
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:24:6: [0m[0;1;30mnote: [0m'_al_mutex_init' declared here[0m
void _al_mutex_init(_AL_MUTEX*);
[0;1;32m     ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:73:7: [0m[0;1;31merror: [0m[1mimplicit declaration of function '_al_cond_wait' is invalid in C99 [-Werror,-Wimplicit-function-declaration][0m
      _al_cond_wait(&outer->cond, &outer->mutex);
[0;1;32m      ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:75:4: [0m[0;1;31merror: [0m[1mimplicit declaration of function '_al_mutex_unlock' is invalid in C99 [-Werror,-Wimplicit-function-declaration][0m
   _al_mutex_unlock(&outer->mutex);
[0;1;32m   ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:75:4: [0m[0;1;30mnote: [0mdid you mean '_al_mutex_lock'?[0m
[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:71:4: [0m[0;1;30mnote: [0m'_al_mutex_lock' declared here[0m
   _al_mutex_lock(&outer->mutex);
[0;1;32m   ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:107:4: [0m[0;1;31merror: [0m[1mimplicit declaration of function '_AL_MARK_MUTEX_UNINITED' is invalid in C99 [-Werror,-Wimplicit-function-declaration][0m
   _AL_MARK_MUTEX_UNINITED(outer->mutex); /* required */
[0;1;32m   ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:121:4: [0m[0;1;31merror: [0m[1mimplicit declaration of function '_al_cond_init' is invalid in C99 [-Werror,-Wimplicit-function-declaration][0m
   _al_cond_init(&outer->cond);
[0;1;32m   ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:137:4: [0m[0;1;31merror: [0m[1mimplicit declaration of function '_al_cond_init' is invalid in C99 [-Werror,-Wimplicit-function-declaration][0m
   _al_cond_init(&outer->cond);
[0;1;32m   ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:166:10: [0m[0;1;31merror: [0m[1mimplicit declaration of function '_al_mutex_lock' is invalid in C99 [-Werror,-Wimplicit-function-declaration][0m
         _al_mutex_lock(&thread->mutex);
[0;1;32m         ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:168:10: [0m[0;1;31merror: [0m[1mimplicit declaration of function '_al_cond_broadcast' is invalid in C99 [-Werror,-Wimplicit-function-declaration][0m
         _al_cond_broadcast(&thread->cond);
[0;1;32m         ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:168:10: [0m[0;1;30mnote: [0mdid you mean '_al_cond_timedwait'?[0m
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:42:5: [0m[0;1;30mnote: [0m'_al_cond_timedwait' declared here[0m
int _al_cond_timedwait(_AL_COND*, _AL_MUTEX*, const ALLEGRO_TIMEOUT *timeout);
[0;1;32m    ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:169:10: [0m[0;1;31merror: [0m[1mimplicit declaration of function '_al_mutex_unlock' is invalid in C99 [-Werror,-Wimplicit-function-declaration][0m
         _al_mutex_unlock(&thread->mutex);
[0;1;32m         ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:210:10: [0m[0;1;31merror: [0m[1mimplicit declaration of function '_al_mutex_lock' is invalid in C99 [-Werror,-Wimplicit-function-declaration][0m
         _al_mutex_lock(&thread->mutex);
[0;1;32m         ^
[0m[1m.sw/storage/pkg/44/82/9c04/src/sdir/src/threads.c:212:10: [0m[0;1;31merror: [0m[1mimplicit declaration of function '_al_cond_broadcast' is invalid in C99 [-Werror,-Wimplicit-function-declaration][0m
         _al_cond_broadcast(&thread->cond);
[0;1;32m         ^
[0m[0;1;31mfatal error: [0mtoo many errors emitted, stopping now [-ferror-limit=][0m
20 errors generated.
command failed: exit code = 1
Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:764, function execute1: When executing: [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/config.c
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/config.c:22:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/allegro.h:26:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/base.h:50:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/alconfig.h:53:5: [0m[0;1;31merror: [0m[1mplatform not supported[0m
   #error platform not supported
[0;1;32m    ^
[0m1 error generated.
command failed: exit code = 1
Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:764, function execute1: When executing: [org.sw.demo.liballeg.allegro5-5.2.7.0]/src/unix/uxthread.c
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/unix/uxthread.c:24:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/allegro.h:26:
In file included from .sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/base.h:50:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/alconfig.h:53:5: [0m[0;1;31merror: [0m[1mplatform not supported[0m
   #error platform not supported
[0;1;32m    ^
[0mIn file included from .sw/storage/pkg/44/82/9c04/src/sdir/src/unix/uxthread.c:26:
[1m.sw/storage/pkg/44/82/9c04/src/sdir/include/allegro5/internal/aintern_thread.h:4:10: [0m[0;1;31merror: [0m[1mexpected "FILENAME" or <FILENAME>[0m
#include ALLEGRO_INTERNAL_THREAD_HEADER
[0;1;32m         ^
[0m2 errors generated.
command failed: exit code = 1
Total errors: 10
make[2]: *** [CMakeFiles/sw_build_dependencies] Error 1
make[1]: *** [CMakeFiles/sw_build_dependencies.dir/all] Error 2
make: *** [all] Error 2

SamuelMarks avatar Apr 08 '21 23:04 SamuelMarks

I did not package that allegro5 package properly. I'll try to do it (couple of days). See its current spec - https://software-network.org/org.sw.demo.liballeg.allegro5/specification

Also note that you need allegro5 imgui backend. Run sw list allegro or on the website.

Okay so I need to explicitly?

Yes, otherwise how else everyone will know your intentions? Imgui has many backends.


Actually you need only https://software-network.org/org.sw.demo.ocornut.imgui.backend.allegro5 dependency. It must provide allegro5 library for you. Something like this

find_package(SW REQUIRED)
sw_add_package(org.sw.demo.ocornut.imgui.backend.allegro5)
sw_execute()

(I need to fix that package first.)

egorpugin avatar Apr 09 '21 00:04 egorpugin

Try it now. Excerpt from my cmake config:

set(deps
    org.sw.demo.ocornut.imgui.backend.allegro5
)

find_package(SW REQUIRED)
sw_add_package(${deps})
sw_execute()

add_executable(${PROJECT_NAME} ${src})
target_link_libraries(${PROJECT_NAME} PRIVATE ${deps})

egorpugin avatar Apr 09 '21 01:04 egorpugin

CMakeLists.txt

cmake_minimum_required(VERSION 3.2)
project(pp VERSION 0.0.0 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 14)

file(DOWNLOAD https://raw.githubusercontent.com/ocornut/imgui/6a161b8/examples/example_allegro5/main.cpp src/main.cpp
     EXPECTED_HASH SHA256=1138d4b862d4349beeaea984005b958c185c44ef4edba6a96db7d8c6bde33cb4)
file(DOWNLOAD https://raw.githubusercontent.com/ocornut/imgui/6a161b8/imgui_impl_allegro5.cpp src/imgui_impl_allegro5.cpp
     EXPECTED_HASH SHA256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855)
# Hmm, same hash?
file(DOWNLOAD https://raw.githubusercontent.com/ocornut/imgui/6a161b8/imgui_impl_allegro5.h src/imgui_impl_allegro5.h
     EXPECTED_HASH SHA256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855)

set(src ${CMAKE_CURRENT_BINARY_DIR}/src/main.cpp)
set(deps org.sw.demo.ocornut.imgui org.sw.demo.ocornut.imgui.backend.allegro5)

find_package(SW REQUIRED)
sw_add_package(${deps})
sw_execute()

add_executable(${PROJECT_NAME} ${src})
target_link_libraries(${PROJECT_NAME} PRIVATE ${deps})
$ rm -rf build && mkdir $_ && cd $_
/tmp/imgui3 $ rm -rf build && mkdir $_ && cd $_
/tmp/imgui3/build $ cmake ..
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found SW: /usr/local/bin/sw  
-- sw: processing dependencies
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/imgui3/build
/tmp/imgui3/build $ cmake --build . | tee logg
[ 33%] sw: building dependencies
[ 33%] Built target sw_build_dependencies
[ 66%] Building CXX object CMakeFiles/pp.dir/src/main.cpp.o
/tmp/imgui3/build/src/main.cpp:37:5: error: use of undeclared identifier 'ImGui_ImplAllegro5_Init'
    ImGui_ImplAllegro5_Init(display);
    ^
/tmp/imgui3/build/src/main.cpp:70:13: error: use of undeclared identifier 'ImGui_ImplAllegro5_ProcessEvent'
            ImGui_ImplAllegro5_ProcessEvent(&ev);
            ^
/tmp/imgui3/build/src/main.cpp:75:17: error: use of undeclared identifier 'ImGui_ImplAllegro5_InvalidateDeviceObjects'
                ImGui_ImplAllegro5_InvalidateDeviceObjects();
                ^
/tmp/imgui3/build/src/main.cpp:77:17: error: use of undeclared identifier 'ImGui_ImplAllegro5_CreateDeviceObjects'
                ImGui_ImplAllegro5_CreateDeviceObjects();
                ^
/tmp/imgui3/build/src/main.cpp:82:9: error: use of undeclared identifier 'ImGui_ImplAllegro5_NewFrame'
        ImGui_ImplAllegro5_NewFrame();
        ^
/tmp/imgui3/build/src/main.cpp:125:9: error: use of undeclared identifier 'ImGui_ImplAllegro5_RenderDrawData'
        ImGui_ImplAllegro5_RenderDrawData(ImGui::GetDrawData());
        ^
/tmp/imgui3/build/src/main.cpp:130:5: error: use of undeclared identifier 'ImGui_ImplAllegro5_Shutdown'
    ImGui_ImplAllegro5_Shutdown();
    ^
7 errors generated.
make[2]: *** [CMakeFiles/pp.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/pp.dir/all] Error 2
make: *** [all] Error 2

Do I need a target_include_directories line?

SamuelMarks avatar Apr 09 '21 02:04 SamuelMarks

No, you need to include imgui allegro5 backend header. Check https://github.com/ocornut/imgui/blob/master/examples/example_allegro5/main.cpp#L9 Do you have this line?

egorpugin avatar Apr 09 '21 09:04 egorpugin

I have this, but I'm not sure this was the right way or if these headers are meant to be packaged:

file(DOWNLOAD https://raw.githubusercontent.com/ocornut/imgui/6a161b8/imgui_impl_allegro5.cpp src/imgui_impl_allegro5.cpp
     EXPECTED_HASH SHA256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855)
# Hmm, same hash?
file(DOWNLOAD https://raw.githubusercontent.com/ocornut/imgui/6a161b8/imgui_impl_allegro5.h src/imgui_impl_allegro5.h
     EXPECTED_HASH SHA256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855)

SamuelMarks avatar Apr 09 '21 12:04 SamuelMarks

I think the best starting point it to build imgui example directly. this file - https://github.com/ocornut/imgui/blob/master/examples/example_allegro5/main.cpp

I've tried that, there is the issue with sw's cmake integration. It does not path system libs (and frameworks on macos) to cmake target. This will be fixed later with new sw version.


What you can try now is to use sw as build system instead of cmake. You may add the following snipped to example main.cpp:

/*
deps: org.sw.demo.ocornut.imgui.backend.allegro5
*/ 

And run sw build main.cpp on it. There is still some issue with macos build. I've successfully build it on windows during my tests.


Another way is to create sw.cpp - C++ build config that is used by sw with following contents

void build(Solution &s)
{
    auto &t = s.addExecutable("mytargetname");
    t += "main.cpp";
    t += "org.sw.demo.ocornut.imgui.backend.allegro5"_dep;
} 

And run sw build in current dir.

egorpugin avatar Apr 09 '21 13:04 egorpugin

Thanks but I depend on a bunch of other C/C++ libraries and need consistent tooling throughout. Will await your CMake fix :)

SamuelMarks avatar Apr 10 '21 06:04 SamuelMarks

Please note, it won't be available in near future. Such issues are postponed till the next major version.

egorpugin avatar Apr 10 '21 08:04 egorpugin

Sort-of offtopic: I'm working on a few C++ projects at the moment, some commercial, some open-source, others both. If you want some contract work hit me up and I'll see if my client can get aboard.

Specifically: machine-learning; CMake; C++; C (incl. using C89 to write package managers); video processing, compilers, &etc.

(only sort-of offtopic because this could help fund sw…)

I really like the concept of sw, and appreciate the 1-man effort approach (looking at your GitHub profile and comparing it to mine shows comparable efforts… would be great to work alongside you 😃)

[email protected]

SamuelMarks avatar Apr 10 '21 08:04 SamuelMarks

Ok, thank you, I'll think about it.

egorpugin avatar Apr 10 '21 09:04 egorpugin