Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libnls2 - nativesdk prepare_recipe_sysroot error fix #65

Open
wants to merge 1 commit into
base: dunfell
Choose a base branch
from

Conversation

moorthy-bs
Copy link

on eSDK population, nativesdk of libnsl2 and
glibc both install yppasswd.x and yppasswd.h files which causes
conflict while preparing recipe sysroot of nativesdk-libnss-nis and nativesdk-python 3.8

The fix resolves below error
ERROR: nativesdk-libnss-nis-3.1+gitAUTOINC+062f31999b-r0 do_prepare_recipe_sysroot:
The file /opt/rdk/2.0/sysroots/x86_64-rdksdk-linux/usr/include/rpcsvc/yppasswd.x is installed by both nativesdk-libnsl2 and nativesdk-glibc, aborting
ERROR: nativesdk-libnss-nis-3.1+gitAUTOINC+062f31999b-r0 do_prepare_recipe_sysroot:
The file /opt/rdk/2.0/sysroots/x86_64-rdksdk-linux/usr/include/rpcsvc/yppasswd.h is installed by both nativesdk-libnsl2 and nativesdk-glibc, aborting

# yppasswd.h which causes conflict on do_recipe_prepare_sysroot()
do_install_append_libc-glibc_class-nativesdk() {
rm -f ${D}${includedir}/rpcsvc/yppasswd.x
rm -f ${D}${includedir}/rpcsvc/yppasswd.h
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these files different between glibc and libnsl2 ? if so what are differences?
I think it should be provided by libnsl2 which means it should
be deleted from glibc recipe

Copy link
Author

@moorthy-bs moorthy-bs Dec 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no difference in yppasswd.x but some API in glibc's yppasswd.h are declared under STDC and __cplusplus macros as below

#if defined(__STDC__) || defined(__cplusplus)
#define YPPASSWDPROC_UPDATE 1
extern  int * yppasswdproc_update_1(yppasswd *, CLIENT *);
extern  int * yppasswdproc_update_1_svc(yppasswd *, struct svc_req *);
extern int yppasswdprog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
#else /* K&R C */
#define YPPASSWDPROC_UPDATE 1
extern  int * yppasswdproc_update_1();
extern  int * yppasswdproc_update_1_svc();
extern int yppasswdprog_1_freeresult ();
#endif /* K&R C */

/* the xdr functions */
#if defined(__STDC__) || defined(__cplusplus)
extern  bool_t xdr_passwd (XDR *, passwd*);
extern  bool_t xdr_yppasswd (XDR *, yppasswd*);
#else /* K&R C */
extern bool_t xdr_passwd ();
extern bool_t xdr_yppasswd ();
#endif /* K&R C */

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another observation that the nativesdk-glibc in yoe build doesn't populate /usr/include/rpcsvc directory so that no error faced. The difference observed is yoe generates esdk toolchain installer version is 3.3.0-beta whereas from usual oe-core dunfell build is 2.0. Is that a reason for the error?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on eSDK population, nativesdk of libnsl2 and glibc both install
yppasswd.x and yppasswd.h files which causes conflict while
preparing recipe sysroot of nativesdk-libnss-nis and nativesdk-python 3.8

The fix resolves below error
ERROR: nativesdk-libnss-nis-3.1+gitAUTOINC+062f31999b-r0 do_prepare_recipe_sysroot:
The file /opt/rdk/2.0/sysroots/x86_64-rdksdk-linux/usr/include/rpcsvc/yppasswd.x is installed by both nativesdk-libnsl2 and nativesdk-glibc, aborting
ERROR: nativesdk-libnss-nis-3.1+gitAUTOINC+062f31999b-r0 do_prepare_recipe_sysroot:
The file /opt/rdk/2.0/sysroots/x86_64-rdksdk-linux/usr/include/rpcsvc/yppasswd.h is installed by both nativesdk-libnsl2 and nativesdk-glibc, aborting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants