sergei-mironov / xkb-switch

Switch your X keyboard layouts from the command line
MIT License
345 stars 37 forks source link

change compression tool from gz to gzip #51

Closed pvonmoradi closed 3 years ago

pvonmoradi commented 3 years ago

I'm on Xubuntu 18.04. Had to change these lines in CMakeCache.txt from gz to gzip

COMPRESS_EXECUTABLE:FILEPATH=/bin/gzip
MAN_COMPRESSION:STRING=gzip
sergei-mironov commented 3 years ago

Hi. CMakeCache.txt is an auto-generated file. I suspect there are some inconsistencies in your working environment (gzip package moved from /bin to somewhere like /usr/bin?). Consider re-generating it first by removing the whole build folder. Please suggest what changes should we do in CMakeLists.txt from the project root folder if the error remains.

pvonmoradi commented 3 years ago
λ mkdir build && cd build

λ cmake ..
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /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: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- 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 done
-- Generating done
-- Build files have been written to: /tmp/xkb-switch/build

λ make
Scanning dependencies of target xkbswitch
[ 16%] Building CXX object CMakeFiles/xkbswitch.dir/src/XKbSwitchApi.cpp.o
[ 33%] Building CXX object CMakeFiles/xkbswitch.dir/src/XKeyboard.cpp.o
[ 50%] Linking CXX shared library libxkbswitch.so
[ 50%] Built target xkbswitch
Scanning dependencies of target xkb-switch
[ 66%] Building CXX object CMakeFiles/xkb-switch.dir/src/XKbSwitch.cpp.o
[ 83%] Linking CXX executable xkb-switch
[ 83%] Built target xkb-switch
Scanning dependencies of target man_xkb-switch_1
[100%] Compressing man file man/xkb-switch.1 to /tmp/xkb-switch/build/xkb-switch.1.gz
This tool modifies various aspects of a running Gazebo simulation.

  Usage:  gz <command>

List of commands:

  help      Print this help text.
  camera    Control a camera
  debug     Returns completion list for a command. Used for bash completion.
  help      Outputs information about a command
  joint     Modify properties of a joint
  log       Introspects and manipulates Gazebo log files.
  marker    Add, modify, or delete visual markers
  model     Modify properties of a model
  physics   Modify properties of the physics engine
  sdf       Converts between SDF versions, and provides info about SDF files
  stats     Print statistics about a running gzserver instance.
  topic     Lists information about topics on a Gazebo master
  world     Modify world properties

Use "gz help <command>" to print help for a command.
CMakeFiles/man_xkb-switch_1.dir/build.make:79: recipe for target 'xkb-switch.1.gz' failed
make[2]: *** [xkb-switch.1.gz] Error 255
make[2]: *** Deleting file 'xkb-switch.1.gz'
CMakeFiles/Makefile2:125: recipe for target 'CMakeFiles/man_xkb-switch_1.dir/all' failed
make[1]: *** [CMakeFiles/man_xkb-switch_1.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
make: *** [all] Error 2

In my setup, gz is an external tool (Gazebo), isn't the compression tool called gzip? I'm using Xubuntu 18, maybe distros have different names for same tools.

sergei-mironov commented 3 years ago

Maybe also a fork's issue? I use gzip, check here https://github.com/grwlf/xkb-switch/blob/master/CMakeLists.txt#L50

sergei-mironov commented 3 years ago

Oh, wait a minute.. https://github.com/grwlf/xkb-switch/blob/master/CMakeLists.txt#L52 stll mentions gz

pvonmoradi commented 3 years ago

@grwlf This time I used your latest master. https://github.com/grwlf/xkb-switch/blob/master/CMakeLists.txt#L41 and line 52 Yeah you already noted

sergei-mironov commented 3 years ago

Could you please check the latest master?

pvonmoradi commented 3 years ago

@grwlf

 make
Scanning dependencies of target xkbswitch
[ 16%] Building CXX object CMakeFiles/xkbswitch.dir/src/XKbSwitchApi.cpp.o
[ 33%] Building CXX object CMakeFiles/xkbswitch.dir/src/XKeyboard.cpp.o
[ 50%] Linking CXX shared library libxkbswitch.so
[ 50%] Built target xkbswitch
Scanning dependencies of target xkb-switch
[ 66%] Building CXX object CMakeFiles/xkb-switch.dir/src/XKbSwitch.cpp.o
[ 83%] Linking CXX executable xkb-switch
[ 83%] Built target xkb-switch
Scanning dependencies of target man_xkb-switch_1
[100%] Compressing man file man/xkb-switch.1 to /tmp/xkb-switch/build/xkb-switch.1.gzip
[100%] Built target man_xkb-switch_1

Builds fine 😉

sergei-mironov commented 3 years ago

Thanks!