#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    6
    Rep Power
    0

    Error: command 'gcc' failed with exit status 1


    Hello,

    i am installing CVXOPT using the instructions of this site "abel.ee.ucla.edu/cvxopt/install/index.html"

    When i reach "python setup.py build --compiler=mingw32" i face the following problem

    C:\Python27\cvxopt-1.1.5\src>python setup.py build --compiler=mingw32
    running build
    running build_py
    running build_ext
    building 'base' extension
    C:\G77\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python27\cvxopt-1.1.5\src\inc
    lude -IC:\Python27\cvxopt-1.1.5\src\PC -c C/base.c -o build\temp.win32-2.7\Relea
    se\c\base.o
    In file included from C:\Python27\cvxopt-1.1.5\src\include\sys\types.h:21,
    from C:\Python27\cvxopt-1.1.5\src\include\io.h:20,
    from C:\Python27\cvxopt-1.1.5\src\include\pyconfig.h:68,
    from C:\Python27\cvxopt-1.1.5\src\include\Python.h:8,
    from C/base.c:24:
    C:\Python27\cvxopt-1.1.5\src\include\stddef.h:6: No include path in which to fin
    d stddef.h
    In file included from C:\Python27\cvxopt-1.1.5\src\include\stdint.h:24,
    from C:\Python27\cvxopt-1.1.5\src\include\io.h:21,
    from C:\Python27\cvxopt-1.1.5\src\include\pyconfig.h:68,
    from C:\Python27\cvxopt-1.1.5\src\include\Python.h:8,
    from C/base.c:24:
    C:\Python27\cvxopt-1.1.5\src\include\stddef.h:6: No include path in which to fin
    d stddef.h
    In file included from C:\Python27\cvxopt-1.1.5\src\include\stdio.h:26,
    from C:\Python27\cvxopt-1.1.5\src\include\pyconfig.h:296,
    from C:\Python27\cvxopt-1.1.5\src\include\Python.h:8,
    from C/base.c:24:
    C:\Python27\cvxopt-1.1.5\src\include\stddef.h:6: No include path in which to fin
    d stddef.h
    In file included from C:\Python27\cvxopt-1.1.5\src\include\stdio.h:28,
    from C:\Python27\cvxopt-1.1.5\src\include\pyconfig.h:296,
    from C:\Python27\cvxopt-1.1.5\src\include\Python.h:8,
    from C/base.c:24:
    C:\Python27\cvxopt-1.1.5\src\include\stdarg.h:6: No include path in which to fin
    d stdarg.h
    In file included from C/base.c:24:
    C:\Python27\cvxopt-1.1.5\src\include\Python.h:35: #error "Python.h requires that
    stdio.h define NULL."
    In file included from C:\Python27\cvxopt-1.1.5\src\include\string.h:24,
    from C:\Python27\cvxopt-1.1.5\src\include\Python.h:38,
    from C/base.c:24:
    C:\Python27\cvxopt-1.1.5\src\include\stddef.h:6: No include path in which to fin
    d stddef.h
    In file included from C:\Python27\cvxopt-1.1.5\src\include\stdlib.h:22,
    from C:\Python27\cvxopt-1.1.5\src\include\Python.h:42,
    from C/base.c:24:
    C:\Python27\cvxopt-1.1.5\src\include\stddef.h:6: No include path in which to fin
    d stddef.h
    In file included from C:\Python27\cvxopt-1.1.5\src\include\Python.h:49,
    from C/base.c:24:
    C:\Python27\cvxopt-1.1.5\src\include\stddef.h:6: No include path in which to fin
    d stddef.h
    In file included from C:\Python27\cvxopt-1.1.5\src\include\time.h:21,
    from C:\Python27\cvxopt-1.1.5\src\include\pyport.h:325,
    from C:\Python27\cvxopt-1.1.5\src\include\Python.h:58,
    from C/base.c:24:
    C:\Python27\cvxopt-1.1.5\src\include\stddef.h:6: No include path in which to fin
    d stddef.h
    In file included from C:\Python27\cvxopt-1.1.5\src\include\sys\stat.h:21,
    from C:\Python27\cvxopt-1.1.5\src\include\pyport.h:377,
    from C:\Python27\cvxopt-1.1.5\src\include\Python.h:58,
    from C/base.c:24:
    C:\Python27\cvxopt-1.1.5\src\include\stddef.h:6: No include path in which to fin
    d stddef.h
    In file included from C:\Python27\cvxopt-1.1.5\src\include\unicodeobject.h:4,
    from C:\Python27\cvxopt-1.1.5\src\include\Python.h:85,
    from C/base.c:24:
    C:\Python27\cvxopt-1.1.5\src\include\stdarg.h:6: No include path in which to fin
    d stdarg.h
    In file included from C:\Python27\cvxopt-1.1.5\src\include\ctype.h:20,
    from C:\Python27\cvxopt-1.1.5\src\include\unicodeobject.h:57,
    from C:\Python27\cvxopt-1.1.5\src\include\Python.h:85,
    from C/base.c:24:
    C:\Python27\cvxopt-1.1.5\src\include\stddef.h:6: No include path in which to fin
    d stddef.h
    In file included from C:\Python27\cvxopt-1.1.5\src\include\wchar.h:26,
    from C:\Python27\cvxopt-1.1.5\src\include\unicodeobject.h:120,
    from C:\Python27\cvxopt-1.1.5\src\include\Python.h:85,
    from C/base.c:24:
    C:\Python27\cvxopt-1.1.5\src\include\stddef.h:6: No include path in which to fin
    d stddef.h
    In file included from C:\Python27\cvxopt-1.1.5\src\include\wctype.h:32,
    from C:\Python27\cvxopt-1.1.5\src\include\wchar.h:45,
    from C:\Python27\cvxopt-1.1.5\src\include\unicodeobject.h:120,
    from C:\Python27\cvxopt-1.1.5\src\include\Python.h:85,
    from C/base.c:24:
    C:\Python27\cvxopt-1.1.5\src\include\stddef.h:6: No include path in which to fin
    d stddef.h
    In file included from C:\Python27\cvxopt-1.1.5\src\include\stringobject.h:10,
    from C:\Python27\cvxopt-1.1.5\src\include\Python.h:94,
    from C/base.c:24:
    C:\Python27\cvxopt-1.1.5\src\include\stdarg.h:6: No include path in which to fin
    d stdarg.h
    In file included from C:\Python27\cvxopt-1.1.5\src\include\bytearrayobject.h:9,
    from C:\Python27\cvxopt-1.1.5\src\include\Python.h:98,
    from C/base.c:24:
    C:\Python27\cvxopt-1.1.5\src\include\stdarg.h:6: No include path in which to fin
    d stdarg.h
    In file included from C:\Python27\cvxopt-1.1.5\src\include\pyerrors.h:319,
    from C:\Python27\cvxopt-1.1.5\src\include\Python.h:121,
    from C/base.c:24:
    C:\Python27\cvxopt-1.1.5\src\include\stdarg.h:6: No include path in which to fin
    d stdarg.h
    In file included from C:\Python27\cvxopt-1.1.5\src\include\modsupport.h:10,
    from C:\Python27\cvxopt-1.1.5\src\include\Python.h:126,
    from C/base.c:24:
    C:\Python27\cvxopt-1.1.5\src\include\stdarg.h:6: No include path in which to fin
    d stdarg.h
    In file included from C:\Python27\cvxopt-1.1.5\src\include\structmember.h:10,
    from C\cvxopt.h:23,
    from C/base.c:25:
    C:\Python27\cvxopt-1.1.5\src\include\stddef.h:6: No include path in which to fin
    d stddef.h
    error: command 'gcc' failed with exit status 1


    Can u please help?
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,850
    Rep Power
    481
    Your compiler cannot find for inclusion these files which should be part of the compiler distribution:

    stdarg.h
    stddef.h

    I usually doubt the advice when told to "reinstall my xxx". Sorry. Reinstalling your mingw compiler might solve the problem.

    Otherwise, you need to find the files on your computer system and somehow pass options through setup.py .

    I'm certain that, were I using your computer directly, I could finish this build. It would be messy because I've never figured out setup.py.


    stddef.h is in some directory. Let's call the directory

    c:/Program Files/mingw/gcc/include

    You need to pass the argument

    -I"c:/Program Files/mingw/gcc/include"

    to gcc.

    stddef.h and stdarg.h are probably in the same directory.


    Alternatively, you could copy those files into
    C:\Python27\cvxopt-1.1.5\src\include\

    and run the build command you first tried.


    I expect you'll have more issues before this is finished.
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo