Page 1 of 1

Make Clean

Posted: Tue Sep 20, 2016 10:18 am
by Gangrenous
Not sure why this is, but it cost me time yet again today. So I am making source changes, this time adding some NPC stats like minimum damage, maximum damage, mainly because I want them in the database. I know the code is right, there is no reason it would not be but I get consistent crashes during the loading of the zone. I spend probably close to 30 minutes going back through my code changes to make sure I do not have something "casting" wrong, like a float -> Int32 or such. I cannot find anything wrong with my code, looks perfect. The error looks like another Mutex issue. But in the log.cpp file? WTF I have not even touched that. What I was editing was world database and entity.cpp, no where near log.cpp.

The culprit ? I had changed a header file, this time entity.h and not done a make clean. So is this a normal thing? I have changed header files before with no issue but 50% of the time I have to do a make clean before make. That other 50% of the time I get a crash at some point before I remember it may need a make clean.

Re: Make Clean

Posted: Tue Sep 20, 2016 4:29 pm
by Jabantiz
Linux should always have a clean before a make I have discovered, it really is a gamble when you compile without doing a clean first and can cause rather odd errors that make no sense as you just found out.

Re: Make Clean

Posted: Wed Sep 21, 2016 9:53 am
by tyrbo
That's good to know. I've had a number of crashes and I'm curious how many of them might be actual crashes and how many are caused by make/make clean wonkyness.

Re: Make Clean

Posted: Wed Sep 21, 2016 9:57 am
by John Adams
I kept forgetting 'make clean' myself a lot in the beginning, so I made my system idiot-proof in a manner of speaking. I wrote a BASH script called 'compile', and taught myself to never use 'make' unless I am debugging.

It does something similar to this (tweak as necessary):

Code: Select all

  cd /eq2emu/svn/root/folder
  svn update
  cd source/WorldServer
  echo "Compiling EQ2World..."
  make clean
  make -j4
  if [ -f eq2world ]
  then
    echo "SUCCESS!"

    # launch binary here

  else
    echo "Compile of WorldServer FAILED! Aborting!"
  fi