spdlog-python icon indicating copy to clipboard operation
spdlog-python copied to clipboard

Installation error pip install spdlog - Ubuntu 22.04.5 LTS

Open Astramat opened this issue 11 months ago • 0 comments

Summary

I tryed to install spdlog with the command pip install spdlog on Github action self-hosted or ubuntu-latest machine but I have the same error.

Build Log

Building wheels for collected packages: spdlog
  Building wheel for spdlog (pyproject.toml): started
  Running command Building wheel for spdlog (pyproject.toml)
  /tmp/pip-build-env-xcymbq26/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_ext
  building 'spdlog' extension
  creating build/temp.linux-x86_64-cpython-311/src
  g++ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ispdlog/include/ -I/tmp/pip-build-env-xcymbq26/normal/lib/python3.11/site-packages/pybind11/include -I/tmp/pip-build-env-xcymbq26/normal/lib/python3.11/site-packages/pybind11/include -I/home/runner/_work/_tool/Python/3.11.11/x64/include/python3.11 -c src/pyspdlog.cpp -o build/temp.linux-x86_64-cpython-311/src/pyspdlog.o -std=c++11 -v
  Using built-in specs.
  COLLECT_GCC=/usr/bin/g++
  OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
  OFFLOAD_TARGET_DEFAULT=1
  Target: x86_64-linux-gnu
  Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr,amdg
  Thread model: posix
  Supported LTO compression algorithms: zlib zstd
  gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
  COLLECT_GCC_OPTIONS='-Wsign-compare' '-D' 'NDEBUG' '-g' '-fwrapv' '-O3' '-Wall' '-fPIC' '-I' 'spdlog/include/' '-I' '/tmp/pip-build-env-xcymbq26/normal/lib/python3.11/site-packages/pybind11/include' '-I' '/tmp/pip-build-env-xcymbq26/normal/lib/python3.11/site-packages/pybind11/include' '-I' '/home/runner/_work/_tool/Python/3.11.11/x64/include/python3.11' '-c' '-o' 'build/temp.linux-x86_64-cpython-311/src/pyspdlog.o' '-std=c++11' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'build/temp.linux-x86_64-cpython-311/src/'
   /usr/lib/gcc/x86_64-linux-gnu/11/cc1plus -quiet -v -I spdlog/include/ -I /tmp/pip-build-env-xcymbq26/normal/lib/python3.11/site-packages/pybind11/include -I /tmp/pip-build-env-xcymbq26/normal/lib/python3.11/site-packages/pybind11/include -I /home/runner/_work/_tool/Python/3.11.11/x64/include/python3.11 -imultiarch x86_64-linux-gnu -D_GNU_SOURCE -D NDEBUG src/pyspdlog.cpp -quiet -dumpdir build/temp.linux-x86_64-cpython-311/src/ -dumpbase pyspdlog.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -g -O3 -Wsign-compare -Wall -std=c++11 -version -fwrapv -fPIC -fasynchronous-unwind-tables -fstack-protector-strong -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/cc5VpkfH.s
  GNU C++11 (Ubuntu 11.4.0-1ubuntu1~22.04) version 11.4.0 (x86_64-linux-gnu)
        compiled by GNU C version 11.4.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP
  GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
  ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/11"
  ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
  ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/11/include-fixed"
  ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include"
  ignoring duplicate directory "/tmp/pip-build-env-xcymbq26/normal/lib/python3.11/site-packages/pybind11/include"
  #include "..." search starts here:
  #include <...> search starts here:
   spdlog/include/
   /tmp/pip-build-env-xcymbq26/normal/lib/python3.11/site-packages/pybind11/include
   /home/runner/_work/_tool/Python/3.11.11/x64/include/python3.11
   /usr/include/c++/11
   /usr/include/x86_64-linux-gnu/c++/11
   /usr/include/c++/11/backward
   /usr/lib/gcc/x86_64-linux-gnu/11/include
   /usr/local/include
   /usr/include/x86_64-linux-gnu
   /usr/include
  End of search list.
GNU C++11 (Ubuntu 11.4.0-1ubuntu1~22.04) version 11.4.0 (x86_64-linux-gnu)
	compiled by GNU C version 11.4.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/11"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/11/include-fixed"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include"
ignoring duplicate directory "/home/runner/_work/_tool/Python/3.11.11/x64/lib/python3.11/site-packages/pybind11/include"
ignoring nonexistent directory "/opt/hostedtoolcache/Python/3.11.11/x64/include/python3.11"
#include "..." search starts here:
#include <...> search starts here:
 spdlog/include/
 /home/runner/_work/_tool/Python/3.11.11/x64/lib/python3.11/site-packages/pybind11/include
 /usr/include/c++/11
 /usr/include/x86_64-linux-gnu/c++/11
 /usr/include/c++/11/backward
 /usr/lib/gcc/x86_64-linux-gnu/11/include
 /usr/local/include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C++11 (Ubuntu 11.4.0-1ubuntu1~22.04) version 11.4.0 (x86_64-linux-gnu)
	compiled by GNU C version 11.4.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: d591828bb4d392ae8b7b160e5bb0b95f
In file included from /home/runner/_work/_tool/Python/3.11.11/x64/lib/python3.11/site-packages/pybind11/include/pybind11/attr.h:13,
                 from /home/runner/_work/_tool/Python/3.11.11/x64/lib/python3.11/site-packages/pybind11/include/pybind11/detail/class.h:12,
                 from /home/runner/_work/_tool/Python/3.11.11/x64/lib/python3.11/site-packages/pybind11/include/pybind11/pybind11.h:12,
                 from /home/runner/_work/_tool/Python/3.11.11/x64/lib/python3.11/site-packages/pybind11/include/pybind11/complex.h:12,
                 from src/pyspdlog.cpp:5:
/home/runner/_work/_tool/Python/3.11.11/x64/lib/python3.11/site-packages/pybind11/include/pybind11/detail/common.h:274:10: fatal error: Python.h: No such file or directory
  274 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1

Github Action

name: CI

on:
  push:
    branches: [ "CI/CD" ]
  pull_request:
    branches: [ "CI/CD" ]

permissions:
  contents: read

jobs:
  run-tests:
    strategy:
      fail-fast: false
      matrix:
        os: [self-hosted]
        python-version:
          - "3.11"

    name: Tests
    runs-on: ${{ matrix.os }}

    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install base dependencies for linux
        if: runner.os == 'Linux'
        run: |
          sudo add-apt-repository ppa:deadsnakes/ppa
          sudo apt-get update
          sudo apt-get install -y build-essential gcc python3.11 python3.11-dev libpython3-dev python3-distutils wget python-dev-is-python3 libspdlog-dev libsasl2-dev libldap2-dev libpython3-all-dev libgdal-dev
          find /usr/include -name Python.h
          ls /usr/include/python3.11
          python3 --version
          pip install pybind11
          git clone https://github.com/bodgergely/spdlog-python.git
          cd spdlog-python
          git submodule update --init --recursive
          python3 setup.py install

      - name: Run tests
        run: |
          python -m pytest tests -o python_files="*.py"
          

Platform

Github action self-hosted: Distributor ID: Ubuntu Description: Ubuntu 22.04.5 LTS Release: 22.04 Codename: jammy

Astramat avatar Dec 12 '24 05:12 Astramat