floooh / sokol-tools

Command line tools for use with sokol headers
MIT License
218 stars 53 forks source link

Can't build on Linux #85

Closed dgoalcantara closed 1 year ago

dgoalcantara commented 1 year ago

./build_docker.sh

`Sending build context to Docker daemon 1.139MB

Step 1/4 : FROM alpine ---> b2aa39c304c2 Step 2/4 : RUN apk add build-base git python3 cmake ninja ---> Using cache ---> aefac3f4998c Step 3/4 : ADD . /workspace/sokol-tools ---> 70f407cdee2c Step 4/4 : RUN cd /workspace/sokol-tools && ./fips build linux-ninja-release && strip /workspace/fips-deploy/sokol-tools/linux-ninja-release/sokol-shdc ---> Running in 6c8140b2dc4f Cloning into '/workspace/fips'... Preset CMake variables:

CMAKE_BUILD_TYPE="Release" FIPS_AUTO_IMPORT="ON" FIPS_CONFIG="linux-ninja-release" FIPS_LOCAL_BUILD="OFF"

-- The C compiler identification is GNU 12.2.1 -- The CXX compiler identification is GNU 12.2.1 -- 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++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done CMAKE_BUILD_TYPE: Release FIPS_ROOT_DIR: /workspace/fips FIPS_PROJECT_DIR: /workspace/sokol-tools FIPS_BUILD_DIR: /workspace/fips-build FIPS_DEPLOY_DIR: /workspace/fips-deploy FIPS_PROJECT_NAME: sokol-tools FIPS_AUTO_IMPORT: ON FIPS_CONFIG: linux-ninja-release FIPS_PROJECT_BUILD_DIR: /workspace/fips-build/sokol-tools/linux-ninja-release FIPS_PROJECT_DEPLOY_DIR: /workspace/fips-deploy/sokol-tools/linux-ninja-release Host system: Linux CMAKE_CXX_COMPILER_ID: GNU FIPS_GCC: 1 -- Looking for atomic_fetch_add_4 -- Looking for __atomic_fetch_add_4 - not found -- Looking for atomic_fetch_add_4 in atomic -- Looking for __atomic_fetch_add_4 in atomic - found -- Looking for clock_gettime in rt -- Looking for clock_gettime in rt - found FIPS_PLATFORM: Linux FIPS_PLATFORM_NAME: linux -- Found Python: /usr/bin/python3.10 (found version "3.10.10") found components: Interpreter CMake Warning at /workspace/fips/cmake/fips.cmake:481 (message): Empty file list for path 'SPIRV-Tools/source' (maybe path doesn't exist?) Call Stack (most recent call first): /workspace/fips/cmake/fips.cmake:504 (fips_files_ex) ext/CMakeLists.txt:16 (fips_src)

CMake Warning at /workspace/fips/cmake/fips.cmake:481 (message): Empty file list for path 'SPIRV-Tools/source/util' (maybe path doesn't exist?) Call Stack (most recent call first): /workspace/fips/cmake/fips.cmake:504 (fips_files_ex) ext/CMakeLists.txt:17 (fips_src)

CMake Warning at /workspace/fips/cmake/fips.cmake:481 (message): Empty file list for path 'SPIRV-Tools/source/val' (maybe path doesn't exist?) Call Stack (most recent call first): /workspace/fips/cmake/fips.cmake:504 (fips_files_ex) ext/CMakeLists.txt:18 (fips_src)

CMake Warning at /workspace/fips/cmake/fips.cmake:481 (message): Empty file list for path 'SPIRV-Tools/source/opt' (maybe path doesn't exist?) Call Stack (most recent call first): /workspace/fips/cmake/fips.cmake:504 (fips_files_ex) ext/CMakeLists.txt:19 (fips_src)

CMake Warning at /workspace/fips/cmake/fips.cmake:481 (message): Empty file list for path 'glslang/glslang/OSDependent/Unix' (maybe path doesn't exist?) Call Stack (most recent call first): /workspace/fips/cmake/fips.cmake:504 (fips_files_ex) ext/CMakeLists.txt:36 (fips_src)

CMake Warning at /workspace/fips/cmake/fips.cmake:481 (message): Empty file list for path 'glslang/OGLCompilersDLL' (maybe path doesn't exist?) Call Stack (most recent call first): /workspace/fips/cmake/fips.cmake:504 (fips_files_ex) ext/CMakeLists.txt:38 (fips_src)

CMake Warning at /workspace/fips/cmake/fips.cmake:481 (message): Empty file list for path 'glslang/glslang' (maybe path doesn't exist?) Call Stack (most recent call first): /workspace/fips/cmake/fips.cmake:504 (fips_files_ex) ext/CMakeLists.txt:39 (fips_src)

CMake Warning at /workspace/fips/cmake/fips.cmake:481 (message): Empty file list for path 'glslang/SPIRV' (maybe path doesn't exist?) Call Stack (most recent call first): /workspace/fips/cmake/fips.cmake:504 (fips_files_ex) ext/CMakeLists.txt:40 (fips_src)

-- Configuring done CMake Error at /workspace/fips/cmake/fips.cmake:230 (add_library): Cannot find source file:

getopt/src/getopt.c

Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc Call Stack (most recent call first): ext/CMakeLists.txt:1 (fips_begin_lib)

CMake Error at /workspace/fips/cmake/fips.cmake:230 (add_library): Cannot find source file:

pystring/pystring.cpp

Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc Call Stack (most recent call first): ext/CMakeLists.txt:9 (fips_begin_lib)

CMake Error at /workspace/fips/cmake/fips.cmake:230 (add_library): Cannot find source file:

SPIRV-Cross/GLSL.std.450.h

Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc Call Stack (most recent call first): ext/CMakeLists.txt:59 (fips_begin_lib)

CMake Error at /workspace/fips/cmake/fips.cmake:230 (add_library): Cannot find source file:

fmt/src/format.cc

Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc Call Stack (most recent call first): ext/CMakeLists.txt:87 (fips_begin_lib)

CMake Error at /workspace/fips/cmake/fips.cmake:230 (add_library): No SOURCES given to target: getopt Call Stack (most recent call first): ext/CMakeLists.txt:1 (fips_begin_lib)

CMake Error at /workspace/fips/cmake/fips.cmake:230 (add_library): No SOURCES given to target: pystring Call Stack (most recent call first): ext/CMakeLists.txt:9 (fips_begin_lib)

CMake Error at /workspace/fips/cmake/fips.cmake:230 (add_library): No SOURCES given to target: SPIRV-Tools Call Stack (most recent call first): ext/CMakeLists.txt:15 (fips_begin_lib)

CMake Error at /workspace/fips/cmake/fips.cmake:230 (add_library): No SOURCES given to target: glslang Call Stack (most recent call first): ext/CMakeLists.txt:30 (fips_begin_lib)

CMake Error at /workspace/fips/cmake/fips.cmake:230 (add_library): No SOURCES given to target: SPIRV-Cross Call Stack (most recent call first): ext/CMakeLists.txt:59 (fips_begin_lib)

CMake Error at /workspace/fips/cmake/fips.cmake:230 (add_library): No SOURCES given to target: fmt Call Stack (most recent call first): ext/CMakeLists.txt:87 (fips_begin_lib)

CMake Generate step failed. Build files cannot be regenerated correctly. === cloning fips build system to '/workspace/fips': === building: linux-ninja-release === generating: linux-ninja-release config file: /workspace/fips/configs/linux-ninja-release.yml [ERROR] Failed to generate 'linux-ninja-release' of project 'sokol-tools' `

floooh commented 1 year ago

This looks like the sokol-tools repository hasn't been cloned with submodules.

This then fails in Docker because it copies the source directory over from the host instead of doing a git clone.

(just use git clone --recursive https://github.com/floooh/sokol-tools to clone the sokol-tools repo, and then run ./build_docker.sh again)

dgoalcantara commented 1 year ago

Solved. Thank you!