<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>6598</bug_id>
          
          <creation_ts>2014-07-29 13:32:28 +0000</creation_ts>
          <short_desc>Yocto Project ADT Autotools: autogen.sh fails with parameters</short_desc>
          <delta_ts>2015-10-26 12:24:05 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Eclipse Plugin</product>
          <component>eclipse-plugin</component>
          <version>1.6</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.9</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Peter Saunderson">peteasa</reporter>
          <assigned_to name="Todor Minchev">todor.minchev</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>ioanax.grigoropol</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>poky.adt.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.e.witt</cc>
    
    <cc>todor.minchev</cc>
    
    <cc>yi.zhao</cc>
    
    <cc>yp.ep.watcher</cc>
    
    <cc>yp.watcher</cc>
          
          <qa_contact name="Valentin Hangan">valentinx.hangan</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>44815</commentid>
    <comment_count>0</comment_count>
    <who name="Peter Saunderson">peteasa</who>
    <bug_when>2014-07-29 13:32:28 +0000</bug_when>
    <thetext>I use eclipse with the Yocto Daisy release
I also build the software from the command prompt using autogen.sh

Building from the command prompt with autogen.sh fails because of a bug in autogen.sh described below.

A suggestion for addition to the documentation http://www.yoctoproject.org/docs/current/adt-manual/adt-manual.html#autotools-based-projects

In Eclipse Properties-&gt;Autotools-&gt;Configure Settings shows the command parameters needed to run autogen.sh from the command prompt.

./autogen.sh CFLAGS=&quot; -g -O0  -I~/Yocto/build --sysroot=~/local/poky/sysroots/armv7at2hf-vfp-neon-poky-linux-gnueabi&quot; CXXFLAGS=&quot; -g -O0  --sysroot=~/local/poky/sysroots/armv7at2hf-vfp-neon-poky-linux-gnueabi&quot; LDFLAGS=&quot; --sysroot=~/local/poky/sysroots/armv7at2hf-vfp-neon-poky-linux-gnueabi&quot; CPPFLAGS=&quot; --sysroot=~/local/poky/sysroots/armv7at2hf-vfp-neon-poky-linux-gnueabi&quot; configure --with-libtool-sysroot=~/local/poky/sysroots/armv7at2hf-vfp-neon-poky-linux-gnueabi --host=arm-poky-linux-gnueabi --build=x86_64-linux --target=arm-poky-linux-gnueabi

The above command fails because autogen.sh does not pass the $CONFIGURE_FLAGS correctly to ./configure.  The parameters ($@) should be surrounded by double quotes (&quot;$@&quot;) - ie autogen.sh should contain:
#! /bin/sh
[ -e config.cache ] &amp;&amp; rm -f config.cache

libtoolize --automake
aclocal ${OECORE_ACLOCAL_OPTS}
autoconf
autoheader
automake -a
./configure &quot;$@&quot;
exit

The README file created in the project folder contains instructions that are not complete:
-----------------------------------------------------------------------------
 Build
-----------------------------------------------------------------------------
$ ./autogen.sh $CONFIGURE_FLAGS
$ make

This template README file should include details of how to get the $CONFIGURE_FLAGS (from Eclipse Properties-&gt;Autotools-&gt;Configure Settings) or could include the $CONFIGURE_FLAGS that are already auto included in the eclipse setup.

The documentation at http://www.yoctoproject.org/docs/current/adt-manual/adt-manual.html should be updated to include these details.  The documentation does not describe what $CONFIGURE_FLAGS are.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47351</commentid>
    <comment_count>1</comment_count>
    <who name="Jessica">jessica.zhang</who>
    <bug_when>2014-12-04 00:14:48 +0000</bug_when>
    <thetext>Hi Randy,

Can you work with Scott on updating the doc?

Thanks,
Jessica</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52532</commentid>
    <comment_count>2</comment_count>
    <who name="Randy Witt">randy.e.witt</who>
    <bug_when>2015-07-22 19:53:16 +0000</bug_when>
    <thetext>Todor, this is the bug I spoke to you about. I believe the user hadn&apos;t source the setup  script. But I wasn&apos;t sure if there was command line access in Eclipse that should work in this scenario.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52801</commentid>
    <comment_count>3</comment_count>
    <who name="Todor Minchev">todor.minchev</who>
    <bug_when>2015-08-03 20:49:45 +0000</bug_when>
    <thetext>In order to build from the command line you will need to setup your environment first by sourcing the environment setup script. This can be found in the directory where the toolchain was extracted. The script will be called environment-setup-XXX-poky-linux where XXX is the architecture of your target.

Please check the documentation here (chapter 5.1)
http://www.yoctoproject.org/docs/1.6/adt-manual/adt-manual.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55732</commentid>
    <comment_count>4</comment_count>
    <who name="Valentin Hangan">valentinx.hangan</who>
    <bug_when>2015-10-26 12:24:05 +0000</bug_when>
    <thetext>Check in  Eclipse Properties-&gt;Autotools-&gt;Configure Settings  the command parameters needed to run autogen.sh from the command prompt.
I source the environment setup script and i run autogen.sh with specific parameters for QEMU:
./autogen.sh CFLAGS=&quot; -g -O0  --sysroot=/home/valentin/test-yocto/qemux86&quot; CXXFLAGS=&quot; -g -O0  --sysroot=/home/valentin/test-yocto/qemux86&quot; LDFLAGS=&quot; --sysroot=/home/valentin/test-yocto/qemux86&quot; CPPFLAGS=&quot; --sysroot=/home/valentin/test-yocto/qemux86&quot; configure --with-libtool-sysroot=/home/valentin/test-yocto/qemux86 --host=i586-poky-linux --build=x86_64-linux --target=i586-poky-linux

Message from cmd : autoreconf: Leaving directory `.&apos;and $CONFIGURE_FLAGS was correctly done.

Verified on:

OS: Fedora 22
Eclipse-version: Mars
Commit: 1d179ddcbd1983bf7bcfe98efdcbb186bdccca4f</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>