Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 784383 - media-sound/ardour-6.6-r1: error: invalid conversion from 'volatile void*' to 'void*' [-fpermissive]
Summary: media-sound/ardour-6.6-r1: error: invalid conversion from 'volatile void*' to...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Professional Audio Applications Maintainers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: glib-2.68
  Show dependency tree
 
Reported: 2021-04-20 11:55 UTC by Joonas Niilola
Modified: 2021-04-27 02:49 UTC (History)
3 users (show)

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


Attachments
build.log (ardour-6.6-r1:20210420-112816.log,919.44 KB, text/plain)
2021-04-20 11:55 UTC, Joonas Niilola
Details
000-cc7b8b1b-and-ea01ec59-glib-gcc-new-version-support.patch (000-cc7b8b1b-and-ea01ec59-glib-gcc-new-version-support.patch,78.18 KB, patch)
2021-04-22 06:45 UTC, Greg Turner
Details | Diff
000-cc7b8b1b-volatile-atomic-variables-one-of-two.patch (000-cc7b8b1b-volatile-atomic-variables-one-of-two.patch,77.34 KB, patch)
2021-04-22 10:55 UTC, Greg Turner
Details | Diff
001-8b4edaa9-volatile-atomic-variables-two-of-two.patch (001-8b4edaa9-volatile-atomic-variables-two-of-two.patch,4.90 KB, patch)
2021-04-22 10:55 UTC, Greg Turner
Details | Diff
002-ea01ec59-correctly-detect-glib-volatile-atomic.patch (002-ea01ec59-correctly-detect-glib-volatile-atomic.patch,1.46 KB, patch)
2021-04-22 10:56 UTC, Greg Turner
Details | Diff
003-b23f260d-move-glib-include-out-of-pbd-namespace.patch (003-b23f260d-move-glib-include-out-of-pbd-namespace.patch,481 bytes, patch)
2021-04-22 11:05 UTC, Greg Turner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joonas Niilola gentoo-dev 2021-04-20 11:55:08 UTC
Created attachment 701019 [details]
build.log

build.log attached.

Works in an environment with glib-2.66.7 installed, but might be caused by the flag.
Comment 1 Harris Landgarten 2021-04-22 02:53:43 UTC
Same here
Comment 2 Greg Turner 2021-04-22 06:22:57 UTC
I think there is some weird entanglement between two bugs going on:

+----------+--------+------------+
|          |  gcc10 |    gcc11   |
+----------+--------+------------+
| glib2.66 | OK now | somehow OK?|
+----------+--------+------------+
| glib2.68 | need A?| need A & B |
+----------+--------+------------+

A: https://github.com/Ardour/ardour/commit/ea01ec5988185228c41b7799b45c5051f0b80d15.patch

B: https://github.com/Ardour/ardour/commit/cc7b8b1bc5fb19e0ec5e476741c55627d4b62ba9.patch

both are upstream in master.  B needs to be trivially rebased to avoid generating a bunch of patch-fuzz.  TBC it should in theory be fine to apply both unconditionally.

See also #777711
Comment 3 Greg Turner 2021-04-22 06:45:47 UTC
Created attachment 701604 [details, diff]
000-cc7b8b1b-and-ea01ec59-glib-gcc-new-version-support.patch

For clarity both aformentioned patches merged and rebased (just-stick-it-in-etc-portage-patches-and-voila-it-compiles POC).

Note that several "discarded qualifiers" warnings pertaining to atomics will be shown during the build; presumably this is why cc7b8b1b is labelled as '[1/2]' with '[2/2]' pending
Comment 4 Greg Turner 2021-04-22 09:29:22 UTC
(In reply to Greg Turner from comment #2)

Sorry, /so/ many mistakes! Everything got jumbled up in my head.  Let's try again:

+----------+--------+------------+
|          | gcc10  | gcc11      |
+----------+--------+------------+
| glib2.66 | rsync  | ?*         |
+----------+--------+------------+
| glib2.68 | A,B    | A, B, C*   |
+----------+--------+------------+
 
A: https://github.com/Ardour/ardour/commit/ea01ec59.patch
(Correctly detect glib volatile atomic)

B: https://github.com/Ardour/ardour/commit/cc7b8b1b.patch
(gcc-11 compat, volatile atomic variables [1/2])**

C: https://github.com/Ardour/ardour/commit/8181b7d3.patch
(Fix atomic volatile with GCC 11)

--

* speculation; not tested here

** although this is listed as gcc-11-compat upstream, I needed it w/ gcc10 using glib-2.68; perhaps it really means 'conform to glib-2.68's gcc-11-compat-related interface changes'
Comment 5 Greg Turner 2021-04-22 09:56:40 UTC
Comment on attachment 701604 [details, diff]
000-cc7b8b1b-and-ea01ec59-glib-gcc-new-version-support.patch

This patch worked for me on gcc10.   But is in fact incomplete.  Working to split these up and fix (still!! sorry) remaining thinkos above*; then I'll repost.


* C had incorrect sha, A and B out of sequence
Comment 6 Greg Turner 2021-04-22 10:55:08 UTC
Created attachment 701718 [details, diff]
000-cc7b8b1b-volatile-atomic-variables-one-of-two.patch

OK trying again to create a usable set of upstream patches (these were all backported from master...6.6).
Comment 7 Greg Turner 2021-04-22 10:55:42 UTC
Created attachment 701721 [details, diff]
001-8b4edaa9-volatile-atomic-variables-two-of-two.patch
Comment 8 Greg Turner 2021-04-22 10:56:19 UTC
Created attachment 701724 [details, diff]
002-ea01ec59-correctly-detect-glib-volatile-atomic.patch
Comment 9 Greg Turner 2021-04-22 11:05:46 UTC
Created attachment 701727 [details, diff]
003-b23f260d-move-glib-include-out-of-pbd-namespace.patch

ok, this time I added some ECC grey matter and hopefully am at least not spewing a bunch of corrupt nonsense :)

My (still untested) theory is that with these four patches everyone with a reasonable setup will get a successful compilation.  The four files may simply be put in /etc/portage/patches/media-sound/ardour-6.6-r1 to test.

* patch names may have inherited some upstream thinkos but at least the SHA's are not all jumbled up this time :)
* compiles for me on gcc-10.3 + unmasked glib-2.68 on ~amd64
Comment 10 Greg Turner 2021-04-22 11:08:02 UTC
Comment on attachment 701721 [details, diff]
001-8b4edaa9-volatile-atomic-variables-two-of-two.patch

fix typo
Comment 11 Kobboi 2021-04-22 11:35:47 UTC
I confirm that 9999 works with glib-2.68.0 and current gcc-11.0.1_pre9999
Comment 12 Kobboi 2021-04-22 11:57:55 UTC
I also confirm that 6.6-r1 + the 4 current patches work with glib-2.68.0 and current gcc-11.0.1_pre9999
Comment 13 Joonas Niilola gentoo-dev 2021-04-22 16:41:40 UTC
I just want to say thanks for the work you've done in here, if no one else, I will get back to these after finishing the run to test all glib reverse dependencies.
Comment 14 Larry the Git Cow gentoo-dev 2021-04-27 02:49:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e848e1a42b49ba606f7e7bcf45ab97d09f1e57c

commit 4e848e1a42b49ba606f7e7bcf45ab97d09f1e57c
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2021-04-27 02:48:41 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2021-04-27 02:48:52 +0000

    media-sound/ardour: Fix build with glib-2.68
    
    Thanks to Greg Turner for tracking down the upstream patches necessary
    to resolve these bugs.
    
    Closes: https://bugs.gentoo.org/777711
    Closes: https://bugs.gentoo.org/784383
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 media-sound/ardour/Manifest             | 1 +
 media-sound/ardour/ardour-6.6-r1.ebuild | 3 +++
 media-sound/mangler/metadata.xml        | 2 +-
 3 files changed, 5 insertions(+), 1 deletion(-)