Skip to content

SDK failed installation on a clean system (fixed) #296

Description

@bpinaya

On a fairly clean 22.04 install I had the following issue:

(venv) bpinaya@msi:~/Documents/gitrepos/rerun$ pip install ./rerun_py                                                                                                                                                                                         
Processing ./rerun_py                                                                                                                                                                                                                                         
  Installing build dependencies ... done                                                                                                                                                                                                                      
  Getting requirements to build wheel ... done                                                                                                                                                                                                                
  Preparing metadata (pyproject.toml) ... done                                                                                                                                                                                                                
Collecting numpy==1.23                                                                                                                                                                                                                                        
  Using cached numpy-1.23.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)                                                                                                                                                                
Building wheels for collected packages: rerun_sdk                                                                                                                                                                                                             
  Building wheel for rerun_sdk (pyproject.toml) ... error                                                                                                                                                                                                     
  error: subprocess-exited-with-error                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                              
  × Building wheel for rerun_sdk (pyproject.toml) did not run successfully.                                                                                                                                                                                   
  │ exit code: 1                                                                                                                                                                                                                                              
  ╰─> [103 lines of output]                                                                                                                                                                                                                                   
      Running `maturin pep517 build-wheel -i /home/bpinaya/Documents/gitrepos/rerun/venv/bin/python3 --compatibility off`                                                                                                                                     
      📡 Using build options locked from pyproject.toml                                                                                                                                                                                                       
      warning: /home/bpinaya/Documents/gitrepos/rerun/Cargo.toml: unused manifest key: patch.crates-io.wgpu-core.ref                                                                                                                                          
      warning: /home/bpinaya/Documents/gitrepos/rerun/Cargo.toml: unused manifest key: patch.crates-io.wgpu.ref                                                                                                                                               
         Compiling ahash v0.8.1                                                                                                                                                                                                                               
         Compiling zstd-safe v5.0.2+zstd.1.5.2                                                                                                                                                                                                                
         Compiling zstd-sys v2.0.1+zstd.1.5.2                                                                                                                                                                                                                 
         Compiling bincode v1.3.3                                                                                                                                                                                                                             
         Compiling wasm-bindgen-shared v0.2.83                                                                                                                                                                                                                
         Compiling owned_ttf_parser v0.15.2                                                                                                                                                                                                                   
         Compiling servo-fontconfig-sys v5.1.0                                                                                                                                                                                                                
         Compiling glib-sys v0.15.10                                                                                                                                                                                                                          
         Compiling pyo3-build-config v0.17.1                                                                                                                                                                                                                  
         Compiling unicode-normalization v0.1.21                                                                                                                                                                                                              
      The following warnings were emitted during compilation:                                                                                                                                                                                                 
                                                                                                                                                                                                                                                              
      warning: `"pkg-config" "--libs" "--cflags" "glib-2.0" "glib-2.0 >= 2.48"` did not exit successfully: exit status: 1                                                                                                                                     
                                                                                                                                                                                                                                                              
      error: failed to run custom build command for `glib-sys v0.15.10`                                                                                                                                                                                       
                                                                                                                                                                                                                                                              
      Caused by:                                                                                                                                                                                                                                              
        process didn't exit successfully: `/home/bpinaya/Documents/gitrepos/rerun/target/release/build/glib-sys-318aed40c122c20e/build-script-build` (exit status: 1)                                                                                         
        --- stdout                                                                                                                                                                                                                                            
        cargo:rerun-if-env-changed=GLIB_2.0_NO_PKG_CONFIG                                                                                                                                                                                                     
        cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu                                                                                                                                                                                        
        cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu                                                                                                                                                                                        
        cargo:rerun-if-env-changed=HOST_PKG_CONFIG                                                                                                                                                                                                            
        cargo:rerun-if-env-changed=PKG_CONFIG                                                                                                                                                                                                                 
        cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu                                                                                                                                                                                   
        cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu                                                                                                                                                                                   
        cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH                                                                                                                                                                                                       
        cargo:rerun-if-env-changed=PKG_CONFIG_PATH                                                                                                                                                                                                            
        cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu                                                                                                                                                                                 
        cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu                                                                                                                                                                                 
        cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR                                                                                                                                                                                                     
        cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR                                                                                                                                                                                                          
        cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu                                                                                                                                                                            
        cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu                                                                                                                                                                            
        cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR                                                                                                                                                                                                
        cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR                                                                                                                                                                                                     
        cargo:warning=`"pkg-config" "--libs" "--cflags" "glib-2.0" "glib-2.0 >= 2.48"` did not exit successfully: exit status: 1                                                                                                                              
        error: could not find system library 'glib-2.0' required by the 'glib-sys' crate
                                                                                                                                                                                                                                                              
        --- stderr                                                                                                                                                                                                                                            
        Package glib-2.0 was not found in the pkg-config search path.                                                                                                                                                                                         
        Perhaps you should add the directory containing `glib-2.0.pc'                                                                                                                                                                                         
        to the PKG_CONFIG_PATH environment variable                                                                                                                                                                                                           
        No package 'glib-2.0' found                                                                                                                                                                                                                           
        Package glib-2.0 was not found in the pkg-config search path.                                                                                                                                                                                         
        Perhaps you should add the directory containing `glib-2.0.pc'                                                                                                                                                                                         
        to the PKG_CONFIG_PATH environment variable                                                                                                                                                                                                           
        No package 'glib-2.0' found
      
      warning: build failed, waiting for other jobs to finish...
      error: failed to run custom build command for `servo-fontconfig-sys v5.1.0`
      
      Caused by:
        process didn't exit successfully: `/home/bpinaya/Documents/gitrepos/rerun/target/release/build/servo-fontconfig-sys-f0a074f7e904d57f/build-script-build` (exit status: 101)
        --- stdout
        cargo:rerun-if-env-changed=FONTCONFIG_NO_PKG_CONFIG
        cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
        cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
        cargo:rerun-if-env-changed=HOST_PKG_CONFIG
        cargo:rerun-if-env-changed=PKG_CONFIG
        cargo:rerun-if-env-changed=FONTCONFIG_STATIC
        cargo:rerun-if-env-changed=FONTCONFIG_DYNAMIC
        cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
        cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
        cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
        cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
        cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
        cargo:rerun-if-env-changed=PKG_CONFIG_PATH
        cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
        cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
        cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
        cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
        cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
        cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
        cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
        cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
      
        --- stderr
        thread 'main' panicked at '`"pkg-config" "--libs" "--cflags" "fontconfig" "fontconfig >= 2.11.1"` did not exit successfully: exit status: 1
        error: could not find system library 'fontconfig' required by the 'servo-fontconfig-sys' crate
      
        --- stderr
        Package fontconfig was not found in the pkg-config search path.
        Perhaps you should add the directory containing `fontconfig.pc'
        to the PKG_CONFIG_PATH environment variable
        No package 'fontconfig' found
        Package fontconfig was not found in the pkg-config search path.
        Perhaps you should add the directory containing `fontconfig.pc'
        to the PKG_CONFIG_PATH environment variable
        No package 'fontconfig' found
        ', /home/bpinaya/.cargo/registry/src/github.com-1ecc6299db9ec823/servo-fontconfig-sys-5.1.0/build.rs:34:17
        note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
      💥 maturin failed
        Caused by: Failed to build a native library through cargo
        Caused by: Cargo build finished with "exit status: 101": `"cargo" "rustc" "--release" "--message-format" "json" "--locked" "--lib"`
      🍹 Building a mixed python/rust project
      🔗 Found pyo3 bindings
      🐍 Found CPython 3.9 at /home/bpinaya/Documents/gitrepos/rerun/venv/bin/python3
      Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/home/bpinaya/Documents/gitrepos/rerun/venv/bin/python3', '--compatibility', 'off'] returned non-zero exit status 1
      [end of output]
   
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for rerun_sdk
Failed to build rerun_sdk
ERROR: Could not build wheels for rerun_sdk, which is required to install pyproject.toml-based projects
WARNING: You are using pip version 22.0.4; however, version 22.3.1 is available.
You should consider upgrading via the '/home/bpinaya/Documents/gitrepos/rerun/venv/bin/python3 -m pip install --upgrade pip' command.

With the following versions:

lsb_realease -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
Codename:       jammy

python --version : Python 3.9.13
pip --version: pip 22.2.2
rustc --version: rustc 1.65.0 (897e37553 2022-11-02)

Solved by googling around and installing the following dependencies:

sudo apt install libfontconfig1-dev libatk-bridge2.0 libgtk-3-dev libglib2.0-dev libfreetype6-dev libatk-bridge2.0

You can close this issue, it's just here if someone has the same problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions