#106 gcc.exe fails to find as.exe

Unsupported_Usage
closed
nobody
None
5
2008-01-18
2008-01-15
Carsten Milkau
No

gcc seems to try to find as.exe on a linux path:

V:\>set PATH=c:\windows\system32;c:\windows;c:\MinGW\bin;c:\MinGW\i686-pc-mingw32\bin
V:\>c:\python25\python Setup.py build --compiler=mingw32
running build
running build_ext
building 'vickrey' extension
c:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python25\include -IC:\Python25\PC -c vickrey.c -o build\temp.win32-2.5\Release\vickrey.o
fixme:msvcrt:_spawnve only trying .exe when no extension given
gcc: installation problem, cannot exec `\usr\libexec\gcc\mingw32\as': No such file or directory
error: command 'gcc' failed with exit status 1

installed packages:
binutils-2.17.50-20060824-1
gcc-core-3.4.5-20060117-1
mingw-runtime-3.9
w32api-3.6

(binary versions, where applicable)
OS: Windows XP (emulated by wine-0.9.46)

No idea how to fix this. I don't even know whether this is a bug or my personal dumbness.

With Regards
Carsten

P.S. ... attached the project I'm trying to compile in case you can't reproduce.

Discussion

  • Carsten Milkau
    Carsten Milkau
    2008-01-15

     
    Attachments
  • Carsten Milkau
    Carsten Milkau
    2008-01-15

    Logged In: YES
    user_id=1192966
    Originator: YES

    update: added c:\MingW\mingw32\bin to %PATH% with identical results.

     
  • Earnie Boyd
    Earnie Boyd
    2008-01-15

    • labels: 103944 -->
    • status: open --> pending
     
  • Earnie Boyd
    Earnie Boyd
    2008-01-15

    Logged In: YES
    user_id=15438
    Originator: NO

    This is an issue with your Python script or your environment. My SWAG is that it has given the AS environment the wrong path for the as executable.

     
  • Carsten Milkau
    Carsten Milkau
    2008-01-16

    Logged In: YES
    user_id=1192966
    Originator: YES

    Hmm personally I don't think so, for two reasons:
    * I'm using a sober windows version of python/distutils without any settings to compiler environment (but --compiler=mingw)
    * Python doesn't call as directly but gcc instead and there were (symptomatically) similar problems with vista and gcc/cc1

    Do you know an easy way to check whether the gcc environment is flawed eventually?

     
  • Carsten Milkau
    Carsten Milkau
    2008-01-16

    • status: pending --> open
     
  • Earnie Boyd
    Earnie Boyd
    2008-01-16

    • status: open --> pending
     
  • Earnie Boyd
    Earnie Boyd
    2008-01-16

    Logged In: YES
    user_id=15438
    Originator: NO

    Your build process thinks ``\usr\libexec\gcc\mingw32\as'' is the path to the assembler compiler, why? It should be ``c:\MinGW\bin\as''.

     
  • Carsten Milkau
    Carsten Milkau
    2008-01-16

    • status: pending --> open
     
  • Carsten Milkau
    Carsten Milkau
    2008-01-16

    Logged In: YES
    user_id=1192966
    Originator: YES

    The build process doesn't (directly) call as at all, it's gcc that's looking it up in the wrong location.

     
  • Earnie Boyd
    Earnie Boyd
    2008-01-17

    • status: open --> pending
     
  • Earnie Boyd
    Earnie Boyd
    2008-01-17

    Logged In: YES
    user_id=15438
    Originator: NO

    Something in your environment has told GCC that AS is pathed as \usr\libexec\gcc\mingw32\as. Look for environment issues such as a variable named AS being defined. The MinGW gcc uses relative pathing to determine where to find its executables; the path you've stated for AS is an absolute path which tells me it isn't GCC that is the issue. Try adding --verbose to the gcc command.

     
  • gcc --verbose

     
    Attachments
  • gcc --verbose

     
    Attachments
  • gcc --verbose

     
    Attachments
  • Carsten Milkau
    Carsten Milkau
    2008-01-17

    Logged In: YES
    user_id=1192966
    Originator: YES

    Thanks for the --verbose hint, that's exactly what I wanted. Unfortunately,
    the information it gives doesn't give any hints about the problem (only
    stderr):

    Reading specs from c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/specs
    Configured
    with: ../gcc-3.4.5/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 special)
    c:/MinGW/bin/../libexec/gcc/mingw32/3.4.5/cc1.exe -quiet -v -IC:
    \Python25\include -IC:\Python25\PC -iprefix c:
    \MinGW\bin/../lib/gcc/mingw32/3.4.5/ vickrey.c -quiet -dumpbase
    vickrey.c -mno-cygwin -mdll -auxbase-strip
    build\temp.win32-2.5\Release\vickrey.o -ggdb -O -Wall -Wall -version -o c:
    \windows\temp/ccXaaaaa.s
    ignoring nonexistent
    directory "c:/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"
    ignoring nonexistent directory "C:/Python25/PC"
    #include "..." search starts here:
    #include <...> search starts here:
    C:/Python25/include
    c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include
    c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/include
    End of search list.
    GNU C version 3.4.5 (mingw special) (mingw32)
    compiled by GNU C version 3.4.5 (mingw special).
    GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
    [... non-related compiler warnings ...]
    gcc: installation problem, cannot exec `\usr\libexec\gcc\mingw32\as': No such
    file or directory
    error: command 'gcc' failed with exit status 1

    Looks fine to me ... of course I didn't mess with any environment variables,
    if they are set, distutils set them.

     
  • Carsten Milkau
    Carsten Milkau
    2008-01-17

    • status: pending --> open
     
  • Earnie Boyd
    Earnie Boyd
    2008-01-17

    Logged In: YES
    user_id=15438
    Originator: NO

    What is the output of ``gcc -print-prog-name=as''?

     
  • Earnie Boyd
    Earnie Boyd
    2008-01-17

    Logged In: YES
    user_id=15438
    Originator: NO

    And what is the output of ``set''?

     
  • Carsten Milkau
    Carsten Milkau
    2008-01-18

    Logged In: YES
    user_id=1192966
    Originator: YES

    output of gcc -print-prog-name=as (in build env): /usr/libexec/gcc/mingw32/as
    output of gcc -print-prog-name=as (on cmd line): /usr/libexec/gcc/mingw32/as
    output of set (on cmd line):

    CLASSPATH=.
    COLORTERM=
    ComSpec=c:\windows\system32\cmd.exe
    CONFIG_PROTECT_MASK=/etc/env.d/java/ /etc/php/cli-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/udev/rules.d /etc/gconf /etc/terminfo /etc/texmf/web2c /etc/revdep-rebuild
    CONFIG_PROTECT=/usr/kde/3.5/share/config /usr/kde/3.5/env /usr/kde/3.5/shutdown /usr/share/config
    CVS_RSH=ssh
    DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-anBnGmIwlU,guid=dfd20f9bf2e38686a4e15900478fb9b1
    DCCC_PATH=/usr/lib/distcc/bin
    DESKTOP_SESSION=default
    DISPLAY=:0
    DISTCC_LOG=
    DISTCC_VERBOSE=0
    DM_CONTROL=/var/run/xdmctl
    EDITOR=/usr/bin/vim
    GCC_SPECS=
    GDK_USE_XFT=1
    GENERATION=2
    GS_LIB=/home/cami/.fonts
    GTK_RC_FILES=/etc/gtk/gtkrc:/home/cami/.gtkrc:/home/cami/.kde3.5/share/config/gtkrc
    GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/cami/.gtkrc-2.0:/home/cami/.kde3.5/share/config/gtkrc-2.0
    INFOPATH=/usr/share/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/info:/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2/info
    JAVA_HOME=/home/cami/.gentoo/java-config-2/current-user-vm
    JAVAC=/home/cami/.gentoo/java-config-2/current-user-vm/bin/javac
    JDK_HOME=/home/cami/.gentoo/java-config-2/current-user-vm
    KDE_FULL_SESSION=true
    KDE_MULTIHEAD=false
    KDE_SESSION_UID=1000
    KDEDIRS=/usr:/usr/local:/usr/kde/3.5
    KONSOLE_DCOP_SESSION=DCOPRef(konsole-12100,session-1)
    KONSOLE_DCOP=DCOPRef(konsole-12100,konsole)
    LANG=de_DE.UTF-8
    LC_ALL=de_DE.UTF-8
    LESS=-R -M --shift 5
    LESSOPEN=|lesspipe.sh %s
    LOGNAME=cami
    LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:
    MANPATH=/home/cami/.gentoo/java-config-2/current-user-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/man:/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2/man:/opt/blackdown-jdk-1.4.2.03/man:/etc/java-config/system-vm/man/:/usr/lib/php5/man/:/usr/kde/3.5/share/man:/usr/qt/3/doc/man
    NUMBER_OF_PROCESSORS=2
    OPENGL_PROFILE=nvidia
    OS=Windows_NT
    PAGER=/usr/bin/less
    PATH=c:\windows\system32;c:\windows;c:\MinGW\bin;c:\Python25
    PKG_CONFIG_PATH=/usr/qt/3/lib/pkgconfig
    PRELINK_PATH_MASK=/usr/lib/gstreamer-0.8
    PROCESSOR_ARCHITECTURE=x86
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 67 Stepping 3, GenuineIntel
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=4303
    ProgramFiles=c:\Programme
    PWD=/home/cami/Dokumente/Entwicklung/Vickrey
    PYTHONPATH=/usr/lib/portage/pym
    QMAKESPEC=linux-g++
    QTDIR=/usr/qt/3
    SANE_CONFIG_DIR=/etc/sane.d
    SESSION_MANAGER=local/cami:/tmp/.ICE-unix/11935
    SGML_CATALOG_FILES=/etc/sgml/sgml-docbook.cat:/etc/sgml/openjade-1.3.2.cat:/etc/sgml/sgml-ent.cat:/etc/sgml/sgml-docbook-3.1.cat:/etc/sgml/sgml-lite.cat:/etc/sgml/dsssl-docbook-stylesheets.cat
    SHELL=/bin/bash
    SHLVL=2
    SYSTEMROOT=c:\windows
    TEMP=c:\windows\temp
    TERM=xterm
    TMP=c:\windows\temp
    USER=cami
    USERNAME=cami
    USERPROFILE=c:\windows\profiles\cami
    VMHANDLE=blackdown-jdk-1.4.2
    windir=c:\windows
    WINDOWID=62914565
    winsysdir=c:\windows\system32
    XCURSOR_THEME=default
    XDG_CONFIG_DIRS=/usr/kde/3.5/etc/xdg
    XDG_DATA_DIRS=/usr/share:/usr/kde/3.5/share:/usr/local/share
    XDM_MANAGED=/var/run/xdmctl/xdmctl-:0,maysd,mayfn,sched,rsvd,method=classic

    It's less trivial to get the output of set in the build env, so I'll do that tomorrow, if you think it's necessary.

     
  • Keith Marshall
    Keith Marshall
    2008-01-18

    Logged In: YES
    user_id=823908
    Originator: NO

    What platform are you running this on? Your environment is a veritable mish-mash of Linux/Woe32 settings; (predominantly Linux, but OS says WinNT, ComSpec is defined as for Woe32, and PATH is in Woe32 format).

    Are you, by any chance, trying to run a Woe32 native compile suite on a Linux host, under Wine? If so, then don't do that! Install a properly configured cross-compiler suite, and use it instead;
    see: https://sourceforge.net/project/showfiles.php?group_id=2435&package_id=12644

     
  • Keith Marshall
    Keith Marshall
    2008-01-18

    Logged In: YES
    user_id=823908
    Originator: NO

    > Are you, by any chance, trying to run a Woe32 native compile suite
    > on a Linux host, under Wine?

    Looking at your original post again, I see this is exactly what you
    *are* trying to do; and the gcc being run would seem to be your native
    Linux version, or at least, your Woe32 gcc driver is finding the Linux
    component tools, rather than the Woe32 variants.

    I see little point in discussing this further. This is not a MinGW bug,
    but rather your misuse of MinGW on a foreign host; as I said previously,
    you should use a cross-compiler.

     
  • Keith Marshall
    Keith Marshall
    2008-01-18

    • milestone: --> Unsupported_Usage
    • status: open --> closed
     
  • Carsten Milkau
    Carsten Milkau
    2008-01-18

    Logged In: YES
    user_id=1192966
    Originator: YES

    Apparently you're right, since removing the Z: drive (pointing to linux
    root directory) fixed the problem. Is it possible that MingW searches all
    drives for build tools? The output clearly shows that python is calling the
    MinGW gcc, so if Linux tools are found, they are found by MinGW tools. Thus
    actually it's rather me that'd say: don't do that. ;) Use the installation
    paths, don't be too graceful with possible search paths.

    Thx for your help!