Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building libshaderc_shared on AlmaLinux #1469

Open
rossant opened this issue Jan 14, 2025 · 0 comments
Open

Building libshaderc_shared on AlmaLinux #1469

rossant opened this issue Jan 14, 2025 · 0 comments

Comments

@rossant
Copy link

rossant commented Jan 14, 2025

I'm unable to build libshaderc_shader.so on AlmaLinux (to include in a Python manylinux wheel) using Docker.

Here is my script:

#!/bin/bash

# Exit immediately if a command exits with a non-zero status
set -e

# Docker image
DOCKER_IMAGE="quay.io/pypa/manylinux_2_28_x86_64"

# Shaderc Git tag to use
SHADERC_TAG="v2024.4"

# Build libshaderc_shared.so in the Docker container
docker run --rm -it "$DOCKER_IMAGE" /bin/bash -c "
    set -e
    # Install necessary tools
    yum install -y \
        git \
        cmake \
        ninja-build \
        gcc \
        gcc-c++ \
        python3 \
        make

    # Clone the shaderc repository and checkout the specified tag
    git clone https://github.com/google/shaderc /shaderc
    cd /shaderc
    git checkout $SHADERC_TAG

    # Sync dependencies
    ./utils/git-sync-deps

    # Build libshaderc_shared.so
    mkdir -p build && cd build
    cmake -GNinja \
        -DCMAKE_BUILD_TYPE=Release \
        -DSHADERC_SKIP_TESTS=ON \
        -DSHADERC_SKIP_EXAMPLES=ON \
        -DSHADERC_SKIP_INSTALL=ON \
        ..
    ninja

    # Copy the built shared library to the output directory
    cp libshaderc_shared.so /shaderc/libshaderc_shared.so
"

and the output

HEAD is now at caa54d9 Finalize Shaderc v2024.4
third_party/effcee                   @ d74d33d93043952a99ae7cd7458baf6bc8df1da0
third_party/re2                      @ 4a8cee3dd3c3d81b6fe8b867811e193d5819df07
third_party/spirv-headers            @ 3f17b2af6784bfa2c5aa5dbb8e0e74a607dd8b3b
third_party/abseil_cpp               @ 1315c900e1ddbb08a23e06eeb9a06450052ccb5e
third_party/googletest               @ 1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2
third_party/spirv-tools              @ 4d2f0b40bfe290dea6c6904dafdf7fd8328ba346
third_party/glslang                  @ a0995c49ebcaca2c6d3b03efbabf74f3843decdb
-- The C compiler identification is GNU 14.2.1
-- The CXX compiler identification is GNU 14.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/rh/gcc-toolset-14/root/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: /opt/rh/gcc-toolset-14/root/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Shaderc: build type is "Release".
-- Configuring Shaderc to avoid building tests.
-- Configuring Shaderc to avoid building examples.
-- Configuring Shaderc to check copyrights.
-- asciidoctor was not found - no documentation will be generated
-- Found Python: /usr/local/bin/python3.13 (found version "3.13.1") found components: Interpreter
-- Performing Test COMPILER_SUPPORTS_FALLTHROUGH_WARNING
-- Performing Test COMPILER_SUPPORTS_FALLTHROUGH_WARNING - Success
-- Performing Test COMPILER_SUPPORTS_EXTRA_SEMI_WARNING
-- Performing Test COMPILER_SUPPORTS_EXTRA_SEMI_WARNING - Success
-- Performing Test COMPILER_SUPPORTS_PIC
-- Performing Test COMPILER_SUPPORTS_PIC - Success
-- Found Python3: /usr/local/bin/python3.13 (found version "3.13.1") found components: Interpreter
-- optimizer enabled
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Configuring done (3.0s)
CMake Error: install(EXPORT "glslang-targets" ...) includes target "SPIRV" which requires target "SPIRV-Tools-opt" that is not in any export set.
CMake Error: install(EXPORT "glslang-targets" ...) includes target "glslang" which requires target "SPIRV-Tools-opt" that is not in any export set.
-- Generating done (0.1s)
CMake Generate step failed.  Build files cannot be regenerated correctly

Any hints would be greatly appreciated! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant