* [Buildroot] [PATCH 1/1] package/optee-client: disable -Werror @ 2020-11-01 20:43 Fabrice Fontaine 2020-11-02 6:07 ` Etienne Carriere 2021-03-06 22:53 ` Yann E. MORIN 0 siblings, 2 replies; 11+ messages in thread From: Fabrice Fontaine @ 2020-11-01 20:43 UTC (permalink / raw) To: buildroot Disable -Werror thanks to CFG_WERROR which is available since version 3.3.0 and https://github.com/OP-TEE/optee_client/commit/5355fdb841bce4f7cce3dd37fc31fa91bd625c98 to fix the following build failure with optee-client 3.11.0: /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c: In function 'ck_create_object': /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c:22:9: error: missing initializer for field 'buffer' of 'struct serializer' [-Werror=missing-field-initializers] struct serializer obj = { }; ^ Fixes: - http://autobuild.buildroot.org/results/a3d663adb943aee814180f01d6e153b3309be962 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> --- package/optee-client/optee-client.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/optee-client/optee-client.mk b/package/optee-client/optee-client.mk index 8108fc2130..7f613f724d 100644 --- a/package/optee-client/optee-client.mk +++ b/package/optee-client/optee-client.mk @@ -11,7 +11,8 @@ OPTEE_CLIENT_LICENSE_FILES = LICENSE OPTEE_CLIENT_INSTALL_STAGING = YES OPTEE_CLIENT_CONF_OPTS = \ - -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) + -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) \ + -DCFG_WERROR=OFF define OPTEE_CLIENT_INSTALL_INIT_SYSV $(INSTALL) -m 0755 -D $(OPTEE_CLIENT_PKGDIR)/S30optee \ -- 2.28.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/1] package/optee-client: disable -Werror 2020-11-01 20:43 [Buildroot] [PATCH 1/1] package/optee-client: disable -Werror Fabrice Fontaine @ 2020-11-02 6:07 ` Etienne Carriere 2020-11-02 7:10 ` Fabrice Fontaine 2021-03-06 22:53 ` Yann E. MORIN 1 sibling, 1 reply; 11+ messages in thread From: Etienne Carriere @ 2020-11-02 6:07 UTC (permalink / raw) To: buildroot Hello Fabrice, On Sun, 1 Nov 2020 at 21:44, Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote: > > Disable -Werror thanks to CFG_WERROR which is available since version > 3.3.0 and > https://github.com/OP-TEE/optee_client/commit/5355fdb841bce4f7cce3dd37fc31fa91bd625c98 > to fix the following build failure with optee-client 3.11.0: > > /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c: In function 'ck_create_object': > /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c:22:9: error: missing initializer for field 'buffer' of 'struct serializer' [-Werror=missing-field-initializers] > struct serializer obj = { }; > ^ > This seems strange as { } is expected to be a valid universal initializer. In OP-TEE packages, we use it to initialize struct instances, so I guess the issue would rise at many places. Toolchain seems gcc 4.8.3, is it this toolchain that does not support { }? > -- The C compiler identification is GNU 4.8.3 > Fixes: > - http://autobuild.buildroot.org/results/a3d663adb943aee814180f01d6e153b3309be962 > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > --- > package/optee-client/optee-client.mk | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/package/optee-client/optee-client.mk b/package/optee-client/optee-client.mk > index 8108fc2130..7f613f724d 100644 > --- a/package/optee-client/optee-client.mk > +++ b/package/optee-client/optee-client.mk > @@ -11,7 +11,8 @@ OPTEE_CLIENT_LICENSE_FILES = LICENSE > OPTEE_CLIENT_INSTALL_STAGING = YES > > OPTEE_CLIENT_CONF_OPTS = \ > - -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) > + -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) \ > + -DCFG_WERROR=OFF > > define OPTEE_CLIENT_INSTALL_INIT_SYSV > $(INSTALL) -m 0755 -D $(OPTEE_CLIENT_PKGDIR)/S30optee \ > -- > 2.28.0 > ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/1] package/optee-client: disable -Werror 2020-11-02 6:07 ` Etienne Carriere @ 2020-11-02 7:10 ` Fabrice Fontaine 2020-11-02 8:16 ` Etienne Carriere 0 siblings, 1 reply; 11+ messages in thread From: Fabrice Fontaine @ 2020-11-02 7:10 UTC (permalink / raw) To: buildroot Hello Etienne, Le lun. 2 nov. 2020 ? 07:07, Etienne Carriere <etienne.carriere@linaro.org> a ?crit : > > Hello Fabrice, > > On Sun, 1 Nov 2020 at 21:44, Fabrice Fontaine > <fontaine.fabrice@gmail.com> wrote: > > > > Disable -Werror thanks to CFG_WERROR which is available since version > > 3.3.0 and > > https://github.com/OP-TEE/optee_client/commit/5355fdb841bce4f7cce3dd37fc31fa91bd625c98 > > to fix the following build failure with optee-client 3.11.0: > > > > /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c: In function 'ck_create_object': > > /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c:22:9: error: missing initializer for field 'buffer' of 'struct serializer' [-Werror=missing-field-initializers] > > struct serializer obj = { }; > > ^ > > > > This seems strange as { } is expected to be a valid universal initializer. > In OP-TEE packages, we use it to initialize struct instances, so I > guess the issue would rise at many places. > Toolchain seems gcc 4.8.3, is it this toolchain that does not support { }? > > -- The C compiler identification is GNU 4.8.3 The correct universal initializer is { 0 }, not { }. I sent a PR: https://github.com/OP-TEE/optee_client/pull/230 > > > > Fixes: > > - http://autobuild.buildroot.org/results/a3d663adb943aee814180f01d6e153b3309be962 > > > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > > --- > > package/optee-client/optee-client.mk | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/package/optee-client/optee-client.mk b/package/optee-client/optee-client.mk > > index 8108fc2130..7f613f724d 100644 > > --- a/package/optee-client/optee-client.mk > > +++ b/package/optee-client/optee-client.mk > > @@ -11,7 +11,8 @@ OPTEE_CLIENT_LICENSE_FILES = LICENSE > > OPTEE_CLIENT_INSTALL_STAGING = YES > > > > OPTEE_CLIENT_CONF_OPTS = \ > > - -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) > > + -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) \ > > + -DCFG_WERROR=OFF > > > > define OPTEE_CLIENT_INSTALL_INIT_SYSV > > $(INSTALL) -m 0755 -D $(OPTEE_CLIENT_PKGDIR)/S30optee \ > > -- > > 2.28.0 > > Best Regards, Fabrice ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/1] package/optee-client: disable -Werror 2020-11-02 7:10 ` Fabrice Fontaine @ 2020-11-02 8:16 ` Etienne Carriere 2020-11-03 9:57 ` Etienne Carriere 0 siblings, 1 reply; 11+ messages in thread From: Etienne Carriere @ 2020-11-02 8:16 UTC (permalink / raw) To: buildroot On Mon, 2 Nov 2020 at 08:10, Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote: > > Hello Etienne, > > Le lun. 2 nov. 2020 ? 07:07, Etienne Carriere > <etienne.carriere@linaro.org> a ?crit : > > > > Hello Fabrice, > > > > On Sun, 1 Nov 2020 at 21:44, Fabrice Fontaine > > <fontaine.fabrice@gmail.com> wrote: > > > > > > Disable -Werror thanks to CFG_WERROR which is available since version > > > 3.3.0 and > > > https://github.com/OP-TEE/optee_client/commit/5355fdb841bce4f7cce3dd37fc31fa91bd625c98 > > > to fix the following build failure with optee-client 3.11.0: > > > > > > /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c: In function 'ck_create_object': > > > /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c:22:9: error: missing initializer for field 'buffer' of 'struct serializer' [-Werror=missing-field-initializers] > > > struct serializer obj = { }; > > > ^ > > > > > > > This seems strange as { } is expected to be a valid universal initializer. > > In OP-TEE packages, we use it to initialize struct instances, so I > > guess the issue would rise at many places. > > Toolchain seems gcc 4.8.3, is it this toolchain that does not support { }? > > > -- The C compiler identification is GNU 4.8.3 > The correct universal initializer is { 0 }, not { }. I sent a PR: > https://github.com/OP-TEE/optee_client/pull/230 { 0 } does not fit well. When the 1st field in a struct is a pointer, as here, we experienced toolchains complaining about pointers being initialized to integer values. OP-TEE coding style documentation highlights that, see last bullet in https://optee.readthedocs.io/en/latest/general/coding_standards.html. Thanks for the P-R in OP-TEE project. I guess we'll get OP-TEE community feedback from there. Regards, Etienne > > > > > > > Fixes: > > > - http://autobuild.buildroot.org/results/a3d663adb943aee814180f01d6e153b3309be962 > > > > > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > > > --- > > > package/optee-client/optee-client.mk | 3 ++- > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/package/optee-client/optee-client.mk b/package/optee-client/optee-client.mk > > > index 8108fc2130..7f613f724d 100644 > > > --- a/package/optee-client/optee-client.mk > > > +++ b/package/optee-client/optee-client.mk > > > @@ -11,7 +11,8 @@ OPTEE_CLIENT_LICENSE_FILES = LICENSE > > > OPTEE_CLIENT_INSTALL_STAGING = YES > > > > > > OPTEE_CLIENT_CONF_OPTS = \ > > > - -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) > > > + -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) \ > > > + -DCFG_WERROR=OFF > > > > > > define OPTEE_CLIENT_INSTALL_INIT_SYSV > > > $(INSTALL) -m 0755 -D $(OPTEE_CLIENT_PKGDIR)/S30optee \ > > > -- > > > 2.28.0 > > > > Best Regards, > > Fabrice ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/1] package/optee-client: disable -Werror 2020-11-02 8:16 ` Etienne Carriere @ 2020-11-03 9:57 ` Etienne Carriere 2020-11-03 13:48 ` Etienne Carriere 0 siblings, 1 reply; 11+ messages in thread From: Etienne Carriere @ 2020-11-03 9:57 UTC (permalink / raw) To: buildroot Hi Fabrice, On Mon, 2 Nov 2020 at 09:16, Etienne Carriere <etienne.carriere@linaro.org> wrote: > > On Mon, 2 Nov 2020 at 08:10, Fabrice Fontaine > <fontaine.fabrice@gmail.com> wrote: > > > > Hello Etienne, > > > > Le lun. 2 nov. 2020 ? 07:07, Etienne Carriere > > <etienne.carriere@linaro.org> a ?crit : > > > > > > Hello Fabrice, > > > > > > On Sun, 1 Nov 2020 at 21:44, Fabrice Fontaine > > > <fontaine.fabrice@gmail.com> wrote: > > > > > > > > Disable -Werror thanks to CFG_WERROR which is available since version > > > > 3.3.0 and > > > > https://github.com/OP-TEE/optee_client/commit/5355fdb841bce4f7cce3dd37fc31fa91bd625c98 > > > > to fix the following build failure with optee-client 3.11.0: > > > > > > > > /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c: In function 'ck_create_object': > > > > /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c:22:9: error: missing initializer for field 'buffer' of 'struct serializer' [-Werror=missing-field-initializers] > > > > struct serializer obj = { }; > > > > ^ > > > > > > > > > > This seems strange as { } is expected to be a valid universal initializer. > > > In OP-TEE packages, we use it to initialize struct instances, so I > > > guess the issue would rise at many places. > > > Toolchain seems gcc 4.8.3, is it this toolchain that does not support { }? > > > > -- The C compiler identification is GNU 4.8.3 > > The correct universal initializer is { 0 }, not { }. I sent a PR: > > https://github.com/OP-TEE/optee_client/pull/230 > > { 0 } does not fit well. When the 1st field in a struct is a pointer, > as here, we experienced toolchains complaining about pointers being > initialized to integer values. > > OP-TEE coding style documentation highlights that, see last bullet in > https://optee.readthedocs.io/en/latest/general/coding_standards.html. > Thanks for the P-R in OP-TEE project. I guess we'll get OP-TEE > community feedback from there. > > Regards, > Etienne Looking back on this, I think disabling error on warning is not a good solution. It could lead to madanted initialization not being handled and hidden at build time. For this very optee_client client, I would suggest either to depend on a more recent toolchain or we fix the source code to use strictly appropriate initiliazers. My preference would go to the 1st proposal, to not deviate from optee_client mainline more than necessary. We'll face similar issues with next OP-TEE releases. Note we do already face the same issues with other OP-TEE packages (boot/optee-os and package/optee-*) currently supported in BR. Regards, Etienne > > > > > > > > > > > > Fixes: > > > > - http://autobuild.buildroot.org/results/a3d663adb943aee814180f01d6e153b3309be962 > > > > > > > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > > > > --- > > > > package/optee-client/optee-client.mk | 3 ++- > > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/package/optee-client/optee-client.mk b/package/optee-client/optee-client.mk > > > > index 8108fc2130..7f613f724d 100644 > > > > --- a/package/optee-client/optee-client.mk > > > > +++ b/package/optee-client/optee-client.mk > > > > @@ -11,7 +11,8 @@ OPTEE_CLIENT_LICENSE_FILES = LICENSE > > > > OPTEE_CLIENT_INSTALL_STAGING = YES > > > > > > > > OPTEE_CLIENT_CONF_OPTS = \ > > > > - -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) > > > > + -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) \ > > > > + -DCFG_WERROR=OFF > > > > > > > > define OPTEE_CLIENT_INSTALL_INIT_SYSV > > > > $(INSTALL) -m 0755 -D $(OPTEE_CLIENT_PKGDIR)/S30optee \ > > > > -- > > > > 2.28.0 > > > > > > Best Regards, > > > > Fabrice ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/1] package/optee-client: disable -Werror 2020-11-03 9:57 ` Etienne Carriere @ 2020-11-03 13:48 ` Etienne Carriere 2020-11-03 17:32 ` Fabrice Fontaine 0 siblings, 1 reply; 11+ messages in thread From: Etienne Carriere @ 2020-11-03 13:48 UTC (permalink / raw) To: buildroot Hi again Fabrice, On Tue, 3 Nov 2020 at 10:57, Etienne Carriere <etienne.carriere@linaro.org> wrote: > > Hi Fabrice, > > On Mon, 2 Nov 2020 at 09:16, Etienne Carriere > <etienne.carriere@linaro.org> wrote: > > > > On Mon, 2 Nov 2020 at 08:10, Fabrice Fontaine > > <fontaine.fabrice@gmail.com> wrote: > > > > > > Hello Etienne, > > > > > > Le lun. 2 nov. 2020 ? 07:07, Etienne Carriere > > > <etienne.carriere@linaro.org> a ?crit : > > > > > > > > Hello Fabrice, > > > > > > > > On Sun, 1 Nov 2020 at 21:44, Fabrice Fontaine > > > > <fontaine.fabrice@gmail.com> wrote: > > > > > > > > > > Disable -Werror thanks to CFG_WERROR which is available since version > > > > > 3.3.0 and > > > > > https://github.com/OP-TEE/optee_client/commit/5355fdb841bce4f7cce3dd37fc31fa91bd625c98 > > > > > to fix the following build failure with optee-client 3.11.0: > > > > > > > > > > /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c: In function 'ck_create_object': > > > > > /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c:22:9: error: missing initializer for field 'buffer' of 'struct serializer' [-Werror=missing-field-initializers] > > > > > struct serializer obj = { }; > > > > > ^ > > > > > > > > > > > > > This seems strange as { } is expected to be a valid universal initializer. > > > > In OP-TEE packages, we use it to initialize struct instances, so I > > > > guess the issue would rise at many places. > > > > Toolchain seems gcc 4.8.3, is it this toolchain that does not support { }? > > > > > -- The C compiler identification is GNU 4.8.3 > > > The correct universal initializer is { 0 }, not { }. I sent a PR: > > > https://github.com/OP-TEE/optee_client/pull/230 > > > > { 0 } does not fit well. When the 1st field in a struct is a pointer, > > as here, we experienced toolchains complaining about pointers being > > initialized to integer values. > > > > OP-TEE coding style documentation highlights that, see last bullet in > > https://optee.readthedocs.io/en/latest/general/coding_standards.html. > > Thanks for the P-R in OP-TEE project. I guess we'll get OP-TEE > > community feedback from there. > > > > Regards, > > Etienne > > Looking back on this, I think disabling error on warning is not > a good solution. It could lead to madanted initialization not being > handled and hidden at build time. > > For this very optee_client client, I would suggest either to > depend on a more recent toolchain or we fix the source code > to use strictly appropriate initiliazers. > My preference would go to the 1st proposal, to not deviate from > optee_client mainline more than necessary. We'll face similar issues > with next OP-TEE releases. Note we do already face the same > issues with other OP-TEE packages (boot/optee-os and > package/optee-*) currently supported in BR. > Are you ok using the patch you made for https://github.com/OP-TEE/optee_client/pull/230 instead of the change proposed here? > > Regards, > Etienne > > > > > > > > > > > > > > > > > > > Fixes: > > > > > - http://autobuild.buildroot.org/results/a3d663adb943aee814180f01d6e153b3309be962 > > > > > > > > > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > > > > > --- > > > > > package/optee-client/optee-client.mk | 3 ++- > > > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > > > > > diff --git a/package/optee-client/optee-client.mk b/package/optee-client/optee-client.mk > > > > > index 8108fc2130..7f613f724d 100644 > > > > > --- a/package/optee-client/optee-client.mk > > > > > +++ b/package/optee-client/optee-client.mk > > > > > @@ -11,7 +11,8 @@ OPTEE_CLIENT_LICENSE_FILES = LICENSE > > > > > OPTEE_CLIENT_INSTALL_STAGING = YES > > > > > > > > > > OPTEE_CLIENT_CONF_OPTS = \ > > > > > - -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) > > > > > + -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) \ > > > > > + -DCFG_WERROR=OFF > > > > > > > > > > define OPTEE_CLIENT_INSTALL_INIT_SYSV > > > > > $(INSTALL) -m 0755 -D $(OPTEE_CLIENT_PKGDIR)/S30optee \ > > > > > -- > > > > > 2.28.0 > > > > > > > > Best Regards, > > > > > > Fabrice ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/1] package/optee-client: disable -Werror 2020-11-03 13:48 ` Etienne Carriere @ 2020-11-03 17:32 ` Fabrice Fontaine 2020-11-03 17:56 ` Etienne Carriere 0 siblings, 1 reply; 11+ messages in thread From: Fabrice Fontaine @ 2020-11-03 17:32 UTC (permalink / raw) To: buildroot Le mar. 3 nov. 2020 ? 14:48, Etienne Carriere <etienne.carriere@linaro.org> a ?crit : > > Hi again Fabrice, > > On Tue, 3 Nov 2020 at 10:57, Etienne Carriere > <etienne.carriere@linaro.org> wrote: > > > > Hi Fabrice, > > > > On Mon, 2 Nov 2020 at 09:16, Etienne Carriere > > <etienne.carriere@linaro.org> wrote: > > > > > > On Mon, 2 Nov 2020 at 08:10, Fabrice Fontaine > > > <fontaine.fabrice@gmail.com> wrote: > > > > > > > > Hello Etienne, > > > > > > > > Le lun. 2 nov. 2020 ? 07:07, Etienne Carriere > > > > <etienne.carriere@linaro.org> a ?crit : > > > > > > > > > > Hello Fabrice, > > > > > > > > > > On Sun, 1 Nov 2020 at 21:44, Fabrice Fontaine > > > > > <fontaine.fabrice@gmail.com> wrote: > > > > > > > > > > > > Disable -Werror thanks to CFG_WERROR which is available since version > > > > > > 3.3.0 and > > > > > > https://github.com/OP-TEE/optee_client/commit/5355fdb841bce4f7cce3dd37fc31fa91bd625c98 > > > > > > to fix the following build failure with optee-client 3.11.0: > > > > > > > > > > > > /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c: In function 'ck_create_object': > > > > > > /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c:22:9: error: missing initializer for field 'buffer' of 'struct serializer' [-Werror=missing-field-initializers] > > > > > > struct serializer obj = { }; > > > > > > ^ > > > > > > > > > > > > > > > > This seems strange as { } is expected to be a valid universal initializer. > > > > > In OP-TEE packages, we use it to initialize struct instances, so I > > > > > guess the issue would rise at many places. > > > > > Toolchain seems gcc 4.8.3, is it this toolchain that does not support { }? > > > > > > -- The C compiler identification is GNU 4.8.3 > > > > The correct universal initializer is { 0 }, not { }. I sent a PR: > > > > https://github.com/OP-TEE/optee_client/pull/230 > > > > > > { 0 } does not fit well. When the 1st field in a struct is a pointer, > > > as here, we experienced toolchains complaining about pointers being > > > initialized to integer values. > > > > > > OP-TEE coding style documentation highlights that, see last bullet in > > > https://optee.readthedocs.io/en/latest/general/coding_standards.html. > > > Thanks for the P-R in OP-TEE project. I guess we'll get OP-TEE > > > community feedback from there. > > > > > > Regards, > > > Etienne > > > > Looking back on this, I think disabling error on warning is not > > a good solution. It could lead to madanted initialization not being > > handled and hidden at build time. > > > > For this very optee_client client, I would suggest either to > > depend on a more recent toolchain or we fix the source code > > to use strictly appropriate initiliazers. > > My preference would go to the 1st proposal, to not deviate from > > optee_client mainline more than necessary. We'll face similar issues > > with next OP-TEE releases. Note we do already face the same > > issues with other OP-TEE packages (boot/optee-os and > > package/optee-*) currently supported in BR. > > > > Are you ok using the patch you made for > https://github.com/OP-TEE/optee_client/pull/230 instead of the change > proposed here? Sure, I sent a new patch however I also know that a common practice in buildroot (and in other distros as well) is to disable -Werror. The goal is not to hide "issues" but to avoid errors with old or newer compilers. So I think that we should apply both. I'll let Thomas or Yann decide if they do agree or not. > > > > > Regards, > > Etienne > > > > > > > > > > > > > > > > > > > > > > > > > > Fixes: > > > > > > - http://autobuild.buildroot.org/results/a3d663adb943aee814180f01d6e153b3309be962 > > > > > > > > > > > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > > > > > > --- > > > > > > package/optee-client/optee-client.mk | 3 ++- > > > > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > > > > > > > diff --git a/package/optee-client/optee-client.mk b/package/optee-client/optee-client.mk > > > > > > index 8108fc2130..7f613f724d 100644 > > > > > > --- a/package/optee-client/optee-client.mk > > > > > > +++ b/package/optee-client/optee-client.mk > > > > > > @@ -11,7 +11,8 @@ OPTEE_CLIENT_LICENSE_FILES = LICENSE > > > > > > OPTEE_CLIENT_INSTALL_STAGING = YES > > > > > > > > > > > > OPTEE_CLIENT_CONF_OPTS = \ > > > > > > - -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) > > > > > > + -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) \ > > > > > > + -DCFG_WERROR=OFF > > > > > > > > > > > > define OPTEE_CLIENT_INSTALL_INIT_SYSV > > > > > > $(INSTALL) -m 0755 -D $(OPTEE_CLIENT_PKGDIR)/S30optee \ > > > > > > -- > > > > > > 2.28.0 > > > > > > > > > > Best Regards, > > > > > > > > Fabrice Best Regards, Fabrice ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/1] package/optee-client: disable -Werror 2020-11-03 17:32 ` Fabrice Fontaine @ 2020-11-03 17:56 ` Etienne Carriere 0 siblings, 0 replies; 11+ messages in thread From: Etienne Carriere @ 2020-11-03 17:56 UTC (permalink / raw) To: buildroot On Tue, 3 Nov 2020 at 18:33, Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote: > > Le mar. 3 nov. 2020 ? 14:48, Etienne Carriere > <etienne.carriere@linaro.org> a ?crit : > > > > Hi again Fabrice, > > > > On Tue, 3 Nov 2020 at 10:57, Etienne Carriere > > <etienne.carriere@linaro.org> wrote: > > > > > > Hi Fabrice, > > > > > > On Mon, 2 Nov 2020 at 09:16, Etienne Carriere > > > <etienne.carriere@linaro.org> wrote: > > > > > > > > On Mon, 2 Nov 2020 at 08:10, Fabrice Fontaine > > > > <fontaine.fabrice@gmail.com> wrote: > > > > > > > > > > Hello Etienne, > > > > > > > > > > Le lun. 2 nov. 2020 ? 07:07, Etienne Carriere > > > > > <etienne.carriere@linaro.org> a ?crit : > > > > > > > > > > > > Hello Fabrice, > > > > > > > > > > > > On Sun, 1 Nov 2020 at 21:44, Fabrice Fontaine > > > > > > <fontaine.fabrice@gmail.com> wrote: > > > > > > > > > > > > > > Disable -Werror thanks to CFG_WERROR which is available since version > > > > > > > 3.3.0 and > > > > > > > https://github.com/OP-TEE/optee_client/commit/5355fdb841bce4f7cce3dd37fc31fa91bd625c98 > > > > > > > to fix the following build failure with optee-client 3.11.0: > > > > > > > > > > > > > > /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c: In function 'ck_create_object': > > > > > > > /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c:22:9: error: missing initializer for field 'buffer' of 'struct serializer' [-Werror=missing-field-initializers] > > > > > > > struct serializer obj = { }; > > > > > > > ^ > > > > > > > > > > > > > > > > > > > This seems strange as { } is expected to be a valid universal initializer. > > > > > > In OP-TEE packages, we use it to initialize struct instances, so I > > > > > > guess the issue would rise at many places. > > > > > > Toolchain seems gcc 4.8.3, is it this toolchain that does not support { }? > > > > > > > -- The C compiler identification is GNU 4.8.3 > > > > > The correct universal initializer is { 0 }, not { }. I sent a PR: > > > > > https://github.com/OP-TEE/optee_client/pull/230 > > > > > > > > { 0 } does not fit well. When the 1st field in a struct is a pointer, > > > > as here, we experienced toolchains complaining about pointers being > > > > initialized to integer values. > > > > > > > > OP-TEE coding style documentation highlights that, see last bullet in > > > > https://optee.readthedocs.io/en/latest/general/coding_standards.html. > > > > Thanks for the P-R in OP-TEE project. I guess we'll get OP-TEE > > > > community feedback from there. > > > > > > > > Regards, > > > > Etienne > > > > > > Looking back on this, I think disabling error on warning is not > > > a good solution. It could lead to madanted initialization not being > > > handled and hidden at build time. > > > > > > For this very optee_client client, I would suggest either to > > > depend on a more recent toolchain or we fix the source code > > > to use strictly appropriate initiliazers. > > > My preference would go to the 1st proposal, to not deviate from > > > optee_client mainline more than necessary. We'll face similar issues > > > with next OP-TEE releases. Note we do already face the same > > > issues with other OP-TEE packages (boot/optee-os and > > > package/optee-*) currently supported in BR. > > > > > > > Are you ok using the patch you made for > > https://github.com/OP-TEE/optee_client/pull/230 instead of the change > > proposed here? > Sure, I sent a new patch however I also know that a common practice in > buildroot (and in other distros as well) is to disable -Werror. > The goal is not to hide "issues" but to avoid errors with old or newer > compilers. > So I think that we should apply both. I'll let Thomas or Yann decide > if they do agree or not. Should we set a BR2_TOOLCHAIN_GCC_AT_LEAST_x=y in optee-os and optee-test packages? They quite use { } and I don't think all mainlines will desire to support quite old toolchains. etienne > > > > > > > > Regards, > > > Etienne > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Fixes: > > > > > > > - http://autobuild.buildroot.org/results/a3d663adb943aee814180f01d6e153b3309be962 > > > > > > > > > > > > > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > > > > > > > --- > > > > > > > package/optee-client/optee-client.mk | 3 ++- > > > > > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > > > > > > > > > diff --git a/package/optee-client/optee-client.mk b/package/optee-client/optee-client.mk > > > > > > > index 8108fc2130..7f613f724d 100644 > > > > > > > --- a/package/optee-client/optee-client.mk > > > > > > > +++ b/package/optee-client/optee-client.mk > > > > > > > @@ -11,7 +11,8 @@ OPTEE_CLIENT_LICENSE_FILES = LICENSE > > > > > > > OPTEE_CLIENT_INSTALL_STAGING = YES > > > > > > > > > > > > > > OPTEE_CLIENT_CONF_OPTS = \ > > > > > > > - -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) > > > > > > > + -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) \ > > > > > > > + -DCFG_WERROR=OFF > > > > > > > > > > > > > > define OPTEE_CLIENT_INSTALL_INIT_SYSV > > > > > > > $(INSTALL) -m 0755 -D $(OPTEE_CLIENT_PKGDIR)/S30optee \ > > > > > > > -- > > > > > > > 2.28.0 > > > > > > > > > > > > Best Regards, > > > > > > > > > > Fabrice > Best Regards, > > Fabrice ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/1] package/optee-client: disable -Werror 2020-11-01 20:43 [Buildroot] [PATCH 1/1] package/optee-client: disable -Werror Fabrice Fontaine 2020-11-02 6:07 ` Etienne Carriere @ 2021-03-06 22:53 ` Yann E. MORIN 2021-03-06 23:11 ` Etienne Carriere 2021-03-17 18:57 ` Peter Korsgaard 1 sibling, 2 replies; 11+ messages in thread From: Yann E. MORIN @ 2021-03-06 22:53 UTC (permalink / raw) To: buildroot Fabrice, All, On 2020-11-01 21:43 +0100, Fabrice Fontaine spake thusly: > Disable -Werror thanks to CFG_WERROR which is available since version > 3.3.0 and > https://github.com/OP-TEE/optee_client/commit/5355fdb841bce4f7cce3dd37fc31fa91bd625c98 > to fix the following build failure with optee-client 3.11.0: > > /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c: In function 'ck_create_object': > /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c:22:9: error: missing initializer for field 'buffer' of 'struct serializer' [-Werror=missing-field-initializers] > struct serializer obj = { }; > ^ > > Fixes: > - http://autobuild.buildroot.org/results/a3d663adb943aee814180f01d6e153b3309be962 > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> After reading the thread, I decided to apply this (oldish) patch to next. Indeed, as you mentionned in the thread, we do try to remove -Werror when we hit issues with it. -Werror is very important for the developpers of a package, because they indeed can find and fix their code as early as possible. But for downstreams, that does not help at all, especially since there are a myriad of possible combination of binutils versions, compiler versins, C libraries flavours and versions, optimisations flags and architectures, that it is virtually impossible to guarantee a no-warning build on all those combinations, especially when a new version of any of those gets out. So, applied to next, thanks. (Yes, I know we just bumped the version of optee-client, and that we do not yet have any -Werror issue with it, but should we have any, the answer would be to apply that patch anyway. So no need to wait for the first issue to popup...) Regards, Yann E. MORIN. > --- > package/optee-client/optee-client.mk | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/package/optee-client/optee-client.mk b/package/optee-client/optee-client.mk > index 8108fc2130..7f613f724d 100644 > --- a/package/optee-client/optee-client.mk > +++ b/package/optee-client/optee-client.mk > @@ -11,7 +11,8 @@ OPTEE_CLIENT_LICENSE_FILES = LICENSE > OPTEE_CLIENT_INSTALL_STAGING = YES > > OPTEE_CLIENT_CONF_OPTS = \ > - -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) > + -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) \ > + -DCFG_WERROR=OFF > > define OPTEE_CLIENT_INSTALL_INIT_SYSV > $(INSTALL) -m 0755 -D $(OPTEE_CLIENT_PKGDIR)/S30optee \ > -- > 2.28.0 > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/1] package/optee-client: disable -Werror 2021-03-06 22:53 ` Yann E. MORIN @ 2021-03-06 23:11 ` Etienne Carriere 2021-03-17 18:57 ` Peter Korsgaard 1 sibling, 0 replies; 11+ messages in thread From: Etienne Carriere @ 2021-03-06 23:11 UTC (permalink / raw) To: buildroot Hello Yann, On Sat, 6 Mar 2021 at 23:53, Yann E. MORIN <yann.morin.1998@free.fr> wrote: > > Fabrice, All, > > On 2020-11-01 21:43 +0100, Fabrice Fontaine spake thusly: > > Disable -Werror thanks to CFG_WERROR which is available since version > > 3.3.0 and > > https://github.com/OP-TEE/optee_client/commit/5355fdb841bce4f7cce3dd37fc31fa91bd625c98 > > to fix the following build failure with optee-client 3.11.0: > > > > /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c: In function 'ck_create_object': > > /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c:22:9: error: missing initializer for field 'buffer' of 'struct serializer' [-Werror=missing-field-initializers] > > struct serializer obj = { }; > > ^ > > > > Fixes: > > - http://autobuild.buildroot.org/results/a3d663adb943aee814180f01d6e153b3309be962 > > > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > > After reading the thread, I decided to apply this (oldish) patch to > next. > > Indeed, as you mentionned in the thread, we do try to remove -Werror > when we hit issues with it. > > -Werror is very important for the developpers of a package, because they > indeed can find and fix their code as early as possible. > > But for downstreams, that does not help at all, especially since there > are a myriad of possible combination of binutils versions, compiler > versins, C libraries flavours and versions, optimisations flags and > architectures, that it is virtually impossible to guarantee a no-warning > build on all those combinations, especially when a new version of any of > those gets out. > > So, applied to next, thanks. > > (Yes, I know we just bumped the version of optee-client, and that we do > not yet have any -Werror issue with it, but should we have any, the > answer would be to apply that patch anyway. So no need to wait for the > first issue to popup...) I understand your concern. Your change is fine, using CFG_WERROR is the best way. It can remain in next and master. Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> (if that helps) Regards, Etienne > > Regards, > Yann E. MORIN. > > > --- > > package/optee-client/optee-client.mk | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/package/optee-client/optee-client.mk b/package/optee-client/optee-client.mk > > index 8108fc2130..7f613f724d 100644 > > --- a/package/optee-client/optee-client.mk > > +++ b/package/optee-client/optee-client.mk > > @@ -11,7 +11,8 @@ OPTEE_CLIENT_LICENSE_FILES = LICENSE > > OPTEE_CLIENT_INSTALL_STAGING = YES > > > > OPTEE_CLIENT_CONF_OPTS = \ > > - -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) > > + -DCFG_TEE_FS_PARENT_PATH=$(BR2_PACKAGE_OPTEE_CLIENT_TEE_FS_PATH) \ > > + -DCFG_WERROR=OFF > > > > define OPTEE_CLIENT_INSTALL_INIT_SYSV > > $(INSTALL) -m 0755 -D $(OPTEE_CLIENT_PKGDIR)/S30optee \ > > -- > > 2.28.0 > > > > _______________________________________________ > > buildroot mailing list > > buildroot at busybox.net > > http://lists.busybox.net/mailman/listinfo/buildroot > > -- > .-----------------.--------------------.------------------.--------------------. > | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | > | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | > | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | > '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/1] package/optee-client: disable -Werror 2021-03-06 22:53 ` Yann E. MORIN 2021-03-06 23:11 ` Etienne Carriere @ 2021-03-17 18:57 ` Peter Korsgaard 1 sibling, 0 replies; 11+ messages in thread From: Peter Korsgaard @ 2021-03-17 18:57 UTC (permalink / raw) To: buildroot >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes: > Fabrice, All, > On 2020-11-01 21:43 +0100, Fabrice Fontaine spake thusly: >> Disable -Werror thanks to CFG_WERROR which is available since version >> 3.3.0 and >> https://github.com/OP-TEE/optee_client/commit/5355fdb841bce4f7cce3dd37fc31fa91bd625c98 >> to fix the following build failure with optee-client 3.11.0: >> >> /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c: In function 'ck_create_object': >> /home/giuliobenetti/autobuild/run/instance-2/output-1/build/optee-client-3.11.0/libckteec/src/pkcs11_processing.c:22:9: error: missing initializer for field 'buffer' of 'struct serializer' [-Werror=missing-field-initializers] >> struct serializer obj = { }; >> ^ >> >> Fixes: >> - http://autobuild.buildroot.org/results/a3d663adb943aee814180f01d6e153b3309be962 >> >> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > After reading the thread, I decided to apply this (oldish) patch to > next. > Indeed, as you mentionned in the thread, we do try to remove -Werror > when we hit issues with it. > -Werror is very important for the developpers of a package, because they > indeed can find and fix their code as early as possible. > But for downstreams, that does not help at all, especially since there > are a myriad of possible combination of binutils versions, compiler > versins, C libraries flavours and versions, optimisations flags and > architectures, that it is virtually impossible to guarantee a no-warning > build on all those combinations, especially when a new version of any of > those gets out. > So, applied to next, thanks. Committed to 2021.02.x and 2020.11.x, thanks. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-03-17 18:57 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-11-01 20:43 [Buildroot] [PATCH 1/1] package/optee-client: disable -Werror Fabrice Fontaine 2020-11-02 6:07 ` Etienne Carriere 2020-11-02 7:10 ` Fabrice Fontaine 2020-11-02 8:16 ` Etienne Carriere 2020-11-03 9:57 ` Etienne Carriere 2020-11-03 13:48 ` Etienne Carriere 2020-11-03 17:32 ` Fabrice Fontaine 2020-11-03 17:56 ` Etienne Carriere 2021-03-06 22:53 ` Yann E. MORIN 2021-03-06 23:11 ` Etienne Carriere 2021-03-17 18:57 ` Peter Korsgaard
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.