BillyDM / egui-baseview

A baseview backend for the egui Rust GUI library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Linux Dependancies?

JoshuaPostel opened this issue · comments

I recently had to reinstall of my OS (Ubuntu 20.04) which lead to build errors which I narrowed down to egui-baseview (baseview built successfully). Its possible this is an upstream error which I failed to uncover, but I didnt have any luck tracking down similar issues in the x11 or raw-gl-context crates.

After running sudo apt-get install mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev, the build error below went away. Should we add these as dependencies similar to baseview's readme?

Original build error:

$ cargo build                                                                                      
   Compiling x11 v2.19.1                                                                                 
error: failed to run custom build command for `x11 v2.19.1`                                                                                                                                                        
                                                                                                         
Caused by:                                                                                               
  process didn't exit successfully: `/xxx/target/debug/build/x11-da52e72baa0be2cc/build-script-build` (exit status: 101)
  --- stdout                                                                                             
  cargo:rerun-if-env-changed=GL_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=GL_STATIC                                                                                                                                                                             
  cargo:rerun-if-env-changed=GL_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 'called `Result::unwrap()` on an `Err` value: `"pkg-config" "--libs" "--cflags" "gl" "gl >= 1"` did not exit successfully: exit status: 1
  error: could not find system library 'gl' required by the 'x11' crate
                                                                                                         
  --- stderr                                                                                             
  Package gl was not found in the pkg-config search path.          
  Perhaps you should add the directory containing `gl.pc'                  
  to the PKG_CONFIG_PATH environment variable                                                            
  No package 'gl' found                                                                                  
  Package gl was not found in the pkg-config search path.                
  Perhaps you should add the directory containing `gl.pc'
  to the PKG_CONFIG_PATH environment variable                                                            
  No package 'gl' found                                                                                  
  ', /yyy/.cargo/registry/src/github.com-1ecc6299db9ec823/x11-2.19.1/build.rs:40:14
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Sorry, really late to this one. Yeah, this makes sense. I'll do that!