TPT++ Compile Errors

  • Candunc
    24th Dec 2012 Member 0 Permalink

    Hello, I'm trying to compile the latest source from github, and I am compiling on Debain 32 bit.

    I run it as scons --lin --release

     

    scons --lin --release
    scons: Reading SConscript files ...
    Checking for C library fftw3f... (cached) yes
    Checking for C library bz2... (cached) yes
    Checking for C library z... (cached) yes
    Checking for C header file bzlib.h... (cached) yes
    Checking for C library lua... (cached) no
    Checking for C library lua5.1... (cached) yes
    scons: done reading SConscript files.
    scons: Building targets ...
    g++ -o build/src/Format.o -c -w -std=c++98 -fkeep-inline-functions -m32 -D_GNU_SOURCE=1 -D_REENTRANT -DLUACONSOLE -DGRAVFFT -D_GNU_SOURCE -DUSE_STDINT -D_POSIX_C_SOURCE=200112L -DUSE_SDL -DLIN -DBETA -DX86 -I/usr/include/SDL -I/usr/include/lua5.1 -Ibuild/src -Ibuild/data -Ibuild/generated build/src/Format.cpp
    cc1plus: error: unrecognized command line option â-m32â
    scons: *** [build/src/Format.o] Error 1
    scons: building terminated because of errors.

     

    Any help?

  • tian110796
    24th Dec 2012 Member 1 Permalink

    It seems that the error is caused by invisible characters around -m32 in the command. The fix is to remove those invisible characters by retyping the -fkeep-inline-functions -m32 -D_GNU_SOURCE=1 part manually (do not copy paste!).

  • Candunc
    24th Dec 2012 Member 0 Permalink

    I can't find the line  -fkeep-inline-functions -m32 -D_GNU_SOURCE=1 anywhere in there, the only line with -fkeep-inline-functions is env.Append(CCFLAGS=['-w', '-std=c++98', '-fkeep-inline-functions'])

  • tian110796
    24th Dec 2012 Member 0 Permalink

    Well, the problem is only around the -m32, try retyping the part -m32 with the parts around it wherever it might be placed.

    I assumed that that part was all in a line and not in different parts of your file so I made you to retype -fkeep-inline-functions -m32 -D_GNU_SOURCE=1 to remove the things I assumed to be around -m32. So wherever -m32 is, retype those parts.

  • jacob1
    25th Dec 2012 Developer 0 Permalink
    It is separate from the other parts actually. It would be funny if this was the problem all along ...
  • Felix
    25th Dec 2012 Member 0 Permalink
    This post has been removed by jacob1: you suck too
  • Candunc
    25th Dec 2012 Member 0 Permalink

    Well, by retyping the parts with -m32 in it did nothing. I dashed them out and this occured:

     

    scons --lin --release
    scons: Reading SConscript files ...
    Checking for C library fftw3f... (cached) yes
    Checking for C library bz2... (cached) yes
    Checking for C library z... (cached) yes
    Checking for C header file bzlib.h... (cached) yes
    Checking for C library lua... (cached) no
    Checking for C library lua5.1... (cached) yes
    scons: done reading SConscript files.
    scons: Building targets ...
    g++ -o build/src/Format.o -c -w -std=c++98 -fkeep-inline-functions -O3 -ftree-vectorize -funsafe-math-optimizations -ffast-math -fomit-frame-pointer -funsafe-loop-optimizations -Wunsafe-loop-optimizations -D_GNU_SOURCE=1 -D_REENTRANT -DLUACONSOLE -DGRAVFFT -D_GNU_SOURCE -DUSE_STDINT -D_POSIX_C_SOURCE=200112L -DUSE_SDL -DLIN -DX86 -I/usr/include/SDL -I/usr/include/lua5.1 -Ibuild/src -Ibuild/data -Ibuild/generated build/src/Format.cpp
    g++ -o build/src/Misc.o -c -w -std=c++98 -fkeep-inline-functions -O3 -ftree-vectorize -funsafe-math-optimizations -ffast-math -fomit-frame-pointer -funsafe-loop-optimizations -Wunsafe-loop-optimizations -D_GNU_SOURCE=1 -D_REENTRANT -DLUACONSOLE -DGRAVFFT -D_GNU_SOURCE -DUSE_STDINT -D_POSIX_C_SOURCE=200112L -DUSE_SDL -DLIN -DX86 -I/usr/include/SDL -I/usr/include/lua5.1 -Ibuild/src -Ibuild/data -Ibuild/generated build/src/Misc.cpp
    build/src/Misc.cpp: In function âint cpu_check()â:
    build/src/Misc.cpp:287:2: error: impossible constraint in âasmâ
    build/src/Misc.cpp:290:2: error: impossible constraint in âasmâ
    scons: *** [build/src/Misc.o] Error 1
    scons: building terminated because of errors.

  • jacob1
    26th Dec 2012 Developer 0 Permalink
    lol, "https://github.com/FacialTurd/The-Powder-Toy/commit/7cb9bb7a258980a9a88ab00de947f4bc7bde64ca"
    the title is "LINKFLAGS, not LINKFAGS"

    Although, that does not fix it the first problem.
    I will fix that cpu thing right now, I always tell people to comment out that function, I can do it myself now.
    Edit: I fixed that one now.

    Edit2: Also, I checked earlier, there is no invisible text there, I checked even in a hex editor and saw none.
  • Candunc
    26th Dec 2012 Member 0 Permalink

    @jacob1 (View Post)

    1) Lol, I noticed that while looking for invisible characters (Yay I bugfixed official code :D)

     

    2) Ah, same problem as my last compile I guess

     

    3) Yup, just a weird scons I guess.

     

    --------------------------------------------------------------------------------------------------------------

    Ok, after downloading new source it compiled for a bit but this came up:

     

     sh: 1: python2: not found
    scons: *** [build/generated/ElementClasses.cpp] Error 127
    scons: building terminated because of errors.

     

    (Full log: https://dl.dropbox.com/u/21878081/error2.txt)