https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112012-11-24T10:43:16ZRuby Issue Tracking SystemRuby master - Feature #7427: Update Rubygemshttps://bugs.ruby-lang.org/issues/7427?journal_id=337172012-11-24T10:43:16Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Priority</strong> changed from <i>Normal</i> to <i>5</i></li></ul> Ruby master - Feature #7427: Update Rubygemshttps://bugs.ruby-lang.org/issues/7427?journal_id=340102012-11-27T14:49:29Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul></ul><p>I plan to commit RubyGems by Thursday Pacific Time.</p> Ruby master - Feature #7427: Update Rubygemshttps://bugs.ruby-lang.org/issues/7427?journal_id=342152012-11-30T19:30:34Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Priority</strong> changed from <i>5</i> to <i>6</i></li></ul><p>drbrain, good work!</p>
<p>The current trunk seems to work on many platforms [1], but unfortunately, usa told me that it does not work on windows [2].</p>
<p>[1] <a href="http://rubyci.org/" class="external">http://rubyci.org/</a><br>
[2] <a href="http://ci.rubyinstaller.org/job/ruby-trunk-x64-test-all/317/console" class="external">http://ci.rubyinstaller.org/job/ruby-trunk-x64-test-all/317/console</a></p>
<p>Can you investigate and fix them?</p>
<p>--<br>
Yusuke Endoh <a href="mailto:mame@tsg.ne.jp" class="email">mame@tsg.ne.jp</a></p> Ruby master - Feature #7427: Update Rubygemshttps://bugs.ruby-lang.org/issues/7427?journal_id=342292012-12-01T02:24:34Zusa (Usaku NAKAMURA)usa@garbagecollect.jp
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>I hope... I've fixed... all problems on Windows... cause by rubygems.....</p>
<p>Eric, check these revisions and merge your tree:<br>
r38064, r38065, r38066, r38071, r38074, r38075 and r37077</p>
<p>I'm uncertain about r38071 and r38074.<br>
Eric, please take care of these two commits.</p>
<p>Have a good weekend, especially, mame-san :)<br>
Good-bye until Monday!</p> Ruby master - Feature #7427: Update Rubygemshttps://bugs.ruby-lang.org/issues/7427?journal_id=342342012-12-01T04:37:27Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul></ul><p>Thank you for your assistance, usa!</p>
<p>I imported all these fixes and your RDoc fix.</p>
<p>r38074 was good. r38071 is fine. The message may not be completely correct, but without a windows environment it is difficult to tell. (I tried setting one up with MinGW this morning but failed.)</p>
<p>I also update r38075 for ruby 1.8.7 compatibility. Hopefully I won't need to support it soon!</p> Ruby master - Feature #7427: Update Rubygemshttps://bugs.ruby-lang.org/issues/7427?journal_id=342412012-12-01T06:07:36Zjonforums (Jon Forums)
<ul></ul><blockquote>
<p>r38074 was good. r38071 is fine. The message may not be completely correct, but without a windows environment it is difficult to tell. (I tried setting one up with MinGW this morning but failed.)</p>
</blockquote>
<p>Eric, what windows version were you using and what specifically failed with your mingw setup this morning? Hopefully one of us can quickly get you up and running.</p>
<p>I'd really like to see you get a workable windows setup (vm or non-vm) given all you work on.</p>
<p>Assuming the problem wasn't standing up a windows system, here's a quick setup similar to what I use on my win7 32bit system. There are other ways, but I prefer this method as it gives more flexibility on tweaking ruby source.</p>
<ol>
<li>Separately <code>git clone</code> rubyinstaller build recipes and ruby into</li>
</ol>
<p>c:\projects\rubyinstaller<br>
c:\projects\ruby</p>
<ol start="2">
<li>
<p>Ensure any antivirus real-time protection (eg - windows defender, avg, etc) excludes both of the dirs from (1)</p>
</li>
<li>
<p>Checkout whatever ruby branch you want in c:\projects\ruby.</p>
</li>
<li>
<p>cd c:\projects\rubyinstaller</p>
<p>rake clean<br>
rake ruby19 local=c:\projects\ruby dkver=mingw64-32-4.7.2</p>
<p>rake devkit:sh<br>
export PATH=/c/projects/rubyinstaller/sandbox/ruby19_mingw/bin:$PATH<br>
cd sandbox/ruby19_build/<br>
make test<br>
make test-all</p>
</li>
</ol>
<p>This will download all the toolchain parts and pre-built native libs and try to build everything with mingw-w64 32bit gcc 4.7.2. Beware of network issues causing download problems for the artifacts and failing the build. Quickest way is to check in <code>c:\projects\rubyinstaller\downloads</code> for any 0-byte files, delete them, and re-run <code>rake ruby19 local=...</code></p>
<p>If you're trying on a 64bit system, you'll need to use <code>dkver=mingw64-64-4.7.2</code>. I don't build on a 64bit system yet, but Hiroshi or Luis can add more info if needed.</p> Ruby master - Feature #7427: Update Rubygemshttps://bugs.ruby-lang.org/issues/7427?journal_id=342422012-12-01T06:36:53Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul></ul><p>=begin<br>
I have Windows XP running in VirtualBox. (I don't have a license for a newer version.) I believe I have it set up for 32bit operation, but I can't see how to check in VirtualBox or Windows.</p>
<p>I downloaded mingw-inst-get-20120426 and told it to use the latest packages upon install.</p>
<p>I have mingw32-gcc 4.7.2</p>
<p>When running make I get a link failure (typed by hand):</p>
<p>thread.o:thread.c:(.text=0x3326): undefined reference to `__sync_val_compare_and_swap_4'<br>
collect2.exe: error: ld returned 1 exit status</p>
<p>I understand this function is a GCC builtin that isn't present on MinGW, but I didn't have time to investigate further due to lunch and whatnot.</p>
<p>I'll see what I can do with your setup instructions.<br>
=end</p> Ruby master - Feature #7427: Update Rubygemshttps://bugs.ruby-lang.org/issues/7427?journal_id=342452012-12-01T07:00:43Zjonforums (Jon Forums)
<ul></ul><p>Don't worry about installing a toolchain and double check that you have a minimal PATH and clean env vars; no pointers to an existing cygwin or mingw install.</p>
<p>We've made the build recipes self-contained so you don't have to worry about installing toolchains, using env vars to influence configure, etc. The <code>rake ruby19 ...</code> command first downloads all it needs into a download cache and then extracts, configures, and builds everything in a sandbox. There's other things (<code>rake -T</code>) you can do (build with a toolchain listed in <code>rake devkit:ls</code>) but my quick start should work.</p>
<p>re: WinXP 32bit...I don't have an XP system any more but I believe Hiroshi has semi-recently built on XP. If you run into compile/link errors with mingw64-32-4.7.2, do a <code>rake clean</code> (keeps the file download cache) followed by <code>rake ruby19 local=c:\projects\ruby dkver=mingw-32-4.6.2</code> to build with the mingw.org toolkit rather than the mingw-w64 toolkit. They both should work even though there are header differences. The key (irrelevant to your scenario but an fyi) is to not mix-n-match building ruby with one toolkit while building a native gem with a different toolkit.</p>
<p>Good luck.</p>
<p>Hiroshi...any issues you've had building on XP 32bit I've forgotten?</p> Ruby master - Feature #7427: Update Rubygemshttps://bugs.ruby-lang.org/issues/7427?journal_id=342462012-12-01T07:26:08Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul></ul><p>The RubyInstaller build tools are fantastic!</p>
<p>Unfortunately I fail at exactly the same spot, undefined reference to __sync_val_compare_and_swap_4.</p>
<p>Looking closer, ruby_atomic.h checks HAVE_GCC_ATOMIC_BUILTINS and assumes the one I need is there even though it is missing.</p>
<p>There is a check in configure for linux for this builtin, but not for mingw32.</p>
<p>Removing HAVE_GCC_ATOMIC_BUILTINS from config.h allows linking of miniruby</p> Ruby master - Feature #7427: Update Rubygemshttps://bugs.ruby-lang.org/issues/7427?journal_id=342482012-12-01T07:30:54Zluislavena (Luis Lavena)luislavena@gmail.com
<ul></ul><p>drbrain (Eric Hodel) wrote:</p>
<blockquote>
<p>The RubyInstaller build tools are fantastic!</p>
<p>Unfortunately I fail at exactly the same spot, undefined reference to __sync_val_compare_and_swap_4.</p>
<p>Looking closer, ruby_atomic.h checks HAVE_GCC_ATOMIC_BUILTINS and assumes the one I need is there even though it is missing.</p>
</blockquote>
<p>That is weird, mingw-w64 provides that, which is the compiler we have been using for Ruby 2.0 (GCC 4.7.2)</p>
<p>Perhaps your other mingw-inst-get installation got in the way?</p>
<blockquote>
<p>There is a check in configure for linux for this builtin, but not for mingw32.</p>
<p>Removing HAVE_GCC_ATOMIC_BUILTINS from config.h allows linking of miniruby</p>
</blockquote>
<p>I'll take a look later tonight. I also have a drop and use package that contains the compilers, a base Ruby and everything to get you up and running quickly.</p> Ruby master - Feature #7427: Update Rubygemshttps://bugs.ruby-lang.org/issues/7427?journal_id=342502012-12-01T07:35:27Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul></ul><p>It seems that using rubyinstaller downloaded its own compiler, so I don't think it got in the way. Since configure doesn't check for these GCC builtins I will submit a patch to check for them momentarily.</p> Ruby master - Feature #7427: Update Rubygemshttps://bugs.ruby-lang.org/issues/7427?journal_id=342512012-12-01T07:39:34Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul></ul><p>Filed <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: ruby cannot build on mingw32 or FreeBSD 8 due to missing __sync_val_compare_and_swap (Closed)" href="https://bugs.ruby-lang.org/issues/7485">#7485</a></p> Ruby master - Feature #7427: Update Rubygemshttps://bugs.ruby-lang.org/issues/7427?journal_id=342522012-12-01T08:21:26Zjonforums (Jon Forums)
<ul></ul><p>Odd. On both my trunk (mingw-w64 gcc 4.7.2) and ruby_1_9_3 (mingw.org gcc 4.6.2) builds, HAVE_GCC_ATOMIC_BUILTINS is defined and all is well on 32bit Win7. I think something else is interferring.</p>
<p>I'm going to try to talk a friend into letting me futz with her WinXP box and try from a fresh start.</p>
<p>From a Command Prompt, would you type <code>set</code> and put it in a gist along with <code>ruby --version</code> and <code>gem env</code> for good measure?</p> Ruby master - Feature #7427: Update Rubygemshttps://bugs.ruby-lang.org/issues/7427?journal_id=342582012-12-01T09:27:50Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul></ul><p>set and ruby -v: <a href="http://paste.segment7.net/ace.html" class="external">http://paste.segment7.net/ace.html</a></p>
<p>gem env: <a href="http://paste.segment.net/acf.html" class="external">http://paste.segment.net/acf.html</a></p> Ruby master - Feature #7427: Update Rubygemshttps://bugs.ruby-lang.org/issues/7427?journal_id=342602012-12-01T10:37:15Zjonforums (Jon Forums)
<ul></ul><p>drbrain (Eric Hodel) wrote:</p>
<blockquote>
<p>set and ruby -v: <a href="http://paste.segment7.net/ace.html" class="external">http://paste.segment7.net/ace.html</a></p>
</blockquote>
<p>Looks ok.</p>
<blockquote>
<p>gem env: <a href="http://paste.segment.net/acf.html" class="external">http://paste.segment.net/acf.html</a></p>
</blockquote>
<p>Bad link..should be <a href="http://paste.segment7.net/acf.html" class="external">http://paste.segment7.net/acf.html</a> (missing 7). This in GEM_PATHS is troubling but may be a red-herring since PATH doesn't appear to have other mingw installs:</p>
<p>C:/MinGW/msys/1.0/home/drbrain/.gem/ruby/1.9.1</p>
<p>Try the following on this snippet <a href="http://pastie.org/5460872" class="external">http://pastie.org/5460872</a> copied to c:\projects\rubyinstaller as gcc_atomic.c</p>
<p>cd c:\projects\rubyinstaller<br>
rake devkit dkver=mingw64-32-4.7.2<br>
rake devit:sh<br>
gcc --version # should be <code>gcc.exe (rubenvb-4.7.2-release) 4.7.2</code><br>
gcc -Wall -o atomics.exe gcc_atomic.c<br>
atomics.exe # should be <code>Got 1</code></p>
<p>If you try the same but with <code>rake devkit dkver=mingw-32-4.6.2</code> you're rewarded with:</p>
<p>C:\Users\Jon\AppData\Local\Temp\ccgG9KBw.o:gcc_atomic.c:(.text+0x2e): undefined reference to `__sync_val_compare_and_swap_4'<br>
collect2: ld returned 1 exit status</p>
<p>Don't know what this means just yet since I can build with both <code>mingw64-32-4.7.2</code> and <code>mingw-32-4.6.</code> Back in awhile after I play on XP.</p>
<p>When you run the following, do you get something similar? Specifically the front part of PATH.</p>
<p>C:\projects\rubyinstaller-git>rake devkit dkver=mingw64-32-4.7.2<br>
mkdir -p C:/projects/rubyinstaller-git/sandbox/.checkpoints<br>
touch C:/projects/rubyinstaller-git/sandbox/.checkpoints/.msys-download<br>
...SNIP...<br>
touch C:/projects/rubyinstaller-git/sandbox/.checkpoints/.mingw-extract<br>
rm -r sandbox/devkit/mingw/mingw32<br>
touch C:/projects/rubyinstaller-git/sandbox/.checkpoints/.mingw-prepare</p>
<p>C:\projects\rubyinstaller-git>rake devkit:sh<br>
Temporarily enhancing PATH to include DevKit...<br>
sh-3.1$ echo $PATH<br>
/usr/bin:/usr/mingw/bin:/c/Program Files/CollabNet/Subversion Client:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:<br>
/c/Windows/System32/WindowsPowerShell/v1.0/:/c/Program Files/ATI Technologies/ATI.ACE/Core-Static:<br>
/c/Program Files/Microsoft Windows Performance Toolkit/:/c/Windows/System32/WindowsPowerShell/v1.0/:/c/tools:<br>
/c/Python27/Scripts:/c/Python27:/c/ruby193/bin:/c/scala/bin:/c/lua/bin:/c/groovy/bin:/c/gnuwin32/curl/bin:/c/gnuwin32/diff/bin:<br>
/c/gnuwin32/grep/bin:/c/gnuwin32/findutils/bin:/c/gnuwin32/sed/bin:/c/gnuwin32/gawk/bin:/c/gnuwin32/less/bin:/c/gnuwin32/upx/bin:<br>
/c/gnuwin32/coreutils/bin:/c/Apps/android-sdk/tools:/c/Apps/android-sdk/platform-tools:/c/Apps/Wix:/c/Apps/git/cmd:/c/Apps/Chocolatey/bin:.</p>
<p>sh-3.1$ gcc --version<br>
gcc.exe (rubenvb-4.7.2-release) 4.7.2<br>
Copyright (C) 2012 Free Software Foundation, Inc.<br>
This is free software; see the source for copying conditions. There is NO<br>
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p> Ruby master - Feature #7427: Update Rubygemshttps://bugs.ruby-lang.org/issues/7427?journal_id=342612012-12-01T12:52:33Zjonforums (Jon Forums)
<ul></ul><p>I can build 2.0.0-preview1 on 32bit XP SP3 (right click My Computer -> properties) using the mingw-32-4.6.2 toolchain. <code>make test</code> has 0 errors, <code>make test-all</code> has 7 failures, 3 errors, 86 skips.</p>
<p>Unfortunately, our mingw64-32-4.7.2 toolchain blows up because the first conftest.c fails with an internal compiler error and an unhelpful log msg. And it seems <code>rake devkit:sh</code> behaves differently on XP and Win7. FYI for your scenario, but the gcc 4.7.2 issue is critical for us (rubyinstaller) to repro, find and fix.</p>
<p>Use the following instead of my previous versions. Remember to run a <code>rake clean</code> to clean out the build sandbox (devkit, ruby, libs, tools) unless you're in a C-tweak -> rebuild cycle and don't want to rebuild everything.</p>
<p>rake ruby19 local=c:\projects\ruby dkver=mingw-32-4.6.2<br>
rake devkit:sh dkver=mingw-32-4.6.2</p>
<p>I'm out for the evening. If this doesn't get you moving again, hopefully one of the others will saunter in with a solution.</p>
<p>Hey, I'm impressed. A VB vm on your Mac running XP and checking out the two-step that can be mingw. What's this world coming to ;)</p>