slim icon indicating copy to clipboard operation
slim copied to clipboard

Bug: Build failure with newer gcc

Open r-value opened this issue 4 years ago • 8 comments

https://github.com/iwamatsu/slim/blob/4a40caff34b52c9b9bcf8cbb83775ade9398d179/panel.cpp#L51

It triggered an error: ordered comparison of pointer with integer zero.

WinGC is a pointer and I can't figure out what WinGC < 0 means. This branch is never taken and actually optimized out if built with older gcc. Could you please explain or fix it?

r-value avatar Oct 03 '21 18:10 r-value

this: https://github.com/archlinux/svntogit-packages/blob/packages/slim/trunk/slim-1.3.6-gcc11.patch seems to work (for gcc11* at least)

ncmprhnsbl avatar Jan 18 '22 10:01 ncmprhnsbl

@ncmprhnsbl The patch works but obviously it made a functional change. I think it'll be better to confirm the meaning of this if branch with upstream vendor so I opened this issue.

r-value avatar Jan 18 '22 11:01 r-value

I don't think that patch does "make a functional change" - it looks like it's simply correcting a long-standing mis-reading of the return value in case of error. As that error should never occur (well, not in normal use, anyway) it's a safe and correct patch. I've applied it to my fork project at https://sourceforge.net/projects/slim-fork/

RobPearce avatar Feb 03 '22 07:02 RobPearce

I don't think that patch does "make a functional change" - it looks like it's simply correcting a long-standing mis-reading of the return value in case of error. As that error should never occur (well, not in normal use, anyway) it's a safe and correct patch. I've applied it to my fork project at https://sourceforge.net/projects/slim-fork/

The patch is also included in the Fedora package (which I am trying to unretire and modernise). There are also some other patches for fedora v1.3.3 and v1.3.2 for selinux. Do we still need these patches?

Sourceforge is a very irritating site to submit bugs, the captcha does not get loaded and so I gave up there. Perhaps you could have a github site for reporting bugs for slim-fork? Thanks!

maitra avatar Feb 25 '23 16:02 maitra

There are also some other patches for fedora v1.3.3 and v1.3.2 for selinux. Do we still need these patches?

If you're referring to the slim-1.3.2-selinux.patch and slim-1.3.3-fedora.patch then both of them look to be specialisation of the configuration. If you intend to retain those Fedora-specific customisations then yes, you will need to apply updated versions of those two. The libpng fix has already been applied to the fork.

RobPearce avatar Feb 25 '23 19:02 RobPearce

There are also some other patches for fedora v1.3.3 and v1.3.2 for selinux. Do we still need these patches?

If you're referring to the slim-1.3.2-selinux.patch and slim-1.3.3-fedora.patch then both of them look to be specialisation of the configuration. If you intend to retain those Fedora-specific customisations then yes, you will need to apply updated versions of those two. The libpng fix has already been applied to the fork.

Thank you. Unfortunately, the patches seem to give errors with your build.

Btw, one more question: I would like to put the current fedora wallpaper in. How do I do that? Where do I specify it in the default configuration? Thank you.

maitra avatar Feb 25 '23 19:02 maitra

Unfortunately, the patches seem to give errors with your build.

They will need updating. The default / example configuration file has been updated and re-arranged, so those old patches won't apply as is. They aren't that big, so the best option may be to hand-edit a copy of the new file (copy & paste the changes, probably) and create a new patch with diff.

As to the wallpaper, you will need to create a "Fedora theme" with the background and panel you desire. There is some documentation on the project homepage. Then patch the "current_theme" line in slim.conf to reference it.

BTW, I've added an "Issues" tab on my github fork if you really can't get SourceForge to work.

RobPearce avatar Feb 25 '23 20:02 RobPearce

Thanks, the main differences seem to be rearrangement of the lines, and also uncommenting the daemon mode as well as the lockfile that used to be /var/log/slim.lock and is now /run/slim.pid.

thanks for the issues tab.

maitra avatar Feb 25 '23 20:02 maitra