ofono fails to compile on gcc-6.3
Hi!
I'm getting this:
CC drivers/rilmodem/network-registration.o
drivers/rilmodem/network-registration.c:40:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
#pragma GCC diagnostic ignored "-Wrestrict"
cc1: error: unrecognized command line option ‘-Wno-format-truncation’
[-Werror]
cc1: all warnings being treated as errors
I commented out #pragma, and this allows compilation to continue... until I hit same issue in drivers/rilmodem/call-forwarding.c:41:32:
Best regards,
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
hi,
I had the same issue.
For now I couldn't spare time to investigate, but I have commented out all lines with that pragma and worked.
Best regards,
Giacinto
Quoted 28 lines · Pavel Machek
Hi!
I'm getting this:
CC
drivers/rilmodem/network-registration.o
drivers/rilmodem/network-registration.c:40:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
#pragma GCC diagnostic ignored "-Wrestrict"
cc1: error: unrecognized command line option ‘-Wno-format-truncation’
[-Werror]
cc1: all warnings being treated as errorsI commented out #pragma, and this allows compilation to continue... until I hit same issue in
drivers/rilmodem/call-forwarding.c:41:32:Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures)
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
_______________________________________________
ofono mailing list
ofono(a)ofono.org
https://lists.ofono.org/mailman/listinfo/ofono
Trouble compiling ... Re: ofono fails to compile on gcc-6.3
In reply to Pavel MachekHi!
On Tue 2018-09-04 11:44:16, Pavel Machek wrote:
commit f13047bf9334795b89b09fef3a051e7dfbe207f2
Author: Denis Kenzior <[email protected]> Date: Thu Dec 27 18:19:31 2018 -0600
stktest: Fix immediate response test
I have updated to recent ofono -- and the problem is still there:
Quoted 9 lines
CC
drivers/rilmodem/network-registration.o
drivers/rilmodem/network-registration.c:40:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
#pragma GCC diagnostic ignored "-Wrestrict"
cc1: error: unrecognized command line option ‘-Wno-format-truncation’
[-Werror]
cc1: all warnings being treated as errors
Quoted 3 lines
I commented out #pragma, and this allows compilation to continue... until I hit same issue in
drivers/rilmodem/call-forwarding.c:41:32:
Plus there's new one:
CC drivers/rilmodem/sim.o
drivers/rilmodem/sim.c: In function ‘ril_file_io_cb’:
drivers/rilmodem/sim.c:381:49: warning: passing argument 2 of ‘l_util_from_hexstring’ from incompatible pointer type
response = l_util_from_hexstring(hex_response, &len);
^
In file included
from ./ell/ell.h:1:0,
from drivers/rilmodem/sim.c:34:
./ell/util.h:271:16: note: expected ‘size_t *’ but argument is of type ‘long int *’
unsigned char *l_util_from_hexstring(const char *str, size_t
*out_len);
^
drivers/rilmodem/sim.c: At top level:
cc1: warning: unrecognized command line option
"-Wno-format-truncation"
CC drivers/rilmodem/ussd.o
CC drivers/rilmodem/call-forwarding.o
drivers/rilmodem/call-forwarding.c:40:9: warning: unknown option
after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
#pragma GCC diagnostic ignored "-Wrestrict"
^
cc1: warning: unrecognized command line option
"-Wno-format-truncation"
Oh and... the ell thing is a trap, ending in compile error. It would be nice to test for ../ell directory at configure time.
Best regards,
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: Trouble compiling ... Re: ofono fails to compile on gcc-6.3
Hi Pavel,
Quoted 9 lines
Quoted 9 lines
CC
drivers/rilmodem/network-registration.o
drivers/rilmodem/network-registration.c:40:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
#pragma GCC diagnostic ignored "-Wrestrict"
cc1: error: unrecognized command line option ‘-Wno-format-truncation’
[-Werror]
cc1: all warnings being treated as errors
Quoted 3 lines
Quoted 3 lines
I commented out #pragma, and this allows compilation to continue... until I hit same issue in
drivers/rilmodem/call-forwarding.c:41:32:
Yeah, I'm not sure what to do with these. Marcel put in the #pragmas to silence some warnings on GCC 8.x, but it seems GCC 6 doesn't know about these #pragma directives and complains.
Quoted 4 lines
Plus there's new one:
CCdrivers/rilmodem/sim.o
drivers/rilmodem/sim.c: In function ‘ril_file_io_cb’:
Quoted 12 lines
drivers/rilmodem/sim.c:381:49: warning: passing argument 2 of
‘l_util_from_hexstring’ from incompatible pointer type
response = l_util_from_hexstring(hex_response, &len);
^
In file included
from ./ell/ell.h:1:0,
from drivers/rilmodem/sim.c:34:
./ell/util.h:271:16: note: expected ‘size_t *’ but
argument is of type ‘long int *’
unsigned char *l_util_from_hexstring(const char *str, size_t
*out_len);
^Ah darn, thought I got them all but seems I missed one. Should be fixed now.
Regards,
-Denis
Re: Trouble compiling ... Re: ofono fails to compile on gcc-6.3
Hi!
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
CC
drivers/rilmodem/network-registration.o
drivers/rilmodem/network-registration.c:40:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
#pragma GCC diagnostic ignored "-Wrestrict"
cc1: error: unrecognized command line option ‘-Wno-format-truncation’
[-Werror]
cc1: all warnings being treated as errors
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
I commented out #pragma, and this allows compilation to continue... until I hit same issue in
drivers/rilmodem/call-forwarding.c:41:32:Yeah, I'm not sure what to do with these. Marcel put in the #pragmas to silence some warnings on GCC 8.x, but it seems GCC 6 doesn't know about these #pragma directives and complains.
/* Test for GCC > 3.2.0 */
#if __GNUC__ > 3 || \
(__GNUC__ == 3 && (__GNUC_MINOR__ > 2 || \
(__GNUC_MINOR__ == 2 && \
__GNUC_PATCHLEVEL__
> 0))#pragma...
#endif
?
Quoted 16 lines
Quoted 5 lines
Plus there's new one:
CCdrivers/rilmodem/sim.o
drivers/rilmodem/sim.c: In function ‘ril_file_io_cb’:
drivers/rilmodem/sim.c:381:49: warning: passing argument 2 of ‘l_util_from_hexstring’ from incompatible pointer typeQuoted 10 lines
response = l_util_from_hexstring(hex_response, &len); ^ In file included from ./ell/ell.h:1:0, from drivers/rilmodem/sim.c:34: ./ell/util.h:271:16: note: expected ‘size_t *’ but argument is of type ‘long int *’ unsigned char *l_util_from_hexstring(const char *str, size_t *out_len); ^
Quoted 2 lines
Ah darn, thought I got them all but seems I missed one. Should be fixed now.
Ok, good.
Would it be possible to get reasonable error message when ell is not found?
"ell not found, you need to install it, please see README file"? It took me a while to figure out...
Thanks,
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: Trouble compiling ... Re: ofono fails to compile on gcc-6.3
Hi Pavel,
Quoted 24 lines · Pavel Machek
Hi!
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
CC
drivers/rilmodem/network-registration.o
drivers/rilmodem/network-registration.c:40:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
#pragma GCC diagnostic ignored "-Wrestrict"
cc1: error: unrecognized command line option ‘-Wno-format-truncation’
[-Werror]
cc1: all warnings being treated as errorsQuoted 7 lines
Quoted 3 lines
Quoted 3 lines
I commented out #pragma, and this allows compilation to continue... until I hit same issue in
drivers/rilmodem/call-forwarding.c:41:32:Yeah, I'm not sure what to do with these. Marcel put in the #pragmas to silence some warnings on GCC 8.x, but it seems GCC 6 doesn't know about these #pragma directives and complains.
/* Test for GCC > 3.2.0 */
#if __GNUC__ > 3 || \ (__GNUC__ == 3 && (__GNUC_MINOR__ > 2 || \ (__GNUC_MINOR__ == 2 && \ __GNUC_PATCHLEVEL__ > 0))
Quoted 4 lines
#pragma...
#endif?
Marcel is taking care of the build system so I let him comment, but that would be fine with me. Maybe you want to send something like this to the list as a patch?
Of course the real fix is to rewrite rilmodem properly so none of this is needed...
Quoted 6 lines
Would it be possible to get reasonable error message when ell is not found?
"ell not found, you need to install it, please see README file"? It took me a while to figure out...
Sounds like a good idea. Marcel?
Regards,
-Denis
Re: Trouble compiling ... Re: ofono fails to compile on gcc-6.3
Hi Denis,
Quoted 27 lines
Quoted 16 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
CC
drivers/rilmodem/network-registration.o
drivers/rilmodem/network-registration.c:40:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
#pragma GCC diagnostic ignored "-Wrestrict"
cc1: error: unrecognized command line option ‘-Wno-format-truncation’
[-Werror]
cc1: all warnings being treated as errorsQuoted 7 lines
Quoted 3 lines
Quoted 3 lines
I commented out #pragma, and this allows compilation to continue... until I hit same issue in
drivers/rilmodem/call-forwarding.c:41:32:Yeah, I'm not sure what to do with these. Marcel put in the #pragmas to silence some warnings on GCC 8.x, but it seems GCC 6 doesn't know about these #pragma directives and complains.
/* Test for GCC > 3.2.0 */
Quoted 8 lines
#if __GNUC__ > 3 || \ (__GNUC__ == 3 && (__GNUC_MINOR__ > 2 || \ (__GNUC_MINOR__ == 2 && \ __GNUC_PATCHLEVEL__ > 0))#pragma...
#endif
?Marcel is taking care of the build system so I let him comment, but that would be fine with me. Maybe you want to send something like this to the list as a patch?
Quoted 8 lines
Of course the real fix is to rewrite rilmodem properly so none of this is needed...
Quoted 4 lines
Would it be possible to get reasonable error message when ell is not found?
"ell not found, you need to install it, please see README file"? It took me a while to figure out...Sounds like a good idea. Marcel?
we can try to improve the ELL detection especially since we now have internal vs external. However I need to look into this for all projects and not just oFono. So we might start with iwd here.
Regards
Marcel
PATCH 1/1 fix compilation on gcc-6.3
In reply to Pavel Machekgcc-6 fails to compile ofono due to #pragma directives. Limit them to gcc versions where they are needed.
drivers/rilmodem/call-forwarding.c +2 -0
@@ -37,7 +37,9 @@#include <ofono/call-forwarding.h> #include "common.h" +#if __GNUC__ >7 #pragma GCC diagnostic ignored "-Wrestrict" +#endif #include "gril.h"
drivers/rilmodem/network-registration.c +2 -0
@@ -36,7 +36,9 @@#include <ofono/modem.h> #include <ofono/netreg.h> +#if __GNUC__ >7 #pragma GCC diagnostic ignored "-Wrestrict" +#endif #include <gril/gril.h>
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
PATCH 1/1 document getting of ell, point people at useful docs
Currently there's README and HACKING... each describing part of what needs to be done to build ofono.
Provide some cross-links and fix build example.
HACKING +2 -1
@@ -45,7 +45,8 @@ bootstrap-configure since it could export development specific settings. So the normal steps to checkout, build and install such a repository is like this: - Checkout repository + Checkout repositories + # git clone git://git.kernel.org/pub/scm/libs/ell/ell.git # git clone git://git.kernel.org/pub/scm/network/ofono/ofono.git # cd ofono
README +4 -1
@@ -16,11 +16,14 @@ To configure run: ./configure --prefix=/usr --mandir=/usr/share/man \ --sysconfdir=/etc --localstatedir=/var -Configure automatically searches for all required components and packages. +Configure automatically searches for all required components and +packages, except ell, mentioned below. To compile and install run: make && make install +See "HACKING" file for details and step-by-step examples. + Embedded Linux library ======================
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [PATCH] document getting of ell, point people at useful docs
Quoted 4 lines · Pavel Machek
Currently there's README and HACKING... each describing part of what needs to be done to build ofono.
Provide some cross-links and fix build example.
Any news about this and parent patch? I don't see them in
https://git.kernel.org/pub/scm/network/ofono/ofono.git/log/ .
Best regards,
Pavel
Quoted 36 lines
HACKING +2
-1@@ -45,7 +45,8 @@ bootstrap-configure since it could export development specific settings. So the normal steps to checkout, build and install such a repository is like this: - Checkout repository + Checkout repositories + # git clone git://git.kernel.org/pub/scm/libs/ell/ell.git # git clone git://git.kernel.org/pub/scm/network/ofono/ofono.git # cd ofonoREADME +4
-1@@ -16,11 +16,14 @@ To configure run: ./configure --prefix=/usr --mandir=/usr/share/man \ --sysconfdir=/etc --localstatedir=/var -Configure automatically searches for all required components and packages. +Configure automatically searches for all required components and +packages, except ell, mentioned below. To compile and install run: make && make install +See "HACKING" file for details and step-by-step examples. + Embedded Linux library ======================
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [PATCH] document getting of ell, point people at useful docs
In reply to Pavel MachekHi Pavel,
Quoted 14 lines
Currently there's README and HACKING... each describing part of what needs to be done to build ofono.
Provide some cross-links and fix build example.
HACKING +0
-0@@ -45,7 +45,8 @@ bootstrap-configure since it could export development specific settings.So the normal steps to checkout, build and install such a repository is like this:
HACKING bootstrap-configure since it could export development specific settings. · line 51
Quoted 5 lines
HACKING +2
-1- Checkout repository + Checkout repositories + # git clone git://git.kernel.org/pub/scm/libs/ell/ell.git # git clone git://git.kernel.org/pub/scm/network/ofono/ofono.git # cd ofono
so coming to think about it, I would actually make this a pre-step.
Checkout Embedded Linux Library
# git clone ..
Also this documentation is primarily for maintainers and the few that deal with making the tarballs. Which is pretty much just me.
README To configure run: · line 21
Quoted 12 lines
README +2
-1@@ -16,11 +16,14 @@ To configure run: ./configure --prefix=/usr --mandir=/usr/share/man \ --sysconfdir=/etc --localstatedir=/var -Configure automatically searches for all required components and packages. +Configure automatically searches for all required components and +packages, except ell, mentioned below.
Nope. Since ELL is actually optional. It is clearly described just a few lines below.
README To configure run: · line 26
Quoted 5 lines
To compile and install run:
make && make installREADME +2
-0+See "HACKING" file for details and step-by-step examples. +
And that is wrong as well. HACKING is for the developers and people just installing oFono should not look at that. In addition HACKING is not included in the tarballs (while README is) and so you not reference a file from README that is not in the tarballs.
Regards
Marcel
Re: [PATCH] document getting of ell, point people at useful docs
Hi!
Quoted 8 lines
Quoted 8 lines
README +0
-0@@ -16,11 +16,14 @@ To configure run: ./configure --prefix=/usr --mandir=/usr/share/man \ --sysconfdir=/etc --localstatedir=/var
Quoted 7 lines
README To configure run: · line 21
Quoted 4 lines
README +2
-1-Configure automatically searches for all required components and packages. +Configure automatically searches for all required components and +packages, except ell, mentioned below.Nope. Since ELL is actually optional. It is clearly described just a few lines below.
Is it optional? This is definitely unclear. Are we looking at same README?
commit 55e5a766f2833d6aaaf98d0f8cc250585717bc07
Author: Nandini Rebello <[email protected]> Date: Wed Jan 16 12:15:31 2019 +0530
README says:
Embedded Linux library
======================
In order to compile the daemon and utilities the development version of Embedded Linux library is required to be present. The development repositories can be found here:
which sounds like "required" to me. Then there is:
When using --enable-external-ell build option, it is not required that the Embedded Linux library source code is available in the top level directory.
But I read it as "can be present somewhere else".
Plus, build actually fails, with pretty cryptic error message:
./bootstrap-configure
./configure
pavel(a)duo:~/g/ofono$ make make --no-print-directory all-am make[1]: *** No rule to make target 'ell/util.c', needed by 'ell/util.lo'. Stop. Makefile:2066: recipe for target 'all' failed make: *** [all] Error 2
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [PATCH] document getting of ell, point people at useful docs
Hi Pavel,
Quoted 41 lines
Quoted 8 lines
Quoted 8 lines
README +0
-0@@ -16,11 +16,14 @@ To configure run: ./configure --prefix=/usr --mandir=/usr/share/man \ --sysconfdir=/etc --localstatedir=/varQuoted 7 lines
README To configure run: · line 21
Quoted 4 lines
README +2
-1-Configure automatically searches for all required components and packages. +Configure automatically searches for all required components and +packages, except ell, mentioned below.Nope. Since ELL is actually optional. It is clearly described just a few lines below.
Is it optional? This is definitely unclear. Are we looking at same README?
commit
55e5a766f2833d6aaaf98d0f8cc250585717bc07Author: Nandini Rebello <[email protected]> Date: Wed Jan 16 12:15:31 2019 +0530README says:
Embedded Linux library
======================In order to compile the daemon and utilities the development version of Embedded Linux library is required to be present. The development repositories can be found here:
which sounds like "required" to me. Then there is:
When using --enable-external-ell build option, it is not required that the Embedded Linux library source code is available in the top level directory.
But I read it as "can be present somewhere else".
Plus, build actually fails, with pretty cryptic error message:
Quoted 8 lines
./bootstrap-configure
./configurepavel(a)duo:~/g/ofono$ make make --no-print-directory all-am make[1]: *** No rule to make target 'ell/util.c', needed by 'ell/util.lo'. Stop. Makefile:2066: recipe for target 'all' failed make: *** [all] Error 2
we can improve the check for the built-in copy of ELL. That is something that should be done for sure and I will look into that.
However for the actual released tarballs, ELL is present. So using the an external ELL is optional. The difference is between building from the GIT tree and building from the tarballs.
Regards
Marcel
Denis Kenzior
AppliedRe: [PATCH] fix compilation on gcc-6.3
In reply to Pavel MachekHi Pavel,
Quoted 3 lines · Pavel Machek
gcc-6 fails to compile ofono due to #pragma directives. Limit them to gcc versions where they are needed.
Applied, thanks.
Regards,
-Denis