Hi Oleg,
The latest linux build you provide works in a GUI!(
https://gitlab.com/sovaz1997/zevra2/tags/v2.1_r210)
When I compile it myself the binary crashes in a GUI.
I analyzed your binary with the file command : zevra_popcnt: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, BuildID[sha1]=5d0d1e0946247dd01bd57033f5003a48618dd4f5, stripped
My compile using your Makefile with make popcnt command shows : zevra_popcnt: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=46ec66976f0bdb9e40ba81044c7587c4d268a73e, not stripped
Could it be that compiling with the newer GCC 8 produces a segfault when binary is run in a GUI?
gcc -v gives :
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=
https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --enable-cet=auto
Thread model: posix
gcc version 8.2.1 20180831 (GCC)
I compiled a debug version and this is the backtrace:
Reading symbols from /home/antonio/Documents/Zevra v2.1 r210/src/zevra...done.
[New LWP 12236]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `./zevra'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f63b2ee9596 in strtok_r () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007f63b2ee9596 in strtok_r () from /usr/lib/libc.so.6
#1 0x000055af4e0cd47b in setFen (board=0x55af50274260, fen=0x55af4e0deec0 <startpos> "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1") at board.c:9
#2 0x000055af4e0d5833 in main () at uci.c:13
(gdb)
It always segfaults at board.c:9
Maybe the strtok_r function using GCC 8 is the culprit?(
https://linux.die.net/man/3/strtok_r)
Kind regards,
Antonio