Maybe I found why cc.exe isn't found

  • FunkyPrince
    7th May 2017 Member 0 Permalink

    I'm not sure if it's a bug but I found this link: https://github.com/Alexpux/MINGW-packages/issues/1030

    which leads to this other one: https://github.com/Alexpux/MINGW-packages/pull/1034

    Looks like some MinGW versions don't download cc.exe, this is what files "The GNU C Compiler" lets you download:

    blob:http://imgur.com/41f93338-4758-460c-a229-f68e926a4580

    These are my dirs that I added to the "Path" env variable: ";C:\Users\Francesco\AppData\Local\Programs\Python\Python35\;C:\Users\Francesco\AppData\Local\Programs\Python\Python35\Scripts\;C:\MinGW\bin\"
    The dirs are correct while installing SCons:
    C:\Users\Francesco\AppData\Local\Programs\Python\Python35\
    C:\Users\Francesco\AppData\Local\Programs\Python\Python35\Lib\site-packages\

    The first link I sent says that they corrected the bug? But it doesn't look like that to my MinGW, which is on the version "0.6.2-beta-20131004-1".

  • jacob1
    7th May 2017 Developer 0 Permalink
    Are you unable to compile tpt? If you are still able to compile without cc.exe, I can remove / change the section of the wiki guide that tells you to run it.

    testing cc.exe isn't required at all, it's just a simple test to ensure MinGW installed correctly.
  • FunkyPrince
    7th May 2017 Member 0 Permalink

    @jacob1 (View Post)

     I stopped where the wiki says: 'If instead you get "cc: command not found"'

    Should I try to continue even if it says command not found?

  • jacob1
    7th May 2017 Developer 0 Permalink
    Yes, please continue the guide anyway. If MinGW isn't including cc.exe then that will always fail, even when MinGW is really installed.
    Edited once by jacob1. Last: 7th May 2017
  • FunkyPrince
    7th May 2017 Member 0 Permalink

    @jacob1 (View Post)

     I arrived to the last section, it says: "Now to compile, run scons.py".

    I cannot found scons.py here: https://github.com/simtr/The-Powder-Toy

    I didn't clone it, I downloaded the zip, the only py there is generator.py, other than SConscript and SConstruct.

    I guess I should open generator.py from IDLE and run it?

     

    EDIT: If I use scons.py directly into the Git Bash, it says: "scons: *** SCons version 2.5.1 does not run under Python version 3.5.1.
    Python 3 is not yet supported."

    Edited once by FunkyPrince. Last: 7th May 2017
  • jacob1
    7th May 2017 Developer 0 Permalink
    If you added everything to your path (which you did), scons.py is in your path already

    Edit: OK, so you'll have to do something like C:\Python27\python.exe scons.py
    Edit2: You did install python 2 and not 3, right? Also python 2 needs to be in your path, not python3. Unless you do C:\Python27\python.exe C:\Python27\whatever\whatever\scons.py
    Edited 2 times by jacob1. Last: 7th May 2017
  • FunkyPrince
    7th May 2017 Member 0 Permalink

    @jacob1 (View Post)

     I skipped the Python installation section, since I already had Python (3), maybe you should put a warn in the Wiki, so that anyone who already has Python, will still read that there is the need to use Python 2. I will install Python 2 now.

     

    EDIT: Is there a way I can add "C:\Python27\" but keeping "python" var for Python3 and make "python2" var for Python2? Anyway, I'll just replace the dirs in "Path" for now.

     

    EDIT 2: I have to reinstall SCons since I made it pointing to the Python3 directories.

     

    EDIT 3: I guess this is good: "$ scons.py

    scons: *** No SConstruct file found.
    File "C:\Python27\Lib\site-packages\scons-2.5.1\SCons\Script\Main.py", line 912, in _main"

    Edited 3 times by FunkyPrince. Last: 7th May 2017
  • jacob1
    7th May 2017 Developer 0 Permalink
    Make sure you are in the right directory when you run "scons.py". Be in the root directory of the source, the one with SConstruct in it.

    Also what I do is just not add python 2 to path at all, I always give a full manual path, like C:\Python27\python.exe C:\Python27\whatever\whatever\scons.py . That way I can keep python 3 as default, scons it the only thing that still uses python 2
  • FunkyPrince
    7th May 2017 Member 0 Permalink

    @jacob1 (View Post)

    It says C compiler works, so it works even without cc.exe

    It gives a problem at the end tho :/

     

     $ scons.py
    scons: Reading SConscript files ...
    Checking whether the C compiler works... yes
    Checking whether the C++ compiler works... yes
    Checking if 64 bit... no
    Adding 32 bit compile flags
    Checking for C library mingw32... yes
    Checking for C library ws2_32... yes
    Checking for C library SDLmain... yes
    Checking for C library SDL... yes
    Checking for C header file SDL.h... no
    Checking for C header file SDL/SDL.h... yes
    Checking for C library lua5.1... yes
    Checking for C header file lua5.1/lua.h... yes
    Checking for C library fftw3f... yes
    Checking for C library bz2... yes
    Checking for C header file bzlib.h... yes
    Checking for C library z... yes
    Checking for C library pthread... yes
    Checking for C library m... yes
    Checking for C library gdi32... yes
    Checking for C library winmm... yes
    Checking for C library dxguid... yes
    scons: done reading SConscript files.
    scons: Building targets ...
    g++ -o build\src\Format.o -c -std=gnu++98 -Wno-invalid-offsetof -msse -msse2 -O3 -ftree-vectorize -funsafe-math-optimizations -ffast-math -fomit-frame-pointer -funsafe-loop-optimizations -DSDL_INC -DWIN -D_WIN32_WINNT=0x0501 -D_USING_V110_SDK71_ -DX86 -DX86_SSE -DX86_SSE2 -DGRAVFFT -DLUACONSOLE -DUSE_SDL -Ibuild\src -Isrc -Ibuild\data -Idata -Ibuild\generated -Igenerated src\Format.cpp
    =====

    This application has requested the Runtime to terminate it in an unusual way.
    Please contact the application's support team for more information.
    Cannot create temporary file in C:\WINDOWS\: Permission denied

    =====
    scons: *** [build\src\Format.o] Error 3
    scons: building terminated because of errors.
    strip: 'build/Powder.exe': No such file

     

     

    EDIT: This time I ran it as Administrator, and that's the error it gives:

    $ scons.py
    scons: Reading SConscript files ...
    Checking whether the C compiler works... (cached) yes
    Checking whether the C++ compiler works... (cached) yes
    Checking if 64 bit... (cached) no
    Adding 32 bit compile flags
    Checking for C library mingw32... (cached) yes
    Checking for C library ws2_32... (cached) yes
    Checking for C library SDLmain... (cached) yes
    Checking for C library SDL... (cached) yes
    Checking for C header file SDL.h... (cached) no
    Checking for C header file SDL/SDL.h... (cached) yes
    Checking for C library lua5.1... (cached) yes
    Checking for C header file lua5.1/lua.h... (cached) yes
    Checking for C library fftw3f... (cached) yes
    Checking for C library bz2... (cached) yes
    Checking for C header file bzlib.h... (cached) yes
    Checking for C library z... (cached) yes
    Checking for C library pthread... (cached) yes
    Checking for C library m... (cached) yes
    Checking for C library gdi32... (cached) yes
    Checking for C library winmm... (cached) yes
    Checking for C library dxguid... (cached) yes
    scons: done reading SConscript files.
    scons: Building targets ...
    g++ -o build\src\Format.o -c -std=gnu++98 -Wno-invalid-offsetof -msse -msse2 -O3 -ftree-vectorize -funsafe-math-optimizations -ffast-math -fomit-frame-pointer -funsafe-loop-optimizations -DSDL_INC -DWIN -D_WIN32_WINNT=0x0501 -D_USING_V110_SDK71_ -DX86 -DX86_SSE -DX86_SSE2 -DGRAVFFT -DLUACONSOLE -DUSE_SDL -Ibuild\src -Isrc -Ibuild\data -Idata -Ibuild\generated -Igenerated src\Format.cpp
    =====
    g++: error: CreateProcess: No such file or directory

    =====
    scons: *** [build\src\Format.o] Error 1
    scons: building terminated because of errors.
    strip: 'build/Powder.exe': No such file

    Edited once by FunkyPrince. Last: 7th May 2017
  • jacob1
    7th May 2017 Developer 0 Permalink
    That seems to be another MinGW bug (MinGW has so many bugs all the time, because windows development is kind of awful)

    I found this here: https://github.com/Alexpux/MSYS2-packages/issues/235

    Some kind of fix is here but I would have to look into how to apply it to the SConscript: https://github.com/Alexpux/MSYS2-packages/pull/239/files