[Bug 4403] New: base.bbclass regexpr on .la files in oe_libinstall seems wrong

bugzilla-daemon at amethyst.openembedded.net bugzilla-daemon at amethyst.openembedded.net
Wed Jul 2 15:11:52 CEST 2008


http://bugs.openembedded.net/show_bug.cgi?id=4403

           Summary: base.bbclass regexpr on .la files in oe_libinstall
                    seems wrong
    Classification: Unclassified
           Product: Openembedded
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: org.openembedded.dev
        AssignedTo: openembedded-issues at lists.openembedded.org
        ReportedBy: damien.lespiau at gmail.com


Hi !


Symptom: In my staging dir, some of the libs (eg. glib-2.0) have some hardcoded
dependencies pointing to /usr/lib/libxxx.la which makes compilation of other
libs/programs rather difficult.

In the function oe_libinstall, some regexpr are used on .la files to keep them
sane in the staging directory. One of these regexpr looks like it has been
written to rewrite potential leaky ${libdir} paths in the dependency_libs
variable but does not seem to do the job.

"Guilty" regexpr:
/^dependency_libs=/s,\([[:space:]']+\)${libdir},\1${STAGING_LIBDIR},g

The problem is in the + given to sed. + used with sed is a GNU extension and
must be escaped (see
http://www.gnu.org/software/sed/manual/html_node/Regular-Expressions.html) so
the right regexpr would be:
/^dependency_libs=/s,\([[:space:]']\+\)${libdir},\1${STAGING_LIBDIR},g

With such an expression, it looks ok:

[damien at griffith poulpy]$ sed -e
"/^dependency_libs=/s,\([[:space:]']\+\)/usr/lib,\1/opt/wombat/staging/i586-mingw32msvc/lib,g"
dependency_libs='/usr/lib/libintl.la'
dependency_libs='/opt/wombat/staging/i586-mingw32msvc/lib/libintl.la'

dependency_libs='/opt/wombat/staging/i586-mingw32msvc/lib/libgoodlib.la
/usr/lib/libintl.la'
dependency_libs='/opt/wombat/staging/i586-mingw32msvc/lib/libgoodlib.la
/opt/wombat/staging/i586-mingw32msvc/lib/libintl.la'

dependency_libs='/opt/wombat/staging/i586-mingw32msvc/lib/libgoodlib.la    
/usr/lib/libintl.la'
dependency_libs='/opt/wombat/staging/i586-mingw32msvc/lib/libgoodlib.la    
/opt/wombat/staging/i586-mingw32msvc/lib/libintl.la'



Alternatively, one can use the -r switch of GNU sed to get the usual meaning of
+ without the need to escape it.

The following patch has been done in the same directory as base.bbclass because
I'm actually working on a fork of OE and the paths won't match

-- 
Configure bugmail: http://bugs.openembedded.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Openembedded-issues mailing list