All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] qga-vss: Use dynamic linking for GLib
@ 2021-02-09 14:54 Kostiantyn Kostiuk
  2021-02-17 12:54 ` Konstantin Kostiuk
  2021-03-01 11:39 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 6+ messages in thread
From: Kostiantyn Kostiuk @ 2021-02-09 14:54 UTC (permalink / raw)
  To: Developers

The current GLib version implements the DllMain function. DllMain is also
present in the provider.cpp code. So in the case of static linking, the
DllMain redefinition error occurs. For now, just switch to dynamic linking
and revert this patch when the issue will be solved.

See Glib issue for more details https://gitlab.gnome.org/GNOME/glib/-/issues/692

Signed-off-by: Kostiantyn Kostiuk <konstantin@daynix.com>
---
 qga/vss-win32/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build
index 780c461432..90825edef3 100644
--- a/qga/vss-win32/meson.build
+++ b/qga/vss-win32/meson.build
@@ -1,5 +1,5 @@
 if add_languages('cpp', required: false)
-  glib_static = dependency('glib-2.0', static: true)
+  glib_dynamic = dependency('glib-2.0', static: false)
   link_args = cc.get_supported_link_arguments(['-fstack-protector-all', '-fstack-protector-strong',
                                                '-Wl,--add-stdcall-alias', '-Wl,--enable-stdcall-fixup'])
 
@@ -8,7 +8,7 @@ if add_languages('cpp', required: false)
                 cpp_args: ['-Wno-unknown-pragmas', '-Wno-delete-non-virtual-dtor', '-Wno-non-virtual-dtor'],
                 link_args: link_args,
                 vs_module_defs: 'qga-vss.def',
-                dependencies: [glib_static, socket,
+                dependencies: [glib_dynamic, socket,
                                cc.find_library('ole32'),
                                cc.find_library('oleaut32'),
                                cc.find_library('shlwapi'),
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] qga-vss: Use dynamic linking for GLib
  2021-02-09 14:54 [PATCH 1/1] qga-vss: Use dynamic linking for GLib Kostiantyn Kostiuk
@ 2021-02-17 12:54 ` Konstantin Kostiuk
  2021-03-01  9:49   ` Konstantin Kostiuk
  2021-03-01 11:39 ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 6+ messages in thread
From: Konstantin Kostiuk @ 2021-02-17 12:54 UTC (permalink / raw)
  To: Developers

[-- Attachment #1: Type: text/plain, Size: 1762 bytes --]

ping

On Tue, Feb 9, 2021 at 4:54 PM Kostiantyn Kostiuk <konstantin@daynix.com>
wrote:

> The current GLib version implements the DllMain function. DllMain is also
> present in the provider.cpp code. So in the case of static linking, the
> DllMain redefinition error occurs. For now, just switch to dynamic linking
> and revert this patch when the issue will be solved.
>
> See Glib issue for more details
> https://gitlab.gnome.org/GNOME/glib/-/issues/692
>
> Signed-off-by: Kostiantyn Kostiuk <konstantin@daynix.com>
> ---
>  qga/vss-win32/meson.build | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build
> index 780c461432..90825edef3 100644
> --- a/qga/vss-win32/meson.build
> +++ b/qga/vss-win32/meson.build
> @@ -1,5 +1,5 @@
>  if add_languages('cpp', required: false)
> -  glib_static = dependency('glib-2.0', static: true)
> +  glib_dynamic = dependency('glib-2.0', static: false)
>    link_args = cc.get_supported_link_arguments(['-fstack-protector-all',
> '-fstack-protector-strong',
>                                                 '-Wl,--add-stdcall-alias',
> '-Wl,--enable-stdcall-fixup'])
>
> @@ -8,7 +8,7 @@ if add_languages('cpp', required: false)
>                  cpp_args: ['-Wno-unknown-pragmas',
> '-Wno-delete-non-virtual-dtor', '-Wno-non-virtual-dtor'],
>                  link_args: link_args,
>                  vs_module_defs: 'qga-vss.def',
> -                dependencies: [glib_static, socket,
> +                dependencies: [glib_dynamic, socket,
>                                 cc.find_library('ole32'),
>                                 cc.find_library('oleaut32'),
>                                 cc.find_library('shlwapi'),
> --
> 2.25.1
>
>

[-- Attachment #2: Type: text/html, Size: 2572 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] qga-vss: Use dynamic linking for GLib
  2021-02-17 12:54 ` Konstantin Kostiuk
@ 2021-03-01  9:49   ` Konstantin Kostiuk
  0 siblings, 0 replies; 6+ messages in thread
From: Konstantin Kostiuk @ 2021-03-01  9:49 UTC (permalink / raw)
  To: Developers

[-- Attachment #1: Type: text/plain, Size: 1851 bytes --]

ping

On Wed, Feb 17, 2021 at 2:54 PM Konstantin Kostiuk <konstantin@daynix.com>
wrote:

> ping
>
> On Tue, Feb 9, 2021 at 4:54 PM Kostiantyn Kostiuk <konstantin@daynix.com>
> wrote:
>
>> The current GLib version implements the DllMain function. DllMain is also
>> present in the provider.cpp code. So in the case of static linking, the
>> DllMain redefinition error occurs. For now, just switch to dynamic linking
>> and revert this patch when the issue will be solved.
>>
>> See Glib issue for more details
>> https://gitlab.gnome.org/GNOME/glib/-/issues/692
>>
>> Signed-off-by: Kostiantyn Kostiuk <konstantin@daynix.com>
>> ---
>>  qga/vss-win32/meson.build | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build
>> index 780c461432..90825edef3 100644
>> --- a/qga/vss-win32/meson.build
>> +++ b/qga/vss-win32/meson.build
>> @@ -1,5 +1,5 @@
>>  if add_languages('cpp', required: false)
>> -  glib_static = dependency('glib-2.0', static: true)
>> +  glib_dynamic = dependency('glib-2.0', static: false)
>>    link_args = cc.get_supported_link_arguments(['-fstack-protector-all',
>> '-fstack-protector-strong',
>>
>> '-Wl,--add-stdcall-alias', '-Wl,--enable-stdcall-fixup'])
>>
>> @@ -8,7 +8,7 @@ if add_languages('cpp', required: false)
>>                  cpp_args: ['-Wno-unknown-pragmas',
>> '-Wno-delete-non-virtual-dtor', '-Wno-non-virtual-dtor'],
>>                  link_args: link_args,
>>                  vs_module_defs: 'qga-vss.def',
>> -                dependencies: [glib_static, socket,
>> +                dependencies: [glib_dynamic, socket,
>>                                 cc.find_library('ole32'),
>>                                 cc.find_library('oleaut32'),
>>                                 cc.find_library('shlwapi'),
>> --
>> 2.25.1
>>
>>

[-- Attachment #2: Type: text/html, Size: 2962 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] qga-vss: Use dynamic linking for GLib
  2021-02-09 14:54 [PATCH 1/1] qga-vss: Use dynamic linking for GLib Kostiantyn Kostiuk
  2021-02-17 12:54 ` Konstantin Kostiuk
@ 2021-03-01 11:39 ` Philippe Mathieu-Daudé
  2021-03-01 12:10   ` Marc-André Lureau
  1 sibling, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-01 11:39 UTC (permalink / raw)
  To: Kostiantyn Kostiuk, Developers
  Cc: Paolo Bonzini, Daniel P . Berrange, Marc-André Lureau

Cc'ing Paolo/Marc-André/Daniel

On 2/9/21 3:54 PM, Kostiantyn Kostiuk wrote:
> The current GLib version implements the DllMain function. DllMain is also
> present in the provider.cpp code. So in the case of static linking, the
> DllMain redefinition error occurs. For now, just switch to dynamic linking
> and revert this patch when the issue will be solved.
> 
> See Glib issue for more details https://gitlab.gnome.org/GNOME/glib/-/issues/692
> 
> Signed-off-by: Kostiantyn Kostiuk <konstantin@daynix.com>
> ---
>  qga/vss-win32/meson.build | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build
> index 780c461432..90825edef3 100644
> --- a/qga/vss-win32/meson.build
> +++ b/qga/vss-win32/meson.build
> @@ -1,5 +1,5 @@
>  if add_languages('cpp', required: false)
> -  glib_static = dependency('glib-2.0', static: true)
> +  glib_dynamic = dependency('glib-2.0', static: false)
>    link_args = cc.get_supported_link_arguments(['-fstack-protector-all', '-fstack-protector-strong',
>                                                 '-Wl,--add-stdcall-alias', '-Wl,--enable-stdcall-fixup'])
>  
> @@ -8,7 +8,7 @@ if add_languages('cpp', required: false)
>                  cpp_args: ['-Wno-unknown-pragmas', '-Wno-delete-non-virtual-dtor', '-Wno-non-virtual-dtor'],
>                  link_args: link_args,
>                  vs_module_defs: 'qga-vss.def',
> -                dependencies: [glib_static, socket,
> +                dependencies: [glib_dynamic, socket,
>                                 cc.find_library('ole32'),
>                                 cc.find_library('oleaut32'),
>                                 cc.find_library('shlwapi'),
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] qga-vss: Use dynamic linking for GLib
  2021-03-01 11:39 ` Philippe Mathieu-Daudé
@ 2021-03-01 12:10   ` Marc-André Lureau
  2021-03-01 12:16     ` Paolo Bonzini
  0 siblings, 1 reply; 6+ messages in thread
From: Marc-André Lureau @ 2021-03-01 12:10 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Kostiantyn Kostiuk, Paolo Bonzini, Daniel P . Berrange, Developers

[-- Attachment #1: Type: text/plain, Size: 2335 bytes --]

Hi

On Mon, Mar 1, 2021 at 3:46 PM Philippe Mathieu-Daudé <philmd@redhat.com>
wrote:

> Cc'ing Paolo/Marc-André/Daniel
>
> On 2/9/21 3:54 PM, Kostiantyn Kostiuk wrote:
> > The current GLib version implements the DllMain function. DllMain is also
> > present in the provider.cpp code. So in the case of static linking, the
> > DllMain redefinition error occurs. For now, just switch to dynamic
> linking
> > and revert this patch when the issue will be solved.
> >
> > See Glib issue for more details
> https://gitlab.gnome.org/GNOME/glib/-/issues/692



It looks like this was fixed recently, but there are a lot of related
discussions:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1316

If I read the old Makefile right, it's a bug we introduced by commit
7272fc7 (meson: convert vss-win32), since glib was in the -shared list.

So it's legitimate to revert it to me:
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>


> >
> > Signed-off-by: Kostiantyn Kostiuk <konstantin@daynix.com>
> > ---
> >  qga/vss-win32/meson.build | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build
> > index 780c461432..90825edef3 100644
> > --- a/qga/vss-win32/meson.build
> > +++ b/qga/vss-win32/meson.build
> > @@ -1,5 +1,5 @@
> >  if add_languages('cpp', required: false)
> > -  glib_static = dependency('glib-2.0', static: true)
> > +  glib_dynamic = dependency('glib-2.0', static: false)
> >    link_args = cc.get_supported_link_arguments(['-fstack-protector-all',
> '-fstack-protector-strong',
> >
>  '-Wl,--add-stdcall-alias', '-Wl,--enable-stdcall-fixup'])
> >
> > @@ -8,7 +8,7 @@ if add_languages('cpp', required: false)
> >                  cpp_args: ['-Wno-unknown-pragmas',
> '-Wno-delete-non-virtual-dtor', '-Wno-non-virtual-dtor'],
> >                  link_args: link_args,
> >                  vs_module_defs: 'qga-vss.def',
> > -                dependencies: [glib_static, socket,
> > +                dependencies: [glib_dynamic, socket,
> >                                 cc.find_library('ole32'),
> >                                 cc.find_library('oleaut32'),
> >                                 cc.find_library('shlwapi'),
> >
>
>
>

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 3703 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] qga-vss: Use dynamic linking for GLib
  2021-03-01 12:10   ` Marc-André Lureau
@ 2021-03-01 12:16     ` Paolo Bonzini
  0 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2021-03-01 12:16 UTC (permalink / raw)
  To: Marc-André Lureau, Philippe Mathieu-Daudé
  Cc: Kostiantyn Kostiuk, Daniel P . Berrange, Developers

On 01/03/21 13:10, Marc-André Lureau wrote:
> If I read the old Makefile right, it's a bug we introduced by commit 
> 7272fc7 (meson: convert vss-win32), since glib was in the -shared list.
> 
> So it's legitimate to revert it to me:
> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

Queued, thanks.

> 
>      >
>      > Signed-off-by: Kostiantyn Kostiuk <konstantin@daynix.com
>     <mailto:konstantin@daynix.com>>
>      > ---
>      >  qga/vss-win32/meson.build | 4 ++--
>      >  1 file changed, 2 insertions(+), 2 deletions(-)
>      >
>      > diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build
>      > index 780c461432..90825edef3 100644
>      > --- a/qga/vss-win32/meson.build
>      > +++ b/qga/vss-win32/meson.build
>      > @@ -1,5 +1,5 @@
>      >  if add_languages('cpp', required: false)
>      > -  glib_static = dependency('glib-2.0', static: true)
>      > +  glib_dynamic = dependency('glib-2.0', static: false)
>      >    link_args =
>     cc.get_supported_link_arguments(['-fstack-protector-all',
>     '-fstack-protector-strong',
>      >                                               
>       '-Wl,--add-stdcall-alias', '-Wl,--enable-stdcall-fixup'])
>      >
>      > @@ -8,7 +8,7 @@ if add_languages('cpp', required: false)
>      >                  cpp_args: ['-Wno-unknown-pragmas',
>     '-Wno-delete-non-virtual-dtor', '-Wno-non-virtual-dtor'],
>      >                  link_args: link_args,
>      >                  vs_module_defs: 'qga-vss.def',
>      > -                dependencies: [glib_static, socket,
>      > +                dependencies: [glib_dynamic, socket,
>      >                                 cc.find_library('ole32'),
>      >                                 cc.find_library('oleaut32'),
>      >                                 cc.find_library('shlwapi'),
>      >
> 
> 
> 
> 
> -- 
> Marc-André Lureau



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-03-01 12:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09 14:54 [PATCH 1/1] qga-vss: Use dynamic linking for GLib Kostiantyn Kostiuk
2021-02-17 12:54 ` Konstantin Kostiuk
2021-03-01  9:49   ` Konstantin Kostiuk
2021-03-01 11:39 ` Philippe Mathieu-Daudé
2021-03-01 12:10   ` Marc-André Lureau
2021-03-01 12:16     ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.