Re: `gem install rdiscount` fails ...

34 views
Skip to first unread message

Eric Promislow

unread,
Sep 22, 2010, 1:57:22 PM9/22/10
to rubyin...@googlegroups.com
The problem is that the gcc installation in devkit 4.5.0 is incorrectly configured
or packaged.
Here's the scenario with devkit 3.4.5 (Vista)

C:\Users\ericp\trash>cat conftest.c
int main() { return 0; }

C:\Users\ericp\trash>which gcc
c:\devkit-3.4.5\mingw\bin\gcc.EXE

C:\Users\ericp\trash>gcc -v -o conftest conftest.c
Reading specs from c:/devkit-3.4.5/mingw/bin/../lib/gcc/mingw32/3.4.5/specs
Configured with: ../gcc-3.4.5-20060117-3/configure --with-gcc --with-gnu-ld
      --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads
     --disable-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry
     --disable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt
    --without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter
    --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.5 (mingw-vista special r3)
 c:/devkit-3.4.5/mingw/bin/../libexec/gcc/mingw32/3.4.5/cc1.exe -quiet -v
    -iprefix c:\devkit-3.4.5\mingw\bin/../lib/gcc/mingw32/3.4.5/ conftest.c -quiet
    -dumpbase conftest.c -auxbase conftest -version
    -o C:\Users\ericp\AppData\Local\Temp/ccxKRtur.s
ignoring nonexistent directory
    "c:/devkit-3.4.5/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../mingw32/include"
ignoring nonexistent directory "/mingw/include"
ignoring nonexistent directory "/mingw/include"
ignoring nonexistent directory "/mingw/lib/gcc/mingw32/3.4.5/include"
ignoring nonexistent directory "/mingw/mingw32/include"
ignoring nonexistent directory "/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
 c:/devkit-3.4.5/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include
 c:/devkit-3.4.5/mingw/bin/../lib/gcc/mingw32/3.4.5/include
End of search list.
GNU C version 3.4.5 (mingw-vista special r3) (mingw32)
        compiled by GNU C version 3.4.5 (mingw-vista special r3).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
     c:/devkit-3.4.5/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../mingw32/bin/as.exe
    -o C:\Users\ericp\AppData\Local\Temp/ccefxiPN.o
    C:\Users\ericp\AppData\Local\Temp/ccxKRtur.s
     c:/devkit-3.4.5/mingw/bin/../libexec/gcc/mingw32/3.4.5/collect2.exe -Bdynamic
    -o conftest.exe c:/devkit-3.4.5/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../crt2.o
    c:/devkit-3.4.5/mingw/bin/../lib/gcc/mingw32/3.4.5/crtbegin.o
     -Lc:/devkit-3.4.5/mingw/bin/../lib/gcc/mingw32/3.4.5
     -Lc:/devkit-3.4.5/mingw/bin/../lib/gcc
    -Lc:/devkit-3.4.5/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../mingw32/lib
     -Lc:/devkit-3.4.5/mingw/bin/../lib/gcc/mingw32/3.4.5/../../..
    C:\Users\ericp\AppData\Local\Temp/ccefxiPN.o -lmingw32 -lgcc -lmoldname
    -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32
     -lgcc -lmoldname -lmingwex -lmsvcrt
    c:/devkit-3.4.5/mingw/bin/../lib/gcc/mingw32/3.4.5/crtend.o

Now run in 4.5.0, in a separate window with a clean environment:

C:\Users\ericp\trash>which gcc
C:\Devkit450\mingw\bin\gcc.EXE

C:\Users\ericp\trash>gcc -v -o conftest conftest.c
Using built-in specs.
COLLECT_GCC=gcc
Target: mingw32
Configured with: ../../gcc-4.5.0/configure --prefix=/mingw --build=mingw32
    --enable-languages=c,ada,c++,fortran,objc,obj-c++ --disable-nls
    --disable-win32-registry --enable-libgomp --disable-werror --enable-threads
    --disable-symvers --enable-cxx-flags='-fno-function-sections
    -fno-data-sections' --enable-fully-dynamic-string --enable-libstdcxx-debug
    --enable-version-specific-runtime-libs --with-pkgversion=tdm-1
    --enable-sjlj-exceptions --with-bugurl=http://tdm-cc.tdragon.net/
bugs
Thread model: win32
gcc version 4.5.0 (tdm-1)
COLLECT_GCC_OPTIONS='-v' '-o' 'conftest.exe' '-mtune=i386' '-march=i386'
 cc1 -quiet -v -iprefix c:\devkit450\mingw\bin\../lib/gcc/mingw32/4.5.0/ conftest.c
    -quiet -dumpbase conftest.c -mtune=i386 -march=i386 -auxbase conftest
    -version -o C:\Users\ericp\AppData\Local\Temp\ccgKx4o8.s
gcc: CreateProcess: No such file or directory

So in 3.4.5, gcc specifies an explicit path to cc1.  In 4.5.0, it doesn't.

If I add %DEVKIT%mingw\libexec\gcc\mingw32\4.5.0; to PATH, I can use
gcc, but I see `gem install` is still broken.


Luis Lavena

unread,
Sep 22, 2010, 2:03:26 PM9/22/10
to rubyin...@googlegroups.com
On Wed, Sep 22, 2010 at 2:57 PM, Eric Promislow
<eric.pr...@gmail.com> wrote:
> The problem is that the gcc installation in devkit 4.5.0 is incorrectly
> configured
> or packaged.
> Here's the scenario with devkit 3.4.5 (Vista)
>

What version of Ruby? The version of GCC and the options feed by Ruby
rbconfig are important.

You should not be playing with the PATH, officially only mingw/bin
needs to be added as the other paths are managed internally.

Since seems you're using a Windows vista installation, would you mind
execute the same testing program with GCC 4.5.0 on a elevated command
prompt?

I don't have Vista to test it anymore, but I remember 3.4.5 r2 had
issues with it which made us report it for r3 be released.

Thank you.
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Jon

unread,
Sep 22, 2010, 4:59:20 PM9/22/10
to rubyin...@googlegroups.com
> Now run in 4.5.0, in a separate window with a clean environment:
>
> C:\Users\ericp\trash>which gcc
> C:\Devkit450\mingw\bin\gcc.EXE

In addition to Luis's feedback, for the above what else is on your PATH, in which environment are you running 'which', and do you have Cygwin installed?

On my Win7 system with a minimal PATH that looks like...

C:\Users\Jon>echo %PATH%
C:\DevKit\bin;C:\DevKit\mingw\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem

...from a Command Prompt I get:

C:\Users\Jon>which gcc
'which' is not recognized as an internal or external command,
operable program or batch file.

When I try 'which' from an MSYS shell fired up using the DevKit's 'msys.bat' I have the following PATH and 'which' result, none of which matches your setup:

Jon@Red ~
$ echo $PATH
.:/usr/local/bin:/mingw/bin:/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem

Jon@Red ~
$ which gcc
/mingw/bin/gcc.exe

Reply all
Reply to author
Forward
0 new messages