News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

Simutrans-Experimental 10.11 for Linux?

Started by dannyman, April 06, 2012, 06:24:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dannyman

Has one been compiled yet?


I got to compiling simutrans a few years back, could do it again if needed, but if there is a binary available for Linux (64bit) please let me know where to grab it .. if we need a volunteer to get compiling the Linux binaries I can look into it.


Thanks,
-danny

jamespetts

There have been problems with recent versions, for reasons that I have so far failed to track down, of the automatic Linux binaries compiling. If you'd like to compile Linux binaries for 10.11, I should be very greateful!
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.

wlindley

I did a 'git checkout devel' and 'make' (which works on the 10.x branch) gives me the below.  I am willing to make the 64-bit binaries, but of which branch please?


===> CXX bauer/brueckenbauer.cc
In file included from bauer/../simunits.h:69:0,
                 from bauer/../simworld.h:18,
                 from bauer/../simwerkz.h:12,
                 from bauer/brueckenbauer.cc:11:
bauer/../utils/float32e8_t.h:206:25: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
bauer/../utils/float32e8_t.h:207:47: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
bauer/../utils/float32e8_t.h:252:42: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
bauer/../utils/float32e8_t.h:253:66: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
In file included from bauer/../dataobj/../tpl/stringhashtable_tpl.h:8:0,
                 from bauer/../dataobj/translator.h:12,
                 from bauer/../simmenu.h:15,
                 from bauer/../simwerkz.h:13,
                 from bauer/brueckenbauer.cc:11:
bauer/../dataobj/../tpl/hashtable_tpl.h: In member function 'bool hashtable_tpl<key_t, value_t, hash_t>::is_contained(key_t) const':
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error: need 'typename' before 'for_sel_ref<slist_tpl<hashtable_tpl<key_t, value_t, hash_t>::node_t>, void(const int&)>::ref' because 'for_sel_ref<slist_tpl<hashtable_tpl<key_t, value_t, hash_t>::node_t>, void(const int&)>' is a dependent scope
bauer/../dataobj/../tpl/hashtable_tpl.h:230:1: error: expected ';' before 'container___230'
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error: need 'typename' before 'for_sel_iter<slist_tpl<hashtable_tpl<key_t, value_t, hash_t>::node_t>, void(const int&)>::iter' because 'for_sel_iter<slist_tpl<hashtable_tpl<key_t, value_t, hash_t>::node_t>, void(const int&)>' is a dependent scope
bauer/../dataobj/../tpl/hashtable_tpl.h:230:1: error: expected ';' before 'iter__230'
bauer/../dataobj/../tpl/hashtable_tpl.h:230:1: error: 'iter__230' was not declared in this scope
bauer/../dataobj/../tpl/hashtable_tpl.h:230:1: error: 'end__230' was not declared in this scope
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Iterator> struct std::iterator_traits'
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error:   expected a type, got 'for_sel_iter<slist_tpl<hashtable_tpl<key_t, value_t, hash_t>::node_t>, void(const int&)>::iter'
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error: invalid type in declaration before 'const'
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error: expected ';' before 'const'
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: warning: ISO C++ forbids declaration of 'iter' with no type [-fpermissive]
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error: expected ')' before ';' token
bauer/../dataobj/../tpl/hashtable_tpl.h:230:1: error: 'break__230' was not declared in this scope
bauer/../dataobj/../tpl/hashtable_tpl.h:230:1: error: 'once1__230' was not declared in this scope
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error: expected ';' before ')' token
bauer/../dataobj/../tpl/hashtable_tpl.h:241:2: error: expected '}' at end of input
bauer/../dataobj/../tpl/hashtable_tpl.h:241:2: warning: no return statement in function returning non-void [-Wreturn-type]
In file included from bauer/brueckenbauer.cc:18:0:
bauer/../simhalt.h: In member function 'void haltestelle_t::add_waiting_time(uint16, halthandle_t, uint8, bool)':
bauer/../simhalt.h:719:4: error: duplicate 'const'
In file included from bauer/../dataobj/../tpl/stringhashtable_tpl.h:8:0,
                 from bauer/../dataobj/translator.h:12,
                 from bauer/../simmenu.h:15,
                 from bauer/../simwerkz.h:13,
                 from bauer/brueckenbauer.cc:11:
bauer/../dataobj/../tpl/hashtable_tpl.h: In member function 'bool hashtable_tpl<key_t, value_t, hash_t>::is_contained(key_t) const [with key_t = short unsigned int, value_t = haltestelle_t::waiting_time_set, hash_t = inthash_tpl<short unsigned int>]':
bauer/../simhalt.h:721:38:   instantiated from here
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error: dependent-name 'for_sel_ref<slist_tpl<hashtable_tpl<key_t, value_t, hash_t>::node_t>, void(const int&)>::ref' is parsed as a non-type, but instantiation yields a type
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: note: say 'typename for_sel_ref<slist_tpl<hashtable_tpl<key_t, value_t, hash_t>::node_t>, void(const int&)>::ref' if a type is meant
bauer/../simhalt.h:721:38:   instantiated from here
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error: dependent-name 'for_sel_iter<slist_tpl<hashtable_tpl<key_t, value_t, hash_t>::node_t>, void(const int&)>::iter' is parsed as a non-type, but instantiation yields a type
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: note: say 'typename for_sel_iter<slist_tpl<hashtable_tpl<key_t, value_t, hash_t>::node_t>, void(const int&)>::iter' if a type is meant
bauer/../dataobj/../tpl/hashtable_tpl.h:230:1: warning: for increment expression has no effect [-Wunused-value]
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: warning: unused variable 'iter' [-Wunused-variable]
bauer/../dataobj/../tpl/hashtable_tpl.h:229:28: warning: unused variable 'code' [-Wunused-variable]
make: *** [build/default/bauer/brueckenbauer.o] Error 1
bill@scottsdale:simutrans-experimental$
bill@scottsdale:simutrans-experimental$ nice make -j1 && cp -a build/default/simutrans-experimental ~/simutrans/sim-exp/
===> CXX bauer/brueckenbauer.cc
In file included from bauer/../simunits.h:69:0,
                 from bauer/../simworld.h:18,
                 from bauer/../simwerkz.h:12,
                 from bauer/brueckenbauer.cc:11:
bauer/../utils/float32e8_t.h:206:25: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
bauer/../utils/float32e8_t.h:207:47: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
bauer/../utils/float32e8_t.h:252:42: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
bauer/../utils/float32e8_t.h:253:66: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
In file included from bauer/../dataobj/../tpl/stringhashtable_tpl.h:8:0,
                 from bauer/../dataobj/translator.h:12,
                 from bauer/../simmenu.h:15,
                 from bauer/../simwerkz.h:13,
                 from bauer/brueckenbauer.cc:11:
bauer/../dataobj/../tpl/hashtable_tpl.h: In member function 'bool hashtable_tpl<key_t, value_t, hash_t>::is_contained(key_t) const':
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error: need 'typename' before 'for_sel_ref<slist_tpl<hashtable_tpl<key_t, value_t, hash_t>::node_t>, void(const int&)>::ref' because 'for_sel_ref<slist_tpl<hashtable_tpl<key_t, value_t, hash_t>::node_t>, void(const int&)>' is a dependent scope
bauer/../dataobj/../tpl/hashtable_tpl.h:230:1: error: expected ';' before 'container___230'
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error: need 'typename' before 'for_sel_iter<slist_tpl<hashtable_tpl<key_t, value_t, hash_t>::node_t>, void(const int&)>::iter' because 'for_sel_iter<slist_tpl<hashtable_tpl<key_t, value_t, hash_t>::node_t>, void(const int&)>' is a dependent scope
bauer/../dataobj/../tpl/hashtable_tpl.h:230:1: error: expected ';' before 'iter__230'
bauer/../dataobj/../tpl/hashtable_tpl.h:230:1: error: 'iter__230' was not declared in this scope
bauer/../dataobj/../tpl/hashtable_tpl.h:230:1: error: 'end__230' was not declared in this scope
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Iterator> struct std::iterator_traits'
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error:   expected a type, got 'for_sel_iter<slist_tpl<hashtable_tpl<key_t, value_t, hash_t>::node_t>, void(const int&)>::iter'
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error: invalid type in declaration before 'const'
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error: expected ';' before 'const'
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: warning: ISO C++ forbids declaration of 'iter' with no type [-fpermissive]
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error: expected ')' before ';' token
bauer/../dataobj/../tpl/hashtable_tpl.h:230:1: error: 'break__230' was not declared in this scope
bauer/../dataobj/../tpl/hashtable_tpl.h:230:1: error: 'once1__230' was not declared in this scope
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error: expected ';' before ')' token
bauer/../dataobj/../tpl/hashtable_tpl.h:241:2: error: expected '}' at end of input
bauer/../dataobj/../tpl/hashtable_tpl.h:241:2: warning: no return statement in function returning non-void [-Wreturn-type]
In file included from bauer/brueckenbauer.cc:18:0:
bauer/../simhalt.h: In member function 'void haltestelle_t::add_waiting_time(uint16, halthandle_t, uint8, bool)':
bauer/../simhalt.h:719:4: error: duplicate 'const'
In file included from bauer/../dataobj/../tpl/stringhashtable_tpl.h:8:0,
                 from bauer/../dataobj/translator.h:12,
                 from bauer/../simmenu.h:15,
                 from bauer/../simwerkz.h:13,
                 from bauer/brueckenbauer.cc:11:
bauer/../dataobj/../tpl/hashtable_tpl.h: In member function 'bool hashtable_tpl<key_t, value_t, hash_t>::is_contained(key_t) const [with key_t = short unsigned int, value_t = haltestelle_t::waiting_time_set, hash_t = inthash_tpl<short unsigned int>]':
bauer/../simhalt.h:721:38:   instantiated from here
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error: dependent-name 'for_sel_ref<slist_tpl<hashtable_tpl<key_t, value_t, hash_t>::node_t>, void(const int&)>::ref' is parsed as a non-type, but instantiation yields a type
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: note: say 'typename for_sel_ref<slist_tpl<hashtable_tpl<key_t, value_t, hash_t>::node_t>, void(const int&)>::ref' if a type is meant
bauer/../simhalt.h:721:38:   instantiated from here
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: error: dependent-name 'for_sel_iter<slist_tpl<hashtable_tpl<key_t, value_t, hash_t>::node_t>, void(const int&)>::iter' is parsed as a non-type, but instantiation yields a type
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: note: say 'typename for_sel_iter<slist_tpl<hashtable_tpl<key_t, value_t, hash_t>::node_t>, void(const int&)>::iter' if a type is meant
bauer/../dataobj/../tpl/hashtable_tpl.h:230:1: warning: for increment expression has no effect [-Wunused-value]
bauer/../dataobj/../tpl/hashtable_tpl.h:230:3: warning: unused variable 'iter' [-Wunused-variable]
bauer/../dataobj/../tpl/hashtable_tpl.h:229:28: warning: unused variable 'code' [-Wunused-variable]
make: *** [build/default/bauer/brueckenbauer.o] Error 1

jamespetts

Hmm - that's very odd. Which branch was 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.

jk271

2012-04-24

Hello, I am not able to compile recent simutrans experimental too.
I am trying  to compile devel branch from 22th April 2012.
I am using 32-bit GNU/Linux.
compiler: g   (Debian 4.4.5-8) 4.4.5

Compilation ended with errors in linkage process. I tried to fix errors. I hope, I have maneged to do it:

Bug 1 - undefined reference to convoi_t::is_circular_route()

build/default/simline.o: In function `simline_t::calc_is_alternating_circular_route()':
simline.cc:(.text 0x179): undefined reference to `convoi_t::is_circular_route() const'

Solution:
Remove "inline" in header file simconvoi.h on line 1249 or move body of the function to header file.

code concerning to this bug:

simconvoi.h:1249:
inline bool is_circular_route() const;

simconvoi.cc:6078
bool convoi_t::is_circular_route() const
{
        // Three lines used here to aid debugging.
        const uint32 departures_count = departures->get_count();
        const uint8 schedule_count = fpl->get_count();
        return departures_count == schedule_count;
}


Bug 2 - undefined reference to convoi_t::get_average_journey_times()

Error from compilation says:

path_explorer.cc:(.text 0x190a): undefined reference to `convoi_t::get_average_journey_times()'

This bug is similar to previous one: Declaration of function, NOT DEFINITION, is marked "inline" in header file.
Function without body (declaration of function) can not be marked "inline", as compiler has no clue, where the body of function is.

Solution:

Remove "inline" from declaration of function
koordhashtable_tpl<id_pair, average_tpl<uint16> > * const get_average_journey_times();
in file simconvoi.h on line 1256.


Having applied this patch simutrans experimental becomes compilable under Linux again.

jamespetts

#5
Thank you very much indeed for that - that is most helpful. I have made the suggested changes to the -devel branch.

Edit: I have also fixed bug 1 on the Master branch (bug 2 is not applicable, as those methods are not present), so hopefully, the current version (10.11) will now compile. Thank you again!
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.

jamespetts

#6
The main executable now compiles on the automatic builds server - thank you for that! 10.11 is now available for Linux.

However, I am having difficulty with Makeobj - even with the latest changes that I have pushed to the master branch, I still get linker errors, which I do not fully understand. Any assistance in resolving them would be helpful!

Edit: It seems that, although the logs report the binaries as having built:


==> LD  build/simutrans-exp/simutrans-experimental


they are not present. I suspect that it will abort the whole build process if there is an error with any of the builds, in this case, Makeobj.
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.

jamespetts

I have now managed to get the Linux build working: Linux versions are now available for 10.11. Apologies to Linux users for the delay! Links here.
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.