Summary: | DAHLIN-00312: Error: conflicting types for 'bool' when compiled after CentOS upgraded to 5.9, kernel 2.6.18-348.el5 | ||||
Reporter: | Vladimir Mikhelson (vmikhelson) | Labels: | |||
Date Opened: | 2013-01-17 22:49:07.000-0600 | Date Closed: | 2013-01-25 16:56:03.000-0600 | ||
Priority: | Major | Regression? | Yes | ||
Status: | Closed/Complete | Components: | Astribank (xpp) | ||
Versions: | 2.6.1 | Frequency of Occurrence | One Time | ||
Related Issues: |
| ||||
Environment: | Centos 5.9 has been just applied, kernel 2.6.18-348.el5, before reboot | Attachments: | ( 0) 0001-xpp-Do-not-typedef-_Bool-on-RHEL-5.2-or-later.patch ( 1) 0001-xpp-Do-not-typedef-bool-on-RHEL-5.2-or-later.patch ( 2) make_output.txt | ||
Description: | Applied CentOS 5.9 yum updates, DAHDI was removed for dependencies, new RPMs were not available, ran MAKE, received the following:
\\ \\ {code}In file included from /usr/src/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp/xpd.h:26, from /usr/src/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp/card_bri.c:29: /usr/src/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp/xdefs.h:152: error: conflicting types for 'bool' include/linux/types.h:36: error: previous declaration of 'bool' was here make[4]: *** [/usr/src/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp/card_bri.o] Error 1 make[3]: *** [/usr/src/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp] Error 2 make[2]: *** [_module_/usr/src/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi] Error 2 make[2]: Leaving directory `/usr/src/kernels/2.6.18-348.el5-i686' make[1]: *** [modules] Error 2 make[1]: Leaving directory `/usr/src/dahdi-linux-complete-2.6.1+2.6.1/linux' make: *** [all] Error 2{code} | ||||
Comments: | By: Vladimir Mikhelson (vmikhelson) 2013-01-17 23:00:51.536-0600 See full MAKE output in attachment. By: Humberto Ratto (hratto) 2013-01-18 11:05:23.935-0600 i have the same issue after update centos to 5.9 , solved after cooment line 152 in /usr/src/dahdi-linux-complete-2.6.1+2.6.1/linux/drivers/dahdi/xpp/xdefs.h By: Vladimir Mikhelson (vmikhelson) 2013-01-18 18:03:37.366-0600 Humberto, Thank you for your comment. It really helps. I found the same thing happened in 2008, and thought it should have been taken care of since then. Solution offered in 2008 was exactly like yours. I still think developers should look into the code and fix this piece for good. -Vladimir By: Shaun Ruffell (sruffell) 2013-01-18 18:44:20.599-0600 Vladimir, It's CentOS backporting definitions. That's why it reoccurred when you updated to 5.9. It shouldn't be long before there is a patch for DAHDI to address it, but it won't be fixed for good unless every definition that could be back ported is grepped for during build, which is not realistic. By: Vladimir Mikhelson (vmikhelson) 2013-01-18 23:10:43.202-0600 Shaun, Thank you for your reply. Do you approve Humberto's solution? Thank you, Vladimir By: Shaun Ruffell (sruffell) 2013-01-19 17:29:41.665-0600 Vladimir, I think something more like https://issues.asterisk.org/jira/secure/attachment/46062/0001-xpp-Do-not-typedef-_Bool-on-RHEL-5.2-or-later.patch (which is attached to this issue) is what's needed. Although I think we'll get Tzafrir's Ack before committing. By: Vladimir Mikhelson (vmikhelson) 2013-01-19 22:40:57.419-0600 Shaun, I failed to apply the patch you provided. Even though I changed the paths from "a/drivers...", "b/drivers..." to "drivers/..." in --- a/drivers/dahdi/xpp/xdefs.h +++ b/drivers/dahdi/xpp/xdefs.h I still received the following: {code}[root@pbx linux]# patch -p0 < 0001-xpp-Do-not-typedef-_Bool-on-RHEL-5.2-or-later.patch patching file drivers/dahdi/xpp/xdefs.h Hunk #1 FAILED at 145. 1 out of 1 hunk FAILED -- saving rejects to file drivers/dahdi/xpp/xdefs.h.rej{code} Thank you, Vladimir By: Shaun Ruffell (sruffell) 2013-01-19 23:34:13.764-0600 I just made a minor update to the patch in order to still work with vanilla 2.6.18 (which shouldn't have been affecting you). Perhaps you weren't applying it to the master branch? Here is how I tested it: {noformat} $ git clone git://git.asterisk.org/dahdi/linux dahdi-linux Cloning into 'dahdi-linux'... remote: Counting objects: 6158, done. remote: Compressing objects: 100% (1165/1165), done. remote: Total 6158 (delta 4068), reused 6158 (delta 4068) Receiving objects: 100% (6158/6158), 3.88 MiB | 565 KiB/s, done. Resolving deltas: 100% (4068/4068), done. $ cd dahdi-linux/ $ wget "https://issues.asterisk.org/jira/secure/attachment/46067/0001-xpp-Do-not-typedef-bool-on-RHEL-5.2-or-later.patch" -O - | git am --2013-01-19 23:31:33-- https://issues.asterisk.org/jira/secure/attachment/46067/0001-xpp-Do-not-typedef-bool-on-RHEL-5.2-or-later.patch Resolving issues.asterisk.org... 76.164.171.238, 2001:470:e0d4::ee Connecting to issues.asterisk.org|76.164.171.238|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1473 (1.4K) [text/plain] Saving to: ‘STDOUT’ 100%[===================================================================================================>] 1,473 --.-K/s in 0s 2013-01-19 23:31:33 (4.58 MB/s) - written to stdout [1473/1473] Applying: xpp: Do not typedef bool on RHEL 5.2 or later. {noformat} By: Vladimir Mikhelson (vmikhelson) 2013-01-20 15:53:25.902-0600 Shaun, I was definitely applying your patch to the the version mentioned in the case header, i.e. 2.6.1. Can you please confirm this been the root cause of the failure? My process: {code}1. wget the patch into the linux sub-directory 2. edit the paths to remove "a" and "b" from the paths 2. patch -p0 < 0001-xpp-Do-not-typedef-_Bool-on-RHEL-5.2-or-later.patch{code} Thank you, Vladimir By: Shaun Ruffell (sruffell) 2013-01-20 18:50:11.391-0600 Confirmed. The patch doesn't apply directly against v2.6.1. Also, note that you don't need to perform step 2 above. You can pass -p1 to patch in order to get it to apply if you do not have git installed. For example, when I attempt to apply it against v2.6.1: {noformat} $ wget -q "https://issues.asterisk.org/jira/secure/attachment/46067/0001-xpp-Do-not-typedef-bool-on-RHEL-5.2-or-later.patch" -O - | patch -p1 patching file drivers/dahdi/xpp/xdefs.h Hunk #1 FAILED at 145. 1 out of 1 hunk FAILED -- saving rejects to file drivers/dahdi/xpp/xdefs.h.rej {noformat} So, feel free to make Humberto's change by hand until this makes it into a 2.6.2 (most likely) release. The patch is essentially doing the same thing he mentioned, but works with CentOS 5.9 in addition to vanilla 2.6.18 or CentOS 5.x versions before 5.2. By: S Chernyshevych (wslch) 2013-01-22 08:14:54.540-0600 I simply commented out one line in the file linux/drivers/dahdi/xpp/xdefs.h: # diff linux/drivers/dahdi/xpp/xdefs.h linux_old/drivers/dahdi/xpp/xdefs.h 152c152 < /*typedef int bool; */ --- > typedef int bool; And everything works! Thank you for help! By: Russ Meyerriecks (rmeyerriecks) 2013-01-25 16:55:40.328-0600 This issue is resolved by the latest dahdi-linux release 2.6.2-rc1. You can download a tarball of the release here: http://downloads.asterisk.org/pub/telephony/dahdi-linux/dahdi-linux-2.6.2-rc1.tar.gz Or you can check out the v2.6.2-rc1 tag from git: git clone git.asterisk.org/dahdi/linux dahdi-linux cd dahdi-liux git checkout v2.6.2-rc1 By: george hernandez (hgeorge1234) 2013-03-22 08:45:50.328-0500 Hi all I have centos with 5.9 with kernel 2.6.18-348.3.1.el5 installed and working with Asterisk 1.8.20.1 and dahdi 2.6.1 was testing an upgrade to dahdi 2.6.2 but I get the following error and patch that appears here because it has CC [M] / home/asterg/rpmbuild/BUILD/dahdi-linux-complete-2.6.2 +2.6.2 / linux/drivers/dahdi/opvxa24xx/ec3000.o error: macro "KERNEL_VERSION" requires 3 arguments, but only 1 Given make [4]: *** Error 1 make [3]: *** [/ home/asterg/rpmbuild/BUILD/dahdi-linux-complete-2.6.2 +2.6.2 / linux/drivers/dahdi/opvxa24xx] Error 2 make [2]: *** [_module_/home/asterg/rpmbuild/BUILD/dahdi-linux-complete-2.6.2 +2.6.2 / linux / drivers / dahdi] Error 2 make [2]: Leaving directory `/ usr/src/kernels/2.6.18-348.3.1.el5-i686 ' make [1]: *** [modules] Error 2 make [1]: Leaving directory `/ home/asterg/rpmbuild/BUILD/dahdi-linux-complete-2.6.2 +2.6.2 / linux ' make: *** [all] Error 2 error: State erred neo output of / var/tmp/rpm-tmp.21317 (% build) Errors of Construction RPM: State erred neo output of / var/tmp/rpm-tmp.21317 (% build) By: Shaun Ruffell (sruffell) 2013-03-22 12:00:56.840-0500 George, You'll need to contact OpenVox. The opvx24xx driver is not distributed as part of DAHDI-Linux. By: george hernandez (hgeorge1234) 2013-03-23 15:26:48.445-0500 Ok thank |