Author Topic: Last build OK?  (Read 6668 times)

Offline JDarthenay

  • Captain
  • ***
  • Posts: 55
    • View Profile
Last build OK?
« on: April 25, 2016, 11:38:06 pm »
Hello.
I am trying to build OpenXCom, it seems there is an error with what I got from GitHub:

Code: [Select]
g++ -Wall -Wextra -std=gnu++11 -O3 -I../yaml-cpp-0.5.3/include -ID:\Prog\msys64\mingw32\include\SDL -c -o obj/x86/release/BaseInfoState.o src/Basescape/BaseInfoState.cpp
src/Basescape/BaseInfoState.cpp: In member function 'virtual void OpenXcom::BaseInfoState::init()':
src/Basescape/BaseInfoState.cpp:302:49: error: 'floor' was not declared in this scope
  ss5 << (int)floor(_base->getUsedStores() + 0.05) << ":" << _base->getAvailableStores();
                                                 ^
makefile:81: recipe for target 'obj/x86/release/BaseInfoState.o' failed
mingw32-make: *** [obj/x86/release/BaseInfoState.o] Error 1

Did I made something wrong when I used "fecth" with TortoiseGit?

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2159
    • View Profile
Re: Last build OK?
« Reply #1 on: April 26, 2016, 01:37:12 am »
Fixed.

Offline Xtendo-com

  • Colonel
  • ****
  • Posts: 118
    • View Profile
Re: Last build OK?
« Reply #2 on: April 26, 2016, 06:44:55 am »
I wounder about applied fix #1216 that not reverted but crashes a game. In bug tracker you can found three crash reports that related to fix #1216. So you need also revert that commit if you want to get a stable build.

Offline JDarthenay

  • Captain
  • ***
  • Posts: 55
    • View Profile
Re: Last build OK?
« Reply #3 on: April 26, 2016, 07:02:34 pm »
I don't understand. I tried using "fetch" again, now I am looking "show log", I don't see the same commits than those on GitHub.

Edit: I have exactly the same error as yesterday, I must be doing something wrong...
« Last Edit: April 26, 2016, 07:16:12 pm by JDarthenay »

Offline JDarthenay

  • Captain
  • ***
  • Posts: 55
    • View Profile
Re: Last build OK?
« Reply #4 on: April 26, 2016, 08:03:14 pm »
Ok, now I think I grabbed last code:

Code: [Select]
g++ -Wall -Wextra -std=gnu++11 -O3 -I../yaml-cpp-0.5.3/include -ID:\Prog\msys64\mingw32\include\SDL -c -o obj/x86/release/CraftInfoState.o src/Basescape/CraftInfoState.cpp
src/Basescape/CraftInfoState.cpp: In member function 'virtual void OpenXcom::CraftInfoState::init()':
src/Basescape/CraftInfoState.cpp:167:96: error: 'ceil' was not declared in this scope
   int damageHours = (int)ceil((double)_craft->getDamage() / _craft->getRules()->getRepairRate());
                                                                                                ^
src/Basescape/CraftInfoState.cpp:176:135: error: 'ceil' was not declared in this scope
   int fuelHours = (int)ceil((double)(_craft->getRules()->getMaxFuel() - _craft->getFuel()) / _craft->getRules()->getRefuelRate() / 2.0);
                                                                                                                                       ^
src/Basescape/CraftInfoState.cpp:238:119: error: 'ceil' was not declared in this scope
     int rearmHours = (int)ceil((double)(w1->getRules()->getAmmoMax() - w1->getAmmo()) / w1->getRules()->getRearmRate());
                                                                                                                       ^
src/Basescape/CraftInfoState.cpp:277:119: error: 'ceil' was not declared in this scope
     int rearmHours = (int)ceil((double)(w2->getRules()->getAmmoMax() - w2->getAmmo()) / w2->getRules()->getRearmRate());
                                                                                                                       ^
makefile:81: recipe for target 'obj/x86/release/CraftInfoState.o' failed
mingw32-make: *** [obj/x86/release/CraftInfoState.o] Error 1

I am a bit lazy at the moment and trying to focus on conceiving my makefile, could I have the date of a commit which successfully build?
« Last Edit: April 26, 2016, 08:14:03 pm by JDarthenay »

Offline Xtendo-com

  • Colonel
  • ****
  • Posts: 118
    • View Profile
Re: Last build OK?
« Reply #5 on: April 26, 2016, 08:39:28 pm »
yaml-cpp-0.5.3
Use yaml-cpp-0.5.1. Only OXCE or OXCE+ can be complied with newer version of yaml-cpp without modifications to source code.

Offline JDarthenay

  • Captain
  • ***
  • Posts: 55
    • View Profile
Re: Last build OK?
« Reply #6 on: April 26, 2016, 08:53:52 pm »
https://openxcom.org/forum/index.php/topic,4452.msg61234.html#msg61234

https://openxcom.org/forum/index.php/topic,4452.msg61236.html#msg61236

And I was indeed able to build with yaml-cpp 0.5.3 a few days ago... But I don't remember when I have to go back to exactly.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2159
    • View Profile
Re: Last build OK?
« Reply #7 on: April 26, 2016, 10:06:04 pm »
Looks like it's this commit that's giving you trouble: https://github.com/SupSuper/OpenXcom/commit/75772c81fcc5782c33329c7195a5428f81297808

I'll revise what includes are missing, though you probably shouldn't build with "-std=gnu++11" as we don't use any C++11 features AFAIK.

Offline JDarthenay

  • Captain
  • ***
  • Posts: 55
    • View Profile
Re: Last build OK?
« Reply #8 on: April 26, 2016, 10:21:56 pm »
Oh it's true, I remember reading something about that. What is recommended standard?

Edit: Well actually, it seems I need -std=gnu++11 because of yam-cpp 0.5.3, or maybe because of the way I built it.
« Last Edit: April 26, 2016, 10:31:19 pm by JDarthenay »

Offline JDarthenay

  • Captain
  • ***
  • Posts: 55
    • View Profile
Re: Last build OK?
« Reply #9 on: April 26, 2016, 10:34:34 pm »
Don't bother adding includes, I am currently doing it, and I will try to send a Pull Request.

Offline JDarthenay

  • Captain
  • ***
  • Posts: 55
    • View Profile
Re: Last build OK?
« Reply #10 on: April 26, 2016, 11:09:32 pm »
Well, it seems I can't directly pull from my PC to your GitHub repository... Do I need to fork your GitHub repository to pull to it, and then pull from my GitHub repository to yours?

Anyway, I think I successfully computed a .patch file.

Offline JDarthenay

  • Captain
  • ***
  • Posts: 55
    • View Profile
Re: Last build OK?
« Reply #11 on: April 26, 2016, 11:29:18 pm »
Well, now I have have linking problems, but that is because I am now trying to use packages from MSYS2, and I am not sure I can mix SDL.dll with SDL_mixer static build...

Offline JDarthenay

  • Captain
  • ***
  • Posts: 55
    • View Profile
Re: Last build OK?
« Reply #12 on: May 01, 2016, 10:38:56 am »
So I probably have all those problems with missing includes because using yaml-cpp 0.5.3 which seems to put less standard includes in its own headers.

As I'm not the only one using yaml-cpp 0.5.3, I figure I can continue fixing them and pushing those fixes, at least as long as those are only adding standard includes. But I wonder how often I should check this and push those minor fixes. As often as I can? No more than once a day/week/month?