The International Simutrans Forum

 

Author Topic: Compile error without multithreading  (Read 908 times)

0 Members and 1 Guest are viewing this topic.

Offline ACarlotti

  • *
  • Posts: 483
Compile error without multithreading
« on: January 30, 2018, 11:40:20 AM »
Commit aafb62 introduced a use of threads_initialised which is undeclared if MULTI_THREAD is undefined.

(I beleive it was this fix: https://forum.simutrans.com/index.php?topic=17810.0)


Incidentally, that suggests I'm compiling without multithreading whereas you are compiling with it. Should I be doing something different? I've just been running 'BACKEND=sdl2 COLOUR_DEPTH=16 OSTYPE=linux make'.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Compile error without multithreading
« Reply #1 on: January 30, 2018, 12:09:48 PM »
Thank you for the report - I have now fixed this error.

I do suggest compiling with multi-threading enabled, as this makes a big difference to performance, especially with larger maps: I always build with multi-threading enabled. You should define MULTI_THREAD=1 to enable multi-threading.

Offline ACarlotti

  • *
  • Posts: 483
Re: Compile error without multithreading
« Reply #2 on: January 30, 2018, 02:24:49 PM »
That's what I ended up doing anyway.

It would be helpful if there were a bit more information about compiling Simutrans Extended; I thought there used to be more information in readme.txt

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Compile error without multithreading
« Reply #3 on: January 30, 2018, 10:53:18 PM »
I do not think that any compilation information was removed from readme.txt, although there are some threads on the forum about compiling Simutrans-Extended that some other users helpfully created a few years ago. Perhaps the development has moved on since that time?

Offline ACarlotti

  • *
  • Posts: 483
Re: Compile error without multithreading
« Reply #4 on: January 31, 2018, 12:42:14 AM »
I think it was accidentally overwritten in this commit in February 2016:

https://github.com/jamespetts/simutrans-extended/commit/f86904#diff-eb6b6c90251ab33cee784713c451e6d8

I imagine it could be largely reinstated as is (or rather was), although it looks like it was never updated for Extended (still refers to the original svn), and it makes no reference MULTI_THREAD.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Compile error without multithreading
« Reply #5 on: January 31, 2018, 12:48:59 AM »
Thank you for finding that. I suspect that the old version would be of little use in any event now. Do you think that we need a new readme.txt, or is it better to use the resources that exist on the forum, I wonder?

Offline ACarlotti

  • *
  • Posts: 483
Re: Compile error without multithreading
« Reply #6 on: January 31, 2018, 01:06:00 AM »
I couldn't find anything on the forum about compiling when I looked (apart from the note about Visual Studio), and the information in the old readme.txt would have helped me (mostly for reassurance, but it would have saved me having to read through most of the makefile), although I agree that it would need a bit of updating. So I think it would be good to either reinstate readme.txt, or add a pinned thread about compiling simutrans to the Extended Development board.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Compile error without multithreading
« Reply #7 on: January 31, 2018, 01:19:59 AM »
We have this thread, but I infer that you were compiling with GCC? Perhaps to have all the information in the same place, we need a new "How to compile Simutrans-Extended with GCC" thread? This would actually be simpler than setting it up to compile with Visual Studio.