News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Cannot compile makeobj

Started by Vladki, March 30, 2020, 06:17:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Vladki

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.


[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

Rollmaterial

This seems to have caused the nightly build to fail, the nightly paksets are empty.

jamespetts

Thank you for the report: I believe that I have now fixed this.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

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

jamespetts

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.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.