Boost C++ Libraries: Ticket #7212: ./b2 fails with 'import error: length of source and target rule name lists don't match!' https://svn.boost.org/trac10/ticket/7212 <p> I attempted to follow the instructions in "Getting Started for Linux", but building with "b2" fails : </p> <p> $ ./bootstrap.sh install --prefix=/usr Building Boost.Build engine with toolset gcc... tools/build/v2/engine/bin.linuxx86_64/b2 Detecting Python version... 2.7 Detecting Python root... /usr/lib64/python2.7.1 Unicode/ICU support for Boost.Regex?... /usr Backing up existing Boost.Build configuration in project-config.jam.1 Generating Boost.Build configuration in project-config.jam... </p> <p> Bootstrapping is done. To build, run: </p> <blockquote> <p> ./b2 </p> </blockquote> <p> To adjust configuration, edit 'project-config.jam'. Further information: </p> <ul><li>Command line help: ./b2 --help </li></ul><ul><li>Getting started guide: <a href="http://www.boost.org/more/getting_started/unix-variants.html">http://www.boost.org/more/getting_started/unix-variants.html</a> </li></ul><ul><li>Boost.Build documentation: <a href="http://www.boost.org/boost-build2/doc/html/index.html">http://www.boost.org/boost-build2/doc/html/index.html</a> </li></ul><p> $ ./b2 --help /usr/OOO/boost_1_50_0/tools/build/v2/kernel/modules.jam:326: in boost-build import error: length of source and target rule name lists don't match! </p> <blockquote> <p> source: peek poke record-binding target: modules.peek </p> </blockquote> <p> /usr/OOO/boost_1_50_0/boost-build.jam:17: in module scope $ ./b2 /usr/OOO/boost_1_50_0/tools/build/v2/kernel/modules.jam:326: in boost-build import error: length of source and target rule name lists don't match! </p> <blockquote> <p> source: peek poke record-binding target: modules.peek </p> </blockquote> <p> /usr/OOO/boost_1_50_0/boost-build.jam:17: in module scope </p> <p> Is this a python problem ? What version of python should I be using ? </p> <p> What extra python modules do I need ? </p> <p> Anyone got a GNU make(1) Makefile for Boost to build with Linux GCC toolchain, or one which does not use python ? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7212 Trac 1.4.3 Jason Vas Dias <jason.vas.dias@…> Wed, 08 Aug 2012 21:00:30 GMT <link>https://svn.boost.org/trac10/ticket/7212#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:1</guid> <description> <p> Sorry, I ran : </p> <p> $ ./bootstrap.sh --prefix=/usr Building Boost.Build engine with toolset gcc... tools/build/v2/engine/bin.linuxx86_64/b2 Detecting Python version... 2.7 Detecting Python root... /usr/lib64/python2.7.1 Unicode/ICU support for Boost.Regex?... /usr Backing up existing Boost.Build configuration in project-config.jam.2 Generating Boost.Build configuration in project-config.jam... </p> <p> Bootstrapping is done. To build, run: </p> <blockquote> <p> ./b2 </p> </blockquote> <p> To adjust configuration, edit 'project-config.jam'. Further information: </p> <ul><li>Command line help: ./b2 --help </li></ul><ul><li>Getting started guide: <a href="http://www.boost.org/more/getting_started/unix-variants.html">http://www.boost.org/more/getting_started/unix-variants.html</a> </li></ul><ul><li>Boost.Build documentation: <a href="http://www.boost.org/boost-build2/doc/html/index.html">http://www.boost.org/boost-build2/doc/html/index.html</a> </li></ul><p> $ ./b2 install /usr/OOO/boost_1_50_0/tools/build/v2/kernel/modules.jam:326: in boost-build import error: length of source and target rule name lists don't match! </p> <blockquote> <p> source: peek poke record-binding target: modules.peek </p> </blockquote> <p> /usr/OOO/boost_1_50_0/boost-build.jam:17: in module scope </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Wed, 15 Aug 2012 19:38:04 GMT</pubDate> <title>component changed https://svn.boost.org/trac10/ticket/7212#comment:2 https://svn.boost.org/trac10/ticket/7212#comment:2 <ul> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">Building Boost</span> </li> </ul> Ticket anonymous Thu, 23 Aug 2012 06:47:10 GMT <link>https://svn.boost.org/trac10/ticket/7212#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:3</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7212#comment:2" title="Comment 2">viboes</a>: </p> <p> where the change has taken place ? how to check it and correct it ? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jurko Gospodnetic</dc:creator> <pubDate>Fri, 24 Aug 2012 16:24:40 GMT</pubDate> <title>component changed; owner set https://svn.boost.org/trac10/ticket/7212#comment:4 https://svn.boost.org/trac10/ticket/7212#comment:4 <ul> <li><strong>owner</strong> set to <span class="trac-author">Vladimir Prus</span> </li> <li><strong>component</strong> <span class="trac-field-old">Building Boost</span> → <span class="trac-field-new">build</span> </li> </ul> <p> Hi. </p> <p> I remember someone once asking me about something like this - here's a response I gave them in a personal e-mail message (never got any response back nor did I see them post a related question to any of the Boost mailing lists): </p> <hr /> <blockquote class="citation"> <blockquote class="citation"> <p> I have used the following commands to install Boost but i am getting the following error :- </p> <p> [priyanka@NGS boost_1_50_0]$ ./bootstrap.sh Building Boost.Build engine with toolset gcc... tools/build/v2/engine/bin.linuxx86_64/b2 Detecting Python version... 2.7 Detecting Python root... /usr ... </p> <p> [priyanka@NGS boost_1_50_0]$ ./bjam --prefix= /~/Downloads link=static runtime-link=static stage install /home/priyanka/Downloads/boost_1_50_0/tools/build/v2/kernel/modules.jam:326: in boost-build import error: length of source and target rule name lists don't match! </p> <blockquote> <p> source: peek poke record-binding target: modules.peek </p> </blockquote> <p> /home/priyanka/Downloads/boost_1_50_0/boost-build.jam:17: in module scope </p> </blockquote> <blockquote> <p> And I really do not know how this happened at your site. I checked </p> </blockquote> <p> the source code lines listed in your error report and in modules.jam there is the following: </p> <p> local globalize = peek poke record-binding ; IMPORT modules : $(globalize) : : modules.$(globalize) ; </p> <p> which expands to: </p> <p> IMPORT modules : peek poke record-binding : : modules.peek modules.poke modules.record-binding ; </p> <p> In your case something seems to cause this to expand to: </p> <p> IMPORT modules : peek poke record-binding : : modules.peek ; </p> <p> Try adding some ECHO statements there like: </p> <p> ECHO /$(globalize)/ ; ECHO /modules.$(globalize)/ ; </p> <p> and see what you get. </p> </blockquote> <hr /> <p> Hopefully someone that can reproduce this issue can report back here (or even better - on the Boost Build mailing list) with some more information, otherwise, I do not see what to do about this. </p> <p> Some ideas: </p> <ul><li>What did the ECHO statements suggested above display? </li><li>Does the same occur with Boost library release 1.51? </li><li>Does the same occur when using the current Boost Build version from the trunk? </li><li>Are you sure you are using the correct Boost Jam executable? </li></ul> Ticket rasmussen74@… Wed, 29 Aug 2012 11:48:52 GMT <link>https://svn.boost.org/trac10/ticket/7212#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:5</guid> <description> <p> Unfortunately I am able to reproduce this error and my build is therefore broken. Any help would be appreciated. </p> <p> Boost library version 1.51 </p> <p> After unpacking the sources tarball I do: </p> <blockquote> <p> ./bootstrap.sh </p> </blockquote> <p> which completes succesfully. But on the next command: </p> <blockquote> <p> ./b2 tools/bcp </p> </blockquote> <p> I get </p> <p> /home/krr/build/external/boost/src/external_boost/tools/build/v2/kernel/modules.jam:326: in boost-build import error: length of source and target rule name lists don't match! </p> <blockquote> <p> source: peek poke record-binding target: modules.peek </p> </blockquote> <p> /home/krr/build/external/boost/src/external_boost/boost-build.jam:17: in module scope </p> <p> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Wed, 29 Aug 2012 12:23:14 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7212#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:6</guid> <description> <p> What does line 326 in modules.jam say for you? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 29 Aug 2012 12:28:59 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7212#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:7</guid> <description> <p> It says </p> <pre class="wiki">IMPORT modules : $(globalize) : : modules.$(globalize) ; </pre><p> BTW I noticed that in bootstrap.log I have two warnings: </p> <pre class="wiki">### ### Using 'gcc' toolset. ### rm -rf bootstrap mkdir bootstrap gcc -o bootstrap/jam0 command.c compile.c constants.c debug.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathunix.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c pwd.c class.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c jam.c: In function 'executable_path': jam.c:653:12: warning: incompatible implicit declaration of built-in function 'strndup' [enabled by default] ./bootstrap/jam0 -f build.jam --toolset=gcc --toolset-root= clean ...found 1 target... ...updating 1 target... [DELETE] clean ...updated 1 target... ./bootstrap/jam0 -f build.jam --toolset=gcc --toolset-root= ...found 50 targets... ...updating 2 targets... [COMPILE] bin.linuxx86_64/b2 jam.c: In function 'executable_path': jam.c:653:12: warning: incompatible implicit declaration of built-in function 'strndup' [enabled by default] [COPY] bin.linuxx86_64/bjam ...updated 2 targets... </pre><p> which are not present on another system where Boost build works fine. Or is this just a red herring? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jurko Gospodnetic</dc:creator> <pubDate>Wed, 29 Aug 2012 12:41:12 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7212#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:8</guid> <description> <p> rasmussen74 - Could you contact me over Skype chat, my login is jurkog? Then I can help you debug this a bit faster... </p> <p> As for the bjam build compiler warning - do you know which header contains the strndup() function declaration on your system? </p> <p> As for the original problem - could you send us lines 325-326 in your modules.jam file. They should read: </p> <pre class="wiki">local globalize = peek poke record-binding ; IMPORT modules : $(globalize) : : modules.$(globalize) ; </pre><p> If that is so then please change those two lines to the following: </p> <pre class="wiki">local globalize = peek poke record-binding ; ECHO xxx1: /$(globalize)/ ; ECHO xxx2: /modules.$(globalize)/ ; IMPORT modules : $(globalize) : : modules.$(globalize) ; </pre><p> and let us know what those 'xxx1:' and 'xxx2:' lines contain in your build output. </p> <p> Best regards, </p> <blockquote> <p> Jurko Gospodnetić </p> </blockquote> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 29 Aug 2012 12:42:25 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7212#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:9</guid> <description> <p> This warning might be the real problem. Can you try <a class="changeset" href="https://svn.boost.org/trac10/changeset/80097" title="Add missing #include. Fixes #7243.">r80097</a> ? </p> </description> <category>Ticket</category> </item> <item> <author>Kim Rasmussen <rasmussen74@…></author> <pubDate>Wed, 29 Aug 2012 12:48:17 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7212#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:10</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7212#comment:8" title="Comment 8">jurko</a>: </p> <blockquote class="citation"> <p> rasmussen74 - Could you contact me over Skype chat, my login is jurkog? Then I can help you debug this a bit faster... </p> </blockquote> <p> Sorry, Skype is no-go from here. </p> <blockquote class="citation"> <p> As for the bjam build compiler warning - do you know which header contains the strndup() function declaration on your system? </p> </blockquote> <p> Will check. </p> <blockquote class="citation"> <p> As for the original problem - could you send us lines 325-326 in your modules.jam file. </p> </blockquote> <p> The lines and surroundings are: </p> <pre class="wiki">320 } 321 322 323 # These rules need to be available in all modules to implement module loading 324 # itself and other fundamental operations. 325 local globalize = peek poke record-binding ; 326 IMPORT modules : $(globalize) : : modules.$(globalize) ; 327 328 329 rule __test__ ( ) 330 { </pre><blockquote> <p> They should read: </p> <blockquote class="citation"> <pre class="wiki">local globalize = peek poke record-binding ; IMPORT modules : $(globalize) : : modules.$(globalize) ; </pre><p> If that is so then please change those two lines to the following: </p> <pre class="wiki">local globalize = peek poke record-binding ; ECHO xxx1: /$(globalize)/ ; ECHO xxx2: /modules.$(globalize)/ ; IMPORT modules : $(globalize) : : modules.$(globalize) ; </pre><p> and let us know what those 'xxx1:' and 'xxx2:' lines contain in your build output. </p> </blockquote> </blockquote> <p> Output is: </p> <pre class="wiki">xxx1: /peek/ xxx2: /modules.peek/ </pre><p> -Kim </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jurko Gospodnetic</dc:creator> <pubDate>Wed, 29 Aug 2012 12:50:35 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7212#comment:11 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:11</guid> <description> <p> Ok, I see you already sent the ECHO results to the Boost Build mailing list - I'll continue responding there... </p> <p> As for the warning - that should not have anything to do with mem.h changed in <a class="changeset" href="https://svn.boost.org/trac10/changeset/80097" title="Add missing #include. Fixes #7243.">r80097</a>. It is complaining about not being able to find a declaration for strndup() - which is a bad thing but should be fixable by a simple header include. </p> <p> Any other instant messenger? Yahoo/ICQ/IRC/Google/MSN? </p> <p> Best regards, </p> <blockquote> <p> Jurko Gospodnetić </p> </blockquote> </description> <category>Ticket</category> </item> <item> <author>Kim Rasmussen <rasmussen74@…></author> <pubDate>Wed, 29 Aug 2012 12:53:57 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7212#comment:12 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:12</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7212#comment:11" title="Comment 11">jurko</a>: </p> <blockquote class="citation"> <p> Ok, I see you already sent the ECHO results to the Boost Build mailing list - I'll continue responding there... </p> </blockquote> <p> OK. </p> <blockquote class="citation"> <p> As for the warning - that should not have anything to do with mem.h changed in <a class="changeset" href="https://svn.boost.org/trac10/changeset/80097" title="Add missing #include. Fixes #7243.">r80097</a>. It is complaining about not being able to find a declaration for strndup() - which is a bad thing but should be fixable by a simple header include. </p> </blockquote> <p> Didn't think that either. </p> <blockquote class="citation"> <p> Any other instant messenger? Yahoo/ICQ/IRC/Google/MSN? </p> </blockquote> <p> Google would be okay (rasmussen74). </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jurko Gospodnetic</dc:creator> <pubDate>Wed, 29 Aug 2012 15:21:30 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7212#comment:13 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:13</guid> <description> <p> It would be great if some more people affected by this problem would come back to us so we can compare their environment with Kims. </p> <p> And here's a status update after doing some interactive debugging with Kim. </p> <p> The problem seems to have been introduced by some of the variable expansion changes made between Boost library 1.49 &amp; 1.50 releases but the effects are <strong>*really really wierd</strong>*. My guess is that the changed code is somehow triggering a compiler/optimizer bug. </p> <p> The problematic function in new code is expand(), located in the function.c module. In the original 1.49 Boost library release code-base, that function did not exist and its work seems to have been done by the var_string() function in the variable.c module (and possibly some other function in the later removed expand.c module - did not check). </p> <p> There we have a 'while ( --i &gt;= 0 )' loop around the middle of that function which never seems to get entered on the target system. Weird thing is that if we add the following code just before that while loop: </p> <pre class="wiki"> if ( --i &gt;= 0 ) { printf( "%d\n", i ); } ++i; </pre><p> Then everything works fine. </p> <p> On the other hand, if we leave in the same code but without the printf() call - then we're back to the original problem - most likely due to the optimizer recognizing and removing the dummy code. </p> <p> We still have not done the following on the target system: </p> <ul><li>tried using the debug Boost Jam build </li><li>collected version information (Linux/gcc/glibc) </li></ul><p> The 'warning' problem mentioned seems to be caused by the target system's include files (old version perhaps?) not declaring the strndup() function unless the _GNU_SOURCE symbol is defined, but that warning existed with Boost library 1.49 release and fixing it in the current trunk has no effect on the initial variable expansion problem. I'll fix that by rewriting the code to not use strndup() in the first place (will replace it with some malloc()/strncpy() combination). </p> <p> For more information on the planned expand() function changes - see the Boost Build mailing list. </p> <p> Hope this helps. </p> <p> Best regards, </p> <blockquote> <p> Jurko Gospodnetić </p> </blockquote> <p> <span class="underline"></span><span class="underline"></span><span class="underline"></span><span class="underline"></span><span class="underline"></span><span class="underline"></span><span class="underline"></span><span class="underline"></span><span class="underline"></span><span class="underline"></span><span class="underline"></span><span class="underline">_ Unsubscribe &amp; other changes: <a class="ext-link" href="http://lists.boost.org/mailman/listinfo.cgi/boost-build"><span class="icon">​</span>http://lists.boost.org/mailman/listinfo.cgi/boost-build</a> </span></p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 29 Aug 2012 20:36:57 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7212#comment:14 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:14</guid> <description> <p> Hi! </p> <p> I have looked more into the problem and as far as I can see it is clearly related to compiler optimization. Below I have included all relevant information, so please accept my apologies for the lengthy comment. </p> <p> Target system information: </p> <pre class="wiki">$ uname -a Linux munin-4 2.6.16.60-0.69.1_1.0102.5650.2.2.74-ss #1 SMP Tue Dec 21 17:20:07 CST 2010 x86_64 x86_64 x86_64 GNU/Linux $ g++ -v Using built-in specs. COLLECT_GCC=/opt/gcc/4.6.0/bin/../snos/bin/g++ COLLECT_LTO_WRAPPER=/opt/gcc/4.6.0/snos/libexec/gcc/x86_64-suse-linux/4.6.0/lto-wrapper Target: x86_64-suse-linux Configured with: ../xt-gcc-4.6.0/configure --prefix=/opt/gcc/4.6.0/snos --disable-nls --libdir=/opt/gcc/4.6.0/snos/lib --enable-languages=c,c++,fortran --with-gxx-include-dir=/opt/gcc/4.6.0/snos/include/g++ --with-slibdir=/opt/gcc/4.6.0/snos/lib --with-system-zlib --enable-shared --enable-__cxa_atexit x86_64-suse-linux --with-mpc=/opt/gcc/mpc/0.8.1 --with-mpfr=/opt/gcc/mpfr/2.4.2 --with-gmp=/opt/gcc/gmp/4.3.2 --with-sysroot= Thread model: posix gcc version 4.6.0 20110325 (Cray Inc.) (GCC) </pre><p> As suggested by Jurko earlier today when we did a bit of debugging, the following was tried on the trunk of Boost build. All commands below are executed within the v2/engine directory. </p> <p> Now, the culprit appears to be the expand() function in function.c. For testing we use a file, let's call it jamtest.jam, containing only these lines: </p> <pre class="wiki">local a = one two three ; ECHO /$(a)/ ; </pre><p> Then the following commands: </p> <pre class="wiki">$ ./build.sh -d3 --release &gt; /tmp/build-d3-release $ ./bin.linuxx86_64/bjam -f jamtest.jam </pre><p> gives </p> <pre class="wiki">/one/ don't know how to make all ...found 1 target... ...can't find 1 target... </pre><p> but </p> <pre class="wiki">$ ./build.sh -d3 --debug &gt; /tmp/build-d3-debug $ ./bin.linuxx86_64.debug/bjam -f jamtest.jam </pre><p> gives </p> <pre class="wiki">/one/ /two/ /three/ don't know how to make all ...found 1 target... ...can't find 1 target... </pre><p> which is what we expected -- so clearly, the 'release' version is faulty. (BTW, the build-d3-release and build-d3-debug files can be found in the pastebins <strong>pastebin.com/M2njiNEK</strong> and <strong>pastebin.com/038qcgFF</strong> respectively). </p> <p> Now, if we insert the following lines just before the line "while ( --i &gt;= 0)" </p> <pre class="wiki"> if (--i &gt;= 0) { side_effect = i; } ++i; </pre><p> and add </p> <pre class="wiki"> static int side_effect; </pre><p> just before the function declaration, we then get: </p> <pre class="wiki">$ ./build.sh -d3 --release &gt; /tmp/build-d3-release $ ./bin.linuxx86_64/bjam -f jamtest.jam /one/ /two/ /three/ don't know how to make all ...found 1 target... ...can't find 1 target... </pre><p> and </p> <pre class="wiki">$ ./build.sh -d3 --debug &gt; /tmp/build-d3-debug $ ./bin.linuxx86_64.debug/bjam -f jamtest.jam /one/ /two/ /three/ don't know how to make all ...found 1 target... ...can't find 1 target... </pre><p> that is, correct in both release and debug modes. </p> <p> To me, it smells compiler bug, but as this is a system where I cannot "just update" the compiler, I am wondering if there are other solutions. I have a feeling that it is the loop/while/goto construct that's complicating matters. </p> <p> BTW, the problem is not present with Boost 1.49, but both in 1.51 and trunk. Of course, function.c is not present in 1.49, so that figures. </p> <p> I'd <span class="underline">really</span> like to get on 1.51, so any suggestions on how to proceed are most welcome. </p> <p> Best regards </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 29 Aug 2012 20:39:04 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7212#comment:15 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:15</guid> <description> <p> BTW, could somebody else with a GCC 4.6.0 try to reproduce? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jurko Gospodnetic</dc:creator> <pubDate>Wed, 29 Aug 2012 21:48:09 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7212#comment:16 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:16</guid> <description> <p> We've confirmed this as a goto related compiler bug. :-) </p> <p> I'm attaching a patched function.c module based on revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/80313" title="Internal Boost Jam cleanup - function.c module's expand() function ...">[80313]</a> that fixes the bug on the target system. I'll not commit it until we can find out more precisely which systems are affected by the bug. </p> <p> Best regards, </p> <blockquote> <p> Jurko Gospodnetić </p> </blockquote> </description> <category>Ticket</category> </item> <item> <dc:creator>Jurko Gospodnetic</dc:creator> <pubDate>Wed, 29 Aug 2012 21:52:45 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/7212 https://svn.boost.org/trac10/ticket/7212 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">function.c</span> </li> </ul> <p> Modified function.c Boost Jam source file based on revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/80313" title="Internal Boost Jam cleanup - function.c module's expand() function ...">[80313]</a> that fixes the issue on one system. </p> Ticket Jason Vas Dias <jason.vas.dias@…> Wed, 29 Aug 2012 21:57:05 GMT <link>https://svn.boost.org/trac10/ticket/7212#comment:17 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:17</guid> <description> <p> Sorry I haven't been much help in resolving the bug I raised, since I needed a boost build in a hurry I reran bootstrap.sh in my own Linux root but using the Python from a Fedora 14 chroot ; then magically the b2 commands started to work , and I was able to complete the build back in my own distro with gcc-4.6.0 . But I think the whole Boost build process should not depend on Python ! I would rather program with modern C++-11 and Boost than Python - why not remove the python dependencies and replace with C++ ? I just wrote bash shell brace-expansion and wildcard-matching code in C++-11 (only!) and found it a refreshing and rewarding experience - beside it the python equivalent looks kludgey, quirky and over-verbose - what do you expect from a language whose syntax changes with every major release ? Why not use one with a well-designed syntax ? Or just use bash / sh ? </p> </description> <category>Ticket</category> </item> <item> <author>Jason Vas Dias <jason.vas.dias@…></author> <pubDate>Wed, 29 Aug 2012 21:58:10 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7212#comment:18 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:18</guid> <description> <p> Anyway, I'll try with 1.51 now - at least this issue seems to have exposed a genuine problem . </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jurko Gospodnetic</dc:creator> <pubDate>Wed, 29 Aug 2012 22:14:33 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7212#comment:19 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:19</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7212#comment:17" title="Comment 17">Jason Vas Dias &lt;jason.vas.dias@…&gt;</a>: </p> <blockquote class="citation"> <p> Sorry I haven't been much help in resolving the bug I raised, since I needed a boost build in a hurry I reran bootstrap.sh in my own Linux root but using the Python from a Fedora 14 chroot ; then magically the b2 commands started to work , and I was able to complete the build back in my own distro with gcc-4.6.0 . But I think the whole Boost build process should not depend on Python ! </p> </blockquote> <p> I am not really sure what happened on your system. I can correctly build Boost on my Win7 system without having Python on the path at all (without building up Boost Python, ofcourse) so I do not really know what Python dependency you are talking about. </p> <blockquote class="citation"> <p> I would rather program with modern C++-11 and Boost than Python - why not remove the python dependencies and replace with C++ ? </p> </blockquote> <p> The only Python dependency I am aware of is in the Boost Python library and some internal testing scripts. Could you help find any others? </p> <blockquote class="citation"> <p> I just wrote bash shell brace-expansion and wildcard-matching code in C++-11 (only!) and found it a refreshing and rewarding experience - beside it the python equivalent looks kludgey, quirky and over-verbose - what do you expect from a language whose syntax changes with every major release ? Why not use one with a well-designed syntax ? Or just use bash / sh ? </p> </blockquote> <p> Actually, I'm quite fond of Python. :-) But, as I said before, I'm not actually sure what Python dependency you're referring to here... </p> <p> However - could you try out the corrected source file I attached to this ticked and see if it fixes the issue? Just checkout Boost Build revision 80313, patch it with the attached file, build Boost Jam from there (run the 'tools/build/v2/engine/build.sh gcc' script) and then use the built Boost Jam executable to install the Boost libraries. </p> <p> Best regards, </p> <blockquote> <p> Jurko Gospodnetić </p> </blockquote> </description> <category>Ticket</category> </item> <item> <author>Jason Vas Dias <jason.vas.dias@…></author> <pubDate>Wed, 29 Aug 2012 22:21:32 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7212#comment:20 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:20</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7212#comment:18" title="Comment 18">Jason Vas Dias &lt;jason.vas.dias@…&gt;</a>: </p> <blockquote class="citation"> <p> Anyway, I'll try with 1.51 now - at least this issue seems to have exposed a genuine problem . </p> </blockquote> <p> And after building gcc-4.7.1 and compiling with it ... Thanks! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jurko Gospodnetic</dc:creator> <pubDate>Wed, 29 Aug 2012 22:26:28 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7212#comment:21 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:21</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7212#comment:20" title="Comment 20">Jason Vas Dias &lt;jason.vas.dias@…&gt;</a>: </p> <blockquote class="citation"> <blockquote class="citation"> <p> Anyway, I'll try with 1.51 now - at least this issue seems to have exposed a genuine problem . </p> </blockquote> <p> And after building gcc-4.7.1 and compiling with it ... Thanks! </p> </blockquote> <p> I'm not sure what you're referring to here - again. :-) </p> <p> You mean - your problem went away after you started using gcc-4.7.1 but with gcc-4.6.0 it's failing? </p> </description> <category>Ticket</category> </item> <item> <author>Kim Rasmussen <rasmussen74@…></author> <pubDate>Thu, 30 Aug 2012 09:33:39 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7212#comment:22 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7212#comment:22</guid> <description> <p> <strong>Update:</strong> </p> <p> I have tried compiling with gcc 4.6.1 and gcc 4.6.2 and the small case described earlier in this thread successfully compiles with both. </p> <p> Subsequently I have successfully compiled the entire Boost 1.51 and the dependent project using gcc 4.6.2 on the target system, so that's solves it for me for now. </p> <p> However, I think that it is clear that gcc 4.6.0 is broken for the loop/while/goto construct when using -Os, -O2 or -O3. It might be an idea to replace it with a while/while/break construct or flag 4.6.0 as broken. </p> <p> Sidenote: On my desktop I have absolutely no problem using gcc 4.7.0 and Boost 1.51. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jurko Gospodnetic</dc:creator> <pubDate>Thu, 30 Aug 2012 13:03:34 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7212#comment:23 https://svn.boost.org/trac10/ticket/7212#comment:23 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed by revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/80319" title="Replaced a goto based loop construct with a while loop in Boost Jam ...">[80319]</a>. </p> Ticket