https://bugs.linaro.org/show_bug.cgi?id=1312
Bug ID: 1312
Summary: Compilation fails due to warning about use of
deprecated constant '_BSD_SOURCE' treated as error
Product: OpenDataPlane
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: major
Priority: ---
Component: General ODP API or linux-generic implimentation
Assignee: [email protected]
Reporter: [email protected]
Created attachment 284
--> https://bugs.linaro.org/attachment.cgi?id=284&action=edit
patch to resolve the compilation warning / error
Overview:
In developing and testing an updated OE recipe to build ODP release 1.0,
OE build of ODP v1.0 fails during compilation.
This is due to a compilation setting which treats all warnings as errors,
so that the compilation returns an error due to a warning about the use of the
deprecated code versioning constant '_BSD_SOURCE' in the source code file
'odp/example/ipsec/odp_ipsec.c'. The generated warning recommends using the
preferred new constant '_DEFAULT_SOURCE' instead.
Steps to Reproduce: Minimized, easy-to-follow steps that will trigger the bug.
Include any special setup steps.
1. Obtain and install the new odp.bb recipe specifying the ODP 1.0 release
as the source code version level.
2. perform OE environment setup as required and run 'bitbake odp'
3.
...
Actual Results: The bitbake build failed during compilation with the
(sanitized) warning message which was treated as an error:
+| In file included from /usr/include/stdlib.h:24:0,
+| from odp/example/ipsec/odp_ipsec.c:16:
+| /usr/include/features.h:148:3:
+| error: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated,
+| use _DEFAULT_SOURCE" [-Werror=cpp]
+| # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated,
+| use _DEFAULT_SOURCE"
+| ^
Expected Results: bitbake build of ODP v1.0 should have completed
Additional Information:
Resolution:
Modified odp/example/ipsec/odp_ipsec.c and replaced the constant _BSD_SOURCE
with the recommended '_DEFAULT_SOURCE'. Then created a patch and added that to
the OE recipe odp.bb as a patch file. Re-ran bitbake usig the new recipe and
confirmed a successful build with the patched recipe.
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp