Menu

#1160 Fix missing header for Slit

v1.4.0
closed-accepted
None
5
2017-03-01
2017-02-24
Petr Vorel
No

Missing heaer breaks build on openSUSE Tumbleweed . It's strange that on some platforms (Debian) this isn't required.

gcc (SUSE Linux) 6.3.1 20170202 [gcc-6-branch revision 245119]

1 Attachments

Discussion

  • Thomas Luebking

    Thomas Luebking - 2017-02-26

    What's the actual error when building w/o?

     
  • Petr Vorel

    Petr Vorel - 2017-02-26

    Errors with GCC:

    g++ -DHAVE_CONFIG_H -I.    -include ./config.h -I./src -I./src -I./src/FbTk -I./nls   -g -O2  -MT src/fluxbox-Slit.o -MD -MP -MF src/.deps/fluxbox-Slit.Tpo -c -o src/fluxbox-Slit.o `test -f 'src/Slit.cc' || echo './'`src/Slit.cc
    src/Slit.cc: In constructor ‘Slit::Slit(BScreen&, FbTk::Layer&, const char*)’:
    src/Slit.cc:280:5: error: ‘Fluxbox’ has not been declared
         Fluxbox::instance()->keys()->registerWindow(window().window(), *this, Keys::ON_SLIT);
         ^~~~~~~
    src/Slit.cc: In member function ‘virtual void Slit::buttonPressEvent(XButtonEvent&)’:
    src/Slit.cc:949:20: error: ‘Fluxbox’ has not been declared
         Display *dpy = Fluxbox::instance()->display();
                        ^~~~~~~
    src/Slit.cc:954:9: error: ‘Fluxbox’ has not been declared
         if (Fluxbox::instance()->keys()->doAction(be.type, be.state, be.button,
             ^~~~~~~
    src/Slit.cc: In member function ‘void Slit::updateCrossingState()’:
    src/Slit.cc:980:23: error: ‘Fluxbox’ has not been declared
         if (XQueryPointer(Fluxbox::instance()->display(), window().window(), &wr, &wc, &rx, &ry, &x, &y, &mask))
                           ^~~~~~~
    src/Slit.cc: In member function ‘virtual void Slit::enterNotifyEvent(XCrossingEvent&)’:
    src/Slit.cc:997:5: error: ‘Fluxbox’ has not been declared
         Fluxbox::instance()->keys()->doAction(ce.type, ce.state, 0, Keys::ON_SLIT);
         ^~~~~~~
    src/Slit.cc: In member function ‘virtual void Slit::leaveNotifyEvent(XCrossingEvent&)’:
    src/Slit.cc:1017:9: error: ‘Fluxbox’ has not been declared
             Fluxbox::instance()->keys()->doAction(event.type, event.state, 0, Keys::ON_SLIT);
             ^~~~~~~
    make[2]: *** [Makefile:3883: src/fluxbox-Slit.o] Error 1
    

    Some gcc related info:

    $ cc --version
    cc (SUSE Linux) 6.3.1 20170202 [gcc-6-branch revision 245119]
    Copyright (C) 2016 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    $ gcc -print-prog-name=cc1plus
    /usr/lib64/gcc/x86_64-suse-linux/6/cc1plus
    
    $ `gcc -print-prog-name=cc1plus` -v
     #include "..." search starts here:
     #include <...> search starts here:
     /usr/include/c++/6
     /usr/include/c++/6/x86_64-suse-linux
     /usr/include/c++/6/backward
     /usr/lib64/gcc/x86_64-suse-linux/6/include
     /usr/local/include
     /usr/lib64/gcc/x86_64-suse-linux/6/include-fixed
     /usr/lib64/gcc/x86_64-suse-linux/6/../../../../x86_64-suse-linux/include
     /usr/include
    End of search list.
    

    It's strange, that it's different for clang:

    clang++ -DHAVE_CONFIG_H -I.    -include ./config.h -I./src -I./src -I./src/FbTk -I./nls   -g -O2  -MT src/fluxbox-Slit.o -MD -MP -MF src/.deps/fluxbox-Slit.Tpo -c -o src/fluxbox-Slit.o `test -f 'src/Slit.cc' || echo './'`src/Slit.cc
    In file included from src/Slit.cc:25:
    In file included from ./src/Slit.hh:29:
    In file included from ./src/LayerMenu.hh:27:
    In file included from ./src/ToggleMenu.hh:25:
    In file included from ./src/FbMenu.hh:27:
    In file included from ./src/FbTk/Menu.hh:32:
    ./src/FbTk/FbWindow.hh:244:10: error: no type named 'unique_ptr' in namespace 'std'
        std::unique_ptr<fbtk::transparent> m_transparent;
        ~~~~~^
    ./src/FbTk/FbWindow.hh:244:20: error: expected member name or ';' after declaration specifiers
        std::unique_ptr<fbtk::transparent> m_transparent;
        ~~~~~~~~~~~~~~~^
    In file included from src/Slit.cc:25:
    In file included from ./src/Slit.hh:29:
    In file included from ./src/LayerMenu.hh:27:
    In file included from ./src/ToggleMenu.hh:25:
    In file included from ./src/FbMenu.hh:27:
    ./src/FbTk/Menu.hh:192:10: error: no type named 'unique_ptr' in namespace 'std'
        std::unique_ptr<menusearch> m_search;
        ~~~~~^
    ./src/FbTk/Menu.hh:192:20: error: expected member name or ';' after declaration specifiers
        std::unique_ptr<menusearch> m_search;
        ~~~~~~~~~~~~~~~^
    ./src/FbTk/Menu.hh:242:10: error: no type named 'unique_ptr' in namespace 'std'
        std::unique_ptr<fbtk::shape> m_shape; // the corners
        ~~~~~^
    ./src/FbTk/Menu.hh:242:20: error: expected member name or ';' after declaration specifiers
        std::unique_ptr<fbtk::shape> m_shape; // the corners
        ~~~~~~~~~~~~~~~^
    In file included from src/Slit.cc:25:
    In file included from ./src/Slit.hh:29:
    In file included from ./src/LayerMenu.hh:27:
    In file included from ./src/ToggleMenu.hh:25:
    ./src/FbMenu.hh:59:10: error: no type named 'unique_ptr' in namespace 'std'
        std::unique_ptr<fbtk::autoreloadhelper> m_reloader;
        ~~~~~^
    ./src/FbMenu.hh:59:20: error: expected member name or ';' after declaration specifiers
        std::unique_ptr<fbtk::autoreloadhelper> m_reloader;
        ~~~~~~~~~~~~~~~^
    ./src/FbMenu.hh:54:60: error: use of undeclared identifier 'm_reloader'
        void setReloadHelper(FbTk::AutoReloadHelper *helper) { m_reloader.reset(helper); }
                                                               ^
    ./src/FbMenu.hh:55:53: error: use of undeclared identifier 'm_reloader'
        FbTk::AutoReloadHelper *reloadHelper() { return m_reloader.get(); }
                                                        ^
    In file included from src/Slit.cc:25:
    In file included from ./src/Slit.hh:29:
    In file included from ./src/LayerMenu.hh:29:
    In file included from ./src/FbTk/RadioMenuItem.hh:25:
    ./src/FbTk/MenuItem.hh:158:14: error: no type named 'unique_ptr' in namespace 'std'
            std::unique_ptr<pixmapwithmask> pixmap;
            ~~~~~^
    ./src/FbTk/MenuItem.hh:158:24: error: expected member name or ';' after declaration specifiers
            std::unique_ptr<pixmapwithmask> pixmap;
            ~~~~~~~~~~~~~~~^
    ./src/FbTk/MenuItem.hh:161:10: error: no type named 'unique_ptr' in namespace 'std'
        std::unique_ptr<icon> m_icon;
        ~~~~~^
    ./src/FbTk/MenuItem.hh:161:20: error: expected member name or ';' after declaration specifiers
        std::unique_ptr<icon> m_icon;
        ~~~~~~~~~~~~~~~^
    ./src/FbTk/MenuItem.hh:109:16: error: use of undeclared identifier 'm_icon'
            return m_icon.get() ? m_icon->pixmap.get() : 0;
                   ^
    ./src/FbTk/MenuItem.hh:109:31: error: use of undeclared identifier 'm_icon'
            return m_icon.get() ? m_icon->pixmap.get() : 0;
                                  ^
    In file included from src/Slit.cc:25:
    ./src/Slit.hh:155:10: error: no type named 'unique_ptr' in namespace 'std'
        std::unique_ptr<layermenu> m_layermenu;
        ~~~~~^
    ./src/Slit.hh:155:20: error: expected member name or ';' after declaration specifiers
        std::unique_ptr<layermenu> m_layermenu;
        ~~~~~~~~~~~~~~~^
    ./src/Slit.hh:181:10: error: no type named 'unique_ptr' in namespace 'std'
        std::unique_ptr<fbtk::layeritem> m_layeritem;
        ~~~~~^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    </fbtk::layeritem></layermenu></layermenu></icon></icon></pixmapwithmask></pixmapwithmask></fbtk::autoreloadhelper></fbtk::autoreloadhelper></fbtk::shape></fbtk::shape></menusearch></menusearch></fbtk::transparent></fbtk::transparent>
     
  • Thomas Luebking

    Thomas Luebking - 2017-02-26
    • status: open --> open-accepted
    • Group: future release --> v1.4.0
     
  • Thomas Luebking

    Thomas Luebking - 2017-02-26

    clang seems to be including some dated libstdc++

    fluxbox.hh is pulled in via Xinerama.hh, ie. you're compiling w/o XINERAMA being defined - what could have undesired impact for it's likely used off-label and partially covers multi-output randr setups as well.

    Other than that, the header needs explicit inclusion (ie. your patch is mandatory)

     
  • Mathias Gumz

    Mathias Gumz - 2017-03-01
    • status: open-accepted --> closed-accepted
    • assigned_to: Mathias Gumz
     
  • Mathias Gumz

    Mathias Gumz - 2017-03-01

    thanks! bdfaaa0e173ad63e64c1166c0b524e1639ced12f

     

Log in to post a comment.

MongoDB Logo MongoDB