Bug#811746: elmerfem: FTBFS with GCC 6: narrowing conversion

Martin Michlmayr tbm at hpe.com
Wed Jan 20 01:49:17 UTC 2016


Package: elmerfem
Version: 6.1.0.svn.5396.dfsg2-4
Severity: important
User: debian-gcc at lists.debian.org
Usertags: ftbfs-gcc-6 gcc-6-narrowing

This package fails to build with GCC 6.  GCC 6 has not been released
yet, but it's expected that GCC 6 will become the default compiler for
stretch.

Note that only the first error is reported; there might be more.  You
can find a snapshot of GCC 6 in experimental.  To build with GCC 6,
you can set CC=gcc-6 CXX=g++-6 explicitly.

You may be able to find out more about this issue at
https://gcc.gnu.org/gcc-6/changes.html

> sbuild (Debian sbuild) 0.67.0 (26 Dec 2015) on dl580gen9-02.hlinux
...
> g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include           -I/<<PKGBUILDDIR>>/debian/tmp/usr/include -I/usr/include/freetype2  -I/<<PKGBUILDDIR>>/debian/tmp/usr/include -I/usr/include/freetype2 -fPIC -I/usr/include -pthread -pthread -I/usr/include/tk8.5 -I/usr/include/tcl8.5 -MT ecif_renderer_OGL.o -MD -MP -MF .deps/ecif_renderer_OGL.Tpo -c -o ecif_renderer_OGL.o ecif_renderer_OGL.cpp
> In file included from /usr/include/c++/6/backward/strstream:50:0,
>                  from ../include/ecif_def.h:604,
>                  from ../include/ecif_body.h:44,
>                  from ecif_renderer_OGL.cpp:36:
> /usr/include/c++/6/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
>  #warning \
>   ^~~~~~~
> 
> In file included from ecif_renderer_OGL.cpp:36:0:
> ../include/ecif_body.h: In member function 'virtual bool Body::isCadBody()':
> ../include/ecif_body.h:174:49: warning: comparison between 'enum bodyGmtrType' and 'enum modelGeometryType' [-Wenum-compare]
>    virtual bool isCadBody() { return gmtrType == GEOM_CAD; }
>                                                  ^~~~~~~~
> 
> ../include/ecif_body.h: In member function 'virtual bool Body::isMeshBody()':
> ../include/ecif_body.h:176:50: warning: comparison between 'enum bodyGmtrType' and 'enum modelGeometryType' [-Wenum-compare]
>    virtual bool isMeshBody() { return gmtrType == GEOM_MESH; }
>                                                   ^~~~~~~~~
> 
> ecif_renderer_OGL.cpp: In member function 'void Renderer_OGL::createData()':
> ecif_renderer_OGL.cpp:326:49: error: narrowing conversion of '0.0f' from 'float' to 'int' inside { } [-Wnarrowing]
>    Color4 current_color = {0.0f, 0.0f, 0.0f, 1.0f};  // black
>                                                  ^
> 
> ecif_renderer_OGL.cpp:326:49: error: narrowing conversion of '0.0f' from 'float' to 'int' inside { } [-Wnarrowing]
> ecif_renderer_OGL.cpp:326:49: error: narrowing conversion of '0.0f' from 'float' to 'int' inside { } [-Wnarrowing]
> ecif_renderer_OGL.cpp:326:49: error: narrowing conversion of '1.0e+0f' from 'float' to 'int' inside { } [-Wnarrowing]
> ecif_renderer_OGL.cpp:327:49: error: narrowing conversion of '0.0f' from 'float' to 'int' inside { } [-Wnarrowing]
>    Color4 mesh_color    = {0.0f, 0.0f, 0.0f, 1.0f};  // black
>                                                  ^
> 
> ecif_renderer_OGL.cpp:327:49: error: narrowing conversion of '0.0f' from 'float' to 'int' inside { } [-Wnarrowing]
> ecif_renderer_OGL.cpp:327:49: error: narrowing conversion of '0.0f' from 'float' to 'int' inside { } [-Wnarrowing]
> ecif_renderer_OGL.cpp:327:49: error: narrowing conversion of '1.0e+0f' from 'float' to 'int' inside { } [-Wnarrowing]
> ecif_renderer_OGL.cpp:328:49: error: narrowing conversion of '1.0e+0f' from 'float' to 'int' inside { } [-Wnarrowing]
>    Color4 select_color  = {1.0f, 1.0f, 1.0f, 1.0f};  // white
>                                                  ^
> 
> ecif_renderer_OGL.cpp:328:49: error: narrowing conversion of '1.0e+0f' from 'float' to 'int' inside { } [-Wnarrowing]
> ecif_renderer_OGL.cpp:328:49: error: narrowing conversion of '1.0e+0f' from 'float' to 'int' inside { } [-Wnarrowing]
> ecif_renderer_OGL.cpp:328:49: error: narrowing conversion of '1.0e+0f' from 'float' to 'int' inside { } [-Wnarrowing]
> ecif_renderer_OGL.cpp: In member function 'virtual void Renderer_OGL::drawAllBodies()':
> ecif_renderer_OGL.cpp:529:22: warning: comparison between 'enum objectDrawingState' and 'enum objectDrawingMode' [-Wenum-compare]
>        if ( dstate == DM_NORMAL || model->getFlagValue(DRAW_TARGET_BOUNDARIES) ) {
>                       ^~~~~~~~~
> 
> In file included from ecif_renderer_OGL.cpp:2531:0:
> ../include/ecif_renderer_OGL_UNIX.hpp: In static member function 'static void Renderer_OGL::createGLWindow(char*, const char*, int, int, int, int, WindowInfo&)':
> ../include/ecif_renderer_OGL_UNIX.hpp:77:82: warning: passing NULL to non-pointer argument 7 of 'int XSetStandardProperties(Display*, Window, const char*, const char*, Pixmap, char**, int, XSizeHints*)' [-Wconversion-null]
>    XSetStandardProperties(dpy, hWnd, oglWinClass, oglWinClass, None, 0, NULL, NULL);
>                                                                                   ^
> 
> ../include/ecif_renderer_OGL_UNIX.hpp: In static member function 'static void Renderer_OGL::destroyWindow(Display*, Window)':
> ../include/ecif_renderer_OGL_UNIX.hpp:101:34: warning: passing NULL to non-pointer argument 2 of 'int glXMakeCurrent(Display*, GLXDrawable, GLXContext)' [-Wconversion-null]
>    glXMakeCurrent(NULL, NULL, NULL);
>                                   ^
> 
> ../include/ecif_renderer_OGL_UNIX.hpp: In static member function 'static int Renderer_OGL::windowProcedure(Window, XEvent, void*, void*)':
> ../include/ecif_renderer_OGL_UNIX.hpp:332:10: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null]
>    return NULL;
>           ^~~~
> 
> Makefile:566: recipe for target 'ecif_renderer_OGL.o' failed

-- 
Martin Michlmayr
Linux for HPE Helion, Hewlett Packard Enterprise



More information about the debian-science-maintainers mailing list