Opened 12 years ago
Closed 8 years ago
#37237 closed defect (fixed)
widelands @build17: error: ‘void Widelands::Ship::set_fleet(Widelands::Fleet*)’ is private
Reported by: | gilles.risch@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | tiger leopard haspatch | Cc: | ryandesign (Ryan Carsten Schmidt) |
Port: | widelands |
Description
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
Attachments (4)
Change History (15)
Changed 12 years ago by gilles.risch@…
comment:1 Changed 12 years ago by mf2k (Frank Schima)
Keywords: | ppc leopard added; widelands powerpc build failure removed |
---|
comment:2 follow-up: 3 Changed 12 years ago by gilles.risch@…
comment:3 follow-up: 5 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | tiger added; ppc removed |
---|---|
Summary: | Widelands does not build on my PowerBook G4 with Mac OS X 10.5.8 → widelands: error: ‘void Widelands::Ship::set_fleet(Widelands::Fleet*)’ is private |
Replying to 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 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 "fixed" in harfbuzz 0.9.6. I have not yet investigated what they changed to make it work.
comment:4 follow-up: 6 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
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 */
comment:5 follow-up: 7 Changed 12 years ago by gilles.risch@…
This reminds me of 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 "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 ...
comment:6 Changed 12 years ago by gilles.risch@…
Replying to 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.
comment:7 Changed 12 years ago 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.
comment:8 Changed 12 years ago 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
comment:9 Changed 12 years ago by mf2k (Frank Schima)
Please attach a unified diff of the portfile against trunk so we can see what changes you made.
Changed 12 years ago by gilles.risch@…
Attachment: | Portfile.diff added |
---|
Changed 12 years ago by gilles.risch@…
Attachment: | Portfile-widelands.diff added |
---|
comment:11 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|---|
Keywords: | haspatch added |
Resolution: | → fixed |
Status: | new → closed |
Summary: | widelands: error: ‘void Widelands::Ship::set_fleet(Widelands::Fleet*)’ is private → widelands @build17: error: ‘void Widelands::Ship::set_fleet(Widelands::Fleet*)’ is private |
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:
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