Freeze/reboot/errors when compiling - unable to make - reproducible and not isolated
#1
I am reporting failures to compile resulting in Rock64 freezing, rebooting, or producing errors.


Trials with hashcat (only available for amd64 and i386, and even then just as 3.30 in stretch) with ayunfan 0.7.9 stretch installed are below.

I fulfilled hashcat's demand for opencl-headers.
apt-get install opencl-headers
The following NEW packages will be installed:
  opencl-c-headers opencl-clhpp-headers opencl-headers

wget https://hashcat.net/files/hashcat-4.2.1.tar.gz
tar -zxf hashcat-4.2.1.tar.gz
cd hashcat-4.2.1/
make
    First effort yielded MANY errors like this one (with "Killed" and coming at the end),
gcc: internal compiler error: Killed (program as)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions.
src/Makefile:479: recipe for target 'obj/LzmaDec.NATIVE.STATIC.o' failed
make: *** [obj/LzmaDec.NATIVE.STATIC.o] Error 4

    Later attempt gave,
...
gcc -c -pipe -std=gnu99 -Iinclude/ -IOpenCL/ -Ideps/lzma_sdk/ -O2 -Ideps/OpenCL-Headers/ -DWITH_HWMON deps/lzma_sdk/Lzma2Dec.c -o obj/Lzma2Dec.NATIVE.STATIC.o
gcc -c -pipe -std=gnu99 -Iinclude/ -IOpenCL/ -Ideps/lzma_sdk/ -O2 -Ideps/OpenCL-Headers/ -DWITH_HWMON deps/lzma_sdk/LzmaDec.c -o obj/LzmaDec.NATIVE.STATIC.o
Write failed: Broken pipe

    The last line was a red herring. The system rebooted perhaps because of a kernel panic. I was able to reproduce the behavior several times.


    Trying to install source from github's master.zip showed the following.
unzip hashcat-master.zip
cd hashcat-master
make linux
gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -I/opt/hashcat-deps/gmp/linux32/include -D__HC_x86_32__ -DPOSIX -m32 -msse2 -c src/common.c -o obj/common.LINUX.32.o
gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -I/opt/hashcat-deps/gmp/linux64/include -D__HC_x86_64__ -DPOSIX -m64 -msse2 -c src/common.c -o obj/common.LINUX.64.o
gcc -W -Wall -pipe -I include/ -O2 -s -fomit-frame-pointer -funroll-loops -I/opt/hashcat-deps/gmp/linux64/include -D__HC_XOP__ -DPOSIX -m64 -mxop -c src/common.c -o obj/common.LINUX.XOP.o
gcc: error: unrecognized command line option '-m64'
gcc: error: unrecognized command line option '-mxop'
src/Makefile:316: recipe for target 'obj/common.LINUX.XOP.o' failed
make: *** [obj/common.LINUX.XOP.o] Error 1
make: *** Waiting for unfinished jobs....
gcc: error: unrecognized command line option '-m64'
gcc: error: unrecognized command line option '-m32'
gcc: error: unrecognized command line option '-msse2'
gcc: error: unrecognized command line option '-msse2'
src/Makefile:190: recipe for target 'obj/common.LINUX.64.o' failed
make: *** [obj/common.LINUX.64.o] Error 1
src/Makefile:148: recipe for target 'obj/common.LINUX.32.o' failed
make: *** [obj/common.LINUX.32.o] Error 1


    I added jessie to my sources.list
deb http://cdn.debian.net/debian/ jessie main contrib non-free
deb-src http://cdn.debian.net/debian/ jessie main contrib non-free

and installed gcc-4.9.
Compiling the .tar froze and rebooted the system; the .zip, produced the same errors but in a slightly different order:
CC="gcc-4.9" make linux
...
gcc: error: unrecognized command line option '-m64'
gcc: error: unrecognized command line option '-mxop'
gcc: error: unrecognized command line option '-m32'
src/Makefile:316: recipe for target 'obj/common.LINUX.XOP.o' failed
make: *** [obj/common.LINUX.XOP.o] Error 1
make: *** Waiting for unfinished jobs....
gcc: error: unrecognized command line option '-m64'
gcc: error: unrecognized command line option '-msse2'
gcc: error: unrecognized command line option '-msse2'
src/Makefile:148: recipe for target 'obj/common.LINUX.32.o' failed
make: *** [obj/common.LINUX.32.o] Error 1
src/Makefile:190: recipe for target 'obj/common.LINUX.64.o' failed
make: *** [obj/common.LINUX.64.o] Error 1


    On a Raspberry Pi, I was able to compile from the same .tar without errors.
    The RPi had at the time,
uname -a
Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
     I have re-verified that, after a brief hang (where Rock64 reboots), RPi with a clean installation of 4.9.35-v7+ compiles hashcat 4.2.1 just fine.
     I have again searched hashcat's forums, and found no mention of the fragment "compil" aside from one hit, which does not indicate any difficulty with compiling from source.
     I deduce aarch64 to somehow be the origin of the problem, but am open to alternative explanations (and concomittant solutions).


    I had similar issues (including the reboot) when attempting to compile golang 1.11. Unlike hashcat, golang /does/ have a package suitable for my needs (golang-1.10 in backports as opposed to 1.7 in stretch) which I installed by adding to my sources.list:
deb http://cdn.debian.net/debian/ stretch-backports main contrib non-free
deb-src http://cdn.debian.net/debian/ stretch-backports main contrib non-free

and by using its peculiarly placed binary,
/usr/lib/go-1.10/bin/go

My point of including golang 1.11 is simply that I anticipate further challenges with gcc, so I would like at the very least to overcome this one. Despite my attentiveness and web searches, I am as of yet, empty-handed on all counts with compiling.


Any guidance on how to surmount these freezes, reboots, and errors (and compile hashcat 4.2.1) on Rock64 would be most welcome.
  Reply
#2
I think you mix up different issues. So a couple of thoughts:

* try a more recent gcc. 4.9 has poor support for aarch64.
* compiler flags like -msse2 or -m64 won't work on aarch64-alt-linux-gcc, they are x64 specific.
* you can't compare aarch64 (rock64) and armv7 (raspi) - they are just different architectures.

I got lot of "gcc: internal compiler error:" on my rock64, too. Look into https://forum.pine64.org/showthread.php?tid=6404

aarch64 can't be the problem. I just got hashcat-4.2.1.tar.gz, extracted it, installed opencl and compiled it with
$ CFLAGS="-mtune=cortex-a53 -march=armv8-a+crc+crypto" CC=gcc-7 make -j4
$ ls -l hashcat
-rwxr-xr-x 1 user users 730496 Oct 1 10:22 hashcat

on altlinux sisyphus.
  Reply
#3
(10-01-2018, 02:36 AM)hunderteins Wrote: aarch64 can't be the problem. I just got hashcat-4.2.1.tar.gz, extracted it, installed opencl and compiled it with
$ CFLAGS="-mtune=cortex-a53 -march=armv8-a+crc+crypto" CC=gcc-7 make -j4
$ ls -l hashcat
-rwxr-xr-x 1 user users 730496 Oct  1 10:22 hashcat

on altlinux sisyphus.

    On a fresh installation, I did
apt-get install opencl-headers
The following NEW packages will be installed:
  opencl-c-headers opencl-clhpp-headers opencl-headers

     I then added buster to my /etc/apt/sources.list
deb http://cdn.debian.net/debian/ buster main contrib non-free
deb-src http://cdn.debian.net/debian/ buster main contrib non-free
deb http://security.debian.org/ buster/updates main contrib non-free
deb-src http://security.debian.org/ buster/updates main contrib non-free
deb http://cdn.debian.net/debian/ buster-updates main contrib non-free
deb-src http://cdn.debian.net/debian/ buster-updates main contrib non-free

     and did,
apt-get update
apt-get install gcc-7
...
The following NEW packages will be installed:
  binutils-aarch64-linux-gnu binutils-common cpp-7 gcc-7 gcc-7-base gcc-8-base libasan4 libbinutils libgcc-7-dev libisl19 liblsan0 libmpfr6 libtsan0
The following packages will be upgraded:
  binutils libatomic1 libc-bin libc-dev-bin libc-l10n libc6 libc6-dev libcc1-0 libgcc1 libgomp1 libitm1 libmpc3 libubsan0 locales


tar -zxf hashcat-4.2.1.tar.gz
cd hashcat-4.2.1
CFLAGS="-mtune=cortex-a53" CC=gcc-7 make -j4
...
gcc -c -mtune=cortex-a53 -pipe -std=gnu99 -Iinclude/ -IOpenCL/ -Ideps/lzma_sdk/ -O2 -Ideps/OpenCL-Headers/ -DWITH_HWMON deps/lzma_sdk/LzmaDec.c -o obj/LzmaDec.NATIVE.STATIC.o
    Compiling hangs and system reboots.
tar -zxf hashcat-4.2.1.tar.gz
cd hashcat-4.2.1
CC=gcc-7 make
...
gcc -c -pipe -std=gnu99 -Iinclude/ -IOpenCL/ -Ideps/lzma_sdk/ -O2 -Ideps/OpenCL-Headers/ -DWITH_HWMON deps/lzma_sdk/LzmaDec.c -o obj/LzmaDec.NATIVE.STATIC.o
    same.
    I found identical results with CC="gcc-7" (i.e. gcc-7 in quotation marks). I also tried this whole rigamarole with gcc-8.
    I have added 1GB of swap to no avail.

    What have I done wrong?
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  i2c0 transfers cause bus errors michaelanburaj 0 1,648 07-14-2020, 02:25 PM
Last Post: michaelanburaj
  Unable to boot armbian fchazal 2 3,785 05-19-2020, 06:43 PM
Last Post: Rocklobster
  gstreamer unable to process dvbsrc from ATSC tuner dongle grkblood13 1 2,909 08-31-2019, 09:01 PM
Last Post: grkblood13
  Errors were encountered while processing: initramfs-tools MotoTom 0 2,376 03-03-2019, 11:53 AM
Last Post: MotoTom
Question HDD filesystem corruption at reboot / poweroff (DietPi) WrongWorld 1 2,878 02-11-2019, 04:00 PM
Last Post: WrongWorld
  USB drive powered off after reboot huberttrz 1 3,001 12-20-2018, 05:39 PM
Last Post: huberttrz
  Spontaneous Reboot during scp with Ubuntu bionic 0.7.8-1061 perniciouscaffeine 0 1,848 10-16-2018, 05:34 PM
Last Post: perniciouscaffeine
  [solved] Unable to start X Osiander 8 11,273 10-03-2018, 03:54 AM
Last Post: jovval
  Cannot make DAC Add-on Board work under debian szclsya 0 1,838 09-29-2018, 12:57 AM
Last Post: szclsya
  USB Errors with ASI camera GuLinux 0 1,787 09-18-2018, 03:48 AM
Last Post: GuLinux

Forum Jump:


Users browsing this thread: 1 Guest(s)