Build Errors with scons

  • DavidTheTech
    10th Mar 2016 Member 0 Permalink

    scons: done reading SConscript files.
    scons: Building targets ...
    g++ -o build\src\PowderToySDL.o -c -std=gnu++98 -Wno-invalid-offsetof -msse -msse2 -ftree-vectorize -funsafe-math-optimizations -ffast-math -fomit-frame-pointer -O2 -funsafe-loop-optimizations -DLUA_R_INCL -DWIN -D_WIN32_WINNT=0x0501 -DX86 -DX86_SSE -DX86_SSE2 -DGRAVFFT -DLUACONSOLE -DUSE_SDL -Ibuild\src -Isrc -Ibuild\data -Idata -Ibuild\generated -Igenerated src\PowderToySDL.cpp
    =====
    In file included from src\client/requestbroker/RequestBroker.h:7:0,
    from src\client/Client.h:16,
    from src\PowderToySDL.cpp:42:
    c:\mingw\include\pthread.h:320:8: error: redefinition of 'struct timespec'
    struct timespec {
    ^
    In file included from c:\mingw\include\time.h:53:0,
    from src\PowderToySDL.cpp:5:
    c:\mingw\include\parts\time.h:105:8: error: previous definition of 'struct timespec'
    struct timespec
    ^

     

    I'm trying to compile TPT but it keep getting that error and i'm using scons.py to compile not visual studio

  • jacob2
    10th Mar 2016 Member 1 Permalink
    I'll see if I can fix it when I get home. I've been using visual studio instead of scons. Also all the cross compilers on the build server were working fine >:
  • DavidTheTech
    10th Mar 2016 Member 0 Permalink

    @jacob2 (View Post)

     thank you :)

  • jacob1
    11th Mar 2016 Developer 1 Permalink
    Well I didn't have time to fix it. Maybe you could try to fix it yourself (seems to be some issue with multiple time.h), or just wait a little longer :P.

    I'll have a ton of time to do stuff on the weekend, but I have a ton of stuff to do. I did at least install most of the dependencies to compile tpt with scons.
  • DavidTheTech
    11th Mar 2016 Member 0 Permalink

    @jacob1 (View Post)

     I have tried to fix it I downloaded it then compiled it I didn't change anything I even reinstalled mingw, python and scons I'll keep trying to fix it

  • jacob2
    11th Mar 2016 Member 1 Permalink
    @DavidTheTech (View Post)
    Your compiler setup is fine. It is an error with the tpt code including files incorrectly.
  • DavidTheTech
    11th Mar 2016 Member 0 Permalink

    @jacob2 (View Post)

     Is there a fix?

  • jacob2
    11th Mar 2016 Member 1 Permalink
    There should be this weekend, youll just have to be patient for now. Or you could install visual studio and use that method. If you use visual studio you will still have to run generator.py (double click it), but there shouldn't be any errors.
  • DavidTheTech
    11th Mar 2016 Member 0 Permalink

    @jacob2 (View Post)

     I tryed visual studio too but I tryed to compile and got this error

    1>c1xx : fatal error C1083: Cannot open source file: 'src\cajun\elements.cpp': No such file or directory
    reader.cpp
    1>c1xx : fatal error C1083: Cannot open source file: 'src\cajun\reader.cpp': No such file or directory
    writer.cpp
    1>c1xx : fatal error C1083: Cannot open source file: 'src\cajun\writer.cpp': No such file or directory
    Misc.cpp
    1>src\Misc.cpp(276): error C3861: 'min': identifier not found
    1>src\Misc.cpp(277): error C3861: 'min': identifier not found
    1>src\Misc.cpp(278): error C3861: 'max': identifier not found
    1>src\Misc.cpp(279): error C3861: 'max': identifier not found
    Simulation.cpp
    1>src\simulation\Simulation.cpp(4047): error C3861: 'max': identifier not found

  • jacob2
    11th Mar 2016 Member 0 Permalink
    Wow, I didn't realize my vs2013 project was out of date.

    Also which version of visual studio are you using?