hdl / Termux-packages

Electronic design automation (EDA) package recipes for Termux (Android)
Apache License 2.0
6 stars 1 forks source link

GHDL installation fails in arch armv71 #4

Open rodrigomelo9 opened 3 years ago

rodrigomelo9 commented 3 years ago

After a new Termux installation (from F-Droid), I perform:

pkg update && pkg upgrade
pkg install git
git clone https://github.com/hdl/Termux-packages.git
cd Termux-packages/scripts
./base.sh
./ghdl.sh

The last one fails when make install. Specifically, performing

install: install.$(backend)
#       Generate std.standard package VHDL source
    $(DESTDIR)$(bindir)/ghdl$(EXEEXT) --disp-standard --std=87 > $(DESTDIR)$(VHDL_LIB_DIR)/src/std/v87/standard.vhdl
    $(DESTDIR)$(bindir)/ghdl$(EXEEXT) --disp-standard --std=93 > $(DESTDIR)$(VHDL_LIB_DIR)/src/std/v93/standard.vhdl
    $(DESTDIR)$(bindir)/ghdl$(EXEEXT) --disp-standard --std=08 > $(DESTDIR)$(VHDL_LIB_DIR)/src/std/v08/standard.vhdl

And the problem is related to the compiled ghdl:

~/.../ghdl/build-termux $ $PREFIX/bin/ghdl --disp-standard --std=87 > $PREFIX/lib/ghdl/src/std/v87/standard.vhdl
Killed
~/.../ghdl/build-termux $ ghdl --version
GHDL 2.0.0-devKilled

Let me know if I can provide debug info. I performed a ltrace which finished with the message Error: call nesting too deep!

umarcor commented 3 years ago

Can you save the build to a log file? Sometimes GHDL's build/install procedure fails when installing, but it is because of some previous error during the build. Other than that, GHDL does work on armv71, so I think this issue is specific to Android/Termux.

rodrigomelo9 commented 3 years ago

Here you are: ghdl.log

I didn't see errors or warnings which gives me a clue.

umarcor commented 3 years ago

Hmmm, it seems that the log is not complete? Is that the call to make only?

rodrigomelo9 commented 3 years ago

Yep, it only includes make. Let me add make install

rodrigomelo9 commented 3 years ago

Here the complete log: ghdl.log

umarcor commented 3 years ago

Can you run /data/data/com.termux/files/usr/bin/ghdl --disp-standard --std=87 on gdb?

rodrigomelo9 commented 3 years ago

I tried what you suggested and also --version:

~/Termux-packages/scripts $ gdb /data/data/com.termux/files/usr/bin/ghdl
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
...
(gdb) run --disp-standard --std=87
Starting program: /data/data/com.termux/files/usr/bin/ghdl --disp-standard --std=87
Program received signal SIGSEGV, Segmentation fault.
0xb6cecd28 in NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*) ()
from /system/lib/libc.so
...
(gdb) run version
Starting program: /data/data/com.termux/files/usr/bin/ghdl version
GHDL 2.0.0-dev
Program received signal SIGSEGV, Segmentation fault.
0xb6a66d28 in NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*) ()
from /system/lib/libc.so