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

Can't compile Dahdi Linux on kernel 5.19.0-76051900-generic #10

Open
gandalf239 opened this issue Sep 6, 2022 · 20 comments
Open

Can't compile Dahdi Linux on kernel 5.19.0-76051900-generic #10

gandalf239 opened this issue Sep 6, 2022 · 20 comments

Comments

@gandalf239
Copy link

Keep getting the following error:

root/dahdi-linux/drivers/dahdi/wct4xxp/base.c: In function ‘t4_allocate_buffers’:
/root/dahdi-linux/drivers/dahdi/wct4xxp/base.c:3864:17: error: implicit declaration of function ‘pci_alloc_consistent’ [-Werror=implicit-function-declaration]
3864 | alloc = pci_alloc_consistent(wc->dev, numbufs * T4_BASE_SIZE(wc) * 2,
| ^~~~~~~~~~~~~~~~~~~~
/root/dahdi-linux/drivers/dahdi/wct4xxp/base.c:3864:15: warning: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
3864 | alloc = pci_alloc_consistent(wc->dev, numbufs * T4_BASE_SIZE(wc) * 2,
| ^
/root/dahdi-linux/drivers/dahdi/wct4xxp/base.c: In function ‘t4_increase_latency’:
/root/dahdi-linux/drivers/dahdi/wct4xxp/base.c:3943:9: error: implicit declaration of function ‘pci_free_consistent’ [-Werror=implicit-function-declaration]
3943 | pci_free_consistent(wc->dev, T4_BASE_SIZE(wc) * oldbufs * 2,

Please advise.

@InterLinked1
Copy link
Contributor

InterLinked1 commented Sep 6, 2022

What distro and version are you using?

(Version of Linux distro, as well as version of DAHDI Linux).

Make sure you are using DAHDI Linux 3.2.0, not 3.1.0! If you are installing from Git, use the next head, not master head.

@gandalf239
Copy link
Author

gandalf239 commented Sep 6, 2022 via email

@InterLinked1
Copy link
Contributor

You didn't answer the other questions (DAHDI version) (or if you did, it didn't come through as it appears an inline image was stripped). Please copy and paste as text.

I doubt many people use PopOS for this, and Debian tends to be more popular than Ubuntu for Asterisk so this may have not been seen before. It's important to have as many details as possible if someone is going to replicate.

@gandalf239
Copy link
Author

My apologies; distro is Pop OS! (based upon Ubuntu LTS 22.04), kernel is 5.19.0-76051900-generic, and Dahdi was cloned from Asterisk repo using: git clone -b next https://github.com/asterisk/dahdi-linux.git. Prereqs installed (build-essential, nodejs, etc).

@InterLinked1
Copy link
Contributor

Thanks for the info.
I don't recall nodejs ever being a pre-requisite for installing DAHDI or Asterisk... where'd you find that?

Out of curiosity, if you install using PhreakScript, does it work for you? https://github.com/InterLinked1/phreakscript

e.g. phreaknet install --dahdi --force

Just used that to install on Debian 11 with a 5.10 kernel and no issues with DAHDI install there.

@gandalf239
Copy link
Author

Thanks for the info. I don't recall nodejs ever being a pre-requisite for installing DAHDI or Asterisk... where'd you find that?

Out of curiosity, if you install using PhreakScript, does it work for you? https://github.com/InterLinked1/phreakscript

e.g. phreaknet install --dahdi --force

Just used that to install on Debian 11 with a 5.10 kernel and no issues with DAHDI install there.

I've not tried Phreakscript yet; thanks for the tip!

As for nodejs, it seems it's a prereq for either FreePBX or Asterisk these days: https://www.google.com/search?client=firefox-b-1-d&q=nodejs+prereq+FreePBX+Asterisk

@gandalf239
Copy link
Author

Unfortunately, I get the same result using phreaknet:

/usr/src/dahdi-linux-3.2.0-rc1/drivers/dahdi/wct4xxp/base.c: In function ‘t4_allocate_buffers’:
/usr/src/dahdi-linux-3.2.0-rc1/drivers/dahdi/wct4xxp/base.c:3864:17: error: implicit declaration of function ‘pci_alloc_consistent’ [-Werror=implicit-function-declaration]
3864 | alloc = pci_alloc_consistent(wc->dev, numbufs * T4_BASE_SIZE(wc) * 2,
| ^~~~~~~~~~~~~~~~~~~~
/usr/src/dahdi-linux-3.2.0-rc1/drivers/dahdi/wct4xxp/base.c:3864:15: warning: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
3864 | alloc = pci_alloc_consistent(wc->dev, numbufs * T4_BASE_SIZE(wc) * 2,
| ^
/usr/src/dahdi-linux-3.2.0-rc1/drivers/dahdi/wct4xxp/base.c: In function ‘t4_increase_latency’:
/usr/src/dahdi-linux-3.2.0-rc1/drivers/dahdi/wct4xxp/base.c:3943:9: error: implicit declaration of function ‘pci_free_consistent’ [-Werror=implicit-function-declaration]
3943 | pci_free_consistent(wc->dev, T4_BASE_SIZE(wc) * oldbufs * 2,
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:249: /usr/src/dahdi-linux-3.2.0-rc1/drivers/dahdi/wct4xxp/base.o] Error 1
make[2]: *** [scripts/Makefile.build:466: /usr/src/dahdi-linux-3.2.0-rc1/drivers/dahdi/wct4xxp] Error 2
make[1]: *** [Makefile:1849: /usr/src/dahdi-linux-3.2.0-rc1/drivers/dahdi] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.19.0-76051900-generic'
make: *** [Makefile:74: modules] Error 2
DAHDI Linux compilation failed, aborting install

@InterLinked1
Copy link
Contributor

nodejs would be required for FreePBX, but not for Asterisk (you hadn't mentioned FreePBX before).
Thanks for that additional info. I think this is indeed a newer issue, probably due to the newer kernel, where it's indeed not present, in 5.19 from 5.10: https://elixir.bootlin.com/linux/v5.19.7/C/ident/pci_free_consistent
Most of us are not quite yet to 5.19 which is why I hadn't noticed before.

@Famicoman
Copy link

Famicoman commented Aug 12, 2023

Hello all, I have a fresh build of Debian 12 (amd64) and am also seeing this issue. Looks like dahdi support may now be broken on the updated kernel used by popular distros?

root@kabelsalat:/usr/src/dahdi-linux-3.2.0# make
make -C drivers/dahdi/firmware firmware-loaders
make[1]: Entering directory '/usr/src/dahdi-linux-3.2.0/drivers/dahdi/firmware'
make[1]: Leaving directory '/usr/src/dahdi-linux-3.2.0/drivers/dahdi/firmware'
make -C /lib/modules/6.1.0-10-amd64/build M=/usr/src/dahdi-linux-3.2.0/drivers/dahdi DAHDI_INCLUDE=/usr/src/dahdi-linux-3.2.0/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
make[1]: Entering directory '/usr/src/linux-headers-6.1.0-10-amd64'
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_adpcm_chan.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_channel.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_stats.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_conf_bridge.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_debug.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_events.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_interrupts.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_memory.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_miscellaneous.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_mixer.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_phasing_tsst.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_playout_buf.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_remote_debug.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_tlv.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_tone_detection.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_tsi_cnct.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_tsst.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/apilib/bt/octapi_bt0.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/apilib/largmath/octapi_largmath.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/apilib/llman/octapi_llman.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/oct612x-user.o
  LD [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/oct612x.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/wct4xxp/base.o
/usr/src/dahdi-linux-3.2.0/drivers/dahdi/wct4xxp/base.c: In function ‘t4_allocate_buffers’:
/usr/src/dahdi-linux-3.2.0/drivers/dahdi/wct4xxp/base.c:3864:17: error: implicit declaration of function ‘pci_alloc_consistent’ [-Werror=implicit-function-declaration]
 3864 |         alloc = pci_alloc_consistent(wc->dev, numbufs * T4_BASE_SIZE(wc) * 2,
      |                 ^~~~~~~~~~~~~~~~~~~~
/usr/src/dahdi-linux-3.2.0/drivers/dahdi/wct4xxp/base.c:3864:15: warning: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 3864 |         alloc = pci_alloc_consistent(wc->dev, numbufs * T4_BASE_SIZE(wc) * 2,
      |               ^
/usr/src/dahdi-linux-3.2.0/drivers/dahdi/wct4xxp/base.c: In function ‘t4_increase_latency’:
/usr/src/dahdi-linux-3.2.0/drivers/dahdi/wct4xxp/base.c:3943:9: error: implicit declaration of function ‘pci_free_consistent’ [-Werror=implicit-function-declaration]
 3943 |         pci_free_consistent(wc->dev, T4_BASE_SIZE(wc) * oldbufs * 2,
      |         ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-6.1.0-10-common/scripts/Makefile.build:255: /usr/src/dahdi-linux-3.2.0/drivers/dahdi/wct4xxp/base.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.1.0-10-common/scripts/Makefile.build:505: /usr/src/dahdi-linux-3.2.0/drivers/dahdi/wct4xxp] Error 2
make[1]: *** [/usr/src/linux-headers-6.1.0-10-common/Makefile:2037: /usr/src/dahdi-linux-3.2.0/drivers/dahdi] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.1.0-10-amd64'
make: *** [Makefile:74: modules] Error 2

@InterLinked1
Copy link
Contributor

Hello all, I have a fresh build of Debian 12 (amd64) and am also seeing this issue. Looks like dahdi support may now be broken on the updated kernel used by popular distros?

root@kabelsalat:/usr/src/dahdi-linux-3.2.0# make
make -C drivers/dahdi/firmware firmware-loaders
make[1]: Entering directory '/usr/src/dahdi-linux-3.2.0/drivers/dahdi/firmware'
make[1]: Leaving directory '/usr/src/dahdi-linux-3.2.0/drivers/dahdi/firmware'
make -C /lib/modules/6.1.0-10-amd64/build M=/usr/src/dahdi-linux-3.2.0/drivers/dahdi DAHDI_INCLUDE=/usr/src/dahdi-linux-3.2.0/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
make[1]: Entering directory '/usr/src/linux-headers-6.1.0-10-amd64'
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_adpcm_chan.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_channel.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_stats.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_conf_bridge.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_debug.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_events.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_interrupts.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_memory.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_miscellaneous.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_mixer.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_phasing_tsst.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_playout_buf.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_remote_debug.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_tlv.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_tone_detection.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_tsi_cnct.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_tsst.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/apilib/bt/octapi_bt0.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/apilib/largmath/octapi_largmath.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/apilib/llman/octapi_llman.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/oct612x-user.o
  LD [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/oct612x/oct612x.o
  CC [M]  /usr/src/dahdi-linux-3.2.0/drivers/dahdi/wct4xxp/base.o
/usr/src/dahdi-linux-3.2.0/drivers/dahdi/wct4xxp/base.c: In function ‘t4_allocate_buffers’:
/usr/src/dahdi-linux-3.2.0/drivers/dahdi/wct4xxp/base.c:3864:17: error: implicit declaration of function ‘pci_alloc_consistent’ [-Werror=implicit-function-declaration]
 3864 |         alloc = pci_alloc_consistent(wc->dev, numbufs * T4_BASE_SIZE(wc) * 2,
      |                 ^~~~~~~~~~~~~~~~~~~~
/usr/src/dahdi-linux-3.2.0/drivers/dahdi/wct4xxp/base.c:3864:15: warning: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 3864 |         alloc = pci_alloc_consistent(wc->dev, numbufs * T4_BASE_SIZE(wc) * 2,
      |               ^
/usr/src/dahdi-linux-3.2.0/drivers/dahdi/wct4xxp/base.c: In function ‘t4_increase_latency’:
/usr/src/dahdi-linux-3.2.0/drivers/dahdi/wct4xxp/base.c:3943:9: error: implicit declaration of function ‘pci_free_consistent’ [-Werror=implicit-function-declaration]
 3943 |         pci_free_consistent(wc->dev, T4_BASE_SIZE(wc) * oldbufs * 2,
      |         ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-6.1.0-10-common/scripts/Makefile.build:255: /usr/src/dahdi-linux-3.2.0/drivers/dahdi/wct4xxp/base.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.1.0-10-common/scripts/Makefile.build:505: /usr/src/dahdi-linux-3.2.0/drivers/dahdi/wct4xxp] Error 2
make[1]: *** [/usr/src/linux-headers-6.1.0-10-common/Makefile:2037: /usr/src/dahdi-linux-3.2.0/drivers/dahdi] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.1.0-10-amd64'
make: *** [Makefile:74: modules] Error 2

Hi Mike! If you use PhreakScript to install DAHDI, that should patch this (known issue)

@InterLinked1
Copy link
Contributor

@push143smart I think this issue was resolved by merge of ee13cb2 and can be closed.

@gui-lux
Copy link

gui-lux commented Dec 5, 2023

Hi everyone,

I need to build v3.2.0 (and not newer) on debian 12.
Unfortunately, I'm having the exact same issue described above by famicoman.

I gave a try to phreakscript which works really great but the --no-rc option was not taken and I ended up with 3.3.0-rc version.
Can anyone please help ?
Thx in advance

EDIT : IDK if it helps, I'm running kernel '6.1.0-13-amd64'

@InterLinked1
Copy link
Contributor

Hi everyone,

I need to build v3.2.0 (and not newer) on debian 12. Unfortunately, I'm having the exact same issue described above by famicoman.

I gave a try to phreakscript which works really great but the --no-rc option was not taken and I ended up with 3.3.0-rc version. Can anyone please help ? Thx in advance

EDIT : IDK if it helps, I'm running kernel '6.1.0-13-amd64'

--no-rc in PhreakScript only applies to Asterisk releases, not DAHDI releases.

Is there a reason you want 3.2.0 over 3.3.0? I know it's "technically" an RC, but it's really the only suitable version for production. It should have been GA released a LONG time ago, Sangoma has just not done it yet because they're very slow.

@gui-lux
Copy link

gui-lux commented Dec 5, 2023

Yes, there is a reason.
I purchased an usb/fxo adapter from amfeltec. The driver they're showing on their product page does not build with kernels higher than 5.3. So I got in touch with their support team who provided me an updated driver. Unfortunately, I couldn't get a successful driver build and the support team recently answered that this driver is not supported with dahdi > 3.2.
BTW, thank you for this precision about PhreakScript use.

@InterLinked1
Copy link
Contributor

Yes, there is a reason. I purchased an usb/fxo adapter from amfeltec. The driver they're showing on their product page does not build with kernels higher than 5.3.

In general, I think newer versions of DAHDI can be used just fine on older kernels (though the reverse does not hold).

So I got in touch with their support team who provided me an updated driver. Unfortunately, I couldn't get a successful driver build

What are the exact issues that you encounter? Can you post a log? Do you mind sharing the driver to reproduce this issue?

and the support team recently answered that this driver is not supported with dahdi > 3.2. BTW, thank you for this precision about PhreakScript use.

There is really no difference between 3.2 and 3.3 apart from some long overdue compilation fixes being included. It's really a rather small update. I'm not sure I'm fully convinced that they know what they're talking about.

@gui-lux
Copy link

gui-lux commented Dec 6, 2023

Thx for your reply.

DAHDI can be used just fine on older kernels

I'm not sure I want to try this : )

the exact issues

When building their driver on top of DAHDI v3.3.0, it returns errors and does not proceed. I had a successful build one or two months ago with version 3.2. I don't know why I'm just not able to reproduce this.

Can you post a log? Do you mind sharing the driver to reproduce this issue?

Yes I can share (logs and driver) but I would prefer to make it not public if it's okay.

I'm not sure I'm fully convinced that they know what they're talking about.

Absolutely, I'm not a developer, but to me, these build errors look ridiculous, just some basic syntax stuff. I'm pretty sure as well that would be worth fixing on their side but their last email didn't sound like that.
These guys did a driver update just for me. It's just me feeling bad by asking a second update, and I thought I would get DAHDI v3.2 working without bothering you.

@InterLinked1
Copy link
Contributor

Thx for your reply.

DAHDI can be used just fine on older kernels

I'm not sure I want to try this : )

I wouldn't either, as current Asterisk will run into issues with older systems.

the exact issues

When building their driver on top of DAHDI v3.3.0, it returns errors and does not proceed. I had a successful build one or two months ago with version 3.2. I don't know why I'm just not able to reproduce this.

Can you post a log? Do you mind sharing the driver to reproduce this issue?

Yes I can share (logs and driver) but I would prefer to make it not public if it's okay.

Can you share the logs at least, if properly sanitizer? Keeping them public ensures anyone can look at them and work on the issue.

I'm not sure I'm fully convinced that they know what they're talking about.

Absolutely, I'm not a developer, but to me, these build errors look ridiculous, just some basic syntax stuff. I'm pretty sure as well that would be worth fixing on their side but their last email didn't sound like that. These guys did a driver update just for me. It's just me feeling bad by asking a second update, and I thought I would get DAHDI v3.2 working without bothering you.

I wouldn't feel bad, you paid for a product presumably, and I think it's reasonable as a customer to expect that it build on a current system.

If they are not willing to do their due diligence, then posting the driver here may at least allow one of us to patch whatever issue you are seeing.

If you really do want to get DAHDI v 3.2.0 working, you can try one of two things:

  • Edit PhreakScript locally to pull 3.2.0 instead of 3.3.0. There is a definition near the top of the script. However, this will probably fail as 3.2.0 is full of build errors without additional patches that have since been removed. So:
  • You may want to use the revision prior to this one: 0497566df8d406c9ceb2db61dea3ac422e3ba48f

@gui-lux
Copy link

gui-lux commented Dec 13, 2023

Hi,
I tried your suggestions.

the revision prior to this one: 0497566df8d406c9ceb2db61dea3ac422e3ba48f

I tried the version just before 0497566df8d406c9ceb2db61dea3ac422e3ba48f and another prior one that has the 'verified' label. It's always looking for 'dahdi-current' which means v3.3.0 now. I couldn't find any 'dahdi version' variable in these versions. Maybe me missing something anyway.

I wouldn't feel bad, you paid for a product presumably, and I think it's reasonable as a customer to expect that it build on a current system.
If they are not willing to do their due diligence, then posting the driver here may at least allow one of us to patch whatever issue you are seeing.

Agreed 100%.

So, here is a build log against DAHDI v3.3.0-rc1 (same output with v3.3.0) :

root@zero-kei:/home/user/amfeltec_usb_4.0.6# make DAHDI_DIR=/usr/src/dahdi-linux-3.3.0-rc1/

 +----------------- Checking Dahdi Sources -----------------+

   Compiling with DAHDI Support!
   Dahdi Dir: /usr/src/dahdi-linux-3.3.0-rc1/


 +----------------------------------------------------------+

make KBUILD_VERBOSE=0 -C /lib/modules/6.1.0-13-amd64/build M=/home/user/amfeltec_usb_4.0.6/driver EXTRA_FLAGS="-D__DAHDI__ -I/usr/src/dahdi-linux-3.3.0-rc1//drivers -I/usr/src/dahdi-linux-3.3.0-rc1//include -DDAHDI_VERSION=-1 -I/lib/modules/6.1.0-13-amd64/build/include/linux -I/home/user/amfeltec_usb_4.0.6/include  -I
/home/user/amfeltec_usb_4.0.6/firmware -I/home/user/amfeltec_usb_4.0.6/include/os -I/usr/src/dahdi-linux-3.3.0-rc1//include/ -O -w -O" modules
make[1] : on entre dans le répertoire « /usr/src/linux-headers-6.1.0-13-amd64 »
  CC [M]  /home/user/amfeltec_usb_4.0.6/driver/amf_main.o
  CC [M]  /home/user/amfeltec_usb_4.0.6/driver/amf_usb_driver.o
  CC [M]  /home/user/amfeltec_usb_4.0.6/driver/amf_usb_core.o
  CC [M]  /home/user/amfeltec_usb_4.0.6/driver/amf_usb_cpu.o
  CC [M]  /home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.o
/home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.c: In function ‘amf_usb_dahdi_register’:
/home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.c:335:19: error: ‘struct dahdi_span’ has no member named ‘manufacturer’
  335 |         ausb->span.manufacturer = "Amfeltec";
      |                   ^
In file included from /usr/src/linux-headers-6.1.0-13-common/include/linux/swait.h:8,
                 from /usr/src/linux-headers-6.1.0-13-common/include/linux/completion.h:12,
                 from /usr/src/linux-headers-6.1.0-13-common/include/linux/mm_types.h:14,
                 from /usr/src/linux-headers-6.1.0-13-common/include/linux/buildid.h:5,
                 from /usr/src/linux-headers-6.1.0-13-common/include/linux/module.h:14,
                 from /home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.c:28:
/home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.c:375:40: error: ‘struct dahdi_span’ has no member named ‘maintq’
  375 |         init_waitqueue_head(&ausb->span.maintq);
      |                                        ^
/usr/src/linux-headers-6.1.0-13-common/include/linux/wait.h:70:40: note: in definition of macro ‘init_waitqueue_head’
   70 |                 __init_waitqueue_head((wq_head), #wq_head, &__key);             \
      |                                        ^~~~~~~
/home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.c:378:19: error: ‘struct dahdi_span’ has no member named ‘pvt’
  378 |         ausb->span.pvt = ausb;
      |                   ^
/home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.c: In function ‘amf_usb_dahdi_register_master’:
/home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.c:451:26: error: ‘struct dahdi_span’ has no member named ‘manufacturer’
  451 |         ausb->span_master.manufacturer  = "Amfeltec";
      |                          ^
/home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.c:468:47: error: ‘struct dahdi_span’ has no member named ‘maintq’
  468 |         init_waitqueue_head(&ausb->span_master.maintq);
      |                                               ^
/usr/src/linux-headers-6.1.0-13-common/include/linux/wait.h:70:40: note: in definition of macro ‘init_waitqueue_head’
   70 |                 __init_waitqueue_head((wq_head), #wq_head, &__key);             \
      |                                        ^~~~~~~
/home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.c:471:26: error: ‘struct dahdi_span’ has no member named ‘pvt’
  471 |         ausb->span_master.pvt = ausb;
      |                          ^
make[2]: *** [/usr/src/linux-headers-6.1.0-13-common/scripts/Makefile.build:255 : /home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.o] Erreur 1
make[2]: *** [/usr/src/linux-headers-6.1.0-13-common/Makefile:2039 : /home/user/amfeltec_usb_4.0.6/driver] Erreur 2
make[1] : on quitte le répertoire « /usr/src/linux-headers-6.1.0-13-amd64 »
make: *** [Makefile:72 : compile_amf_mod] Erreur 2

Any thoughts ? Likely something minor ?

Thx for your support

@InterLinked1
Copy link
Contributor

Hi, I tried your suggestions.

the revision prior to this one: 0497566df8d406c9ceb2db61dea3ac422e3ba48f

I tried the version just before 0497566df8d406c9ceb2db61dea3ac422e3ba48f and another prior one that has the 'verified' label. It's always looking for 'dahdi-current' which means v3.3.0 now. I couldn't find any 'dahdi version' variable in these versions. Maybe me missing something anyway.

Currently, it's at line 200 of the script.

I wouldn't feel bad, you paid for a product presumably, and I think it's reasonable as a customer to expect that it build on a current system.
If they are not willing to do their due diligence, then posting the driver here may at least allow one of us to patch whatever issue you are seeing.

Agreed 100%.

So, here is a build log against DAHDI v3.3.0-rc1 (same output with v3.3.0) :

root@zero-kei:/home/user/amfeltec_usb_4.0.6# make DAHDI_DIR=/usr/src/dahdi-linux-3.3.0-rc1/

 +----------------- Checking Dahdi Sources -----------------+

   Compiling with DAHDI Support!
   Dahdi Dir: /usr/src/dahdi-linux-3.3.0-rc1/


 +----------------------------------------------------------+

make KBUILD_VERBOSE=0 -C /lib/modules/6.1.0-13-amd64/build M=/home/user/amfeltec_usb_4.0.6/driver EXTRA_FLAGS="-D__DAHDI__ -I/usr/src/dahdi-linux-3.3.0-rc1//drivers -I/usr/src/dahdi-linux-3.3.0-rc1//include -DDAHDI_VERSION=-1 -I/lib/modules/6.1.0-13-amd64/build/include/linux -I/home/user/amfeltec_usb_4.0.6/include  -I
/home/user/amfeltec_usb_4.0.6/firmware -I/home/user/amfeltec_usb_4.0.6/include/os -I/usr/src/dahdi-linux-3.3.0-rc1//include/ -O -w -O" modules
make[1] : on entre dans le répertoire « /usr/src/linux-headers-6.1.0-13-amd64 »
  CC [M]  /home/user/amfeltec_usb_4.0.6/driver/amf_main.o
  CC [M]  /home/user/amfeltec_usb_4.0.6/driver/amf_usb_driver.o
  CC [M]  /home/user/amfeltec_usb_4.0.6/driver/amf_usb_core.o
  CC [M]  /home/user/amfeltec_usb_4.0.6/driver/amf_usb_cpu.o
  CC [M]  /home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.o
/home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.c: In function ‘amf_usb_dahdi_register’:
/home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.c:335:19: error: ‘struct dahdi_span’ has no member named ‘manufacturer’
  335 |         ausb->span.manufacturer = "Amfeltec";
      |                   ^
In file included from /usr/src/linux-headers-6.1.0-13-common/include/linux/swait.h:8,
                 from /usr/src/linux-headers-6.1.0-13-common/include/linux/completion.h:12,
                 from /usr/src/linux-headers-6.1.0-13-common/include/linux/mm_types.h:14,
                 from /usr/src/linux-headers-6.1.0-13-common/include/linux/buildid.h:5,
                 from /usr/src/linux-headers-6.1.0-13-common/include/linux/module.h:14,
                 from /home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.c:28:
/home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.c:375:40: error: ‘struct dahdi_span’ has no member named ‘maintq’
  375 |         init_waitqueue_head(&ausb->span.maintq);
      |                                        ^
/usr/src/linux-headers-6.1.0-13-common/include/linux/wait.h:70:40: note: in definition of macro ‘init_waitqueue_head’
   70 |                 __init_waitqueue_head((wq_head), #wq_head, &__key);             \
      |                                        ^~~~~~~
/home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.c:378:19: error: ‘struct dahdi_span’ has no member named ‘pvt’
  378 |         ausb->span.pvt = ausb;
      |                   ^
/home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.c: In function ‘amf_usb_dahdi_register_master’:
/home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.c:451:26: error: ‘struct dahdi_span’ has no member named ‘manufacturer’
  451 |         ausb->span_master.manufacturer  = "Amfeltec";
      |                          ^
/home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.c:468:47: error: ‘struct dahdi_span’ has no member named ‘maintq’
  468 |         init_waitqueue_head(&ausb->span_master.maintq);
      |                                               ^
/usr/src/linux-headers-6.1.0-13-common/include/linux/wait.h:70:40: note: in definition of macro ‘init_waitqueue_head’
   70 |                 __init_waitqueue_head((wq_head), #wq_head, &__key);             \
      |                                        ^~~~~~~
/home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.c:471:26: error: ‘struct dahdi_span’ has no member named ‘pvt’
  471 |         ausb->span_master.pvt = ausb;
      |                          ^
make[2]: *** [/usr/src/linux-headers-6.1.0-13-common/scripts/Makefile.build:255 : /home/user/amfeltec_usb_4.0.6/driver/amf_usb_dahdi.o] Erreur 1
make[2]: *** [/usr/src/linux-headers-6.1.0-13-common/Makefile:2039 : /home/user/amfeltec_usb_4.0.6/driver] Erreur 2
make[1] : on quitte le répertoire « /usr/src/linux-headers-6.1.0-13-amd64 »
make: *** [Makefile:72 : compile_amf_mod] Erreur 2

Any thoughts ? Likely something minor ?

It seems to think these all belong to the dahdi_span struct, but that struct doesn't have such fields in the current source, and likely didn't in the past either, since I know that hasn't changed recently.

It's likely something small missing/changed somewhere which is causing it to output an error like that. But I'd need to see the actual driver source to get further insight on that.

You could try compiling with 3.2.0 with the change above, but I'd honestly be very surprised if that worked.

@gui-lux
Copy link

gui-lux commented Dec 14, 2023

Hi,
I edited the script by changing 'dahdi-linux-current' with 'dahdi-linux-3.2.0', same for dahdi tools and it worked for the dahdi part, it crashed later when building asterisk.
However, the driver build did work and now I'm watching latest phreakscript doing the rest of the job. Hoping for the best : )

Thx again for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants