Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 617876 - net-misc/dahdi-2.11.1 : /.../dahdi-base.c:5954:7: error: implicit declaration of function ‘signal_pending’ [-Werror=implicit-function-declaration]
Summary: net-misc/dahdi-2.11.1 : /.../dahdi-base.c:5954:7: error: implicit declaration...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tony Vroon
URL:
Whiteboard:
Keywords:
: 638380 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-05-08 17:43 UTC by Toralf Förster
Modified: 2018-06-08 12:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,5.17 KB, text/plain)
2017-05-08 17:43 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,97.73 KB, text/plain)
2017-05-08 17:43 UTC, Toralf Förster
Details
environment (environment,132.79 KB, text/plain)
2017-05-08 17:43 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,21.86 KB, application/x-bzip)
2017-05-08 17:43 UTC, Toralf Förster
Details
net-misc:dahdi-2.11.1:20170508-131930.log (net-misc:dahdi-2.11.1:20170508-131930.log,8.01 KB, text/plain)
2017-05-08 17:43 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,31.79 KB, application/x-bzip)
2017-05-08 17:43 UTC, Toralf Förster
Details
Another patch to avoid building OPVXA1200 - as it fails with a compilation error (0003-do-not-build-OPVXA1200-as-it-is-failing-compilation.patch,837 bytes, patch)
2017-08-20 04:01 UTC, Joe M
Details | Diff
signal pending patch (0001-signal_pending-is-now-in-linux-sched-signal.h-includ.patch,4.39 KB, patch)
2017-11-06 14:06 UTC, Jaco Kroon
Details | Diff
atomic read patch (0002-atomic_read-refcount_read.patch,3.32 KB, patch)
2017-11-06 14:07 UTC, Jaco Kroon
Details | Diff
dev attrs patch (dev_attrs_groups-v3.patch,11.35 KB, patch)
2017-11-06 14:07 UTC, Jaco Kroon
Details | Diff
opxval200 compile fix (opvxa1200-nmi.diff,507 bytes, patch)
2017-11-06 19:02 UTC, Jaco Kroon
Details | Diff
xpp-command-timer-core.diff (07-xpp-command-timer-core.diff,2.85 KB, patch)
2018-06-08 12:02 UTC, Jaco Kroon
Details | Diff
09-init-timer.diff (09-init_timer.diff,9.62 KB, patch)
2018-06-08 12:03 UTC, Jaco Kroon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2017-05-08 17:43:07 UTC
/var/tmp/portage/net-misc/dahdi-2.11.1/work/dahdi-linux-2.11.1/drivers/dahdi/dahdi-base.c: In function ‘dahdi_ioctl_iomux’:
/var/tmp/portage/net-misc/dahdi-2.11.1/work/dahdi-linux-2.11.1/drivers/dahdi/dahdi-base.c:5954:7: error: implicit declaration of function ‘signal_pending’ [-Werror=implicit-function-declaration]
   if (signal_pending(current)) {
       ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 13.0-systemd-abi32+64_20170506-112642

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-6.3.0 *

Available Python interpreters, in order of preference:
  [1]   python3.4
  [2]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby21 (with Rubygems)
  [2]   ruby22 (with Rubygems) *
Comment 1 Toralf Förster gentoo-dev 2017-05-08 17:43:10 UTC
Created attachment 471998 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-05-08 17:43:13 UTC
Created attachment 472000 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2017-05-08 17:43:16 UTC
Created attachment 472002 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2017-05-08 17:43:19 UTC
Created attachment 472004 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2017-05-08 17:43:22 UTC
Created attachment 472006 [details]
net-misc:dahdi-2.11.1:20170508-131930.log
Comment 6 Toralf Förster gentoo-dev 2017-05-08 17:43:26 UTC
Created attachment 472008 [details]
temp.tbz2
Comment 7 Joe M 2017-08-20 03:27:44 UTC
the patches in this bug report helped fix the issue:

https://issues.asterisk.org/jira/browse/DAHLIN-354
Comment 8 Joe M 2017-08-20 04:01:37 UTC
Created attachment 489714 [details, diff]
Another patch to avoid building OPVXA1200 - as it fails with a compilation error

Another patch to avoid building OPVXA1200 - as it fails with a compilation error
Comment 9 Jaco Kroon 2017-11-06 14:05:22 UTC
Hi,

The don't build patch is inappropriate.  We should rather fix the includes.

Further problems building against 4.13.10 kernel:

/var/tmp/portage/net-misc/dahdi-2.11.1/work/dahdi-linux-2.11.1/drivers/dahdi/dahdi-sysfs.c:273:2: error: unknown field 'dev_attrs' specified in initializer
  .dev_attrs = span_dev_attrs,

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879043 and https://issues.asterisk.org/jira/browse/DAHLIN-356

I can confirm that with BOTH patches at the link Joe M supplied in comment 7, as well as the -v3 patch at the 356 DAHDI bug report dahdi also fails for me on opvxa1200.  This is due to touch_softlockup_watchdog declaration having moved from linux/sched.h to linux/nmi.h - I'm not sure which kernel version exactly yet.

This leaves:

dahd
i-linux-2.11.1/drivers/dahdi/xpp/xbus-pcm.c
In file included from ./include/linux/kobject.h:21:0,
                 from ./include/linux/module.h:17,
                 from /var/tmp/portage/net-misc/dahdi-2.11.1/work/dahdi-linux-2.11.1/drivers/dahdi/xpp/xbus-sysfs.c:24:
/var/tmp/portage/net-misc/dahdi-2.11.1/work/dahdi-linux-2.11.1/drivers/dahdi/xpp/xbus-sysfs.c:801:23: error: 'hwid_show' undeclared here (not in a function)
 static DEVICE_ATTR_RO(hwid);
                       ^
./include/linux/sysfs.h:116:10: note: in definition of macro '__ATTR_RO'
  .show = _name##_show,      \
          ^
/var/tmp/portage/net-misc/dahdi-2.11.1/work/dahdi-linux-2.11.1/drivers/dahdi/xpp/xbus-sysfs.c:801:8  note: in expansion of macro 'DEVICE_ATTR_RO'
 static DEVICE_ATTR_RO(hwid);

I can't find any reference to a hwid attribute other than this, which is introduced by dev_attrs_groups-v3.patch - any objections to simply mangling the patch?

Sorry for only picking up on this report now - been using 4.0.9 kernel until very recently due to being the least unstable version in 4.X branch.  I'll attach individual patches here in a bit.  Just need to find which kernel version the nmi.h changed.
Comment 10 Jaco Kroon 2017-11-06 14:06:15 UTC
Created attachment 502798 [details, diff]
signal pending patch
Comment 11 Jaco Kroon 2017-11-06 14:07:07 UTC
Created attachment 502804 [details, diff]
atomic read patch
Comment 12 Jaco Kroon 2017-11-06 14:07:40 UTC
Created attachment 502806 [details, diff]
dev attrs patch
Comment 13 Jaco Kroon 2017-11-06 19:02:53 UTC
Created attachment 502848 [details, diff]
opxval200 compile fix

# ebuild /usr/portage/net-misc/dahdi/dahdi-2.11.1.ebuild clean unpack
...
# cd /var/tmp/portage/net-misc/dahdi-2.11.1/work/dahdi-patchset/
# cp ~/0001-signal_pending-is-now-in-linux-sched-signal.h-includ.patch 05-linux-sched-signal.diff
# cp ~/0002-atomic_read-refcount_read.patch 06-linux-refcount.diff
# cp ~/dev_attrs_groups-v3.patch 07-dev-attrs.diff
# mv 98-non-digium-hardware-and-oslec.diff 97-non-digium-hardware-and-oslec.diff                    # mv 99-irqf-disabled.diff 98-irqf-disabled.diff
# cp ~/opvxa1200-nmi.diff 99-opvxa1200-nmi.diff
# ebuild /usr/portage/net-misc/dahdi/dahdi-2.11.1.ebuild compile
...
>>> Source compiled.

DISCLAIMER: I don't have all the hardware to test all of the various modules.

It does compile and it does merge with the additional four patches.  Three of the four patches comes from the Digium bug tracker (with a minor modification).  The fourth is a trivial patch to accomodate commit d151b27d3f86589308cd8c891fdfd2db5f8e80d6 in kernel 4.11 as submitted by Ingo Molnar and acked by Linus.  The commit message hints that linux/nmi.h may be renamed again at some point in the future, so when anyone picks that up, please contact me and I'll adjust the patch accordingly.
Comment 14 Toralf Förster gentoo-dev 2018-04-11 17:14:59 UTC
*** Bug 638380 has been marked as a duplicate of this bug. ***
Comment 15 Jaco Kroon 2018-06-08 12:02:47 UTC
Created attachment 535246 [details, diff]
xpp-command-timer-core.diff
Comment 16 Jaco Kroon 2018-06-08 12:03:35 UTC
Created attachment 535248 [details, diff]
09-init-timer.diff

Additional patches required for dahdi 2.11.1 to compile against 4.15+.
Comment 17 Larry the Git Cow gentoo-dev 2018-06-08 12:36:08 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=544f094826762efc335dcfcf8392e07b0883894d

commit 544f094826762efc335dcfcf8392e07b0883894d
Author:     Tony Vroon <chainsaw@gentoo.org>
AuthorDate: 2018-06-08 12:35:55 +0000
Commit:     Tony Vroon <chainsaw@gentoo.org>
CommitDate: 2018-06-08 12:36:16 +0000

    net-misc/dahdi: Address build failures on newer kernels
    
    Reported by Toralf Förster; patches scavenged & rebased by Jaco Kroon.
    
    Closes: https://bugs.gentoo.org/617876
    Package-Manager: Portage-2.3.40, Repoman-2.3.9

 net-misc/dahdi/Manifest               |  1 +
 net-misc/dahdi/dahdi-2.11.1-r1.ebuild | 80 +++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+)