Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64F88CFC5F6 for ; Thu, 10 Oct 2024 18:54:52 +0000 (UTC) Subject: ln -rs throws suntax error in do_populate_sysroot:append() To: poky@lists.yoctoproject.org From: "Jojan" X-Originating-Location: Irvine, California, US (192.19.222.250) X-Originating-Platform: Linux Firefox 131 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Thu, 10 Oct 2024 11:54:45 -0700 Message-ID: Content-Type: multipart/alternative; boundary="lwzD5bwne5YiHxLjAkEs" List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 10 Oct 2024 18:54:52 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/poky/message/13452 --lwzD5bwne5YiHxLjAkEs Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable I have a sysroot provide glibc-external sysroot_stage_dirs function does not stage links=C2=A0 correctly in my do_install append I added ln -rs ${D}${libdir} ${D}${prefix_native}/l= ib64 =C2=A0 link of lib64 to /usr/lib lib64 is also added in FILES:${PN} But when do_populate_sysroot calls the sysroot_stage_dirs()=C2=A0 , that po= pulates everything defined in the SYSROOT_DIRS sysroot_stage_dirs() { from=3D"$1" to=3D"$2" for dir in =C2=A0 =C2=A0 =C2=A0/usr/include =C2=A0 =C2=A0 /usr/lib =C2=A0 = =C2=A0 /lib =C2=A0 =C2=A0 /lib =C2=A0 =C2=A0 /usr/share =C2=A0 =C2=A0 /sysr= oot-only ; do sysroot_stage_dir "$from$dir" "$to$dir" done } I added=C2=A0 an append function like this so that lib64 is a softlink to l= ib . The stage do_populate_sysroot:append() { dstdir =3D d.getVar('SYSROOT_DESTDIR') # =C2=A0 =C2=A0bb.warn("DEST DIR s '%s'" % (dstdir)) ln -s -r ${dstdir}${libdir} ${SYSROOT_DESTDIR}${prefix_native}/lib64 } But this cause a syntax error ln -s -r ${dstdir}${libdir} ${SYSROOT_DESTDIR}${prefix_native}/lib64 ^ SyntaxError: invalid syntax ERROR: Parsing halted due to errors, see error messages above Adding "SYSROOT_DIRS +=3D =C2=A0 ${prefix_native}/lib64 \ "=C2=A0 does not = work , becuase it only created empty directory . Any idea why ln command th= rows syntax error in do_populate_sysroot:append() --lwzD5bwne5YiHxLjAkEs Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
I have a sysroot provide glibc-external
sysroot_stage_dirs function does not stage links  correctly
in my do_install append I added ln -rs ${D}${libdir} ${D}${prefix_nati= ve}/lib64   link of lib64 to /usr/lib
lib64 is also added in FILES:${PN}
 
But when do_populate_sysroot calls the sysroot_stage_dirs()  , th= at populates everything defined in the SYSROOT_DIRS
sysroot_stage_dirs() {
        from=3D"$1"        to=3D"$2"

      &n= bsp; for dir in     &n= bsp;/usr/include     /usr/lib     /lib     /l= ib     /usr/share     /sysroot-only ; do  <= br /> 
                s= ysroot_stage_dir "$from$dir" "$to$dir"
        don= e
}
 
 
I added  an append function like this so that lib64 is a softlink= to lib . The stage
do_populate_sysroot:append() {
    dstdir =3D d.getVar(= 'SYSROOT_DESTDIR')
#    bb.warn("DEST DIR s '%s'" % (dstdir)= )
    ln -s -r ${dstdir}${libdir} ${SYSROOT_DESTDIR}${prefix= _native}/lib64
}
 
But this cause a syntax error
    ln -s -r ${dstdir}${libdir} ${SYSROOT_DESTDIR}${prefix_n= ative}/lib64
             ^
Sy= ntaxError: invalid syntax
ERROR: Parsing halted due to errors, see error messages above
 
Adding "SYSROOT_DIRS +=3D   ${prefix_native}/lib64 \ "  does= not work , becuase it only created empty directory . Any idea why ln comma= nd throws syntax error in do_populate_sysroot:append()
 
--lwzD5bwne5YiHxLjAkEs--