Monday, September 20, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Only console users are allowed to run the X server

Posted: 20 Sep 2021 10:48 AM PDT

when I tried to do the startX command from the windows swl2 subsystem of Ubuntu. I tried to open the GUI of the Ubuntu system. I have installed the ubuntu desktop. However, When I tried to open the desktop. There is the problem. enter image description here

Compiling older gcc with newer GCC, why did make stop without errors?

Posted: 20 Sep 2021 10:22 AM PDT

Boring backround: I am attempting to get msp430 toolchain to aarch64 (64bit arm). I have recently moved from gentoo (constant need to add 32 bit useflags poluting mine portage and then cheking if they are still necessary... necessity to add abi_x86_32 manualy did put the hole gentoo to its knees). After 12 years with gentoo I was looking to move to arch, but with mine Pi4 I got manjaro for 64bit support.

I am trying to port msp430 to aarch64. I have got the msp430-binutils to the package,but gcc makes more problem...

To the point: WHen attempting to compile the TI's latest (patched)gcc-9.3.1.11, The make stops during the compilation but I cant find the actual errors which caused it. Mine PCKGBUILD :

  # based on apply-patches.sh from msp430-gcc-9.3.1.11-source-patches by texas instruments  # based on a gcc9 PKGBUILD by group of authors  # package for gcc-9.3.0 for MSP430  # This file is written by complete noob.  # No warranty whatsoever    ########################################################################  #     Warning!!!!!                                                     #  #   As the parser of texi file is incapable of unicode (not even utf-8)#  #   this package will not pass make stage if BuildPATH contains non-asci characters    pkgbase=msp430-gcc9  pkgname=msp430-gcc  pkgver=9.3.1.11  pkgrel=1  _islver=0.21  pkgdesc="GNU toolchain for the TI MSP430 processor"  arch=('aarch64')  url="https://www.ti.com/tool/MSP430-GCC-OPENSOURCE"  license=('GPL')  makedepends=( 'wget' 'texinfo' 'ncurses' 'zlib' 'msp430-binutils' 'libmpc' 'doxygen' 'python' 'git')  depends=('elfutils' 'libmpc' 'gcc')  options=(!strip !emptydirs !libtool)                  # as some of the shared files have been removed to prevent conflicts with main gcc they have to be already on a system  configure_args_gdb_common=$(echo --disable-{binutils,gas,ld,gprof,etc} --without-{mpfr,lzma} --with-static-standard-libraries --disable-source-highlight)  configure_args_gdb_nopy="--with-python=no"  configure_args_gdb_py="--with-python=python2.7 --program-prefix=msp430-elf- --program-suffix=-py"configure_args_gcc=$(echo --enable-target-optspace --enable-newlib-nano-formatted-io)      source=( "http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_3_1_2/export/msp430-gcc-9.3.1.11-source-full.tar.bz2"                    http://isl.gforge.inria.fr/isl-${_islver}.tar.xz          https://occam.cs.pitt.edu/QmcvDZvdTHadc93Dtn4SJi8gMvezxJVeTLk6pJnE8uy1Pr/5du9jMmZ9WGWsGta7qCfAj8xM7btzP/raw/fs64270.patch          #c89 c99           )    sha1sums=('88cbf70edd38f29a88d0dc9e7544f42708f84835'            '175111adaa8f6bda81a99ba9e200255a3b8075e2'            'b5d3c80aa04ceef9310e6a6baf8657a88247f244')    _builddir=build    prepare() {      cd "${srcdir}/msp430-gcc-${pkgver}-source-full/gcc/"    # Download sources for gcc prerequisites (gmp, mpfr, mpc, and isl)    (      # download_prerequisites requires wget which isn't on macOS      wget() {        curl -O "$@"      }      source ./contrib/download_prerequisites    )      # Create a single source tree for gcc and newlib    for dir in libgloss newlib; do      ln -fns ../newlib/$dir $dir    done          }        build() {      cd "${srcdir}/msp430-gcc-${pkgver}-source-full/gcc/"      export PATH=./:$PWD/../../install/usr/local/bin:$PATH    ./configure $configure_args_common $configure_args_gcc \                 CFLAGS_FOR_TARGET="-Os" \                 --prefix=/usr \                 --infodir=/usr/share/info \                 --mandir=/usr/share/man \                 --disable-libssp \                 --disable-nls \                 --target=msp430 \                 --enable-languages=c,c++ \                 --with-gnu-as \                 --with-gnu-ld \                 --with-as=/usr/bin/msp430-as \                 --with-ld=/usr/bin/msp430-ld \                 --with-pkgversion="mspgcc_${_mspgcc_ver}"    #CFLAGS="-Os -g0 -s" "${srcdir}/gcc-${pkgver}/configure" \                     printf "\n\n###########################################\n Predmake\n####################################x\n "  #pushd build/gcc    (    CFLAGS="${CFLAGS/-pipe/} -Wno-error"    CXXFLAGS="${CXXFLAGS/-pipe/} -Wno-error"      make #>> ./Vystup      printf "\n\n###########################################\n Pomake\n####################################x\n "      make html      make install install-html DESTDIR=$PWD/../../install    )  #popd        libtool --finish /usr/libexec/gcc/msp430/9.3.1  }    check() {    #cd ${srcdir}/binutils-*/${_builddir}      # do not abort on errors - manually check log files    make -k -j1 check || true    }    package() {   cd ${srcdir}/gcc-${pkgver}/${_builddir}    make DESTDIR=${pkgdir} install      rm -f  ${pkgdir}/usr/lib/libiberty.a    rm -rf ${pkgdir}/usr/share/man/man7    rm -rf ${pkgdir}/usr/share/info      msg "Stripping debugging symbols from binaries"    local binary    find ${pkgdir} -type f 2>/dev/null | while read binary ; do      case "$(file -biz "$binary")" in        *compressed-encoding*)      # Skip compressed binarys          ;;        *application/x-executable*) # Binaries          /usr/bin/strip "$binary" >/dev/null 2>&1 ;;      esac    done      "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"  }    # vim:set sts=2 ts=2 sw=2 et:  

The error Output:

In file included from /usr/include/string.h:519,                   from ../.././libiberty/dyn-string.c:38:  In function 'strncpy',      inlined from 'dyn_string_insert_cstr' at ../.././libiberty/dyn-string.c:280:3:  /usr/include/bits/string_fortified.h:106:10: warning: '__builtin_strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]    106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ../.././libiberty/dyn-string.c: In function 'dyn_string_insert_cstr':  ../.././libiberty/dyn-string.c:272:16: note: length computed here    272 |   int length = strlen (src);        |                ^~~~~~~~~~~~  configure: WARNING: decimal float is not supported for this target, ignored  In file included from /usr/include/string.h:519,                   from ../.././libiberty/dyn-string.c:38:  In function 'strncpy',      inlined from 'dyn_string_insert_cstr' at ../.././libiberty/dyn-string.c:280:3:  /usr/include/bits/string_fortified.h:106:10: warning: '__builtin_strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]    106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ../.././libiberty/dyn-string.c: In function 'dyn_string_insert_cstr':  ../.././libiberty/dyn-string.c:272:16: note: length computed here    272 |   int length = strlen (src);        |                ^~~~~~~~~~~~  In file included from /usr/include/string.h:519,                   from ../.././libiberty/dyn-string.c:38:  In function 'strncpy',      inlined from 'dyn_string_insert_cstr' at ../.././libiberty/dyn-string.c:280:3:  /usr/include/bits/string_fortified.h:106:10: warning: '__builtin_strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]    106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ../.././libiberty/dyn-string.c: In function 'dyn_string_insert_cstr':  ../.././libiberty/dyn-string.c:272:16: note: length computed here    272 |   int length = strlen (src);        |                ^~~~~~~~~~~~  ar: `u' modifier ignored since `D' is the default (see `U')  objcopy: /tmp/ls267314: cannot fill debug link section `x': No such file or directory  ar: `u' modifier ignored since `D' is the default (see `U')  ../.././libcpp/expr.c: In function 'unsigned int cpp_classify_number(cpp_reader*, const cpp_token*, const char**, location_t)':  ../.././libcpp/expr.c:797:18: error: format not a string literal and no format arguments [-Werror=format-security]    797 |        0, message);        |                  ^  ../.././libcpp/expr.c:800:39: error: format not a string literal and no format arguments [-Werror=format-security]    800 |           virtual_location, 0, message);        |                                       ^  cc1plus: some warnings being treated as errors  make[2]: *** [Makefile:224: expr.o] Error 1  make[2]: *** Waiting for unfinished jobs....  ../.././libcpp/macro.c: In member function 'vaopt_state::update_type vaopt_state::update(const cpp_token*)':  ../.././libcpp/macro.c:164:23: error: format not a string literal and no format arguments [-Werror=format-security]    164 |      vaopt_paste_error);        |                       ^  ../.././libcpp/macro.c:193:24: error: format not a string literal and no format arguments [-Werror=format-security]    193 |       vaopt_paste_error);        |                        ^  ../.././libcpp/macro.c: In function 'cpp_macro* create_iso_definition(cpp_reader*)':  ../.././libcpp/macro.c:3385:58: error: format not a string literal and no format arguments [-Werror=format-security]   3385 |        cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);        |                                                          ^  ../.././libcpp/macro.c:3400:58: error: format not a string literal and no format arguments [-Werror=format-security]   3400 |        cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);        |                                                          ^  cc1plus: some warnings being treated as errors  make[2]: *** [Makefile:224: macro.o] Error 1  make[1]: *** [Makefile:2791: all-build-libcpp] Error 2  make[1]: *** Waiting for unfinished jobs....  ../.././libcpp/expr.c: In function 'unsigned int cpp_classify_number(cpp_reader*, const cpp_token*, const char**, location_t)':  ../.././libcpp/expr.c:797:18: error: format not a string literal and no format arguments [-Werror=format-security]    797 |        0, message);        |                  ^  ../.././libcpp/expr.c:800:39: error: format not a string literal and no format arguments [-Werror=format-security]    800 |           virtual_location, 0, message);        |                                       ^  libtool: install: warning: remember to run `libtool --finish /usr/libexec/gcc/msp430/9.3.1'  cc1plus: some warnings being treated as errors  make[2]: *** [Makefile:224: expr.o] Error 1  make[2]: *** Waiting for unfinished jobs....  ../.././libcpp/macro.c: In member function 'vaopt_state::update_type vaopt_state::update(const cpp_token*)':  ../.././libcpp/macro.c:164:23: error: format not a string literal and no format arguments [-Werror=format-security]    164 |      vaopt_paste_error);        |                       ^  ../.././libcpp/macro.c:193:24: error: format not a string literal and no format arguments [-Werror=format-security]    193 |       vaopt_paste_error);        |                        ^  ../.././libcpp/macro.c: In function 'cpp_macro* create_iso_definition(cpp_reader*)':  ../.././libcpp/macro.c:3385:58: error: format not a string literal and no format arguments [-Werror=format-security]   3385 |        cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);        |                                                          ^  ../.././libcpp/macro.c:3400:58: error: format not a string literal and no format arguments [-Werror=format-security]   3400 |        cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);        |                                                          ^  cc1plus: some warnings being treated as errors  make[2]: *** [Makefile:224: macro.o] Error 1  make[1]: *** [Makefile:6965: all-libcpp] Error 2  make: *** [Makefile:949: all] Error 2  ==> CHYBA: Chyba nastala v build().      Prebieha rušenie...  

The last two Lines translate as: Error during build() and Cenceling...

last few make lines:

g++  -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include  -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -Wp,-D_GLIBCXX_ASSERTIONS -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long  -fno-exceptions -fno-rtti -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include   -c -o directives.o -MT directives.o -MMD -MP -MF .deps/directives.Tpo ../.././libcpp/directives.c  g++  -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include  -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -Wp,-D_GLIBCXX_ASSERTIONS -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long  -fno-exceptions -fno-rtti -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include   -c -o directives-only.o -MT directives-only.o -MMD -MP -MF .deps/directives-only.Tpo ../.././libcpp/directives-only.c  gcc -c -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wno-overlength-strings -pedantic -Wno-long-long   -DHAVE_CONFIG_H -I. -I../.././fixincludes -I../include -I../.././fixincludes/../include ../.././fixincludes/server.c  gcc -c -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wno-overlength-strings -pedantic -Wno-long-long   -DHAVE_CONFIG_H -I. -I../.././fixincludes -I../include -I../.././fixincludes/../include ../.././fixincludes/procopen.c  g++  -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include  -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -Wp,-D_GLIBCXX_ASSERTIONS -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long  -fno-exceptions -fno-rtti -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include   -c -o errors.o -MT errors.o -MMD -MP -MF .deps/errors.Tpo ../.././libcpp/errors.c  gcc -c -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wno-overlength-strings -pedantic -Wno-long-long   -DHAVE_CONFIG_H -I. -I../.././fixincludes -I../include -I../.././fixincludes/../include ../.././fixincludes/fixlib.c  gcc -c -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wno-overlength-strings -pedantic -Wno-long-long   -DHAVE_CONFIG_H -I. -I../.././fixincludes -I../include -I../.././fixincludes/../include ../.././fixincludes/fixopts.c  srcdir="../.././fixincludes" /bin/sh ../.././fixincludes/mkfixinc.sh msp430-unknown-none  sed -e 's/@gcc_version@/9.3.1/' < mkheaders.almost > mkheadersT  mv -f mkheadersT mkheaders  g++  -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include  -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -Wp,-D_GLIBCXX_ASSERTIONS -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long  -fno-exceptions -fno-rtti -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include   -c -o expr.o -MT expr.o -MMD -MP -MF .deps/expr.Tpo ../.././libcpp/expr.c  g++  -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include  -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -Wp,-D_GLIBCXX_ASSERTIONS -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long  -fno-exceptions -fno-rtti -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include   -c -o files.o -MT files.o -MMD -MP -MF .deps/files.Tpo ../.././libcpp/files.c  gcc -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -static-libstdc++ -static-libgcc -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o fixincl fixincl.o fixtests.o fixfixes.o server.o procopen.o fixlib.o fixopts.o ../libiberty/libiberty.a  echo timestamp > full-stamp  make[2]: Leaving directory '/home/asi/Balickovac/src/msp430-gcc-9.3.1.11-source-full/gcc/host-aarch64-unknown-linux-gnu/fixincludes'  g++  -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include  -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -Wp,-D_GLIBCXX_ASSERTIONS -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long  -fno-exceptions -fno-rtti -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include   -c -o identifiers.o -MT identifiers.o -MMD -MP -MF .deps/identifiers.Tpo ../.././libcpp/identifiers.c  /bin/sh ./libtool --tag=CC --tag=disable-static  --mode=link gcc -Wall -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -Wc,-static-libgcc  -module -bindir /usr/libexec/gcc/msp430/9.3.1    -Xcompiler '-static-libstdc++' -Xcompiler '-static-libgcc' '-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' -o liblto_plugin.la -rpath /usr/libexec/gcc/msp430/9.3.1 lto-plugin.lo  -Wc,../libiberty/pic/libiberty.a   libtool: link: gcc -shared  -fPIC -DPIC  .libs/lto-plugin.o    -march=armv8-a -static-libgcc -static-libstdc++ -static-libgcc -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z -Wl,relro -Wl,-z -Wl,now ../libiberty/pic/libiberty.a   -Wl,-soname -Wl,liblto_plugin.so.0 -o .libs/liblto_plugin.so.0.0.0  libtool: link: (cd ".libs" && rm -f "liblto_plugin.so.0" && ln -s "liblto_plugin.so.0.0.0" "liblto_plugin.so.0")  libtool: link: (cd ".libs" && rm -f "liblto_plugin.so" && ln -s "liblto_plugin.so.0.0.0" "liblto_plugin.so")  libtool: link: ( cd ".libs" && rm -f "liblto_plugin.la" && ln -s "../liblto_plugin.la" "liblto_plugin.la" )  echo "#define LOCALEDIR \"/usr/share/locale\"" > localedir.new  ../.././libcpp/../move-if-change localedir.new localedir.h  echo timestamp > localedir.hs  g++  -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include  -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -Wp,-D_GLIBCXX_ASSERTIONS -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long  -fno-exceptions -fno-rtti -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include   -c -o lex.o -MT lex.o -MMD -MP -MF .deps/lex.Tpo ../.././libcpp/lex.c  mkdir -p -- ../../host-aarch64-unknown-linux-gnu/gcc  libtool: install: /usr/bin/install -c .libs/liblto_plugin.so.0.0.0 /home/asi/Balickovac/src/msp430-gcc-9.3.1.11-source-full/gcc/host-aarch64-unknown-linux-gnu/lto-plugin/../../host-aarch64-unknown-linux-gnu/gcc/liblto_plugin.so.0.0.0  libtool: install: (cd /home/asi/Balickovac/src/msp430-gcc-9.3.1.11-source-full/gcc/host-aarch64-unknown-linux-gnu/lto-plugin/../../host-aarch64-unknown-linux-gnu/gcc && { ln -s -f liblto_plugin.so.0.0.0 liblto_plugin.so.0 || { rm -f liblto_plugin.so.0 && ln -s liblto_plugin.so.0.0.0 liblto_plugin.so.0; }; })  libtool: install: (cd /home/asi/Balickovac/src/msp430-gcc-9.3.1.11-source-full/gcc/host-aarch64-unknown-linux-gnu/lto-plugin/../../host-aarch64-unknown-linux-gnu/gcc && { ln -s -f liblto_plugin.so.0.0.0 liblto_plugin.so || { rm -f liblto_plugin.so && ln -s liblto_plugin.so.0.0.0 liblto_plugin.so; }; })  libtool: install: /usr/bin/install -c .libs/liblto_plugin.lai /home/asi/Balickovac/src/msp430-gcc-9.3.1.11-source-full/gcc/host-aarch64-unknown-linux-gnu/lto-plugin/../../host-aarch64-unknown-linux-gnu/gcc/liblto_plugin.la  make[3]: Leaving directory '/home/asi/Balickovac/src/msp430-gcc-9.3.1.11-source-full/gcc/host-aarch64-unknown-linux-gnu/lto-plugin'  make[2]: Leaving directory '/home/asi/Balickovac/src/msp430-gcc-9.3.1.11-source-full/gcc/host-aarch64-unknown-linux-gnu/lto-plugin'  g++  -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include  -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -Wp,-D_GLIBCXX_ASSERTIONS -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long  -fno-exceptions -fno-rtti -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include   -c -o line-map.o -MT line-map.o -MMD -MP -MF .deps/line-map.Tpo ../.././libcpp/line-map.c  g++  -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include  -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -Wp,-D_GLIBCXX_ASSERTIONS -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long  -fno-exceptions -fno-rtti -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include   -c -o macro.o -MT macro.o -MMD -MP -MF .deps/macro.Tpo ../.././libcpp/macro.c  g++  -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include  -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -Wp,-D_GLIBCXX_ASSERTIONS -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long  -fno-exceptions -fno-rtti -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include   -c -o mkdeps.o -MT mkdeps.o -MMD -MP -MF .deps/mkdeps.Tpo ../.././libcpp/mkdeps.c  g++  -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include  -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -Wp,-D_GLIBCXX_ASSERTIONS -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long  -fno-exceptions -fno-rtti -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include   -c -o pch.o -MT pch.o -MMD -MP -MF .deps/pch.Tpo ../.././libcpp/pch.c  make[2]: Leaving directory '/home/asi/Balickovac/src/msp430-gcc-9.3.1.11-source-full/gcc/host-aarch64-unknown-linux-gnu/libcpp'  make[1]: Leaving directory '/home/asi/Balickovac/src/msp430-gcc-9.3.1.11-source-full/gcc'  

Full make output at https://pastebin.com/KpwyLfWZ After googling I have read abnout problems compiling older gcc using newer version, but as the manjaros aarch64 is rather fresh, gcc version 10.2.0 is as old as its available and attempting to complie older version would have the same result... I dont have another computer (Mine old toughbook was killed in rather spectaculary manner with its metal frame melted in process) and I cant use other peoples computers to the developement level. so I cant compileon older and I am not sure about which level chrooting to intell32bit would work on arm platform. Any ideas?

Copying linux file content in an incremental manner

Posted: 20 Sep 2021 09:53 AM PDT

I need a bash code that can permit me to copy a linux file to another file line by line. The content of the file should copied starting from the bottom of the file going to the top of the file.

PrintScreen key not registering in Arch Linux

Posted: 20 Sep 2021 09:44 AM PDT

I'm using Arch Linux with i3 as my wm and running an x server. All my keys work but printscreen key doesn't even register.

I tried xbindkeys -k which seems to work for all keys except Print.

My keyboard is fine, because I have a dual boot with win10 where printscreen works flawlessly.

Please help.

meld won't start on Cygwin: No module named 'meld'

Posted: 20 Sep 2021 08:39 AM PDT

I'm using Cygwin 64 on Windows 10; just updated. Some relevant package versions:

  • meld: 3.18.0-1
  • python3: 3.8.6-1
  • python2: 2.7.18-4

I'm also using MobaXTerm's X server (and it works - I can run xclock for example.)

When I run meld in a Cygwin bash session (within mintty), I get:

Traceback (most recent call last):    File "/usr/bin/meld", line 71, in <module>      import meld.conf  ModuleNotFoundError: No module named 'meld'  

Why is this happening, and how can I get meld to properly run?

Notes:

Directory w/in file system has more space used than total available in Filesystem?

Posted: 20 Sep 2021 07:41 AM PDT

Linux newbie here, done some search but cannot seem to come across the answer.

I am needing to check the size of a directory in order to do some migration work and ensure the space available is sufficient. Yet I Checked one of my directories which is large in size with a

du -h --max-depth=1 NameOfDirectory/  

The above gave me the size output for all the folders within that directory and at the end I see it summarizes the total to 5.3T. Which I assume is Terabytes.

5.3T    NameOfDirectory/BigDir  8.0K    NameOfDirectory/firstDir  8.0K    NameOfDirectory/SecondDir  8.0K    NameOfDirectory/ThirdDir  547M    NameOfDirectory/FourthDir  5.3T    NameOfDirectory/  

This is interesting and make me curious as the whole filesystem this is on only has a 4.6T of which 3.8T is being utilized.

Am i misreading this or is there a better alternative which accurately shows the correct size of a directory?

Linux find and delete file by date at home path

Posted: 20 Sep 2021 08:47 AM PDT

I run some processes which generate a huge number of output files (log, error, warning etc) at my home directory. To find the output files generated on a specific day, let's say 17 Sept 2021, I tried the following command:

find . -type f -newermt 2021-09-17  

which is supposed to find all files which are modified on 17 Sept 2021 as referred here, and it does work. However, the command returns not only the output files, but also some hidden files at my home directory such as .history, .viminfo and .cache.

Now, if I try to delete all the files I found with

find . -type f -newermt 2021-09-17 | xargs rm -f  

will the hidden files be disastrously deleted as well? If the answer is yes, how should I change it so that the hidden files will be kept and only the output files will be removed?

Why PID 1 send SIGTERM

Posted: 20 Sep 2021 06:57 AM PDT

I had this problem for a few days. A process, in this case qbittorrent, will stop after a few minutes.

Looking at logs it seems that it just caught a SIGTERM. Alright so I used strace -p {PID} -e 'trace=!all' to debug and I've got:

--- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=1, si_uid=0} ---  --- SIGCONT {si_signo=SIGCONT, si_code=SI_USER, si_pid=1, si_uid=0} ---  +++ exited with 0 +++  

I cannot figure why PID 1 send a SIGTERM to this process. It used to work a few days ago, I didn't change anything on this system.

By the way sytem wide CPU and RAM usage remain low (let's say below 30%).

Any idea how to investigate further ?

Why does an IPv6 neighbour router status become STALE? How can I avoid it?

Posted: 20 Sep 2021 10:01 AM PDT

I have a VM on a host with bridged networking (hence, with its own MAC address). Both host and VM run CentOS. Their network is managed by simple /etc/sysconfig/network-scripts/ifcfg-enpXsY files. IPv4 works just fine.

I have assigned an IPv6 address to the VM (the host also has one) which is routed correctly in the data centre. Most connections use IPv4, however (no DNS AAAA entry for the machine yet, still testing IPv6).

When I boot up the VM it has full IPv6 connectivity. However, after a while IPv6 connectivity stops working (IPv6 magic?). I have narrowed to problem down to neighbour (ARP/NDISC cache) data:

Not working, cannot ping or connect by IPv6 in or out:

# ip -6 neighbour   fe80::1 dev enp1s2 lladdr 0c:86:72:2e:04:28 router STALE  

Fix/workaround to refresh the cache:

# ip -6 neighbour flush dev enp1s2  # ip -6 neighbour  (empty, as expected)  

Then ping6 the host from within the VM to fill the cache:

# ping6 2912:1375:23:9a6c::2  PING 2912:1375:23:9a6c::2(2912:1375:23:9a6c::2) 56 data bytes  64 bytes from 2912:1375:23:9a6c::2: icmp_seq=1 ttl=64 time=2.35 ms  64 bytes from 2912:1375:23:9a6c::2: icmp_seq=2 ttl=64 time=0.468 ms  ^C  # ip -6 neighbour  fe80::1 dev enp1s2 lladdr 0c:86:72:2e:04:28 router REACHABLE  2912:1375:23:9a6c::2 dev enp1s2 lladdr 08:21:4b:b7:f8:31 DELAY  

IPv6 neighbour/ARP table restored to validity and connectivity is working in and out!

So my questions are:

  1. Why does the cache become stale?
  2. What can I do to avoid it?

Of course I could run those commands in a cron job (how often?) but I suppose that cannot really be needed for IPv6 to work in general?

start command in linux

Posted: 20 Sep 2021 08:52 AM PDT

I have a custom script which runs on a cPanel server (CentOS 6) which is as below. It starts a service on the specified port which accepts incoming data. It uses start command and runs ok.

#!/bin/bash  PORT_NUMBER=xxxx  echo "Start Time: $(date)"  if sudo netstat -altpn|grep xxxx | grep -q 'CLOSE_WAIT'; then  echo "Found Close Wait"  sudo stop comm  sleep 60  sudo stop comm  sudo lsof -i tcp:${PORT_NUMBER} | awk 'NR!=1 {print $2}' | xargs kill  sudo kill -9 $(sudo lsof -t -i:xxxx)  sleep 60  sudo start comm  fi  if [[ $(sudo lsof -t -i:2010) ]]; then      echo "Service Running"  else      echo "Restarting Service"      sudo start comm  fi  

Which start command produces /sbin/start

I have copied this script to a newer server with CentOS 7. When i try to run it, it gives the following error.

Start Time: Mon Sep 20 12:09:36 UTC 2021  Restarting Service  sudo: start: command not found  End Time: Mon Sep 20 12:09:36 UTC 2021  

I tried searching for a package to install, which provides the start command. I was unable to find such package. Any ideas which package I need to install on CentOS 7 server.

Update The comm job was defined in the /etc/init/comm.conf and was being called as the parameter for the start command.

description "Daemon Service running on port xxxx to receive device files"  author "xxxxxxxxxx"    start on startup  stop on shutdown  respawn    script      [ $(exec /usr/bin/php -f /home/xxxxxxx/scripts/comm.php &>> /home/xxxxxxx/scripts/log.txt) = 'ERROR' ] && ( stop; exit 1; )  end script    

scp+ssh+scp in a single connection

Posted: 20 Sep 2021 10:03 AM PDT

I don't know the nomenclature, but basically our corporate environment is setup with jumphosts so creating an ssh tunnel is really slow. Therefore I'm hoping there is some way to perform these three steps in a single ssh command:

$ scp localfile.jar user@server:~/path/ # upload executable  $ ssh user@server java -jar path/localfile.jar some argument >path/output.bin # run it  $ scp user@server:~/path/output.bin . # download output  

This is the way. Is there a way? (The server doesn't have access to my local machine, but perhaps that is stating the obvious.) Thanks!

Creating swap when out of memory

Posted: 20 Sep 2021 09:47 AM PDT

Out of memory is a common issue and the official OOM is not efficient. Several other programs have been introduced to do the killing job faster.

I wonder why there is no approach to creating swap instead of killing. Consider a system with no swap, an OOM program can trigger sudo swapon /swapfile (assuming swapfile exists) instead of killing processes.

Are there technical limitations for implementing this idea?

Rename directories based on matching and appending column data

Posted: 20 Sep 2021 09:13 AM PDT

I want to rename directories based on matching information from columns of the CSV file.

For example, the columns in the csv file with repeated some rows looks like this:

1111,ABC1  1111,ABC1  2222,DFG2  3333,FEG1  3333,FEG1  4444,TTG2    

The existing directories are with following names:

1111 2222 3333 4444   

I want to rename these directories by matching with column 1 and appending the corresponding column 2 information along with it.

I read the columns as follows:

col1_id=$(awk -F "\"*,\"*" '{print $1}' "$somefile" | sed 1d | awk '!a[$0]++')  col2_id=$(awk -F "\"*,\"*" '{print $2}' "$somefile" | sed 1d | awk '!a[$0]++')  

I tried to map the columns and append as follows:

cnt=${#col1_id[@]}  for ((i=0;i<cnt;i++));   do      mv "{$col1_id[i]}" "${col1_id[i]}_${col2_id[i]}"  done  

However, I am not getting the desired output. My output directories should be with names.

1111_ABC1 2222_DFG2 3333_FEG1 4444_TTG2  

How to run a script every 64 hours?

Posted: 20 Sep 2021 07:01 AM PDT

I couldn't find the answer with Cron. Is it possible with it, or should I use a loop in the script?

Return value vs return status of a coprocess

Posted: 20 Sep 2021 07:36 AM PDT

I don't understand this sentence about Coprocesses in the bash man page:

Since the coprocess is created as an asynchronous command, the coproc command always returns success. The return status of a coprocess is the exit status of 'command'.

What is the difference between a "success" return value and a "success/error" (0/non-0) exit status? How differently are they handled by the bash? And how can one catch them to see the difference?

Cannot use trackpad and keyboard at the same time

Posted: 20 Sep 2021 08:01 AM PDT

My trackpad works fine, but the moment I press a button on my keyboard, the mouse freeze and I can not use my trackpad anymore. When I release the key the trackpad works again. This is an issue for some software where I would like to continue using my keyboard while moving the mouse

I am on Ubuntu 20.04 on a DELL laptop

Output of xinput list-props for the touchpad id

Device 'DELL07E6:00 06CB:76AF Touchpad':      Device Enabled (172):   1      Coordinate Transformation Matrix (174): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000      libinput Tapping Enabled (327): 1      libinput Tapping Enabled Default (328): 0      libinput Tapping Drag Enabled (329):    1      libinput Tapping Drag Enabled Default (330):    1      libinput Tapping Drag Lock Enabled (331):   0      libinput Tapping Drag Lock Enabled Default (332):   0      libinput Tapping Button Mapping Enabled (333):  1, 0      libinput Tapping Button Mapping Default (334):  1, 0      libinput Natural Scrolling Enabled (311):   1      libinput Natural Scrolling Enabled Default (312):   0      libinput Disable While Typing Enabled (335):    1      libinput Disable While Typing Enabled Default (336):    1      libinput Scroll Methods Available (313):    1, 1, 0      libinput Scroll Method Enabled (314):   1, 0, 0      libinput Scroll Method Enabled Default (315):   1, 0, 0      libinput Click Methods Available (337): 1, 1      libinput Click Method Enabled (338):    1, 0      libinput Click Method Enabled Default (339):    1, 0      libinput Middle Emulation Enabled (340):    0      libinput Middle Emulation Enabled Default (341):    0      libinput Accel Speed (318): 0.000000      libinput Accel Speed Default (319): 0.000000      libinput Left Handed Enabled (323): 0      libinput Left Handed Enabled Default (324): 0      libinput Send Events Modes Available (292): 1, 1      libinput Send Events Mode Enabled (293):    0, 0      libinput Send Events Mode Enabled Default (294):    0, 0      Device Node (295):  "/dev/input/event10"      Device Product ID (296):    1739, 30383      libinput Drag Lock Buttons (325):   <no items>      libinput Horizontal Scroll Enabled (326):   1  

Ping from Linux distros = 20s, ping from Windows/Android = instant. Why?

Posted: 20 Sep 2021 09:23 AM PDT

I'm hoping this will be an interesting problem for Linux networking aficionados. In summary, I have a new broadband modem/router connected to an ISP offering a 40Mbit/s bandwidth. However, the initial connect to any website using a browser on a Linux distro takes a good 20s whereas on an Android phone or Windows the website opens as quickly as you might expect. A ping command (with domain name) too takes 20s to show ANY output at all (even the ip address). Let's focus on ping:

  • When pinging by ip address there is no issue. A 20s delay only when pinging by domain name

  • the ping delay of 20s shows up even when I try it from a live linux USB - whether it is Manjaro or Linux Mint

  • the delay is seen even if I try on another computer with live-booted Linux

  • ping from the same laptop(s) running Windows returns results practically instantly - even with domains I have never visited before.

  • ping from a terminal on a Pixel 2XL phone running Android returns results instantly

  • the problem exists whether I connect my laptop via wifi or via ethernet cable to the router

  • the same Linux distro on the same laptop, when connected to my mobile hotspot does not have the issue

  • Ping -4 to force IPv4 does not help - the delay is still 20s

  • As suggested by a senior member of the Manjaro forum I tried moving from openresolv to systemd-resolved but that increased the delay to over 2 minutes and I had to roll back the change.

  • Having described ping, let me describe how Firefox works on Linux. The first access to any website takes 20 seconds, but thereafter even if I access a website I have never accessed earlier it opens up as expected - in less than a couple of seconds, However if I close Firefox and open a fresh instance I again have to wait for 20 seconds for the first website I access - even if it is Google.

This is as you realize not a "fun" question but a rather perplexing one and almost a showstopper for me. The problem is specifically with the combination of Linux and this new router and I have no idea where to look for a solution.I have of course had a long discussion on the Manjaro forum where I hit a dead end.

Thanks very much for reading! Best - Ram

Network Info

Router internal LANIPv4 address: 192.168.9.1

Primary DNS: 125.22.47.125, Secondary DNS 203.145.160.4

(Also tried 8.8.8.8 as primary DNS)

My laptop: 192.168.9.6

*Examples and Test outputs:

The response starting with "PING" appears 20-30s after I type the following command:

[ramkumarr@RR-W520 ~]$ ping www.google.com  PING www.google.com (142.250.192.132) 56(84) bytes of data.  64 bytes from bom12s18-in-f4.1e100.net (142.250.192.132): icmp_seq=1 ttl=118 time=25.1 ms.   
[ramkumarr@RR-W520 ~]$ ping -n www.google.com  PING www.google.com (142.250.192.100) 56(84) bytes of data.  64 bytes from 142.250.192.100: icmp_seq=1 ttl=59 time=29.4 m  ---> Again a 20s delay before any output appears.  

On Windows the response is almost instantaneous (less than half a second)

Pinging www.google.com [142.250.182.36] with 32 bytes of data:  Reply from 142.250.182.36: bytes=32 time=11ms TTL=118  

And instantaneous on Linux with ip address below but not with domain name such as www.google.com:

[ramkumarr@RR-W520 ~]$ ping -W 0.001 8.8.8.8  PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.  

Contents of /etc/nsswitch.conf

# Name Service Switch configuration file.  # See nsswitch.conf(5) for details.    passwd: files mymachines systemd  group: files [SUCCESS=merge] mymachines systemd  shadow: files    publickey: files    hosts: files mymachines mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns mdns4 myhostname  networks: files    protocols: files  services: files  ethers: files  rpc: files    netgroup: files  

Output of nslookup www.google.com - ends with a timeout on both Linux as well as Windows. On Linux the output is instantaneous upto the line "Address: 142.250.192.132", then a delay, then the timeout message.

[ramkumarr@RR-W520 ~]$ nslookup www.google.com  Server:         192.168.9.1  Address:        192.168.9.1#53    Non-authoritative answer:  Name:   www.google.com  Address: 142.250.192.132  ;; connection timed out; no servers could be reached    [ramkumarr@RR-W520 ~]$   

...and on Windows

C:\Users\ramku>nslookup www.google.com  Server:  TJ2100N.Home  Address:  192.168.9.1    DNS request timed out.      timeout was 2 seconds.  Non-authoritative answer:  DNS request timed out.      timeout was 2 seconds.  Name:    www.google.com  Address:  142.250.195.100  

Contents of /etc/resolv.conf

# Generated by NetworkManager  search Home  nameserver 192.168.9.1  

On Windows

C:\Users\ramku>ipconfig /all | find /i "dns servers"     DNS Servers . . . . . . . . . . . : 192.168.9.1    C:\Users\ramku>  

On Linux:

[ramkumarr@RR-W520 ~]$ sudo iptables -nvL  [sudo] password for ramkumarr:   Chain INPUT (policy ACCEPT 0 packets, 0 bytes)   pkts bytes target     prot opt in     out     source               destination             Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)   pkts bytes target     prot opt in     out     source               destination             Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)   pkts bytes target     prot opt in     out     source               destination           [ramkumarr@RR-W520 ~]$   
[ramkumarr@RR-W520 ~]$ ip route get 192.168.9.1  192.168.9.1 dev wlp3s0 src 192.168.9.10 uid 1000       cache   [ramkumarr@RR-W520 ~]$  --> 192.168.9.10 is my laptop ip address  

Workaround/solution? As suggested in one of the answers below, setting the DNS on the client side in the wifi preferences tab forced the laptop to access the Google DNS, but without that the laptop reported 192.168.9.1 as the DNS as shown below:

With DNS set in wifi prefs with "Automatic (Addresses only)"

[ramkumarr@RR-W520 ~]$ ( nmcli dev list || nmcli dev show ) 2>/dev/null | grep DNS  IP4.DNS[1]:                             8.8.8.8  IP4.DNS[2]:                             8.8.4.4  

With client at "Automatic" and no DNS specified

[ramkumarr@RR-W520 ~]$ ( nmcli dev list || nmcli dev show ) 2>/dev/null | grep DNS  IP4.DNS[1]:                             192.168.9.1  

Why is "ssh -t" not working as far as logging in and running a command?

Posted: 20 Sep 2021 06:59 AM PDT

I'm on Mac OS Big Sur and running a virtual Ubuntu 16.04 Linux instance (using vagrant). I can run the following two commands fine (one to ssh into the virtual server, and the second to run a command within it )…

$ ssh myvirtual.local  Warning: Permanently added '10.0.4.19' (ECDSA) to the list of known hosts.  Last login: Wed Sep 15 16:37:57 2021 from 10.0.4.1  $ foreman start -f Procfile.debug  16:38:26 rails.1      | started with pid 27884  16:38:26 worker.1     | started with pid 27885  16:38:26 scheduler.1  | started with pid 27887  ...  

I would like to be able to combine these two commands, so I tried

$ ssh -t myvirtual.local 'foreman start -f Procfile.debug'  Warning: Permanently added '10.0.4.19' (ECDSA) to the list of known hosts.  bash: foreman: command not found  Connection to 10.0.4.19 closed.  

I'm confused about what other setup I would need to run to have a single command to simulate what I'm doing initially. Any thoughts?

can‘t ping the ip addr after send a wget request

Posted: 20 Sep 2021 10:38 AM PDT

I am facing a problem while try to visit a remote website address.

Please help me out.

first.everything is ok.

second.send a wget request.and recive "Connection reset by peer"

then.ping not working.

and i found the command "ip route get xxx" output has changed after send wget.

and "ip route flush cache" can fixed ping.but wget still not working.

CoreELEC:~ # ip route get 104.26.12.50  104.26.12.50 via 192.168.1.1 dev eth0  src 192.168.1.179     CoreELEC:~ # ping 104.26.12.50  PING 104.26.12.50 (104.26.12.50): 56 data bytes  64 bytes from 104.26.12.50: seq=0 ttl=53 time=179.858 ms  64 bytes from 104.26.12.50: seq=1 ttl=53 time=180.024 ms  64 bytes from 104.26.12.50: seq=2 ttl=53 time=179.980 ms  ^Z[1]+  Stopped                    ping 104.26.12.50    CoreELEC:~ # wget https://104.26.12.50/  Connecting to 104.26.12.50 (104.26.12.50:443)  wget: error getting response: Connection reset by peer    CoreELEC:~ # ip route get 104.26.12.50  104.26.12.50 via 104.26.12.50 dev eth0  src 192.168.1.179     CoreELEC:~ # ping 104.26.12.50  PING 104.26.12.50 (104.26.12.50): 56 data bytes  ^Z[2]+  Stopped                    ping 104.26.12.50    CoreELEC:~ # ip route flush cache    CoreELEC:~ # ip route get 104.26.12.50  104.26.12.50 via 192.168.1.1 dev eth0  src 192.168.1.179     CoreELEC:~ # ping 104.26.12.50  PING 104.26.12.50 (104.26.12.50): 56 data bytes  64 bytes from 104.26.12.50: seq=0 ttl=53 time=179.730 ms  64 bytes from 104.26.12.50: seq=1 ttl=53 time=179.616 ms  ^Z[3]+  Stopped                    ping 104.26.12.50  

traceroute result

CoreELEC:~ # ip route flush cache    CoreELEC:~ # traceroute 104.26.12.50  traceroute to 104.26.12.50 (104.26.12.50), 30 hops max, 38 byte packets   1  192.168.1.1 (192.168.1.1)  0.770 ms  0.752 ms  0.650 ms   2  10.11.128.1 (10.11.128.1)  3.400 ms  3.728 ms  3.249 ms   3  211.136.62.237 (211.136.62.237)  5.067 ms  4.482 ms  4.310 ms   4  111.24.14.45 (111.24.14.45)  4.594 ms  4.720 ms  4.791 ms   5  111.24.2.110 (111.24.2.110)  16.499 ms^Z[1]+  Stopped                    traceroute 104.26.12.50    CoreELEC:~ # wget https://104.26.12.50/  Connecting to 104.26.12.50 (104.26.12.50:443)  wget: error getting response: Connection reset by peer    CoreELEC:~ # traceroute 104.26.12.50  traceroute to 104.26.12.50 (104.26.12.50), 30 hops max, 38 byte packets   1  192.168.1.179 (192.168.1.179)  1675.641 ms !H  2751.899 ms !H  3000.313 ms !H  CoreELEC:~ # traceroute 104.26.12.50  traceroute to 104.26.12.50 (104.26.12.50), 30 hops max, 38 byte packets   1  192.168.1.179 (192.168.1.179)  724.558 ms !H  2989.973 ms !H  3000.084 ms !H    CoreELEC:~ # ip route flush cache    CoreELEC:~ # traceroute 104.26.12.50  traceroute to 104.26.12.50 (104.26.12.50), 30 hops max, 38 byte packets   1  192.168.1.1 (192.168.1.1)  0.831 ms  0.907 ms  0.807 ms   2  10.11.128.1 (10.11.128.1)  10.854 ms  7.432 ms  2.965 ms   3  211.136.62.237 (211.136.62.237)  24.308 ms  7.107 ms  19.634 ms   4  111.24.14.45 (111.24.14.45)  4.821 ms  4.816 ms  4.593 ms   5^Z[2]+  Stopped                    traceroute 104.26.12.50  

another mac at same local network:

bash-3.2$ traceroute 104.26.12.50  traceroute to 104.26.12.50 (104.26.12.50), 64 hops max, 52 byte packets   1  192.168.1.1 (192.168.1.1)  3.779 ms  0.954 ms  0.986 ms   2  10.11.128.1 (10.11.128.1)  3.959 ms  3.594 ms  3.680 ms   3  211.136.62.237 (211.136.62.237)  5.088 ms  5.719 ms  4.760 ms   4  111.24.14.45 (111.24.14.45)  5.277 ms  4.875 ms  5.072 ms   5  111.24.2.106 (111.24.2.106)  7.508 ms      111.24.2.110 (111.24.2.110)  5.291 ms      111.24.17.157 (111.24.17.157)  5.907 ms   6  221.176.21.150 (221.176.21.150)  38.841 ms  7.606 ms  9.093 ms  ^C    bash-3.2$ wget https://104.26.12.50/  Connecting to 104.26.12.50:443... connected.  OpenSSL: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure  Unable to establish SSL connection.    bash-3.2$ traceroute 104.26.12.50  traceroute to 104.26.12.50 (104.26.12.50), 64 hops max, 52 byte packets   1  192.168.1.1 (192.168.1.1)  3.674 ms  1.162 ms  1.141 ms   2  10.11.128.1 (10.11.128.1)  4.327 ms  4.152 ms  4.043 ms   3  211.136.62.237 (211.136.62.237)  5.764 ms  18.867 ms  19.749 ms   4  111.24.14.45 (111.24.14.45)  7.277 ms  5.256 ms  5.969 ms  ^C      

i am use coreelec9.0.0(Linux3.14.29),the 'ip' command in BusyBox is unsupport full options.

CoreELEC:~ # cat /proc/version   Linux version 3.14.29 (adamg@zulu) (gcc version 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701] (Linaro GCC 7.3-2018.05) ) #1 SMP Sat Feb 16 12:49:23 GMT 2019    CoreELEC:~ # uname -a  Linux CoreELEC 3.14.29 #1 SMP Sat Feb 16 12:49:23 GMT 2019 aarch64 GNU/Linux    CoreELEC:~ # lsb_release -a  CoreELEC (official): 9.0.0      CoreELEC:~ # ip link  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 4096 qdisc noqueue       link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00  2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP8000> mtu 1500 qdisc fq_codel qlen 1000      link/ether fc:7c:02:e9:85:c5 brd ff:ff:ff:ff:ff:ff  3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000      link/ether fc:7c:02:e9:85:c4 brd ff:ff:ff:ff:ff:ff    CoreELEC:~ # ip address  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 4096 qdisc noqueue       link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00      inet 127.0.0.1/8 scope host lo         valid_lft forever preferred_lft forever  2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP8000> mtu 1500 qdisc fq_codel qlen 1000      link/ether fc:7c:02:e9:85:c5 brd ff:ff:ff:ff:ff:ff      inet 192.168.1.179/24 brd 192.168.1.255 scope global eth0         valid_lft forever preferred_lft forever      inet6 fe80::fe7c:2ff:fee9:85c5/64 scope link          valid_lft forever preferred_lft forever  3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000      link/ether fc:7c:02:e9:85:c4 brd ff:ff:ff:ff:ff:ff    CoreELEC:~ # ip route  default via 192.168.1.1 dev eth0   192.168.1.0/24 dev eth0 scope link  src 192.168.1.179   192.168.1.1 dev eth0 scope link     CoreELEC:~ # ip rule  0:  from all lookup local   32766:  from all lookup main   32767:  from all lookup default   

tracepath output

CoreELEC:~/.opt/bin # tracepath -4 104.26.12.50   1?: [LOCALHOST]                      pmtu 1500   1:  192.168.1.1                                           1.169ms    1:  192.168.1.1                                           1.090ms    2:  192.168.1.1                                           1.064ms pmtu 1492   2:  10.11.128.1                                           4.250ms    3:  211.136.62.237                                       31.305ms    4:  111.24.14.45                                          6.265ms    5:  111.24.17.157                                         6.674ms asymm  6    6:  221.176.21.150                                        7.991ms asymm  8    7:  221.183.25.202                                        7.046ms asymm  9    8:  221.183.55.113                                        9.257ms    9:  223.120.22.18                                         8.574ms asymm  8   10:  223.120.6.54                                        180.044ms asymm 11   11:  223.120.6.54                                        181.604ms   ^Z[1]+  Stopped                    tracepath -4 104.26.12.50    CoreELEC:~/.opt/bin # wget https://104.26.12.50/  Connecting to 104.26.12.50 (104.26.12.50:443)  wget: error getting response: Connection reset by peer    CoreELEC:~/.opt/bin # tracepath -4 104.26.12.50   1?: [LOCALHOST]                      pmtu 1492   1:  192.168.1.179                                       375.207ms !H   1:  192.168.1.179                                       2750.098ms !H       Resume: pmtu 1492     CoreELEC:~/.opt/bin # ip route flush cache    CoreELEC:~/.opt/bin # tracepath -4 104.26.12.50   1?: [LOCALHOST]                      pmtu 1500   1:  192.168.1.1                                           0.994ms    1:  192.168.1.1                                           0.776ms    2:  192.168.1.1                                           0.809ms pmtu 1492   2:  10.11.128.1                                           5.180ms    3:  211.136.62.237                                       13.072ms    4:  111.24.14.45                                          4.863ms   ^Z[2]+  Stopped                    tracepath -4 104.26.12.50  CoreELEC:~/.opt/bin #  

How to only display the text after the third, first, and fifth comma in this order in Unix?

Posted: 20 Sep 2021 07:29 AM PDT

I want to display the text after the 3rd, 1st, and 5th comma from a given input text, in that order.

Doing cut -d ',' -f 3,1,5 does the job but doesn't keep the order I want. Instead, it displays the text in ascending order: 1, 3, 5.

Boost continually fails to download while using cmake for ethminer

Posted: 20 Sep 2021 08:44 AM PDT

I've been stuck with this since this morning. Basically I ran into an issue with this cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF command while following this https://medium.com/coinmonks/eth-x-nvidia-x-ubuntu-1980393a36f8 tutorial.

Things I know for sure:

The problem isn't in the paramaters, I tried without them, I get the same error.

I have internet connection.

Things I tried:

I found a similar problem which had the solution to manually download boost, put it in the destination folder and enable an option to take a local file if there is one (I forgot what it is and I can't find that question thread right now, sorry). This of course did not work for me.

I've also seen on their sites that they have changed their download urls, but I have no idea what to do with that information.

Here is the relevant message:

-- SHA1 hash of      /root/.hunter/_Base/Download/Boost/1.66.0/075d0b4/boost_1_66_0.7z    does not match expected value      expected: '075d0b43980614054b1f1bafd189f863bba6600e'        actual: 'da39a3ee5e6b4b0d3255bfef95601890afd80709'  -- File already exists but hash mismatch. Removing...  -- Downloading...     dst='/root/.hunter/_Base/Download/Boost/1.66.0/075d0b4/boost_1_66_0.7z'     timeout='none'  -- Using src='https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.7z'  -- Retrying...  -- Using src='https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.7z'  -- Retry after 5 seconds (attempt #2) ...  -- Using src='https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.7z'  -- Retry after 5 seconds (attempt #3) ...  -- Using src='https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.7z'  -- Retry after 15 seconds (attempt #4) ...  -- Using src='https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.7z'  -- Retry after 60 seconds (attempt #5) ...  -- Using src='https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.7z'  CMake Error at Build/Boost-prefix/src/Boost-stamp/download-Boost.cmake:159 (message):    Each download failed!        error: downloading 'https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.7z' failed           status_code: 22           status_string: "HTTP response code said error"  

When I try to run cmake without hunter with -DHUNTER_ENABLED=OFF I get the following error message:

CMake Error at CMakeLists.txt:68 (find_package):    Could not find a package configuration file provided by "jsoncpp" with any    of the following names:        jsoncppConfig.cmake      jsoncpp-config.cmake      Add the installation prefix of "jsoncpp" to CMAKE_PREFIX_PATH or set    "jsoncpp_DIR" to a directory containing one of the above files.  If    "jsoncpp" provides a separate development package or SDK, be sure it has    been installed.  

UPDATE: I've been able to manually install the necessary packages and I was able to run cmake .. successfully.

However, I have encountered another error when I run cmake --build .

Error:

In file included from /home/luka/ethrepoclone/ethminer/libethash-cuda/CUDAMiner.cpp:18:  /home/luka/ethrepoclone/ethminer/libethash-cuda/../libethcore/Farm.h:30:10: fatal error: json/json.h: No such file or directory     30 | #include <json/json.h>        |          ^~~~~~~~~~~~~  compilation terminated.  

UPDATE#2: After fixing the above error with ln -s /usr/include/jsoncpp/json/ /usr/include/json I now get a different (compile-time I think) error from some sort of FixedHash.h file.

[ 56%] Building CXX object libethcore/CMakeFiles/ethcore.dir/EthashAux.cpp.o  /home/luka/ethmining/ethminer/libethcore/EthashAux.cpp: In static member function 'static dev::eth::Result dev::eth::EthashAux::eval(int, const h256&, uint64_t)':  /home/luka/ethmining/ethminer/libethcore/EthashAux.cpp:28:29: error: 'get_global_epoch_context' is not a member of 'ethash'     28 |     auto& context = ethash::get_global_epoch_context(epoch);        |                             ^~~~~~~~~~~~~~~~~~~~~~~~  /home/luka/ethmining/ethminer/libethcore/EthashAux.cpp:30:88: error: no matching function for call to 'dev::FixedHash<32>::FixedHash(<brace-enclosed initializer list>)'     30 |     h256 mix{reinterpret_cast<byte*>(result.mix_hash.bytes), h256::ConstructFromPointer};        |                                                                                        ^  In file included from /home/luka/ethmining/ethminer/libethcore/../libdevcore/Exceptions.h:31,                   from /home/luka/ethmining/ethminer/libethcore/EthashAux.h:21,                   from /home/luka/ethmining/ethminer/libethcore/EthashAux.cpp:18:  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:136:14: note: candidate: 'dev::FixedHash<N>::FixedHash(const string&) [with unsigned int N = 32; std::string = std::__cxx11::basic_string<char>]'    136 |     explicit FixedHash(std::string const& _s)        |              ^~~~~~~~~  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:136:14: note:   candidate expects 1 argument, 2 provided  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:130:14: note: candidate: 'dev::FixedHash<N>::FixedHash(const byte*, dev::FixedHash<N>::ConstructFromPointerType) [with unsigned int N = 32; byte = unsigned char]'    130 |     explicit FixedHash(byte const* _bs, ConstructFromPointerType /*unused*/)        |              ^~~~~~~~~  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:130:14: note:   conversion of argument 1 would be ill-formed:  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:112:14: note: candidate: 'dev::FixedHash<N>::FixedHash(dev::bytesConstRef, dev::FixedHash<N>::ConstructFromHashType) [with unsigned int N = 32; dev::bytesConstRef = dev::vector_ref<const unsigned char>]'    112 |     explicit FixedHash(bytesConstRef _b, ConstructFromHashType _t = FailIfDifferent)        |              ^~~~~~~~~  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:112:14: note:   conversion of argument 1 would be ill-formed:  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:94:14: note: candidate: 'dev::FixedHash<N>::FixedHash(const bytes&, dev::FixedHash<N>::ConstructFromHashType) [with unsigned int N = 32; dev::bytes = std::vector<unsigned char>]'     94 |     explicit FixedHash(bytes const& _b, ConstructFromHashType _t = FailIfDifferent)        |              ^~~~~~~~~  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:94:14: note:   conversion of argument 1 would be ill-formed:  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:91:14: note: candidate: 'dev::FixedHash<N>::FixedHash(unsigned int) [with unsigned int N = 32]'     91 |     explicit FixedHash(unsigned _u) { toBigEndian(_u, m_data); }        |              ^~~~~~~~~  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:91:14: note:   candidate expects 1 argument, 2 provided  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:88:5: note: candidate: 'dev::FixedHash<N>::FixedHash(const Arith&) [with unsigned int N = 32; dev::FixedHash<N>::Arith = boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >]'     88 |     FixedHash(Arith const& _arith) { toBigEndian(_arith, m_data); }        |     ^~~~~~~~~  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:88:5: note:   candidate expects 1 argument, 2 provided  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:79:14: note: candidate: 'template<unsigned int M> dev::FixedHash<N>::FixedHash(const dev::FixedHash<M>&, dev::FixedHash<N>::ConstructFromHashType)'     79 |     explicit FixedHash(FixedHash<M> const& _h, ConstructFromHashType _t = AlignLeft)        |              ^~~~~~~~~  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:79:14: note:   template argument deduction/substitution failed:  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:75:5: note: candidate: 'dev::FixedHash<N>::FixedHash() [with unsigned int N = 32]'     75 |     FixedHash() { m_data.fill(0); }        |     ^~~~~~~~~  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:75:5: note:   candidate expects 0 arguments, 2 provided  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:41:7: note: candidate: 'constexpr dev::FixedHash<32>::FixedHash(const dev::FixedHash<32>&)'     41 | class FixedHash        |       ^~~~~~~~~  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:41:7: note:   candidate expects 1 argument, 2 provided  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:41:7: note: candidate: 'constexpr dev::FixedHash<32>::FixedHash(dev::FixedHash<32>&&)'  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:41:7: note:   candidate expects 1 argument, 2 provided  /home/luka/ethmining/ethminer/libethcore/EthashAux.cpp:31:92: error: no matching function for call to 'dev::FixedHash<32>::FixedHash(<brace-enclosed initializer list>)'     31 |     h256 final{reinterpret_cast<byte*>(result.final_hash.bytes), h256::ConstructFromPointer};        |                                                                                            ^  In file included from /home/luka/ethmining/ethminer/libethcore/../libdevcore/Exceptions.h:31,                   from /home/luka/ethmining/ethminer/libethcore/EthashAux.h:21,                   from /home/luka/ethmining/ethminer/libethcore/EthashAux.cpp:18:  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:136:14: note: candidate: 'dev::FixedHash<N>::FixedHash(const string&) [with unsigned int N = 32; std::string = std::__cxx11::basic_string<char>]'    136 |     explicit FixedHash(std::string const& _s)        |              ^~~~~~~~~  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:136:14: note:   candidate expects 1 argument, 2 provided  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:130:14: note: candidate: 'dev::FixedHash<N>::FixedHash(const byte*, dev::FixedHash<N>::ConstructFromPointerType) [with unsigned int N = 32; byte = unsigned char]'    130 |     explicit FixedHash(byte const* _bs, ConstructFromPointerType /*unused*/)        |              ^~~~~~~~~  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:130:14: note:   conversion of argument 1 would be ill-formed:  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:112:14: note: candidate: 'dev::FixedHash<N>::FixedHash(dev::bytesConstRef, dev::FixedHash<N>::ConstructFromHashType) [with unsigned int N = 32; dev::bytesConstRef = dev::vector_ref<const unsigned char>]'    112 |     explicit FixedHash(bytesConstRef _b, ConstructFromHashType _t = FailIfDifferent)        |              ^~~~~~~~~  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:112:14: note:   conversion of argument 1 would be ill-formed:  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:94:14: note: candidate: 'dev::FixedHash<N>::FixedHash(const bytes&, dev::FixedHash<N>::ConstructFromHashType) [with unsigned int N = 32; dev::bytes = std::vector<unsigned char>]'     94 |     explicit FixedHash(bytes const& _b, ConstructFromHashType _t = FailIfDifferent)        |              ^~~~~~~~~  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:94:14: note:   conversion of argument 1 would be ill-formed:  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:91:14: note: candidate: 'dev::FixedHash<N>::FixedHash(unsigned int) [with unsigned int N = 32]'     91 |     explicit FixedHash(unsigned _u) { toBigEndian(_u, m_data); }        |              ^~~~~~~~~  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:91:14: note:   candidate expects 1 argument, 2 provided  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:88:5: note: candidate: 'dev::FixedHash<N>::FixedHash(const Arith&) [with unsigned int N = 32; dev::FixedHash<N>::Arith = boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >]'     88 |     FixedHash(Arith const& _arith) { toBigEndian(_arith, m_data); }        |     ^~~~~~~~~  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:88:5: note:   candidate expects 1 argument, 2 provided  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:79:14: note: candidate: 'template<unsigned int M> dev::FixedHash<N>::FixedHash(const dev::FixedHash<M>&, dev::FixedHash<N>::ConstructFromHashType)'     79 |     explicit FixedHash(FixedHash<M> const& _h, ConstructFromHashType _t = AlignLeft)        |              ^~~~~~~~~  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:79:14: note:   template argument deduction/substitution failed:  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:75:5: note: candidate: 'dev::FixedHash<N>::FixedHash() [with unsigned int N = 32]'     75 |     FixedHash() { m_data.fill(0); }        |     ^~~~~~~~~  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:75:5: note:   candidate expects 0 arguments, 2 provided  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:41:7: note: candidate: 'constexpr dev::FixedHash<32>::FixedHash(const dev::FixedHash<32>&)'     41 | class FixedHash        |       ^~~~~~~~~  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:41:7: note:   candidate expects 1 argument, 2 provided  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:41:7: note: candidate: 'constexpr dev::FixedHash<32>::FixedHash(dev::FixedHash<32>&&)'  /home/luka/ethmining/ethminer/libethcore/../libdevcore/FixedHash.h:41:7: note:   candidate expects 1 argument, 2 provided  make[2]: *** [libethcore/CMakeFiles/ethcore.dir/build.make:63: libethcore/CMakeFiles/ethcore.dir/EthashAux.cpp.o] Error 1  make[1]: *** [CMakeFiles/Makefile2:304: libethcore/CMakeFiles/ethcore.dir/all] Error 2  make: *** [Makefile:152: all] Error 2  

bash: fdisk: command not found

Posted: 20 Sep 2021 08:48 AM PDT

I have installed Debian 10 remotely on a server from a live netinstal iso USB over KVM, but then I encounter this strange problem:

# fdisk -l  bash: fdisk: command not found  

However if I use /sbin/fdisk -l , the command executes with no issues.

I'm wondering what has caused this and how can I fix it?

Terminal sort command options: sort -k1,1

Posted: 20 Sep 2021 07:24 AM PDT

cat input.txt | sort -k1,1  

I am trying to figure out what the ,1 part at the end does in this command. input.txt is a 2 column file. First column is some word and second column is the number 1. -k1 tells it to sort by the first column, so alphabetically in this case. What does the second part, ,1 do?

$GDM_USER has no access to $XDG_DATA after manually changing location of $XDG_DATA

Posted: 20 Sep 2021 06:52 AM PDT

I have a small office with 5 desktops and a server, all of them running on Debian. I have just upgraded the clients to Stretch and see only 1 error in the journal that bothers me:

gnome-settings-[939]: failed to create profile from EDID data: failed to save ICC file: Error opening file '/var/data/users/Debian-gdm/icc/edid-93ed9b01fe8febb07668e99b557191e9.icc': Access denied
gnome-settings-[939]: failed to create profile from EDID data: failed to save ICC file: Error opening file '/var/data/users/Debian-gdm/icc/edid-93ed9b01fe8febb07668e99b557191e9.icc': Access denied
gnome-settings-[939]: failed to set screen _ICC_PROFILE: Opening file '/var/data/users/vincent/icc/edid-93ed9b01fe8febb07668e99b557191e9.icc' failed: Access denied

As our users $HOME folders are mounted through NFS, I have made sure that all $XDG_DATA and $XDG_CACHE (at least for regular users) are stored locally on the client. Back in 2014 I had found a manual to do it like this:

In /etc/profile.d/xdg_dirs.sh:

if [ "$USER" == "root" ]; then    unset XDG_CACHE_HOME    unset XDG_DATA_HOME  else    test -d $XDG_CACHE_HOME || mkdir -p $XDG_CACHE_HOME    test -d $XDG_DATA_HOME || mkdir -p $XDG_DATA_HOME  fi  

In /etc/security/pam_env.conf:

XDG_CACHE_HOME DEFAULT="/var/cache/users/@{PAM_USER}"  XDG_DATA_HOME  DEFAULT="/var/data/users/@{PAM_USER}"  

I'm pretty sure this has messed up the correct permissions for the Debian-gdm user, but I don't know how to solve it. I tried creating the dir and giving r+w permissions to both Debian-gdm and the default user-groups, but this didn't work. I also tried exclusing the Debian-gdm user from the above script by adding:

if [ "$USER" == "root" ] || [ "$USER" == "Debian-gdm" ]; then  

, but that didn't work as well.

Any thoughts?

CentOS 6 glibc Update issue

Posted: 20 Sep 2021 10:03 AM PDT

my centOS version is centos-release-6-6.el6.centos.12.2.x86_64

I have executed the following commands to extract and install glibc-2.15

tar zxvf glibc-2.14.tar.gz  cd glibc-2.14  mkdir build  cd build   ../configure --prefix=/opt/glibc-2.14   make -j4  make install  

But when I check glib version with command yum list glibc, it shows:

Installed Packages glibc.i686 2.12-1.192.el6 @base glibc.x86_64 2.12-1.192.el6 @base

How to detect if HDMI Monitor is switched off in Ubuntu?

Posted: 20 Sep 2021 08:08 AM PDT

Is there any command in Ubuntu to detect an HDMI monitor? I have tried ddclient but it's not working.

The command I tried:

ddclient -p m/> Power control/  

Why is it rm -rf and not rmdir -rf

Posted: 20 Sep 2021 09:48 AM PDT

I've always been curious why the command for deleting everything in a directory is rm -rf.

Why aren't there flags to do the same thing with rmdir?

Wouldn't it be more intuitive to use rmdir for directory operations?

Is there logitech gaming mouse programming software for any Linux Distro?

Posted: 20 Sep 2021 10:25 AM PDT

I happened upon an unopened Logitech G502 programmable gaming mouse. I would like to program buttons to do things like write commonly used lines in programs (which I know is possible in Windows; my college roommate did it earlier this year). The problem is, the device is meant to be programmed by software designed explicitly for Windows. The website download page only offers versions for different versions of Windows.

A quick Google search yields nothing useful. Does anyone know if there is Linux/Unix software available for programming the mouse? I am using Fedora 20, but knowledge of any software for this mouse which will run on a Linux OS would be useful. The mouse's defaults work when simply plugged in (scroll, clicking/moving pointer, and page fwd/bkwd).

How to SSH from host to guest using QEMU?

Posted: 20 Sep 2021 09:01 AM PDT

How do I setup ssh from the host to the guest using qemu? I am able to use port redirection when I boot the VM without any special parameters, as follows:

/usr/bin/qemu-system-x86_64 -hda ubuntu1204 -m 512 -redir tcp:7777::8001  

But when I try to boot using the following:

/usr/bin/qemu-system-x86_64 \  -m 1024 \  -name vserialtest \  -hda ubuntu1204 \  -chardev socket,host=localhost,port=7777,server,nowait,id=port1-char \  -device virtio-serial \  -device virtserialport,id=port1,chardev=port1-char,name=org.fedoraproject.port.0 \  -net user,hostfwd=tcp:7777::8001  

I get the following error and the VM does not boot:

qemu-system-x86_64: -net user,hostfwd=tcp:7777::8001: invalid host  forwarding rule 'tcp:7777::8001'  qemu-system-x86_64: -net user,hostfwd=tcp:7777::8001: Device 'user'  could not be initialized  

Please note that I am able to boot the VM without the -net parameter without any issues, however, I want to setup ssh from the host to the guest. ssh from guest to host works fine as expected.

Edit

I have tried using

-net user,hostfwd=tcp::7777-:8001  

as well as

-net user,hostfwd=tcp::7777:8001  

but still the error persists and the VM does not boot.

How can I set repeat rate of USB keyboard with udev?

Posted: 20 Sep 2021 08:38 AM PDT

How can I get my keyboard repeat rate to apply to a hotplugged USB keyboard?

I made a udev rule to set the keyboard repeat delay and rate, /etc/udev/rules.d/99-usb-keyboard.rules with the following contents:

ACTION=="add", SUBSYSTEM=="usb", RUN+="/home/michael/bin/keyboard_settings.sh"  

keyboard_settings.sh:

#!/bin/bash    # Set keyboard repeat delay and rate  xset -display :0.0 r rate 250 40  

udev seems to see this, using the command udevadm test /sys/bus/usb/devices/3-2\:1.0/

read rules file: /etc/udev/rules.d/99-usb-keyboard.rules  rules contain 393216 bytes tokens (32768 * 12 bytes), 37438 bytes strings  31709 strings (264322 bytes), 28154 de-duplicated (230440 bytes), 3556 trie nodes used  IMPORT builtin 'hwdb' /lib/udev/rules.d/50-udev-default.rules:11  RUN '/home/myuser/bin/keyboard_settings.sh' /etc/udev/rules.d/99-usb-keyboard.rules:1  unable to create temporary db file '/run/udev/data/+usb:3-2:1.0.tmp': Permission denied  ACTION=add  DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0  DEVTYPE=usb_interface  DRIVER=usbhid  ID_VENDOR_FROM_DATABASE=Hewlett-Packard  INTERFACE=3/1/1  MODALIAS=usb:v03F0p0325d0102dc00dsc00dp00ic03isc01ip01in00  PRODUCT=3f0/325/102  SUBSYSTEM=usb  TYPE=0/0/0  USEC_INITIALIZED=4145997461  run: '/home/myuser/bin/keyboard_settings.sh'  

And yet, this doesn't actually change the repeat rate. The laptop keyboard has the correct settings, but the external USB keyboard does not. Is Xorg overwriting the settings after the udev rule is applied? How can I find out?

I get this in the Xorg.0.log, indicating that X11 is fussing with things, but none of the rules in /usr/share/X11/xorg.conf.d/ do anything to keyboards.

[164570.705] (II) config/udev: Adding input device Lite-On Technology Corp. HP Basic USB Keyboard (/dev/input/event6)  [164570.705] (**) Lite-On Technology Corp. HP Basic USB Keyboard: Applying InputClass "evdev keyboard catchall"  [164570.705] (**) Lite-On Technology Corp. HP Basic USB Keyboard: Applying InputClass "Keyboard Defaults"  [164570.705] (II) Using input driver 'evdev' for 'Lite-On Technology Corp. HP Basic USB Keyboard'  [164570.705] (**) Lite-On Technology Corp. HP Basic USB Keyboard: always reports core events  [164570.705] (**) evdev: Lite-On Technology Corp. HP Basic USB Keyboard: Device: "/dev/input/event6"  [164570.705] (--) evdev: Lite-On Technology Corp. HP Basic USB Keyboard: Vendor 0x3f0 Product 0x325  [164570.705] (--) evdev: Lite-On Technology Corp. HP Basic USB Keyboard: Found keys  [164570.705] (II) evdev: Lite-On Technology Corp. HP Basic USB Keyboard: Configuring as keyboard  [164570.705] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/input/input34/event6"  [164570.705] (II) XINPUT: Adding extended input device "Lite-On Technology Corp. HP Basic USB Keyboard" (type: KEYBOARD, id 11)  [164570.705] (**) Option "xkb_rules" "evdev"  [164570.705] (**) Option "xkb_model" "pc105"  [164570.705] (**) Option "xkb_layout" "us"  

No comments:

Post a Comment