Since we are fast approaching the 10th, I thought it appropriate to report this "bug" with the build despite not having worked around it.<br>Build environment is <br><br><b>Summary:</b><br><br>When building llvm-gcc with a arm-apple-darwin target on i686-pc-cygwin, make fails because child calls to configure have an errant semicolon that causes the --srcdir parameter to be ignored by the configure script.  This causes the builds in the host-i686-pc-cygwin directory to fail unnecessarily.  <br>
<br>Removing said semicolon from the configure calls and running 'make' manually succeeds.<br><br><b>Configure Parameters for </b><b>llvm-gcc:</b><br><br>(from /cygdrive/e/llvm-gcc4.2-2.2.source/config.status)<br>
<br><span style="font-family: courier new,monospace;">config.status:# ./configure   --enable-llvm=/cygdrive/e/llvm-2.2 --target=arm-ap</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">ple-darwin --enable-sjlj-exceptions --with-heavenly=/usr/local/share/iphone-file</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">system --with-gcc=/usr/bin/gcc --program-prefix=arm-apple-darwin --with-as=/usr/</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">local/bin/llvm-as --with-ld=/usr/local/bin/llvm-ld --enable-languages=c,c++,objc</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">,obj-c++</span><br style="font-family: courier new,monospace;"><br><b>Root Cause?:</b><br><br>I believe this problem is caused by --srcdir appearing after the program_transform_name substitutions. <br>
This problem was likely introduced within this change <br><br><pre class="vc_raw_diff">+if test "$program_transform_name" = s,x,x,; then</pre><br>


Revision <a href="http://llvm.org/viewvc/llvm-project?view=rev&revision=43990"><b>43990</b></a> -

(<a href="http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/release_22/configure?revision=43990&view=markup">view</a>)

(<a href="http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/release_22/configure?revision=43990">download</a>)

(<a href="http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/release_22/configure?annotate=43990">annotate</a>)



- <a href="http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/release_22/configure?r1=43990&view=log">[select for diffs]</a>




<br>

Modified

<i>Sat Nov 10 22:32:06 2007 CST</i> (2 months, 4 weeks ago) by <i>void</i>

<br>Original Path: <a href="http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/configure?view=log&pathrev=43990"><i>llvm-gcc-4.2/trunk/configure</i></a>









<br>File length: 244731 byte(s)






<br>Diff to <a href="http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/release_22/configure?r1=43921&r2=43990">previous 43921</a>

(<a href="http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/release_22/configure?r1=43921&r2=43990&diff_format=h">colored</a>)






<pre class="vc_log">Update configure scripts to build the Apple Way<br><br></pre><b>Fix:</b>  <br><br>To maintain computability with the 'Apple way of building', while also enabling compatability for Apple platforms, I suggest
moving the } ${ml_srcdiroption} options prior to the ${ac_configure_args} when generating calls to ./configure from 'make' <br><br><b>Closing Comments:</b><br><br>I've yet to complete an entire build, but wanted to report this bug
now in case the llvm-gcc team would like to address this problem on Cygwin builds prior to the release.  It seems easy enough to fix.<br><br>I will report back further after I complete the
build, and may also install these sources on a clean install of Cygwin
to see if I can reproduce the problem.  It appears this bug can be corrected rather easily by
moving --srcdir as I have suggested.<br><br>-- Patrick Hennessey<br>-- Dallas, TX<br><br><br><b>Problem Description</b><br><br>For each host- subdir, the --srcdir parameter follows a semicolon, which to my bash shell means that --srcdir is a second command to execute, rather than a parameter to the configure.  <br>
<br>I believe this problem would be mitigated by --srcdir appearing before --program-transform-name in the generated invocations of configure.<br><br>It might to be related these lines in the top level configure which contain said semicolon:<br>
<br><ul><li>i<span style="font-family: courier new,monospace;">f test "$program_transform_name" = s,x,x,; then</span></li><li style="font-family: courier new,monospace;">  program_transform_name="<b>s,^,${program_prefix},; </b>$program_transform_name"</li>
<li style="font-family: courier new,monospace;">  program_transform_name="<b>s,\$\$,${program_suffix},;</b> $program_transform_name"</li></ul><br><br>Here is an example from <b>config.log </b> for<b> llvm-gcc4.2-2.2.source/</b><b>host-i686-pc-cygwin/gcc</b> (fixincludes, libiberty and intl already were 'fixed' per my 'solution')<br>
<br>$<span style="font-family: courier new,monospace;"> grep configure config.log |head -3</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">running configure, to aid debugging if configure makes a mistake.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">It was created by configure, which was</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  $ /cygdrive/e/llvm-gcc4.2-2.2.source/gcc/configure --cache-file=./config.cac</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> --build=i686-pc-cygwin --host=i686-pc-cygwin --target=arm-apple-darwin --enab</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">-llvm=/cygdrive/e/llvm-2.2 --enable-sjlj-exceptions </span><span style="font-family: courier new,monospace;">--with-gcc=/usr/bin/gcc <br>
--with-as=/usr/local/bin/llvm-as </span><span style="font-family: courier new,monospace;">--with-ld=/usr/local/bin/llvm-ld --enable-languages=c,c++,objc,obj-c++ <br>--program</span><span style="font-family: courier new,monospace;">-transform-name=s,^,arm-apple-darwin,;  --srcdir=../.././gcc</span><br style="font-family: courier new,monospace;">
<br>Its an easy fix to get these to compile, though:<br><ul style="font-family: courier new,monospace;"><li>cd host-i686-pc-cygwin/gcc/</li><li>grep configure config.log|head -3|tail -1 | perl -pe 's/\;//;s/^\s+\$//;' > newonfig.sh</li>
<li>bash newconfig.sh</li><li>make</li></ul><span style="font-family: courier new,monospace;">$ cat newconfig.sh</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> /cygdrive/e/llvm-gcc4.2-2.2.source/gcc/configure --cache-file=./config.cache --</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">build=i686-pc-cygwin --host=i686-pc-cygwin --target=arm-apple-darwin --enable-ll</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">vm=/cygdrive/e/llvm-2.2 --enable-sjlj-exceptions </span><span style="font-family: courier new,monospace;">--with-gcc=/usr/bin/gcc --with-as=/usr/local/bin/llvm-as --w</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">ith-ld=/usr/local/bin/llvm-ld --enable-languages=c,c++,objc,obj-c++ --program-tr</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">ansform-name=s,^,arm-apple-darwin,  --srcdir=../.././gcc</span><br style="font-family: courier new,monospace;">
<br>Below is the first top-level error generated by 'make' after configure (for fixincludes) This sort of error is generated for each subdirectory target under <span style="font-family: courier new,monospace;">./llvm-gcc4.2-2.2.source/host-i686-pc-cygwin</span>.  Each time I get the error, I can correct the invocation of configure and build  using the Perl rewrite appearing above.<br>
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$ make</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">make[1]: Entering directory `/cygdrive/e/llvm-gcc4.2-2.2.source'</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">make[2]: Entering directory `/cygdrive/e/llvm-gcc4.2-2.2.source/host-i686-pc-cyg</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">win/libiberty'</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">make[3]: Entering directory `/cygdrive/e/llvm-gcc4.2-2.2.source/host-i686-pc-cyg</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">win/libiberty/testsuite'</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">make[3]: Nothing to be done for `all'.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">make[3]: Leaving directory `/cygdrive/e/llvm-gcc4.2-2.2.source/host-i686-pc-cygw</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">in/libiberty/testsuite'</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">make[2]: Leaving directory `/cygdrive/e/llvm-gcc4.2-2.2.source/host-i686-pc-cygw</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">in/libiberty'</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">make[2]: Entering directory `/cygdrive/e/llvm-gcc4.2-2.2.source/host-i686-pc-cyg</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">win/fixincludes'</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">make[2]: *** No rule to make target `/cygdrive/e/llvm-gcc4.2-2.2.source/fixinclu</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">des/Makefile.in', needed by `Makefile'.  Stop.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">make[2]: Leaving directory `/cygdrive/e/llvm-gcc4.2-2.2.source/host-i686-pc-cygw</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">in/fixincludes'</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">make[1]: *** [all-fixincludes] Error 2</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">make[1]: Leaving directory `/cygdrive/e/llvm-gcc4.2-2.2.source'</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">make: *** [all] Error 2</span><br style="font-family: courier new,monospace;">
<br><br><span style="font-family: courier new,monospace;">$ cd /cygdrive/e/llvm-gcc4.2-2.2.source/host-i686-pc-cygwin/fixincldes</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$ grep configure config.log |head -20</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">running configure, to aid debugging if configure makes a mistake.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">It was created by fixincludes configure  , which was</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  $ /cygdrive/e/llvm-gcc4.2-2.2.source/fixincludes/configure --cache-file=./con</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">ig.cache --build=i686-pc-cygwin --host=i686-pc-cygwin --target=arm-apple-darwin</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">--enable-llvm=/cygdrive/e/llvm-2.2 --enable-sjlj-exceptions --with-gcc=/usr/bin/gc</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">c --enable-languages=c,c++ objc,obj-c++ --program-transform-name=s,^,arm-apple-darwin, --srcdir=/cygdrive/</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">/llvm-gcc4.2-2.2.source/fixincludes</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">