|Summary:||misc/dahdi-kmod: Fails to build on 13.0-BETA1: dahdi-base.c:9432:26: error: use of undeclared identifier 'thread_dtor'|
|Product:||Ports & Packages||Reporter:||dgilbert|
|Component:||Individual Port(s)||Assignee:||Max Khon <fjoe>|
|Severity:||Affects Some People||CC:||dym, freebsd|
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 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: 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 .