Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAHDI Tools compilation failed, aborting install #16

Open
chrisvictor opened this issue May 31, 2023 · 11 comments
Open

DAHDI Tools compilation failed, aborting install #16

chrisvictor opened this issue May 31, 2023 · 11 comments
Labels
bug Something isn't working

Comments

@chrisvictor
Copy link

RPi3b+ with 32bit Debian
cvictor@TEST-ASL30-K6CV:/usr/src $ cat /etc/release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"

Ran into this Dahdi Tools compilation failed error, when following the AllStarLink Version 3 readme.md file
4:43
make[3]: Entering directory '/usr/src/dahdi-tools-3.2.0/xpp'
CC astribank_tool-astribank_tool.o
CC libastribank_la-astribank.lo
CC libastribank_la-mpptalk.lo
CC libastribank_la-astribank_license.lo
CCLD libastribank.la
CCLD astribank_tool
CC astribank_hexload-astribank_hexload.o
CC astribank_hexload-pic_loader.o
CC hexfile.lo
CCLD libhexfile.la
CC libecholoader_la-parse_span_specs.lo
CC libecholoader_la-echo_loader.lo
CCLD libecholoader.la
CCLD astribank_hexload
/usr/bin/ld: ./.libs/libecholoader.a(libecholoader_la-echo_loader.o): in function init_octasic': echo_loader.c:(.text+0x1c24): undefined reference to get_ver'
/usr/bin/ld: ./.libs/libecholoader.a(libecholoader_la-echo_loader.o): in function echo_ver': echo_loader.c:(.text+0x29f0): undefined reference to get_ver'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:739: astribank_hexload] Error 1
make[3]: Leaving directory '/usr/src/dahdi-tools-3.2.0/xpp'
make[2]: *** [Makefile:1061: all-recursive] Error 1
make[2]: Leaving directory '/usr/src/dahdi-tools-3.2.0/xpp'
make[1]: *** [Makefile:1138: all-recursive] Error 1
make[1]: Leaving directory '/usr/src/dahdi-tools-3.2.0'
make: *** [Makefile:681: all] Error 2
DAHDI Tools compilation failed, aborting install
cvictor@TEST-ASL30-K6CV:/usr/src $

cvictor@TEST-ASL30-K6CV:/usr/src $ phreaknet info
Hostname: TEST-ASL30-K6CV
Raspbian GNU/Linux 11 (bullseye)
Linux TEST-ASL30-K6CV 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux
Package Manager: apt-get
PhreakScript 0.3.3 (2023-05-25)
https://github.com/InterLinked1/phreakscript
(C) 2021-2023 PhreakNet - https://portal.phreaknet.org https://docs.phreaknet.org
To report bugs or request feature additions, please report at https://issues.interlinked.us

@chrisvictor
Copy link
Author

Re-Ran as ROOT, and now get this:

root@TEST-ASL30-K6CV:~# CFLAGS=-Wno-error phreaknet install -b -d
Real time pusling is not compatible or has been disabled for this build.
SpanDSP is not compatible or has been disabled for this build.
WARNING: You are installing Asterisk to run as root. This is not recommended.
Specify -u or --user to specify a run user

Starting installation with country code 1
Installing prerequisites...
Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Aborted package lists... 27%
Aborted package lists... 18%
Aborted package lists... 18%
Aborted package lists... 18%
Aborted package lists... 18%
Aborted package lists... 18%
Aborted package lists... 18%
Aborted package lists... 18%
Aborted package lists... 18%
Aborted package lists... 18%
Aborted package lists... 18%
Aborted package lists... 18%
Unable to find automatic installation candidate for 6.1.21-v7+
Aborted package lists... 18%
Failed to download system headers and exception failed
Your kernel: 6.1.21-v7+
Available headers for your system:
You may need to upgrade your kernel using apt-get dist-upgrade to install the build headers for your system.

Aborted
Installed:
total 24
drwxr-xr-x 6 root root 4096 May 3 01:06 .
drwxr-xr-x 71 root root 4096 Jun 1 00:34 ..
drwxr-xr-x 3 root root 4096 Jun 1 00:32 6.1.21+
drwxr-xr-x 4 root root 4096 Jun 1 00:34 6.1.21-v7+
drwxr-xr-x 3 root root 4096 Jun 1 00:32 6.1.21-v7l+
drwxr-xr-x 3 root root 4096 May 3 01:06 6.1.21-v8+
root@TEST-ASL30-K6CV:# modprobe dahdi
root@TEST-ASL30-K6CV:
#

@InterLinked1
Copy link
Owner

I'm guessing this is either your 32-bit OS (which has not been well supported by DAHDI) or the 6.1.x kernel (which is new enough that there may be some breakage in DAHDI that we still need to fix).

PhreakScript must always be run as root, so if you did not do that the first time, the output is simply invalid. In fact, phreaknet install will not even run if you are not root. What command did you run the first time exactly?

The XPP drivers should be disabled on 32-bit at the moment as a workaround that seemed to fix this for a while, but it looks like those are rearing their ugly head again. Given this appears to be a linking error I'm leaning towards the 32-bit OS being the factor here.

@chrisvictor
Copy link
Author

Q: What command did you run the first time exactly?
A: sudo CFLAGS=-Wno-error phreaknet install -b -d
modprobe dahdi

Note: README.md states
For Raspberry Pi use the Raspberry Pi Imager and install the OS Lite (32-bit) version.

So I did that.

I have now moved onto the 64bit version of OS Lite, and it's doing its thing, under root, ....

Also, I loaded this flavor of OS (going back to a earlier 02-2023 version:
2023-02-21-raspios-bullseye-armhf-lite.img.xz
This is to see if a earlier OS is any better than the May-2023 version....

So far after 20minutes of phreaknet'ing, it is still doing stuff.

Will advise the outcome.

K6CV
Chris Victor

@chrisvictor
Copy link
Author

Well never fails, just as soon as I sent the above, and went back to the Pi, it bombed.
See below:

dahdi-tools-3.2.0/configure.ac~
dahdi-tools-3.2.0/configure.ac
We have an exact kernel match: 5.15.84-v7+
Applying patch dahdi_pci.diff to dahdi_pci.diff
patching file include/dahdi/kernel.h
Applying patch b6d9b417e1992868549d443efad11e4f1513c9d7.diff to b6d9b417e1992868549d443efad11e4f1513c9d7.diff
patching file include/dahdi/kernel.h
Hunk #1 succeeded at 60 with fuzz 2 (offset -6 lines).
Applying patch 09adb59cfe2aff9fc1c18cafb44ae0faf811adca.diff to 09adb59cfe2aff9fc1c18cafb44ae0faf811adca.diff
patching file include/dahdi/kernel.h
Hunk #1 succeeded at 64 (offset -6 lines).
Applying patch dahdi_kern_61.diff to dahdi_kern_61.diff
patching file include/dahdi/kernel.h
Applying git patch: dahdi_rtoutpulse.diff
Applying git patch: kewl.diff
Applying patch kewl2.diff to kewl2.diff
patching file drivers/dahdi/dahdi-base.c
Hunk #1 succeeded at 8579 with fuzz 2 (offset 30 lines).
Applying git patch: hearpulsing-dahlin.diff
Not compiling XPP driver for 32-bit
make -C drivers/dahdi/firmware firmware-loaders
make[1]: Entering directory '/usr/src/dahdi-linux-3.2.0/drivers/dahdi/firmware'
Attempting to download dahdi-fwload-vpmadt032-1.25.0.tar.gz
--2023-06-01 01:52:17-- http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.25.0.tar.gz
Resolving downloads.digium.com (downloads.digium.com)... 165.22.184.19, 2604:a880:400:d0::14:9001
Connecting to downloads.digium.com (downloads.digium.com)|165.22.184.19|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.25.0.tar.gz [following]
--2023-06-01 01:52:18-- https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.25.0.tar.gz
Connecting to downloads.digium.com (downloads.digium.com)|165.22.184.19|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 149360 (146K) [application/octet-stream]
Saving to: ‘dahdi-fwload-vpmadt032-1.25.0.tar.gz’

dahdi-fwload-vpmadt032-1.25.0.tar.gz 100%[=============================================================>] 145.86K --.-KB/s in 0.1s

2023-06-01 01:52:19 (983 KB/s) - ‘dahdi-fwload-vpmadt032-1.25.0.tar.gz’ saved [149360/149360]

make[1]: Leaving directory '/usr/src/dahdi-linux-3.2.0/drivers/dahdi/firmware'
You do not appear to have the sources for the 5.15.84-v7+ kernel installed.
make: *** [Makefile:72: modules] Error 1
DAHDI Linux compilation failed, aborting install

root@TEST-ASL3:/usr/src# phreaknet info
Hostname: TEST-ASL3.0-K6CV
Raspbian GNU/Linux 11 (bullseye)
Linux TEST-ASL3.0-K6CV 5.15.84-v7+ #1613 SMP Thu Jan 5 11:59:48 GMT 2023 armv7l GNU/Linux
Package Manager: apt-get
PhreakScript 0.3.3 (2023-05-25)
https://github.com/InterLinked1/phreakscript
(C) 2021-2023 PhreakNet - https://portal.phreaknet.org https://docs.phreaknet.org
To report bugs or request feature additions, please report at https://issues.interlinked.us

@InterLinked1
Copy link
Owner

Q: What command did you run the first time exactly? A: sudo CFLAGS=-Wno-error phreaknet install -b -d modprobe dahdi

I seem to recall someone advised using -Wno-error on 32-bit but I can't remember the reason now, do you?
Needless to say that's not recommended, if we can figure out why that was suggested perhaps we can throw in a fix for that as well.

Note: README.md states For Raspberry Pi use the Raspberry Pi Imager and install the OS Lite (32-bit) version.

So I did that.

That isn't necessarily a suggestion we endorse here. That's for a specific downstream project.

I have now moved onto the 64bit version of OS Lite, and it's doing its thing, under root, ....

Also, I loaded this flavor of OS (going back to a earlier 02-2023 version: 2023-02-21-raspios-bullseye-armhf-lite.img.xz This is to see if a earlier OS is any better than the May-2023 version....

You do not appear to have the sources for the 5.15.84-v7+ kernel installed.
make: *** [Makefile:72: modules] Error 1
DAHDI Linux compilation failed, aborting install

You previously had a 6.1 kernel and now it seems you have a 5.15 one? Is this a different machine? If it's the same, a reboot might be required inbetween.
It should fail earlier actually if the kernel headers were supposed to be installed but it couldn't find it. Could you upload the full install log from the beginning here as an attachment?

@chrisvictor
Copy link
Author

Well, I am now burning a new SD card with this image, so I won't be able to upload anything now, starting from scratch with this OS:
image

@InterLinked1 InterLinked1 added the bug Something isn't working label Jun 1, 2023
@chrisvictor
Copy link
Author

If you need the previous install log, I can recreate the steps I did with the Feb 2023 version later on. Let's see how far I get with May 2023 version now. I dont mind blowing away SD cards, getting use to that now!!!!

@chrisvictor
Copy link
Author

BTW, I do NOT do any 'apt-get update' or 'apt-get upgrade' or 'apt-get update-distro' commands before I start the installation,
Just keeping things reproducible here.
DE K6CV

@chrisvictor
Copy link
Author

OK, now on May 2023 version and started the install as shown below, as root.
cvictor@TEST-ASL3:~ $ sudo su -

Wi-Fi is currently blocked by rfkill.
Use raspi-config to set the country before use.

root@TEST-ASL3:~# cd /usr/src && wget https://docs.phreaknet.org/script/phreaknet.sh && chmod +x phreaknet.sh && ./phreaknet.sh make
--2023-06-01 02:14:10-- https://docs.phreaknet.org/script/phreaknet.sh
Resolving docs.phreaknet.org (docs.phreaknet.org)... 104.21.48.12, 172.67.175.181, 2606:4700:3036::6815:300c, ...
Connecting to docs.phreaknet.org (docs.phreaknet.org)|104.21.48.12|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 155803 (152K) [text/x-sh]
Saving to: ‘phreaknet.sh’

phreaknet.sh 100%[===========================================================>] 152.15K --.-KB/s in 0.01s

2023-06-01 02:14:10 (11.3 MB/s) - ‘phreaknet.sh’ saved [155803/155803]

PhreakScript added to path.
root@TEST-ASL3:/usr/src# CFLAGS=-Wno-error phreaknet install -b -d
Real time pusling is not compatible or has been disabled for this build.
SpanDSP is not compatible or has been disabled for this build.
WARNING: You are installing Asterisk to run as root. This is not recommended.
Specify -u or --user to specify a run user

Starting installation with country code 1
Installing prerequisites...
Hit:1 http://deb.debian.org/debian bullseye InRelease
Get:2 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:3 http://security.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:4 http://archive.raspberrypi.org/debian bullseye InRelease [23.6 kB]
Get:5 http://deb.debian.org/debian bullseye-updates/main armhf Packages [12.1 kB]
Get:6 http://deb.debian.org/debian bullseye-updates/main arm64 Packages [12.1 kB]
Get:7 http://deb.debian.org/debian bullseye-updates/main Translation-en [8,129 B]
0% [Working]

@chrisvictor
Copy link
Author

Well, it crashed as shown below.
CC libecholoader_la-echo_loader.lo
CCLD libecholoader.la
CCLD astribank_hexload
/usr/bin/ld: ./.libs/libecholoader.a(libecholoader_la-echo_loader.o): in function init_octasic': echo_loader.c:(.text+0x1700): undefined reference to get_ver'
/usr/bin/ld: ./.libs/libecholoader.a(libecholoader_la-echo_loader.o): in function echo_ver': echo_loader.c:(.text+0x2290): undefined reference to get_ver'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:739: astribank_hexload] Error 1
make[3]: Leaving directory '/usr/src/dahdi-tools-3.2.0/xpp'
make[2]: *** [Makefile:1061: all-recursive] Error 1
make[2]: Leaving directory '/usr/src/dahdi-tools-3.2.0/xpp'
make[1]: *** [Makefile:1138: all-recursive] Error 1
make[1]: Leaving directory '/usr/src/dahdi-tools-3.2.0'
make: *** [Makefile:681: all] Error 2
DAHDI Tools compilation failed, aborting install
root@TEST-ASL3:/usr/src#

I didn't have the output going to a file, so attached is a partial scrollback buffer on my terminal to the RPi doing the installation.
If you need the whole thing, I can recreate and pipe it to a file if you like.

Partial instal log for ASL30 on RPi3b+ with Debian11 Lite May 2023.txt

DE K6CV

@chrisvictor
Copy link
Author

OK, reimaged, same RPi OS Lite, and started with only phreaknet and NOT the CFLAGS stuff, and it stopped at a different spot this time...
Full Install log is attached.
TEST-ASL3.0-K6CV Install.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants