[Bug 248736] devel/json-glib: Fix build with -fno-common (clang 11 and gcc 10)

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 248736] devel/json-glib: Fix build with -fno-common (clang 11 and gcc 10)

bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248736

            Bug ID: 248736
           Summary: devel/json-glib: Fix build with -fno-common (clang 11
                    and gcc 10)
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: [hidden email]
          Reporter: [hidden email]
             Flags: maintainer-feedback?([hidden email])
          Assignee: [hidden email]

Created attachment 217321
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=217321&action=edit
Fix build with -fno-common (clang 11 and gcc 10)

In base r364284, I imported clang 11 into head. Like gcc 10, it now defaults to
-fno-common, meaning that duplicated global symbols will most likely lead to
link errors. Here is a patch to fix this port's duplicated global symbols.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

maintainer-feedback requested: [Bug 248736] devel/json-glib: Fix build with -fno-common (clang 11 and gcc 10)

bugzilla-noreply
Bugzilla Automation <[hidden email]> has asked freebsd-gnome (Nobody)
<[hidden email]> for maintainer-feedback:
Bug 248736: devel/json-glib: Fix build with -fno-common (clang 11 and gcc 10)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248736



--- Description ---
In base r364284, I imported clang 11 into head. Like gcc 10, it now defaults to
-fno-common, meaning that duplicated global symbols will most likely lead to
link errors. Here is a patch to fix this port's duplicated global symbols.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 248736] devel/json-glib: Fix build with clang 11

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248736

Dimitry Andric <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|devel/json-glib: Fix build  |devel/json-glib: Fix build
                   |with -fno-common (clang 11  |with clang 11
                   |and gcc 10)                 |

--- Comment #1 from Dimitry Andric <[hidden email]> ---
Sorry, the summary and description were not correct. In case of json-glib, it
was a new clang 11 -Werror warning:

../json-glib/json-scanner.c:928:13: error: cast to smaller integer type
'GTokenType' from 'gpointer' (aka 'void *')
[-Werror,-Wvoid-pointer-to-enum-cast]
        *token_p = (GTokenType) value_p->v_symbol;
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is because v_symbol is a pointer and GTokenType is an enum (so int-like).
Glib provides the GPOINTER_TO_INT macro for this purpose.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 248736] devel/json-glib: Fix build with clang 11

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248736

--- Comment #2 from Dimitry Andric <[hidden email]> ---
Sorry, the summary and description were not correct. In case of json-glib, it
was a new clang 11 -Werror warning:

../json-glib/json-scanner.c:928:13: error: cast to smaller integer type
'GTokenType' from 'gpointer' (aka 'void *')
[-Werror,-Wvoid-pointer-to-enum-cast]
        *token_p = (GTokenType) value_p->v_symbol;
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is because v_symbol is a pointer and GTokenType is an enum (so int-like).
Glib provides the GPOINTER_TO_INT macro for this purpose.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 248736] devel/json-glib: Fix build with clang 11

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248736

--- Comment #3 from Jan Beich <[hidden email]> ---
I've submitted upstream as
https://gitlab.gnome.org/GNOME/json-glib/-/merge_requests/29

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 248736] devel/json-glib: Fix build with clang 11

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248736

Niclas Zeising <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
             Status|New                         |In Progress

--- Comment #4 from Niclas Zeising <[hidden email]> ---
Committed, awaiting merge.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 248736] devel/json-glib: Fix build with clang 11

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248736

Niclas Zeising <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[hidden email]           |[hidden email]
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 248736] devel/json-glib: Fix build with clang 11

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248736

--- Comment #5 from [hidden email] ---
A commit references this bug:

Author: zeising
Date: Sat Aug 22 09:37:47 UTC 2020
New revision: 545754
URL: https://svnweb.freebsd.org/changeset/ports/545754

Log:
  devel/json-glib: Fix build with llvm 11

  Fix the build of devel/json-glib with llvm 11.
  llvm 11 introduced a new warning relating to how to cast between void * and
  enums, which json-glib are stumbling over.

  PR:           248736
  Submitted by: dim
  MFH:          2020Q3

Changes:
  head/devel/json-glib/files/
  head/devel/json-glib/files/patch-json-glib_json-scanner.c

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 248736] devel/json-glib: Fix build with clang 11

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248736

Baptiste Daroussin <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|In Progress                 |Closed

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"