Bug 253386 - misc/dahdi-kmod[26]: Fails to build on 13.0-BETA1: dahdi-base.c:9432:26: error: use of undeclared identifier 'thread_dtor'
Summary: misc/dahdi-kmod[26]: Fails to build on 13.0-BETA1: dahdi-base.c:9432:26: erro...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2021-02-09 19:27 UTC by dgilbert
Modified: 2022-05-19 23:04 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (fjoe)
koobs: merge-quarterly?


Attachments
misc/dahdi-kmod build log (19.07 KB, text/plain)
2021-02-09 19:27 UTC, dgilbert
no flags Details
misc/dahdi-kmod26 build log. (22.65 KB, text/plain)
2021-02-09 19:28 UTC, dgilbert
no flags Details
GpakApi.c.patch (329 bytes, patch)
2021-03-15 06:38 UTC, DYM
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dgilbert 2021-02-09 19:27:48 UTC
Created attachment 222307 [details]
misc/dahdi-kmod build log

Implicit function definition EVENTHANDLER_REGISTER ... which, since this builds under 12.2(and 11.4) means that this is a new thing.

NB: I'm including my patch from 
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252907
... but this is only fixing the compiler's reading of tabs and spaces, so while it's required to compile under 13.0, it's not really relevant to this bug otherwise.
Comment 1 dgilbert 2021-02-09 19:28:43 UTC
Created attachment 222308 [details]
misc/dahdi-kmod26 build log.

Added misc/dahdi-kmod26 build log for completeness.  Largely the same.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2021-02-10 02:56:47 UTC
@Reporter Can you unbundle the bug 252907 changes from the patch here unless its required please, in which case, set a Depends On: instead in this issue
Comment 3 dgilbert 2021-02-10 04:17:21 UTC
(In reply to Kubilay Kocak from comment #2)

I don't understand "unbundle"  I just mentioned it because any compile of dahdi will fail past 12.2 without the patch.  The issue is (briefly) that the source files use a TAB of 4 and the compiler options (post 12.2) complain about the indentation (which assumes TAB of 8) not matching the braces.

It has no effect on the correctness of the code.  It is not a code patch --- it simply removes the -Wall because the -Wall includes this check.  The code is the same code that compile just fine without the patch in 12.1.

However... under 13.0, the problem is some new change unrelated to that patch --- but any compiling of the code requires -Wall to be struck.
Comment 4 DYM 2021-03-15 06:38:06 UTC
Created attachment 223280 [details]
GpakApi.c.patch

# uname -a
FreeBSD test 12.2-RELEASE-p4 FreeBSD 12.2-RELEASE-p4 r369447 GENERIC  amd64

Make dahdi-kmod fail on FreeBSD 12.2 from ports:
==========================================================
/usr/ports/misc/dahdi-kmod/work/dahdi-freebsd-complete-2.4.0-rc5+2.4.0-rc1/freebsd/freebsd/dahdi_voicebus/../../drivers/dahdi/voicebus/GpakApi.c:1563:2: error: misleading indentation;
      statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
        for (i = 0; i < MemoryLength_Word16; i++)
        ^
/usr/ports/misc/dahdi-kmod/work/dahdi-freebsd-complete-2.4.0-rc5+2.4.0-rc1/freebsd/freebsd/dahdi_voicebus/../../drivers/dahdi/voicebus/GpakApi.c:1560:5: note: previous statement is here
    if (DspStatus != 0)
    ^
1 error generated.
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/misc/dahdi-kmod/work/dahdi-freebsd-complete-2.4.0-rc5+2.4.0-rc1/freebsd/freebsd/dahdi_voicebus
*** Error code 1
==========================================================

On file misc/dahdi-kmod/work/dahdi-freebsd-complete-2.4.0-rc5+2.4.0-rc1/freebsd/drivers/dahdi/voicebus/GpakApi.c
change tabulation (hex code 09) to space (hex code 20) resolve problem.

 diff GpakApi.c.bad GpakApi.c.good 
1563c1563
<       for (i = 0; i < MemoryLength_Word16; i++)
---
>  for (i = 0; i < MemoryLength_Word16; i++)

It not a code correction, it only remove the "tab read error" with a compiler and allow make normal.
Comment 5 DYM 2021-05-29 23:37:54 UTC
Hi!

Why did the package become broken?
Is it really impossible to make a single syntax correction, not related and not affecting the work logic, instead of mentioning the package as broken?

It easy (dahdi-kmod2.6):
change at the beginning of 1563 lines tabulation (hex code 09) to space (hex code 20) in file /usr/ports/misc/dahdi-kmod26/work/dahdi-freebsd-2.6.1-r10747/drivers/dahdi/voicebus/GpakApi.c

Similarly for dahdi-kmod2.4:
change at the beginning of 1563 lines tabulation (hex code 09) to space (hex code 20) in file /usr/ports/misc/dahdi-kmod/work/dahdi-freebsd-complete-2.4.0-rc5+2.4.0-rc1/freebsd/drivers/dahdi/voicebus/GpakApi.c
Comment 6 Joan Touzet 2021-06-04 01:54:39 UTC
Patches for this and bug 252907 has been submitted upstream to Max Khon. If you just need to get going, remove the BROKEN line in the Makefile and apply https://patch-diff.githubusercontent.com/raw/mkhon/dahdi-freebsd/pull/1.patch .
Comment 7 Rene Ladan freebsd_committer freebsd_triage 2021-12-06 12:28:03 UTC
Maintainer reset.
Comment 8 John Baldwin freebsd_committer freebsd_triage 2022-05-19 23:04:00 UTC
A fix for the original issue from the subject line was committed in November 2021.