aliens

Author Topic: Update linux nightly?  (Read 4497 times)

Offline ubai

  • Sergeant
  • **
  • Posts: 22
    • View Profile
Update linux nightly?
« on: January 27, 2016, 04:50:26 am »
Hello,

I'm trying to update my linux nightly build using these instructions:

Code: [Select]
cd ~/OpenXcom_dev/src
git pull
make -f Makefile.simple clean
make -f Makefile.simple

Unfortunately, when I do the "git pull" I get the following error:
Code: [Select]
error: Your local changes to the following files would be overwritten by merge:
bin/standard/xcom1/soldiers.rul
Please, commit your changes or stash them before you can merge.
Aborting

Does anyone know how I can fix this and continue with my update? Are these instructions correct?

Thanks!
Matt

Offline R1dO

  • Colonel
  • ****
  • Posts: 442
    • View Profile
Re: Update linux nightly?
« Reply #1 on: January 27, 2016, 03:06:49 pm »
According to compile with make you are doing it correct (even more than strictly required). And kudo's for using pull, instead of clone for updating.

Personally i prefer Cmake as build system. In that case an update would be (assuming your already inside OpenXcom_dev, and using out-of-source builds )
Code: [Select]
git pull
cd build
cmake -L .. # Enforces updating of git-version string and displays current build settings.
make

Now back to the actual problem at hand. I suspect you made some manual changes to "soldiers.rul". In that case you probably want to keep those changes. The easiest solution would be:
Code: [Select]
git stash
git pull
git stash pop  # And hope no merge conflicts arise
The smart solution would be to move those changes to a personal-mod after which you can (forcefully) reset the local repository with
Code: [Select]
git reset --hard
Please note this command will throw away all personal modifications not committed to a git-branch of your own.

Good luck

Offline ubai

  • Sergeant
  • **
  • Posts: 22
    • View Profile
Re: Update linux nightly?
« Reply #2 on: January 28, 2016, 03:53:35 am »
Thanks so much! It says it is offline for maintenance but as soon as it is back up I'll give it a try.



Offline ubai

  • Sergeant
  • **
  • Posts: 22
    • View Profile
Re: Update linux nightly?
« Reply #3 on: January 28, 2016, 05:08:50 am »
Hmm, it looked like it was going to work and then I got this:

Code: [Select]
Savegame/Base.cpp: In member function ‘void OpenXcom::Base::load(const YAML::Node&, OpenXcom::SavedGame*, bool, bool)’:
Savegame/Base.cpp:180:6: error: no match for ‘operator=’ (operand types are ‘std::map<std::basic_string<char>, int>::iterator {aka std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, int> >}’ and ‘void’)
    i = _items->getContents()->erase(i);
      ^
Savegame/Base.cpp:180:6: note: candidate is:
In file included from /usr/include/c++/4.8/set:60:0,
                 from /usr/include/yaml-cpp/stlemitter.h:11,
                 from /usr/include/yaml-cpp/yaml.h:10,
                 from Savegame/Target.h:22,
                 from Savegame/Base.h:20,
                 from Savegame/Base.cpp:20:
/usr/include/c++/4.8/bits/stl_tree.h:157:12: note: std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, int> >& std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, int> >::operator=(const std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, int> >&)
     struct _Rb_tree_iterator
            ^
/usr/include/c++/4.8/bits/stl_tree.h:157:12: note:   no known conversion for argument 1 from ‘void’ to ‘const std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, int> >&’
make: *** [../obj/Base.o] Error 1

Offline R1dO

  • Colonel
  • ****
  • Posts: 442
    • View Profile
Re: Update linux nightly?
« Reply #4 on: January 28, 2016, 11:48:36 am »
You were probably unlucky, it looks like it is fixed in commit a55d90b.

As a sidenode, it might be handy if you mention the commit when such a problem arises. It makes it a lot easier to check if it still needs attention.

Offline ubai

  • Sergeant
  • **
  • Posts: 22
    • View Profile
Re: Update linux nightly?
« Reply #5 on: January 30, 2016, 05:26:21 am »
Thanks again! I am new to this git thing, next time I will include the commit number.

-Matt

ps: worked like a charm this time, I am good to go. :)
« Last Edit: January 30, 2016, 05:42:43 am by ubai »

Offline R1dO

  • Colonel
  • ****
  • Posts: 442
    • View Profile
Re: Update linux nightly?
« Reply #6 on: January 30, 2016, 01:39:56 pm »
No problem, we all have to learn.

Glad it works. Enjoy