[MacPorts] #37237: Widelands does not build on my PowerBook G4 with Mac OS X 10.5.8
#37237: Widelands does not build on my PowerBook G4 with Mac OS X 10.5.8 ---------------------------------------------+----------------------------- Reporter: gilles.risch@… | Owner: macports- Type: defect | tickets@… Priority: Normal | Status: new Component: ports | Milestone: Keywords: widelands powerpc build failure | Version: 2.1.2 | Port: widelands ---------------------------------------------+----------------------------- I just tried in install widelands build17 on my PowerBook G4 with Max OS X version 10.5.8 but the build process fails. The build log is attached. Kind regards, Gilles -- Ticket URL: <https://trac.macports.org/ticket/37237> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37237: Widelands does not build on my PowerBook G4 with Mac OS X 10.5.8 -----------------------------+-------------------------------- Reporter: gilles.risch@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: ppc leopard Port: widelands | -----------------------------+-------------------------------- Changes (by macsforever2000@…): * keywords: widelands powerpc build failure => ppc leopard -- Ticket URL: <https://trac.macports.org/ticket/37237#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37237: Widelands does not build on my PowerBook G4 with Mac OS X 10.5.8 -----------------------------+-------------------------------- Reporter: gilles.risch@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: ppc leopard Port: widelands | -----------------------------+-------------------------------- Comment (by gilles.risch@…): Hello, building the game manually as it is described on the widelands wiki page (http://wl.widelands.org/wiki/BuildingWidelands/#building_under_mac_os_x) isn´t successful either. Here´s the output: {{{ [ 69%] Building CXX object src/CMakeFiles/widelands_all.dir/economy/flag.cc.o /Users/roodemol/Downloads/widelands/src/ui_basic/panel.h:246: warning: 'hot' attribute directive ignored /Users/roodemol/Downloads/widelands/src/ui_basic/button.h:72: warning: 'hot' attribute directive ignored [ 69%] Building CXX object src/CMakeFiles/widelands_all.dir/economy/fleet.cc.o /Users/roodemol/Downloads/widelands/src/ui_basic/panel.h:246: warning: 'hot' attribute directive ignored /Users/roodemol/Downloads/widelands/src/ui_basic/button.h:72: warning: 'hot' attribute directive ignored /Users/roodemol/Downloads/widelands/src/economy/fleet.cc: In member function 'virtual void Widelands::Fleet::Loader::load_pointers()': /Users/roodemol/Downloads/widelands/src/logic/ship.h:106: error: 'void Widelands::Ship::set_fleet(Widelands::Fleet*)' is private /Users/roodemol/Downloads/widelands/src/economy/fleet.cc:697: error: within this context /Users/roodemol/Downloads/widelands/src/economy/portdock.h:106: error: 'void Widelands::PortDock::set_fleet(Widelands::Fleet*)' is private /Users/roodemol/Downloads/widelands/src/economy/fleet.cc:701: error: within this context make[2]: *** [src/CMakeFiles/widelands_all.dir/economy/fleet.cc.o] Error 1 make[1]: *** [src/CMakeFiles/widelands_all.dir/all] Error 2 make: *** [all] Error 2 }}} It seams that the error is inside the fleet.cc. I used the gcc version 4.0.1 (Apple Inc. build 5493). Kind regards, Gilles -- Ticket URL: <https://trac.macports.org/ticket/37237#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37237: widelands: error: ‘void Widelands::Ship::set_fleet(Widelands::Fleet*)’ is private -----------------------------+-------------------------------- Reporter: gilles.risch@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: tiger leopard Port: widelands | -----------------------------+-------------------------------- Changes (by ryandesign@…): * keywords: ppc leopard => tiger leopard Comment: Replying to [comment:2 gilles.risch@…]:
building the game manually as it is described on the widelands wiki page (http://wl.widelands.org/wiki/BuildingWidelands/#building_under_mac_os_x) isn´t successful either.
Then it's not a MacPorts-specific problem, and should be reported to the developers of widelands to be fixed. {{{ error: ‘void Widelands::Ship::set_fleet(Widelands::Fleet*)’ is private }}} This reminds me of [http://lists.freedesktop.org/archives/harfbuzz/2012-October/002592.html an error I saw with harfbuzz 0.9.5] which was also only occurring with gcc 4.0.1 and other older compilers. That problem was [http://lists.freedesktop.org/archives/harfbuzz/2012-December/002732.html ""fixed""] in harfbuzz 0.9.6. I have not yet investigated what they changed to make it work. -- Ticket URL: <https://trac.macports.org/ticket/37237#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37237: widelands: error: ‘void Widelands::Ship::set_fleet(Widelands::Fleet*)’ is private -----------------------------+-------------------------------- Reporter: gilles.risch@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: tiger leopard Port: widelands | -----------------------------+-------------------------------- Comment (by ryandesign@…): It looks like they just did they obvious, and marked those members as public instead of private: {{{ diff -ru harfbuzz-0.9.5/src/hb-ot-layout-common-private.hh harfbuzz-0.9.6/src/hb-ot-layout-common-private.hh --- harfbuzz-0.9.5/src/hb-ot-layout-common-private.hh 2012-09-15 20:16:08.000000000 -0500 +++ harfbuzz-0.9.6/src/hb-ot-layout-common-private.hh 2012-11-12 13:16:45.000000000 -0600 @@ -403,6 +403,8 @@ glyphs->add (glyphArray[i]); } + public: + /* Older compilers need this to be public. */ struct Iter { inline void init (const struct CoverageFormat1 &c_) { c = &c_; i = 0; }; inline bool more (void) { return i < c->glyphArray.len; } @@ -414,6 +416,7 @@ const struct CoverageFormat1 *c; unsigned int i; }; + private: protected: USHORT coverageFormat; /* Format identifier--format = 1 */ @@ -497,6 +500,8 @@ rangeRecord[i].add_coverage (glyphs); } + public: + /* Older compilers need this to be public. */ struct Iter { inline void init (const CoverageFormat2 &c_) { c = &c_; @@ -522,6 +527,7 @@ const struct CoverageFormat2 *c; unsigned int i, j, coverage; }; + private: protected: USHORT coverageFormat; /* Format identifier--format = 2 */ }}} -- Ticket URL: <https://trac.macports.org/ticket/37237#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37237: widelands: error: ‘void Widelands::Ship::set_fleet(Widelands::Fleet*)’ is private -----------------------------+-------------------------------- Reporter: gilles.risch@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: tiger leopard Port: widelands | -----------------------------+-------------------------------- Comment (by gilles.risch@…):
This reminds me of [http://lists.freedesktop.org/archives/harfbuzz/2012-October/002592.html an error I saw with harfbuzz 0.9.5] which was also only occurring with gcc 4.0.1 and other older compilers. That problem was [http://lists.freedesktop.org/archives/harfbuzz/2012-December/002732.html ""fixed""] in harfbuzz 0.9.6. I have not yet investigated what they changed to make it work.
That said I tried a different compiler that has been installed by macports (acPorts apple-gcc42 5666.3_9). With that compiler the code compiled, with more or less warnings, but it did not link the object files: {{{ $sudo port -v install widelands configure.compiler=apple-gcc-4.2 ... [100%] Building CXX object src/CMakeFiles/widelands.dir/main.cc.o [100%] Building CXX object src/CMakeFiles/widelands.dir/build_info.cc.o Linking CXX executable widelands Undefined symbols: "_main", referenced from: start in crt1.10.5.o (maybe you meant: cstring=center_mainview_here, cstring=center_main_mapview_on_location , Editor_Interactive::toggle_mainmenu() , _SDL_main ) ld: symbol(s) not found collect2: ld returned 1 exit status make[2]: *** [src/widelands] Error 1 make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_games_widelands/widelands/work /widelands-build17-src/build' make[1]: *** [src/CMakeFiles/widelands.dir/all] Error 2 make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_games_widelands/widelands/work /widelands-build17-src/build' make: *** [all] Error 2 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_games_widelands/widelands/work /widelands-build17-src/build' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_games_widelands/widelands/work /widelands-build17-src/build" && /usr/bin/make -w all Exit code: 2 ... }}} -- Ticket URL: <https://trac.macports.org/ticket/37237#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37237: widelands: error: ‘void Widelands::Ship::set_fleet(Widelands::Fleet*)’ is private -----------------------------+-------------------------------- Reporter: gilles.risch@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: tiger leopard Port: widelands | -----------------------------+-------------------------------- Comment (by gilles.risch@…): Replying to [comment:4 ryandesign@…]:
It looks like they just did they obvious, and marked those members as public instead of private:
{{{ diff -ru harfbuzz-0.9.5/src/hb-ot-layout-common-private.hh harfbuzz-0.9.6/src/hb-ot-layout-common-private.hh --- harfbuzz-0.9.5/src/hb-ot-layout-common-private.hh 2012-09-15 20:16:08.000000000 -0500 +++ harfbuzz-0.9.6/src/hb-ot-layout-common-private.hh 2012-11-12 13:16:45.000000000 -0600 @@ -403,6 +403,8 @@ glyphs->add (glyphArray[i]); }
+ public: + /* Older compilers need this to be public. */ struct Iter { inline void init (const struct CoverageFormat1 &c_) { c = &c_; i = 0; }; inline bool more (void) { return i < c->glyphArray.len; } @@ -414,6 +416,7 @@ const struct CoverageFormat1 *c; unsigned int i; }; + private:
protected: USHORT coverageFormat; /* Format identifier--format = 1 */ @@ -497,6 +500,8 @@ rangeRecord[i].add_coverage (glyphs); }
+ public: + /* Older compilers need this to be public. */ struct Iter { inline void init (const CoverageFormat2 &c_) { c = &c_; @@ -522,6 +527,7 @@ const struct CoverageFormat2 *c; unsigned int i, j, coverage; }; + private:
protected: USHORT coverageFormat; /* Format identifier--format = 2 */ }}}
I also tried this suggestion and changed "set_fleet(Widelands::Fleet*)" from private to public inside ship.h and portdock.h. Wideland compiled with gcc 4.0.1 but did not link neither, same error as with apple-gcc42. -- Ticket URL: <https://trac.macports.org/ticket/37237#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37237: widelands: error: ‘void Widelands::Ship::set_fleet(Widelands::Fleet*)’ is private -----------------------------+-------------------------------- Reporter: gilles.risch@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: tiger leopard Port: widelands | -----------------------------+-------------------------------- Comment (by gilles.risch@…):
{{{
Linking CXX executable widelands Undefined symbols: "_main", referenced from: start in crt1.10.5.o (maybe you meant: cstring=center_mainview_here,
cstring=center_main_mapview_on_location , Editor_Interactive::toggle_mainmenu() , _SDL_main )
ld: symbol(s) not found
... }}}
I found the solution to this problem. I had an old version of libsdl in the /Library/Frameworks/ directory and the linker preferred that over the one installed by macports. After removing it, the installation of the port worked. -> the port should be build with gcc 4.2 or higher. -- Ticket URL: <https://trac.macports.org/ticket/37237#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37237: widelands: error: ‘void Widelands::Ship::set_fleet(Widelands::Fleet*)’ is private -----------------------------+-------------------------------- Reporter: gilles.risch@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: tiger leopard Port: widelands | -----------------------------+-------------------------------- Comment (by gilles.risch@…): Hello, I have uploaded a suggestion for a portfile to compile Wideland on Max OS X 10.5.8. It simply replaces gcc 4.0 with gcc4.2. This should work an all Leopard installations because gcc 4.2 is included in the latest running Xcode release. Regards, Gilles -- Ticket URL: <https://trac.macports.org/ticket/37237#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37237: widelands: error: ‘void Widelands::Ship::set_fleet(Widelands::Fleet*)’ is private -----------------------------+-------------------------------- Reporter: gilles.risch@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: tiger leopard Port: widelands | -----------------------------+-------------------------------- Comment (by macsforever2000@…): Please attach a unified diff of the portfile against trunk so we can see what changes you made. -- Ticket URL: <https://trac.macports.org/ticket/37237#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37237: widelands: error: ‘void Widelands::Ship::set_fleet(Widelands::Fleet*)’ is private -----------------------------+-------------------------------- Reporter: gilles.risch@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: tiger leopard Port: widelands | -----------------------------+-------------------------------- Comment (by gilles.risch@…): I hope that one helps. -- Ticket URL: <https://trac.macports.org/ticket/37237#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts