http://bugs.openembedded.org/show_bug.cgi?id=2957

           Summary: oe_libinstall -C option issue
           Product: BitBake
           Version: 1.8.x
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: BitBake
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Has anyone had any issues with the oe_libinstall function when being passed the
-C <dir> option? 

For me, if the -C option is specified, as in the standard package definition
file for libtool

do_stage () {
        install -m 0755 ${HOST_SYS}-libtool
${STAGING_BINDIR}/${HOST_SYS}-libtool
        install -m 0755 libtoolize ${STAGING_BINDIR}/libtoolize
  -->>> oe_libinstall -a -so -C libltdl libltdl ${STAGING_LIBDIR}
        install -m 0644 libltdl/ltdl.h ${STAGING_INCDIR}/
        install -d ${STAGING_DATADIR}/libtool ${STAGING_DATADIR}/aclocal
        install -c config.guess ${STAGING_DATADIR}/libtool/
        install -c config.sub ${STAGING_DATADIR}/libtool/
        install -c -m 0644 ltmain.sh ${STAGING_DATADIR}/libtool/
        install -c -m 0644 libtool.m4 ${STAGING_DATADIR}/aclocal/
        install -c -m 0644 ltdl.m4 ${STAGING_DATADIR}/aclocal/ }

I get the following error during the build:

ERROR: function do_stage failed
ERROR: log data follows
(/opt/data/OpenEmbedded/tmp/work/x86_64-linux/libtool-native-1.5.10-r6/t
emp/log.do_stage.8992)
| find: write error: Broken pipe
| oe_libinstall: cd
libltdl/opt/data/OpenEmbedded/tmp/work/x86_64-linux/libtool-native-1.5.1
0-r6/libtool-1.5.10/libltdl
|
/opt/data/OpenEmbedded/tmp/work/x86_64-linux/libtool-native-1.5.10-r6/te
mp/run.do_stage.8992: line 414: cd:
libltdl/opt/data/OpenEmbedded/tmp/work/x86_64-linux/libtool-native-1.5.1
0-r6/libtool-1.5.10/libltdl: No such file or directory
NOTE: Task failed:
/opt/data/OpenEmbedded/tmp/work/x86_64-linux/libtool-native-1.5.10-r6/te
mp/log.do_stage.8992
NOTE: package libtool-native-1.5.10-r6: task do_populate_staging: failed
ERROR: TaskFailed event exception, aborting
NOTE: package libtool-native-1.5.10: failed
ERROR: Build of
/opt/data/OpenEmbedded/org.openembedded.dev/packages/libtool/libtool-nat
ive_1.5.10.bb do_populate_staging failed
ERROR: Task 146
(/opt/data/OpenEmbedded/org.openembedded.dev/packages/libtool/libtool-na
tive_1.5.10.bb, do_populate_staging) failed
NOTE: Tasks Summary: Attempted 313 tasks of which 304 didn't need to be rerun
and 1 failed.
ERROR:
'/opt/data/OpenEmbedded/org.openembedded.dev/packages/libtool/libtool-na
tive_1.5.10.bb' failed


Digging into the script I figured out that when -C <directory> is specified,
<directory> gets pre-pended into the path and thus messes things up.

To get it to work, I made the following changes to the body of the
oe_libinstall function (look for #begin/#end My Mods block)

oe_libinstall() {
        # Purpose: Install a library, in all its forms
        # Example
        #
        # oe_libinstall libltdl ${STAGING_LIBDIR}/
        # oe_libinstall -C src/libblah libblah ${D}/${libdir}/
        dir=""
        libtool=""
        silent=""
        require_static=""
        require_shared=""
        staging_install=""
        while [ "$#" -gt 0 ]; do
                case "$1" in
                -C)
                        shift
                        dir="$1"
                        ;;
                -s)
                        silent=1
                        ;;
                -a)
                        require_static=1
                        ;;
                -so)
                        require_shared=1
                        ;;
                -*)
                        oefatal "oe_libinstall: unknown option: $1"
                        ;;
                *)
                        break;
                        ;;
                esac
                shift
        done

        libname="$1"
        shift
        destpath="$1"
        if [ -z "$destpath" ]; then
                oefatal "oe_libinstall: no destination path specified"
        fi
        if echo "$destpath/" | egrep '^${STAGING_LIBDIR}/' >/dev/null
        then
                staging_install=1
        fi

        __runcmd () {
                if [ -z "$silent" ]; then
                        echo >&2 "oe_libinstall: $*"
                fi
                $*
        }

# begin my Mods
       pwd=`pwd`
       if [ -z "$dir" ]; then
               dir=$pwd
       else
               dir=$pwd/$dir
       fi
# end my Mods

        dotlai=$libname.lai
        dir=$dir`(cd $dir;find . -name "$dotlai") | sed
"s/^\.//;s/\/$dotlai\$//;q"`
        olddir=`pwd`
        __runcmd cd $dir
 ...

Am I missing something? I'm using the tip of the org.openembedded.dev branch as
of about a week ago and my build host is running Fedora Core 7.

I am new to the whole Linux distribution build process, so any help would be
greatly appreciated.

Thanks!
--Mike


-- 
Configure bugmail: http://bugs.openembedded.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Bitbake-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bitbake-dev

Reply via email to