ethereum-mining / ethminer

Ethereum miner with OpenCL, CUDA and stratum support
GNU General Public License v3.0
5.97k stars 2.28k forks source link

cmake fails on gentoo gcc 10.3 #2263

Open evilbulgarian opened 3 years ago

evilbulgarian commented 3 years ago

Describe the bug Unable to compile from git master branch

To Reproduce Steps to reproduce the behavior: 1) check out git repo 2) cmake -DETHASHCL=ON -DETHASHCUDA=OFF -DAPICORE=ON -H. -Bbuild -DUSE_SYS_OPENCL=ON

Expected behavior get a ethminer binary

Environment (please complete the following information):

Additional context Add any other context about the problem here.

CMakeError.log CMakeOutput.log

Portage 3.0.17 (python 3.8.8-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-10.3.0, glibc-2.32-r7, 5.11.14 x86_64)

System uname: Linux-5.11.14-x86_64-AMD_Ryzen_7_3700X_8-Core_Processor-with-glibc2.2.5 KiB Mem: 16391252 total, 1824024 free KiB Swap: 16137212 total, 16137212 free Timestamp of repository gentoo: Thu, 15 Apr 2021 14:05:22 +0000 Head commit of repository gentoo: 9a3e09ff1abe1857094d32df9c41dc8623f13258

Head commit of repository electron: dc057836273bd3dbb7db1c51dc7865e3c4813a30

Head commit of repository lto-overlay: 5b785228c5c84cce3e2dc25b14b04d5a20c6d540

Head commit of repository mv: fa7e285faaaa9ba00a9b0883649ad46c8032f283

Head commit of repository steam-overlay: 98251c8f5a441e47b304dd33f3ff31dbc8e1b87a

Head commit of repository mva: 85b3f883ec934add5e78882e408d8799d62f7a0a

sh bash 5.0_p18 ld GNU ld (Gentoo 2.35.2 p1) 2.35.2 distcc 3.3.3 x86_64-pc-linux-gnu [enabled] ccache version 4.2 [disabled] app-shells/bash: 5.0_p18::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.30.3::gentoo dev-lang/python: 3.8.8_p1::gentoo, 3.9.2_p1::gentoo dev-lang/rust: 1.47.0-r2::gentoo dev-util/ccache: 4.2::gentoo dev-util/cmake: 3.18.5::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/openrc: 0.42.1-r1::gentoo sys-apps/sandbox: 2.20::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo sys-devel/automake: 1.16.2-r1::gentoo sys-devel/binutils: 2.35.2::gentoo sys-devel/gcc: 10.3.0::gentoo sys-devel/gcc-config: 2.4::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers) sys-libs/glibc: 2.32-r7::gentoo Repositories:

gentoo location: /usr/portage sync-type: git sync-uri: https://github.com/gentoo-mirror/gentoo priority: -1000

electron location: /usr/local/portage/electron sync-type: git sync-uri: https://github.com/elprans/electron-overlay.git masters: gentoo

x-portage location: /usr/local/portage masters: gentoo priority: 0

lto-overlay location: /usr/local/portage/lto-overlay sync-type: git sync-uri: https://github.com/InBetweenNames/gentooLTO.git masters: gentoo mv priority: 50

mv location: /usr/local/portage/mv sync-type: git sync-uri: https://anongit.gentoo.org/git/user/mv.git masters: gentoo priority: 50

steam-overlay location: /usr/local/portage/steam sync-type: git sync-uri: https://github.com/anyc/steam-overlay.git masters: gentoo priority: 50

mva location: /usr/local/portage/mva sync-type: git sync-uri: https://github.com/msva/mva-overlay.git masters: gentoo priority: 9999

ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=znver2 -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=auto -fuse-linker-plugin -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=znver2 -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=auto -fuse-linker-plugin -pipe" DISTDIR="/usr/portage/distfiles" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distcc distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en bg" MAKEOPTS="-j17 -l9" PKGDIR="/var/cache/binpkgs" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/cache/gentoo" USE="X a52 aac aalib acl acpi activities adns aio alsa amd64 asf bash-completion berkdb bluetooth branding btrfs bzip2 cairo caps cdda cdr chroot cli crypt cryptsetup cups curl custom-cflags custom-optimization dav1d dbus declarative device-mapper dri dts dv dvd dvdr egl elogind emboss encode exif faac faad ffmpeg flac fortran gbm gdbm gif glamor gles gles2 glib gnutls gold gpg graphite gstreamer gui hwaccel iconv icu imap inotify introspection io-uring iproute2 ipv6 irc ithreads iwd jpeg jpeg2k jumbo-build kde kerberos kipi kwallet lcms libaom libglvnd libinput libnotify libtirpc lto lzo mad maps matroska mdnsresponder-compat melt mng mp3 mp4 mpd mpeg mtp multilib ncurses networkmanager nls nptl offensive ogg ogm opengl openmp opus otr ozone pam pango pcre pdf pdfimport pgo phonon pic plasma png policykit ppds pulseaudio qml qt5 rar rav1e rdp readline rpc sasl screencast sdl seccomp semantic-desktop speex spell split-usr sql ssl startup-notification svg system-av1 system-cairo system-ffmpeg system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-llvm system-mesa system-webp theora threads thumbnail tidy tiff truetype udev udisks unicode upower usb user-session v4l vaapi vcd vim-syntax vnc vorbis vpx wayland webp widgets x264 xattr xcb xml xv xvfb xvid zip zlib zsh-completion" ABI_X86="64 32" ADA_TARGET="gnat_2018" ALSA_CARDS="hda_intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc efi-64" INPUT_DEVICES="keyboard libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" RUBY_TARGETS="ruby26" SANE_BACKENDS="fujitsu" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS

evilbulgarian commented 3 years ago

If I use previously built binary I get:

lots of: Warning: (!g_use_interrupt_wait || isIPC()) && "Use of non-host signal in host signal wait API." in virtual hsa_signal_value_t rocr::core::BusyWaitSignal::WaitRelaxed(hsa_signal_condition_t, hsa_signal_value_t, uint64_t, hsa_wait_state_t), /tmp/portage/dev-libs/rocr-runtime-4.1.0/work/ROCR-Runtime-rocm-4.1.0/src/core/runtime/default_signal.cpp:87

and plenty of segfaults trying to start it: ethminer 0.19.0-17+commit.ce52c740 Build: linux/release/gnu

LoadLib(libhsa-amd-aqlprofile64.so) failed: libhsa-amd-aqlprofile64.so: cannot open shared object file: No such file or directory CUDA Error : No CUDA driver found i 12:25:23 ethminer Configured pool us2.ethermine.org:5555 i 12:25:23 ethminer Selected pool us2.ethermine.org:5555 i 12:25:23 ethminer Negotiation of EthereumStratum/2.0.0 failed. Trying another ... i 12:25:23 ethminer Stratum mode : EthereumStratum/1.0.0 (NiceHash) i 12:25:23 ethminer Established connection to us2.ethermine.org [172.65.226.101:5555] i 12:25:23 ethminer Spinning up miners... cl 12:25:23 cl-0 Using Device : 28:00.0 gfx1010:xnack- OpenCL 2.0 Memory : 7.98 GB (8573157376 B) i 12:25:23 cl-0 Adjusting CL work multiplier for 20 CUs. Adjusted work multiplier: 36,409 i 12:25:23 ethminer Extranonce set to 1d0a i 12:25:23 ethminer Authorized worker 0xFf1eB0a5883896975648856F91c47D99d4F00D47.beowulf i 12:25:23 ethminer Epoch : 409 Difficulty : 4.29 Gh i 12:25:23 ethminer Job: f3c20ab3… us2.ethermine.org [172.65.226.101:5555] cl 12:25:25 cl-0 Generating split DAG + Light (total): 4.20 GB i 12:25:25 ethminer Job: 33f86c92… us2.ethermine.org [172.65.226.101:5555] cl 12:25:25 cl-0 OpenCL kernel SIGSEGV encountered ... stack trace: backtrace() returned 29 addresses ./ethminer(+0x9c020) [0x55c42f09d020] /lib64/libpthread.so.0(+0x13890) [0x7f539c8ff890] /lib64/libc.so.6(cfree+0x1c) [0x7f539c64020c] /usr/lib/llvm/roc/lib/libLLVMCore.so.12roc(_ZN4llvm4UserdlEPv+0xdd) [0x7f52983df02d] /usr/lib/llvm/roc/lib/../lib/libLLVMTransformUtils.so.12roc(_ZN4llvm19changeToUnreachableEPNS_11InstructionEbbPNS_14DomTreeUpdaterEPNS_16MemorySSAUpdaterE+0x310) [0x7f5292a1e020] /usr/lib/llvm/roc/lib/../lib/libLLVMScalarOpts.so.12roc(_ZN4llvm9runIPSCCPERNS_6ModuleERKNS_10DataLayoutESt8functionIFRKNS_17TargetLibraryInfoERNS_8FunctionEEENS_12function_refIFNS_20AnalysisResultsForFnESA_EEE+0x89e) [0x7f5292da83ee] /usr/lib/llvm/roc/lib/../lib/libLLVMipo.so.12roc(+0x14dd20) [0x7f5292ff2d20] /usr/lib/llvm/roc/lib/libLLVMCore.so.12roc(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x3b0) [0x7f529839a0c0] /usr/lib/llvm/roc/lib/../lib/libclangCodeGen.so.12roc(_ZN5clang17EmitBackendOutputERNS_17DiagnosticsEngineERKNS_19HeaderSearchOptionsERKNS_14CodeGenOptionsERKNS_13TargetOptionsERKNS_11LangOptionsERKN4llvm10DataLayoutEPNSE_6ModuleENS_13BackendActionESt10unique_ptrINSE_17raw_pwrite_streamESt14default_deleteISM_EE+0x78e) [0x7f5292011ffe] /usr/lib/llvm/roc/lib/../lib/libclangCodeGen.so.12roc(+0x3a2a8a) [0x7f52922fca8a] /usr/lib/llvm/roc/lib/libclangFrontend.so.12roc(_ZN5clang14FrontendAction7ExecuteEv+0x179) [0x7f529913b849] /usr/lib/llvm/roc/lib/libclangFrontend.so.12roc(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x210) [0x7f52990f7620] /usr/lib/llvm/roc/lib/libclangFrontendTool.so.12roc(_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE+0xab3) [0x7f539aed71a3] /usr/lib64/libamd_comgr.so.2(+0x1cc00) [0x7f529a4e6c00] /usr/lib64/libamd_comgr.so.2(+0x1ea4e) [0x7f529a4e8a4e] /usr/lib64/libamd_comgr.so.2(+0x23650) [0x7f529a4ed650] /usr/lib64/libamd_comgr.so.2(amd_comgr_do_action+0x40b) [0x7f529a4f797b] /usr/lib64/libamdocl64.so(+0xbee1b) [0x7f539bd21e1b] /usr/lib64/libamdocl64.so(+0xf2fd1) [0x7f539bd55fd1] /usr/lib64/libamdocl64.so(clBuildProgram+0x146) [0x7f539bcca716] /usr/lib64/libOpenCL.so.1(clBuildProgram+0x4e) [0x7f539c92448e] ./ethminer(+0x3638fc) [0x55c42f3648fc] ./ethminer(+0x366296) [0x55c42f367296] ./ethminer(+0xe99fe) [0x55c42f0ea9fe] ./ethminer(+0x360e02) [0x55c42f361e02] ./ethminer(+0x134756) [0x55c42f135756] ./ethminer(+0x4594a3) [0x55c42f45a4a3] /lib64/libpthread.so.0(+0x8136) [0x7f539c8f4136] /lib64/libc.so.6(clone+0x3f) [0x7f539c6c2cff] SIGSEGV encountered ... stack trace: backtrace() returned 7 addresses ./ethminer(+0x9c020) [0x55c42f09d020] /lib64/libpthread.so.0(+0x13890) [0x7f539c8ff890] ./ethminer(+0x91a20) [0x55c42f092a20] ./ethminer(+0x984e1) [0x55c42f0994e1] ./ethminer(+0x4594a3) [0x55c42f45a4a3] /lib64/libpthread.so.0(+0x8136) [0x7f539c8f4136] /lib64/libc.so.6(clone+0x3f) [0x7f539c6c2cff]

jimmystewpot commented 3 years ago

can you try and run this as root just to see if the problem persists?

I have exactly the same problem with one of my systems and it works when I run as root. Working on writing some better error handling patches at the moment.

evilbulgarian commented 3 years ago

I fixed it by re-cloning the repo and building again from scratch. But I still do get the crashes at startup so i have to use a while loop to go through a bunch of crashes before ethminer starts, then I also still get the messages spamming the screen: Warning: (!g_use_interrupt_wait || isIPC()) && "Use of non-host signal in host signal wait API." in virtual hsa_signal_value_t rocr::core::BusyWaitSignal::WaitRelaxed(hsa_signal_condition_t, hsa_signal_value_t, uint64_t, hsa_wait_state_t), /tmp/portage/dev-libs/rocr-runtime-4.1.0/work/ROCR-Runtime-rocm-4.1.0/src/core/runtime/default_signal.cpp:87

xbjfk commented 3 years ago

I am facing the same error as the original post