Bug 227951 - x11-wm/icewm: Does not build due to some C++11 compilation errors
Summary: x11-wm/icewm: Does not build due to some C++11 compilation errors
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs mailing list
URL: https://lists.freebsd.org/pipermail/f...
Keywords: needs-patch, regression
Depends on:
Blocks: 224669
  Show dependency treegraph
 
Reported: 2018-05-03 15:11 UTC by Mateusz Piotrowski
Modified: 2018-05-21 21:27 UTC (History)
4 users (show)

See Also:
portmaster: maintainer-feedback+


Attachments
Force gnu++98 mode for icewm (390 bytes, patch)
2018-05-03 18:05 UTC, Dimitry Andric
no flags Details | Diff
Fixes the compile errors on 12.0-CURRENT (amd64) (3.87 KB, patch)
2018-05-03 19:07 UTC, Ronald Klop
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mateusz Piotrowski freebsd_committer 2018-05-03 15:11:02 UTC
I'm testing on FreeBSD 12.0 r332889 but I guess it could be reproduced on any version.
Comment 1 Walter Schwarzenfeld freebsd_triage 2018-05-03 16:16:40 UTC
It also fails on 10.4.  I got it to compile with USES=           compiler:c++11-lang in the Makefile and with clang50. It does not compile with clang60.

With clang69 a lot of errors like 
./ref.h:22:15: note: expanded from macro 'null'
:#define null (*(class null_ref *)0)15: note: expanded from macro 'null'

#define null (*(class null_ref *)0)              ^~~~~~~~~~~~~~~~~~~~

              ^~~~~~~~~~~~~~~~~~~~
wmapp.cc:652:39: warning: binding dereferenced null pointer to reference has undefined behavior
      [-Wnull-dereference]
    if (TEST_GRADIENT(logoutPixbuf == null))
                                      ^~~~
./ref.h:22:15: note: expanded from macro 'null'
#define null (*(class null_ref *)0)
              ^~~~~~~~~~~~~~~~~~~~
./ypaint.h:36:30: note: expanded from macro 'TEST_GRADIENT'
#define TEST_GRADIENT(Cond) (Cond)
                             ^~~~
wmapp.cc:654:43: warning: binding dereferenced null pointer to reference has undefined behavior
      [-Wnull-dereference]
    if (TEST_GRADIENT(switchbackPixbuf == null))
                                          ^~~~
./ref.h:22:15: note: expanded from macro 'null'
#define null (*(class null_ref *)0)
              ^~~~~~~~~~~~~~~~~~~~
./ypaint.h:36:30: note: expanded from macro 'TEST_GRADIENT'
#define TEST_GRADIENT(Cond) (Cond)
                             ^~~~
wmapp.cc:656:41: warning: binding dereferenced null pointer to reference has undefined behavior
      [-Wnull-dereference]
    if (TEST_GRADIENT(menubackPixbuf == null))
                                        ^~~~
./ref.h:22:15: note: expanded from macro 'null'
#define null (*(class null_ref *)0)
              ^~~~~~~~~~~~~~~~~~~~
./ypaint.h:36:30: note: expanded from macro 'TEST_GRADIENT'
#define TEST_GRADIENT(Cond) (Cond)
                             ^~~~
wmapp.cc:658:40: warning: binding dereferenced null pointer to reference has undefined behavior
      [-Wnull-dereference]
    if (TEST_GRADIENT(menuselPixbuf == null))
                                       ^~~~
./ref.h:22:15: note: expanded from macro 'null'
#define null (*(class null_ref *)0)
              ^~~~~~~~~~~~~~~~~~~~
./ypaint.h:36:30: note: expanded from macro 'TEST_GRADIENT'
#define TEST_GRADIENT(Cond) (Cond)
                             ^~~~
wmapp.cc:660:40: warning: binding dereferenced null pointer to reference has undefined behavior
      [-Wnull-dereference]
    if (TEST_GRADIENT(menusepPixbuf == null))
                                       ^~~~
./ref.h:22:15: note: expanded from macro 'null'
wmframe.cc#define null (*(class null_ref *)0)
              ^~~~~~~~~~~~~~~~~~~~
:./ypaint.h:36:30: note: expanded from macro 'TEST_GRADIENT'
2227#define TEST_GRADIENT(Cond) (Cond)
                             ^~~~
wmapp.cc:664:41: warning: binding dereferenced null pointer to reference has undefined behavior
      [-Wnull-dereference]
:21    if (TEST_GRADIENT(listbackPixbuf == null) &&
                                        ^~~~
:./ref.h:22:15: note: expanded from macro 'null'
 #define null (*(class null_ref *)0)warning: binding dereferenced null pointer to reference has undefined behavior
      [-Wnull-dereference]

    WindowOption wo(null);              ^~~~~~~~~~~~~~~~~~~~

                    ^~~~
./ref.h:22:15: note: expanded from macro 'null'
./ypaint.h#define null (*(class null_ref *)0):36:30: note: expanded from macro 'TEST_GRADIENT'

#define TEST_GRADIENT(Cond) (Cond)
                             ^~~~
wmapp.cc:665:66: warning: binding dereferenced null pointer to reference has undefined behavior
      [-Wnull-dereference]
        (listbackPixmap = paths->loadPixmap(0, "listbg.xpm")) == null)
                                                                 ^~~~
./ref.h:22:15: note: expanded from macro 'null'
#define null (*(class null_ref *)0)
              ^~~~~~~~~~~~~~~~~~~~
wmapp.cc:668:43: warning: binding dereferenced null pointer to reference has undefined behavior
      [-Wnull-dereference]
    if (TEST_GRADIENT(dialogbackPixbuf == null) &&
                                          ^~~~
./ref.h:22:15: note: expanded from macro 'null'
#define null (*(class null_ref *)0)
              ^~~~~~~~~~~~~~~~~~~~
./ypaint.h:36:30: note: expanded from macro 'TEST_GRADIENT'
#define TEST_GRADIENT(Cond) (Cond)
                             ^~~~
wmapp.cc:669:70: warning: binding dereferenced null pointer to reference has undefined behavior
Comment 2 Walter Schwarzenfeld freebsd_triage 2018-05-03 16:19:30 UTC
I does not tested functionality, I made only quick look into it.
Comment 4 Dimitry Andric freebsd_committer 2018-05-03 18:05:24 UTC
Created attachment 193026 [details]
Force gnu++98 mode for icewm

Try this patch, which sets the C++ language standard to gnu++98.  Even though there are many warnings, icewm should compile just fine.  For me, it also starts up and run, though I only tested it very lightly.
Comment 5 Ronald Klop 2018-05-03 19:07:43 UTC
Created attachment 193027 [details]
Fixes the compile errors on 12.0-CURRENT (amd64)

Some fixes to the source to compile with the latest compiler on 12-CURRENT #8 r332738M: Thu Apr 19 04:00:22 CEST 2018 -> clang 6

I just compile tested it.

Did see the other patch to the Makefile just a moment ago. I don't have a preference for this or that patch.
Comment 6 Chris Hutchinson 2018-05-17 14:23:41 UTC
@Jan
Thanks for stepping up on this while I was away!

@All
Please see bug #227951 , where I've squashed all the remaining
errors on this.

Thanks, again!

--Chris
Comment 7 Ronald Klop 2018-05-21 21:02:05 UTC
(In reply to Chris Hutchinson from comment #6)

So what is fixed?
The reference to another issue is recursive to this issue.
And I don't see a commit in the icewm port since March.

Please enlighten me. :-)

Regards,
Ronald.
Comment 8 Chris Hutchinson 2018-05-21 21:25:03 UTC
(In reply to Ronald Klop from comment #7)
> (In reply to Chris Hutchinson from comment #6)
> 
> So what is fixed?
> The reference to another issue is recursive to this issue.
> And I don't see a commit in the icewm port since March.
> 
> Please enlighten me. :-)
> 
> Regards,
> Ronald.
Hey, Ronald! After checking the links in this thread/pr now,
I'd have to say I'd be confused too. :-)

I submitted a patch in bug #228317 that should explain it all.

HTH !


--Chris
Comment 9 Chris Hutchinson 2018-05-21 21:27:03 UTC
(In reply to Chris Hutchinson from comment #8)
> (In reply to Ronald Klop from comment #7)
> > (In reply to Chris Hutchinson from comment #6)
> > 
> > So what is fixed?
> > The reference to another issue is recursive to this issue.
> > And I don't see a commit in the icewm port since March.
> > 
> > Please enlighten me. :-)
> > 
> > Regards,
> > Ronald.
> Hey, Ronald! After checking the links in this thread/pr now,
> I'd have to say I'd be confused too. :-)
> 
> I submitted a patch in bug #228317 that should explain it all.
> 
> HTH !
> 
> 
> --Chris

Oh, and of course bug #228317 will need to be committed before
any good comes of it. ;-)