paullouisageneau / libdatachannel

C/C++ WebRTC network library featuring Data Channels, Media Transport, and WebSockets
https://libdatachannel.org/
Mozilla Public License 2.0
1.67k stars 344 forks source link

ORBIS build #453

Open shinyclaw opened 2 years ago

shinyclaw commented 2 years ago

Hi, I try to generate project files for ORBIS (PS4) toolchain, but in CMake following error appears:

CMake Error at deps/usrsctp/CMakeLists.txt:125 (message): usrsctp.h not found

Do you have any idea what can cause it?

Thanks!

paullouisageneau commented 2 years ago

Is the usrsctp submodule correctly updated? In particular, does the file deps/usrsctp/usrsctplib/usrsctp.h actually exist?

If so, could you try running cmake in deps/usrsctp to see if the issue is with usrsctp?

shinyclaw commented 2 years ago

Yes, the module is updated - when I run cmake on regular visual studio toolchain it works ok:

c:\Users\shiny\Downloads\libdatachannel\deps\usrsctp>cmake cmakelists.txt -- Building for: Visual Studio 15 2017 -- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.19042. -- The C compiler identification is MSVC 19.16.27045.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- No build type selected, using DEBUG -- Looking for include file sys/queue.h -- Looking for include file sys/queue.h - not found -- Looking for include files sys/socket.h, linux/if_addr.h -- Looking for include files sys/socket.h, linux/if_addr.h - not found -- Looking for include files sys/socket.h, linux/rtnetlink.h -- Looking for include files sys/socket.h, linux/rtnetlink.h - not found -- Looking for 4 include files sys/types.h, ..., netinet/ip_icmp.h -- Looking for 4 include files sys/types.h, ..., netinet/ip_icmp.h - not found -- Looking for include file stdatomic.h -- Looking for include file stdatomic.h - not found -- Looking for usrsctp.h -- Looking for usrsctp.h - found -- Performing Test have_sa_len -- Performing Test have_sa_len - Failed -- Performing Test have_sin_len -- Performing Test have_sin_len - Failed -- Performing Test have_sin6_len -- Performing Test have_sin6_len - Failed -- Performing Test have_sconn_len -- Performing Test have_sconn_len - Failed -- Compiler flags (CMAKE_C_FLAGS): /DWIN32 /D_WINDOWS /W4 /wd4100 /wd4127 /wd4200 /wd4214 /wd4706 /wd4245 /wd4389 /wd4702 /wd4701 /wd4244 /WX -- Performing Test has_wno_address_of_packed_member -- Performing Test has_wno_address_of_packed_member - Failed -- Performing Test has_wno_deprecated_declarations -- Performing Test has_wno_deprecated_declarations - Failed -- link library: ws2_32 -- Looking for pthread.h -- Looking for pthread.h - not found -- Found Threads: TRUE -- Configuring done -- Generating done -- Build files have been written to: C:/Users/shiny/Downloads/libdatachannel/deps/usrsctp

But, for ORBIS toolchain the results are:

Configuring ORBIS

The C compiler identification is Clang 11.0.1 Detecting C compiler ABI info Detecting C compiler ABI info - done Check for working C compiler: E:/Programming/SDKs/SCE/ORBIS SDKs/8.500/host_tools/bin/orbis-clang.exe - skipped Detecting C compile features Detecting C compile features - done No build type selected, using DEBUG Looking for include file sys/queue.h Looking for include file sys/queue.h - found Looking for include files sys/socket.h, linux/if_addr.h Looking for include files sys/socket.h, linux/if_addr.h - not found Looking for include files sys/socket.h, linux/rtnetlink.h Looking for include files sys/socket.h, linux/rtnetlink.h - not found Looking for 4 include files sys/types.h, ..., netinet/ip_icmp.h Looking for 4 include files sys/types.h, ..., netinet/ip_icmp.h - not found Looking for include file stdatomic.h Looking for include file stdatomic.h - not found Looking for usrsctp.h Looking for usrsctp.h - not found CMake Error at CMakeLists.txt:125 (message): usrsctp.h not found

paullouisageneau commented 2 years ago

The failing check is in usrsctp's CMakeLists:

set(CMAKE_REQUIRED_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/usrsctplib")

check_include_file(usrsctp.h have_usrsctp_h)
if (NOT have_usrsctp_h)
    message(FATAL_ERROR "usrsctp.h not found")
endif ()

I've no idea why it fails with that toolchain since CMAKE_REQUIRED_INCLUDES for check_include_file is supposed to be there from CMake 3.0. You may try reporting it to sctplab/usrsctp.