Page MenuHomeFreeBSD

multimedia/webcamoid: Unbreaking clang-built app with USE_GCC=6.0+
ClosedPublic

Authored by yuri on Dec 16 2017, 8:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 10:08 PM
Unknown Object (File)
Fri, Nov 8, 4:24 AM
Unknown Object (File)
Mon, Nov 4, 4:33 PM
Unknown Object (File)
Wed, Oct 30, 9:32 AM
Unknown Object (File)
Wed, Oct 30, 9:31 AM
Unknown Object (File)
Wed, Oct 30, 9:31 AM
Unknown Object (File)
Wed, Oct 30, 9:31 AM
Unknown Object (File)
Wed, Oct 30, 9:21 AM
Subscribers

Details

Summary

This is a very ugly patch, but it makes Webcamoid run for the users.
Unfortunately, Webcamoid crashes when it is built with clang.
The upstream is investigating. It runs fine when gcc builds it.
USE_GCC in combination with qmake5 hits another bug: Bug#224137: qmake runs g++ command instead of ${CXX}.
This isn't yet fixed by the Qt team, hence another workaround.

I would like to commit this patch for the benefit of users who will be able to run Webcamoid this way, instead of seeing it crashing.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

multimedia/webcamoid/Makefile
37–39 ↗(On Diff #36654)
BINARY_ALIAS=  g++=${CXX}
yuri marked an inline comment as done.Dec 16 2017, 9:51 AM
yuri added inline comments.
multimedia/webcamoid/Makefile
37–39 ↗(On Diff #36654)

Thanks for this suggestion!

yuri marked an inline comment as done.

Using BINARY_ALIAS.

yuri marked an inline comment as done.Dec 16 2017, 9:51 AM
multimedia/webcamoid/Makefile
35 ↗(On Diff #36657)

This will break if ${CXX} has a space in it. Can this be accomplished with a REINPLACE_CMD instead, or does it need to be a BINARY_ALIAS?

yuri marked an inline comment as done.Dec 18 2017, 9:59 PM
yuri added inline comments.
multimedia/webcamoid/Makefile
35 ↗(On Diff #36657)

This, unfortunately, can't be accomplished with REINPLACE_CMD because the problem is in the qmake5 port. Bare g++ occurs there a lot, and one or some of such occurrences get into the command lines, and here we need g++6 in this case.

On the other hand, ${CXX} isn't supposed to have spaces in it on UNIX. A lot of other things will break too in such case.

yuri marked 2 inline comments as done.Dec 18 2017, 9:59 PM
adamw added inline comments.
multimedia/webcamoid/Makefile
35 ↗(On Diff #36657)

Fair enough!

This revision is now accepted and ready to land.Dec 18 2017, 10:07 PM
This revision was automatically updated to reflect the committed changes.