Author Topic: Linux Makeobj mit statisch gelinkter libpng  (Read 574 times)

0 Members and 1 Guest are viewing this topic.

Offline Frank

Linux Makeobj mit statisch gelinkter libpng
« on: August 12, 2016, 05:33:25 AM »
ich hab ein Ubuntu 16.04

Simutrans wie Makeobj werden funktionsfähig erstellt

Ich benötige aber ein Makeobj mit statisch gelinkter libpng.

Jemand Kenntnisse was ich wo wie angeben/einstellen muss um das hin zu bekommen?


Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4120
  • Total likes: 124
  • Helpful: 147
  • Languages: EN, DE, AT
Re: Linux Makeobj mit statisch gelinkter libpng
« Reply #1 on: August 12, 2016, 06:18:16 AM »
In makeobj/Makefile Zeile 24 abaendern in
Code: [Select]
STD_LIBS += -lz -lbz2 libpng.a
Allerdings muss die Datei libpng.a dann verfuegbar sein (in /lib, /usr/lib oder /lib64, u.U. auch noch mit einer Versionsnummer). Hoffe, dass funktioniert.

Womoeglich muss dann auch libz statisch gelinkt werden (also libz.a statt -lz)
Parsley, sage, rosemary, and maggikraut.

Offline Frank

Re: Linux Makeobj mit statisch gelinkter libpng
« Reply #2 on: August 12, 2016, 07:52:42 AM »
also die Zeile

Code: [Select]
STD_LIBS += /usr/lib/x86_64-linux-gnu/libz.a -lbz2 /usr/lib/x86_64-linux-gnu/libpng.a
tut es nur zum Teil wie es scheint

Es werden zwar makeobj erstellt die etwa 80 kb größer sind als vorher, aber die scheinen nicht zu funktionieren.

Ausserdem hat ein Makeobj 50 was ich statisch hab ~780 kb.

Demzufolge scheint noch was zu fehlen.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4120
  • Total likes: 124
  • Helpful: 147
  • Languages: EN, DE, AT
Re: Linux Makeobj mit statisch gelinkter libpng
« Reply #3 on: August 12, 2016, 09:21:41 AM »
Was funktioniert nicht? Das Linken oder das fertige Programm?

Hilft es, erst libpng.a dann liz.a anzugeben (also andere Reihenfolge in STD_LIBS+= ...)
Parsley, sage, rosemary, and maggikraut.

Offline Frank

Re: Linux Makeobj mit statisch gelinkter libpng
« Reply #4 on: August 13, 2016, 05:40:49 AM »
Was funktioniert nicht? Das Linken oder das fertige Programm?
...

das fertige Programm erstellt auf dem Server jedenfalls keine pak-Dateien

55.2 hat 249 kb
55.4 hat 259 kb

ein 50 hat 769 kb, was von wernieman aus dem Jahr 2009 stammt

...
Hilft es, erst libpng.a dann liz.a anzugeben (also andere Reihenfolge in STD_LIBS+= ...)

umstellen hat keine Auswirkungen, die resultierende Datei ist gleich groß

Terminalausgaben
Code: [Select]
ubuntu@ubuntu:~/Desktop/simutrans-src-112-3/makeobj$ make
===> CXX ../besch/writer/bridge_writer.cc
===> CXX ../besch/writer/building_writer.cc
===> CXX ../besch/writer/citycar_writer.cc
===> CXX ../besch/writer/crossing_writer.cc
===> CXX ../besch/writer/factory_writer.cc
../besch/writer/factory_writer.cc: In member function ‘virtual std::__cxx11::string factory_writer_t::get_node_name(FILE*) const’:
../besch/writer/factory_writer.cc:260:35: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
  fread(&node, sizeof(node), 1, fp);
                                   ^
===> CXX ../besch/writer/get_climate.cc
===> CXX ../besch/writer/get_waytype.cc
===> CXX ../besch/writer/good_writer.cc
===> CXX ../besch/writer/groundobj_writer.cc
===> CXX ../besch/writer/ground_writer.cc
===> CXX ../besch/writer/image_writer.cc
===> CXX ../besch/writer/imagelist2d_writer.cc
===> CXX ../besch/writer/imagelist_writer.cc
===> CXX ../besch/writer/obj_node.cc
../besch/writer/obj_node.cc: In static member function ‘static void obj_node_t::read_node(FILE*, obj_node_info_t&)’:
../besch/writer/obj_node.cc:34:23: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
  fread(&u32, 4, 1, fp);
                       ^
../besch/writer/obj_node.cc:36:23: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
  fread(&u16, 2, 1, fp);
                       ^
../besch/writer/obj_node.cc:38:23: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
  fread(&u16, 2, 1, fp);
                       ^
../besch/writer/obj_node.cc:41:24: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&u32, 4, 1, fp);
                        ^
===> CXX ../besch/writer/obj_writer.cc
../besch/writer/obj_writer.cc: In member function ‘std::__cxx11::string obj_writer_t::name_from_next_node(FILE*) const’:
../besch/writer/obj_writer.cc:122:31: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(buf, node.size, 1, fp);
                               ^
===> CXX ../besch/writer/pedestrian_writer.cc
===> CXX ../besch/writer/roadsign_writer.cc
===> CXX ../besch/writer/root_writer.cc
../besch/writer/root_writer.cc: In member function ‘bool root_writer_t::do_dump(const char*)’:
../besch/writer/root_writer.cc:153:45: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
    fread(&version, sizeof(version), 1, infp);
                                             ^
../besch/writer/root_writer.cc: In member function ‘bool root_writer_t::do_list(const char*)’:
../besch/writer/root_writer.cc:195:45: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
    fread(&version, sizeof(version), 1, infp);
                                             ^
../besch/writer/root_writer.cc: In member function ‘bool root_writer_t::do_copy(FILE*, obj_node_info_t&, const char*)’:
../besch/writer/root_writer.cc:246:45: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
    fread(&version, sizeof(version), 1, infp);
                                             ^
../besch/writer/root_writer.cc: In member function ‘void root_writer_t::uncopy(const char*)’:
../besch/writer/root_writer.cc:349:44: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&version, sizeof(version), 1, infp);
                                            ^
../besch/writer/root_writer.cc: In member function ‘void root_writer_t::copy_nodes(FILE*, FILE*, obj_node_info_t&)’:
../besch/writer/root_writer.cc:449:33: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(buf, info.size, 1, infp);
                                 ^
===> CXX ../besch/writer/sim_writer.cc
===> CXX ../besch/writer/skin_writer.cc
===> CXX ../besch/writer/sound_writer.cc
===> CXX ../besch/writer/text_writer.cc
../besch/writer/text_writer.cc: In member function ‘virtual void text_writer_t::dump_node(FILE*, const obj_node_info_t&)’:
../besch/writer/text_writer.cc:27:32: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
  fread(buf, node.size, 1, infp);
                                ^
===> CXX ../besch/writer/tree_writer.cc
===> CXX ../besch/writer/tunnel_writer.cc
===> CXX ../besch/writer/vehicle_writer.cc
===> CXX ../besch/writer/way_writer.cc
===> CXX ../besch/writer/way_obj_writer.cc
===> CXX ../besch/writer/xref_writer.cc
../besch/writer/xref_writer.cc: In member function ‘virtual void xref_writer_t::dump_node(FILE*, const obj_node_info_t&)’:
../besch/writer/xref_writer.cc:38:33: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(buf, node.size, 1, infp);
                                 ^
===> CXX ../utils/dr_rdpng.cc
===> CXX ../besch/bild_besch.cc
===> CXX ../dataobj/freelist.cc
===> CXX ../dataobj/tabfile.cc
===> CXX ../simdebug.cc
===> CXX ../simmem.cc
===> CXX ../utils/simstring.cc
../utils/simstring.cc: In function ‘char* ntos(int, const char*)’:
../utils/simstring.cc:20:6: warning: variable ‘r’ set but not used [-Wunused-but-set-variable]
  int r;
      ^
===> CXX ../utils/searchfolder.cc
===> CXX ../utils/log.cc
../utils/log.cc: In member function ‘void log_t::fatal(const char*, const char*, ...)’:
../utils/log.cc:269:6: warning: unused variable ‘n’ [-Wunused-variable]
  int n = vsprintf( buffer, formatbuffer, argptr );
      ^
===> CXX makeobj.cc
===> LD  ../build/default/makeobj/makeobj
ubuntu@ubuntu:~/Desktop/simutrans-src-112-3/makeobj$