Bug 192132 - games/opencity: build with GCC 4.8 fails with extensionmanager.cpp:45:86: error: ISO C++ forbids casting between pointer-to-function and pointer-to-object
Summary: games/opencity: build with GCC 4.8 fails with extensionmanager.cpp:45:86: err...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks: 192025
  Show dependency treegraph
 
Reported: 2014-07-26 10:43 UTC by Gerald Pfeifer
Modified: 2014-08-31 00:38 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer freebsd_committer freebsd_triage 2014-07-26 10:43:36 UTC
We are working to change the default version of GCC from 4.7 (which
is end of life) to 4.8.

This port is one of a handfull that blocks this migration since it fails
to build on FreeBSD/amd64 10 as follows:

g++48 -DHAVE_CONFIG_H -I. -I..  -I../src/ -I../src/binreloc/ -I../src/enum/ -I../src/mas/ -I../src/mapgen/ -I../src/model/ -I../src/networking/ -I../src/pngfuncs/ -I../src/simulator/ -I../src/structure/ -I../src/tinyxml/ -I../src/tinyxpath/ -I../src/triangulation/ -DDATADIR=\"/usr/local/share\" -DSYSCONFDIR=\"/usr/local/etc\" -I/usr/X11R6/include  -DNDEBUG -Wall -Wmissing-braces -Wparentheses -pedantic-errors -I/usr/local/include/SDL -I/usr/local/include -D_GNU_SOURCE=1 -D_REENTRANT -D_THREAD_SAFE -I/usr/local/include/libpng15    -std=c++98 -O2 -pipe -Wl,-rpath=/usr/local/lib/gcc48 -fno-strict-aliasing -Wl,-rpath=/usr/local/lib/gcc48 -MT extensionmanager.o -MD -MP -MF .deps/extensionmanager.Tpo -c -o extensionmanager.o extensionmanager.cpp
extensionmanager.cpp: In member function 'bool ExtensionManager::Load()':
extensionmanager.cpp:45:86: error: ISO C++ forbids casting between pointer-to-function and pointer-to-object [-Werror=pedantic]
  this->glTexImage3D = (PFNGLfTEXIMAGE3DEXTPROC)SDL_GL_GetProcAddress("glTexImage3DEXT");

The full log is at http://package23.nyi.freebsd.org/data/10amd64-default-PR192025/2014-07-24_23h12m00s/logs/errors/opencity-0.0.6.4_3.log
Comment 1 commit-hook freebsd_committer freebsd_triage 2014-08-31 00:36:54 UTC
A commit references this bug:

Author: gerald
Date: Sun Aug 31 00:36:37 UTC 2014
New revision: 366693
URL: http://svnweb.freebsd.org/changeset/ports/366693

Log:
  Support building with modern, more standards-compliant compilers such
  as GCC 4.8.

  (For a project as little maintained upstream as OpenCity building with
  -pedantic-errors is a bad idea anyways.)

  PR:		192132
  Approved by:	maintainer timeout (amdmi3, five weeks)

Changes:
  head/games/opencity/files/patch-no-pedantic-errors
Comment 2 Gerald Pfeifer freebsd_committer freebsd_triage 2014-08-31 00:38:04 UTC
This should be fixed now.