The International Simutrans Forum

 

Author Topic: Cannot compile makeobj  (Read 591 times)

0 Members and 1 Guest are viewing this topic.

Offline Vladki

  • Devotee
  • *
  • Posts: 3718
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Cannot compile makeobj
« on: March 30, 2020, 06:17:50 PM »
While working on smoke patches I found out that I cannot compile makeobj any more.
Last time I compiled (successfully) was on march 5th. (But I did not compile since then).
Simutrans itself can be compiled.

Code: [Select]
[0] 20:12 vladki hex ~/simutrans-extended/makeobj:master $ make
===> CXX ../descriptor/writer/bridge_writer.cc
g++ -DMAKEOBJ -O -g -DDEBUG -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align   -DUSE_C -fno-delete-null-pointer-checks -fno-strict-aliasing -std=c++11 -c -MMD -o ../build/default/descriptor/writer/bridge_writer-makeobj-extended.o ../descriptor/writer/bridge_writer.cc
In file included from ../descriptor/writer/../skin_desc.h:10:0,
                 from ../descriptor/writer/../bridge_desc.h:10,
                 from ../descriptor/writer/bridge_writer.cc:11:
../descriptor/writer/../obj_base_desc.h: In constructor ‘obj_desc_transport_related_t::obj_desc_transport_related_t()’:
../descriptor/writer/../obj_base_desc.h:83:9: warning: ‘obj_desc_transport_related_t::axle_load’ will be initialized after [-Wreorder]
  uint16 axle_load;   ///< up to this load vehicle may pass (default 9999)
         ^~~~~~~~~
../descriptor/writer/../obj_base_desc.h:82:9: warning:   ‘uint8 obj_desc_transport_related_t::wtyp’ [-Wreorder]
  uint8  wtyp;    ///< waytype of this thing
         ^~~~
In file included from ../descriptor/writer/../skin_desc.h:10:0,
                 from ../descriptor/writer/../bridge_desc.h:10,
                 from ../descriptor/writer/bridge_writer.cc:11:
../descriptor/writer/../obj_base_desc.h:96:2: warning:   when initialized here [-Wreorder]
  obj_desc_transport_related_t() : obj_desc_timelined_t(),
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../descriptor/writer/bridge_writer.cc: In member function ‘virtual void bridge_writer_t::write_obj(FILE*, obj_node_t&, tabfileobj_t&)’:
../descriptor/writer/bridge_writer.cc:153:121: error: ‘pow’ was not declared in this scope
    permissive_way_constraints = (tmp_permissive > 0) ? permissive_way_constraints | (uint8)pow(2, (double)tmp_permissive) : permissive_way_constraints | 1;
                                                                                                                         ^
../descriptor/writer/bridge_writer.cc:157:125: error: ‘pow’ was not declared in this scope
    prohibitive_way_constraints = (tmp_prohibitive > 0) ? prohibitive_way_constraints | (uint8)pow(2, (double)tmp_prohibitive) : prohibitive_way_constraints | 1;
                                                                                                                             ^
In file included from ../descriptor/writer/../image.h:9:0,
                 from ../descriptor/writer/../image_list.h:9,
                 from ../descriptor/writer/../image_array.h:9,
                 from ../descriptor/writer/../skin_desc.h:11,
                 from ../descriptor/writer/../bridge_desc.h:10,
                 from ../descriptor/writer/bridge_writer.cc:11:
../descriptor/writer/../../display/simgraph.h: At global scope:
../descriptor/writer/../../display/simgraph.h:131:15: warning: ‘zoom_den’ defined but not used [-Wunused-variable]
 static sint32 zoom_den[MAX_ZOOM_FACTOR + 1] = { 1, 2, 3, 1, 4, 8, 2, 8, 4, 8 };
               ^~~~~~~~
../descriptor/writer/../../display/simgraph.h:130:15: warning: ‘zoom_num’ defined but not used [-Wunused-variable]
 static sint32 zoom_num[MAX_ZOOM_FACTOR + 1] = { 2, 3, 4, 1, 3, 5, 1, 3, 1, 1 };
               ^~~~~~~~
../descriptor/writer/../../display/simgraph.h:129:15: warning: ‘zoom_factor’ defined but not used [-Wunused-variable]
 static uint32 zoom_factor = ZOOM_NEUTRAL;
               ^~~~~~~~~~~
../uncommon.mk:51: návod pro cíl „../build/default/descriptor/writer/bridge_writer-makeobj-extended.o“ selhal
make: *** [../build/default/descriptor/writer/bridge_writer-makeobj-extended.o] Chyba 1

Offline Rollmaterial

  • Devotee
  • *
  • Posts: 625
  • OS: Windows 10
  • Languages: EN, FR, DE, FI, SE
Re: Cannot compile makeobj
« Reply #1 on: March 30, 2020, 07:42:26 PM »
This seems to have caused the nightly build to fail, the nightly paksets are empty.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20776
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cannot compile makeobj
« Reply #2 on: April 02, 2020, 09:46:12 AM »
Thank you for the report: I believe that I have now fixed this.

Offline Vladki

  • Devotee
  • *
  • Posts: 3718
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cannot compile makeobj
« Reply #3 on: April 02, 2020, 04:51:43 PM »
The error is still there. Now it says:

../descriptor/writer/bridge_writer.cc:153:92: error: ‘pow’ is not a member of ‘std’

isntead of

../descriptor/writer/bridge_writer.cc:153:121: error: ‘pow’ was not declared in this scope

The rest of messages is the same

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20776
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cannot compile makeobj
« Reply #4 on: April 06, 2020, 06:21:04 PM »
Thank you for the report: it seems as if this had been fixed for Windows but not Linux. I have now pushed a series of fixes which seems to work for both Windows and Linux, so this should be working in the nightly builds now.

Apologies for the trouble.