cloudhead / rx

👾 Modern and minimalist pixel editor
https://discord.gg/xHggPjfsS9
GNU General Public License v3.0
3.11k stars 109 forks source link

Building from source fails. cmake error. #99

Closed Serif-7 closed 3 years ago

Serif-7 commented 3 years ago

Linux Mint 20 cmake 3.16.3 cargo 1.43

Build command was standard.

   Updating git repository `https://github.com/cloudhead/rx`
  Installing rx v0.4.0 (https://github.com/cloudhead/rx?tag=v0.4.0#4235af85)
    Updating crates.io index
   Compiling log v0.4.13
   Compiling cfg-if v0.1.10
   Compiling khronos_api v3.1.0
   Compiling libc v0.2.82
   Compiling proc-macro2 v1.0.24
   Compiling xml-rs v0.8.3
   Compiling cc v1.0.66
   Compiling typenum v1.12.0
   Compiling bitflags v1.2.1
   Compiling autocfg v1.0.1
   Compiling unicode-xid v0.2.1
   Compiling byteorder v1.4.2
   Compiling crc32fast v1.2.1
   Compiling adler32 v1.2.0
   Compiling syn v1.0.58
   Compiling semver-parser v0.7.0
   Compiling cfg-if v1.0.0
   Compiling color_quant v1.1.0
   Compiling lazy_static v1.4.0
   Compiling lzw v0.10.0
   Compiling pico-args v0.3.4
   Compiling nonempty v0.1.5
   Compiling cmake v0.1.45
   Compiling num-traits v0.2.14
   Compiling inflate v0.4.5
   Compiling deflate v0.7.20
   Compiling semver v0.9.0
   Compiling snap v0.2.5
   Compiling gif v0.10.3
   Compiling glfw-sys v3.3.2
   Compiling simple_logger v1.11.0
   Compiling gl_generator v0.14.0
   Compiling quote v1.0.8
   Compiling png v0.15.3
   Compiling dirs-sys v0.3.5
   Compiling raw-window-handle v0.3.3
   Compiling generic-array v0.12.3
   Compiling rgx v0.7.1
error: failed to run custom build command for `glfw-sys v3.3.2`

Caused by:
  process didn't exit successfully: `/tmp/cargo-install5p4wkt/release/build/glfw-sys-f01debb03cc29596/build-script-build` (exit code: 101)
--- stdout
running: "cmake" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/glfw-sys-3.3.2/." "-DGLFW_BUILD_EXAMPLES=OFF" "-DGLFW_BUILD_TESTS=OFF" "-DGLFW_BUILD_DOCS=OFF" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_PREFIX=/tmp/cargo-install5p4wkt/release/build/glfw-sys-3441d3ee6c44ea7f/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release"
-- The C compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- 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
-- Found Threads: TRUE  
-- Using X11 for window creation
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Configuring incomplete, errors occurred!
See also "/tmp/cargo-install5p4wkt/release/build/glfw-sys-3441d3ee6c44ea7f/out/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/cargo-install5p4wkt/release/build/glfw-sys-3441d3ee6c44ea7f/out/build/CMakeFiles/CMakeError.log".

--- stderr
CMake Error at CMakeLists.txt:206 (message):
  RandR headers not found; install libxrandr development package

thread 'main' panicked at '
command did not execute successfully, got: exit code: 1

build script failed, must exit now', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.45/src/lib.rs:894:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

warning: build failed, waiting for other jobs to finish...
error: failed to compile `rx v0.4.0 (https://github.com/cloudhead/rx?tag=v0.4.0#4235af85)`, intermediate artifacts can be found at `/tmp/cargo-install5p4wkt`

Caused by:
  build failed
cloudhead commented 3 years ago

Have you tried what is suggested?

I think for your OS you would run sudo apt-get install libxrandr-dev or perhaps xorg-dev might have the headers.

Serif-7 commented 3 years ago

@cloudhead

Here is the output when I ran the build command given in README.md (not the one on the site. I don't believe they are substantially different, though) This was after installing libxrandr-dev

error: failed to run custom build command for `glfw-sys v3.3.2`

Caused by:
  process didn't exit successfully: `/home/daniel/src/rx/target/release/build/glfw-sys-26b6f559dd8ddb15/build-script-build` (exit code: 101)
--- stdout
running: "cmake" "/home/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/glfw-sys-3.3.2/." "-DGLFW_BUILD_EXAMPLES=OFF" "-DGLFW_BUILD_TESTS=OFF" "-DGLFW_BUILD_DOCS=OFF" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_PREFIX=/home/daniel/src/rx/target/release/build/glfw-sys-1bc049f465ed05b5/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_BUILD_TYPE=Release"
-- The C compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- 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
-- Found Threads: TRUE  
-- Using X11 for window creation
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Configuring incomplete, errors occurred!
See also "/home/daniel/src/rx/target/release/build/glfw-sys-1bc049f465ed05b5/out/build/CMakeFiles/CMakeOutput.log".
See also "/home/daniel/src/rx/target/release/build/glfw-sys-1bc049f465ed05b5/out/build/CMakeFiles/CMakeError.log".

--- stderr
CMake Error at CMakeLists.txt:211 (message):
  Xinerama headers not found; install libxinerama development package

thread 'main' panicked at '
command did not execute successfully, got: exit code: 1

build script failed, must exit now', /home/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.42/src/lib.rs:861:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

warning: build failed, waiting for other jobs to finish...
error: failed to compile `rx v0.4.0 (/home/daniel/src/rx)`, intermediate artifacts can be found at `/home/daniel/src/rx/target`

Caused by:
  build failed

Now it conveniently tells me to install libxinerama-dev. I do, and...

error: failed to run custom build command for `glfw-sys v3.3.2`

Caused by:
  process didn't exit successfully: `/home/daniel/src/rx/target/release/build/glfw-sys-26b6f559dd8ddb15/build-script-build` (exit code: 101)
--- stdout
running: "cmake" "/home/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/glfw-sys-3.3.2/." "-DGLFW_BUILD_EXAMPLES=OFF" "-DGLFW_BUILD_TESTS=OFF" "-DGLFW_BUILD_DOCS=OFF" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_PREFIX=/home/daniel/src/rx/target/release/build/glfw-sys-1bc049f465ed05b5/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_BUILD_TYPE=Release"
-- Using X11 for window creation
-- Configuring incomplete, errors occurred!
See also "/home/daniel/src/rx/target/release/build/glfw-sys-1bc049f465ed05b5/out/build/CMakeFiles/CMakeOutput.log".
See also "/home/daniel/src/rx/target/release/build/glfw-sys-1bc049f465ed05b5/out/build/CMakeFiles/CMakeError.log".

--- stderr
CMake Error at CMakeLists.txt:221 (message):
  Xcursor headers not found; install libxcursor development package

thread 'main' panicked at '
command did not execute successfully, got: exit code: 1

build script failed, must exit now', /home/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.42/src/lib.rs:861:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

warning: build failed, waiting for other jobs to finish...
error: failed to compile `rx v0.4.0 (/home/daniel/src/rx)`, intermediate artifacts can be found at `/home/daniel/src/rx/target`

Caused by:
  build failed

Now I install `libxcursor-dev'. Same thing happens and it tells me to install 'libxi-dev'. Now it finally installs correctly.

Hope this was helpful.

cloudhead commented 3 years ago

Cool, I think proably xorg-dev or something has all of those packages in one, that would have been more helpful to install. Glad you got it working though. I'll add something to the README.