Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 582954 - net-libs/libvncserver-0.9.10_p20160127: build w/gcc-6: breaks build of kde-apps/krfb-16.04.0
Summary: net-libs/libvncserver-0.9.10_p20160127: build w/gcc-6: breaks build of kde-ap...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alex Xu (Hello71)
URL:
Whiteboard:
Keywords:
Depends on: 578958 604192
Blocks: gcc-6
  Show dependency tree
 
Reported: 2016-05-14 01:49 UTC by Peter Levine
Modified: 2017-01-20 20:16 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
libvncserver-gcc6.patch (libvncserver-gcc6.patch,4.55 KB, patch)
2016-05-14 01:51 UTC, Peter Levine
Details | Diff
krfb-16.08.2-fix-build-by-undefining-max-macro.patch (krfb-16.08.2-fix-build-by-undefining-max-macro.patch,659 bytes, patch)
2016-10-29 12:03 UTC, Jonathan Scruggs (RETIRED)
Details | Diff
libvncserver-0.9.10_p20160924.ebuild (libvncserver-0.9.10_p20160924.ebuild,1.78 KB, text/plain)
2016-10-29 14:18 UTC, Jonathan Scruggs (RETIRED)
Details
libvncserver-0.9.10-cmake-fixes.patch (libvncserver-0.9.10-cmake-fixes.patch,5.93 KB, patch)
2016-10-29 14:19 UTC, Jonathan Scruggs (RETIRED)
Details | Diff
libvncserver-0.9.10_p20160924.ebuild (libvncserver-0.9.10_p20160924.ebuild,2.10 KB, text/plain)
2016-10-29 21:14 UTC, Jonathan Scruggs (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Levine 2016-05-14 01:49:35 UTC
Building kde-apps/krfb-16.04.0 with gcc-6 fails with:

>error: macro "max" passed 3 arguments, but takes just 2

"max" macro from libvncserver conflicts with the one from gcc
Comment 1 Peter Levine 2016-05-14 01:51:54 UTC
Created attachment 434232 [details, diff]
libvncserver-gcc6.patch

Based on upstream revision: https://github.com/rdieter/libvncserver/commit/53cc1fa18a3b96d2c31a145d971017564fca39bb
Comment 2 Peter Kunze 2016-10-22 00:40:12 UTC
I ran into the same problem.
The patch fixed it right away!

Thanks, Peter!
Comment 3 Jonathan Scruggs (RETIRED) gentoo-dev 2016-10-29 12:03:04 UTC
Created attachment 451830 [details, diff]
krfb-16.08.2-fix-build-by-undefining-max-macro.patch

The issue isn't with libvncserver, it's actually with krfb. There is already a fix in official upstream master to fix this. See the attached patch. The other patch is a work around by renaming the max macro. This new patch will use Standard Max if it exists rather than a custom one. :)
Comment 4 Jonathan Scruggs (RETIRED) gentoo-dev 2016-10-29 12:23:03 UTC
Sorry. Also noticed that the first attached patch in this report is from libvncserver master: https://github.com/LibVNC/libvncserver/commit/53cc1fa18a3b96d2c31a145d971017564fca39bb

Hmm. I need to test how this works with the the patch from krfb upstream. It'd be funny if they broke each other trying to fix each other's compile issues.
Comment 5 Jonathan Scruggs (RETIRED) gentoo-dev 2016-10-29 14:18:21 UTC
Created attachment 451860 [details]
libvncserver-0.9.10_p20160924.ebuild

I did some compile tests and the changing of the max function does work with the patch to krfb. :)

I made an updated ebuild to libvncserver to the latest master commit at the time of this post. This will include the patch from Peter Levine as that's in upstream already.

Changes in the ebuild:
- Switched to CMake
- Added systemd
- Added SDL and SDL2 (not sure if the latter works)
- Cleaned up the ebuild
- Couldn't find static lib compiling in the CMake files, so removed that.
- Added required use statements to clean up the configure section

Not a 100% certain this all works, so this ebuild requires more testing.
Comment 6 Jonathan Scruggs (RETIRED) gentoo-dev 2016-10-29 14:19:17 UTC
Created attachment 451862 [details, diff]
libvncserver-0.9.10-cmake-fixes.patch

The patch needed for the attached ebuild to disable the automagic in the CMake files.
Comment 7 Jonathan Scruggs (RETIRED) gentoo-dev 2016-10-29 21:14:51 UTC
Created attachment 451894 [details]
libvncserver-0.9.10_p20160924.ebuild

Here is a version without a patch. I was shown a cool trick to stop automagic from happening when I don't want it. :)

Again. Needs testing with all the new features. I don't know how to test the systemd sockets.
Comment 8 Alex Xu (Hello71) 2016-10-31 00:39:30 UTC
(In reply to Jon from comment #7)
> Created attachment 451894 [details]
> libvncserver-0.9.10_p20160924.ebuild
> 
> Here is a version without a patch. I was shown a cool trick to stop
> automagic from happening when I don't want it. :)
> 
> Again. Needs testing with all the new features. I don't know how to test the
> systemd sockets.

tbh I would rather see these automagic changes upstream if at all possible...
Comment 9 Jonathan Scruggs (RETIRED) gentoo-dev 2016-10-31 07:28:08 UTC
(In reply to Alex Xu (Hello71) from comment #8)
> (In reply to Jon from comment #7)
> > Created attachment 451894 [details]
> > libvncserver-0.9.10_p20160924.ebuild
> > 
> > Here is a version without a patch. I was shown a cool trick to stop
> > automagic from happening when I don't want it. :)
> > 
> > Again. Needs testing with all the new features. I don't know how to test the
> > systemd sockets.
> 
> tbh I would rather see these automagic changes upstream if at all possible...

That would be nice, but this is upstream. I was thinking for wrapping the detection stuff with something like the patch I posted here and sending that upstream.
Comment 10 Alex Xu (Hello71) 2017-01-20 20:16:36 UTC
fixed in 0.9.11, stable in bug 605326. chose not to change to cmake for now.