Cross-compiling Pidgin 2.10.7: multiple definition of `___stack_chk_fail'

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

Cross-compiling Pidgin 2.10.7: multiple definition of `___stack_chk_fail'

Konrad Gräfe
Hi,

I try to cross-compile Pidgin 2.10.7 for Windows on Ubuntu (Gnome)
13.04. I followed the instructions on [1] except of two details which I
hope don't matter:
- the Pidgin source sits in "pidgin-2.10.7-win32" rather than
"pidgin-2.10.7"
- I copied the Bonjour_SDK from an older win32-dev directory that fits
previous Pidgin versions so that I'm not sure whether I have the latest
or not (but I don't want to fiddle with the Bonjour installer until
necessary...).

When it tries to link libgg.dll it throws this error message (the full
log is attached to this mail):
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/libssp.a(ssp.o):(.text+0x100):
multiple definition of `___stack_chk_fail'
../../../libpurple/libpurple.dll.a(d000002.o):(.text+0x0): first defined
here

Google doesn't show up much at all; and nothing usefull. :( Do you have
any suggestions where to look into?

Regards,
Konrad Gräfe

[1] https://developer.pidgin.im/wiki/BuildingWinPidgin?version=147

_______________________________________________
Devel mailing list
[hidden email]
http://pidgin.im/cgi-bin/mailman/listinfo/devel

local.mak (365 bytes) Download Attachment
make_mingw.log (96K) Download Attachment
pidgin_devroot_tree.txt (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Cross-compiling Pidgin 2.10.7: multiple definition of `___stack_chk_fail'

Jeronimo17
I have the same problem


In windows with Cygwin and MSYS:

../../../libpurple/win32/rules.mak:4: recipe for target 'perl.o' failed
make[3]: *** [perl.o] Error 1
make[3]: Leaving directory '/home/Jeronimo/pidgin-2.10.7/libpurple/plugins/perl'
Makefile.mingw:48: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/Jeronimo/pidgin-2.10.7/libpurple/plugins'
Makefile.mingw:136: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/Jeronimo/pidgin-2.10.7/libpurple'
Makefile.mingw:93: recipe for target 'all' failed
make: *** [all] Error 2<quote author="Konrad Gräfe">


I'm interested in a correction that has been made ​​to the next version will not be available

https://developer.pidgin.im/ticket/15756
Reply | Threaded
Open this post in threaded view
|

Re: Cross-compiling Pidgin 2.10.7: multiple definition of `___stack_chk_fail'

Tomasz Wasilczyk-5
Could you try disabling gg prpl? Removing one line from a makefile under libpurple/protocols dir should be enough. It should tell, if its a problem with the prpl or the libpurple.

Tomek


2013/11/13 Jeronimo17 <[hidden email]>
I have the same problem
<http://pidgin.10357.n7.nabble.com/file/n127945/Scre.png>

In windows with Cygwin and MSYS:

/../../../libpurple/win32/rules.mak:4: recipe for target 'perl.o' failed
make[3]: *** [perl.o] Error 1
make[3]: Leaving directory
'/home/Jeronimo/pidgin-2.10.7/libpurple/plugins/perl'
Makefile.mingw:48: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/Jeronimo/pidgin-2.10.7/libpurple/plugins'
Makefile.mingw:136: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/Jeronimo/pidgin-2.10.7/libpurple'
Makefile.mingw:93: recipe for target 'all' failed
make: *** [all] Error 2/

I'm interested in a correction that has been made to the next version will
not be available

https://developer.pidgin.im/ticket/15756




--
View this message in context: http://pidgin.10357.n7.nabble.com/Cross-compiling-Pidgin-2-10-7-multiple-definition-of-stack-chk-fail-tp126854p127945.html
Sent from the Pidgin - Development mailing list archive at Nabble.com.

_______________________________________________
Devel mailing list
[hidden email]
http://pidgin.im/cgi-bin/mailman/listinfo/devel


_______________________________________________
Devel mailing list
[hidden email]
http://pidgin.im/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: Cross-compiling Pidgin 2.10.7: multiple definition of `___stack_chk_fail'

Konrad Gräfe
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

When I do that the same error occurs when it tries to link libirc.dll
which is the first protocol after gg in
libpurple/protocols/Makefile.mingw.

Regards,
Konrad Gräfe

Am 15.11.2013 18:30, schrieb Tomasz Wasilczyk:

> Could you try disabling gg prpl? Removing one line from a makefile
> under libpurple/protocols dir should be enough. It should tell, if
> its a problem with the prpl or the libpurple.
>
> Tomek
>
>
> 2013/11/13 Jeronimo17 <[hidden email]
> <mailto:[hidden email]>>
>
> I have the same problem
> <http://pidgin.10357.n7.nabble.com/file/n127945/Scre.png>
>
> In windows with Cygwin and MSYS:
>
> /../../../libpurple/win32/rules.mak:4: recipe for target 'perl.o'
> failed make[3]: *** [perl.o] Error 1 make[3]: Leaving directory
> '/home/Jeronimo/pidgin-2.10.7/libpurple/plugins/perl'
> Makefile.mingw:48: recipe for target 'all' failed make[2]: ***
> [all] Error 2 make[2]: Leaving directory
> '/home/Jeronimo/pidgin-2.10.7/libpurple/plugins'
> Makefile.mingw:136: recipe for target 'all' failed make[1]: ***
> [all] Error 2 make[1]: Leaving directory
> '/home/Jeronimo/pidgin-2.10.7/libpurple' Makefile.mingw:93: recipe
> for target 'all' failed make: *** [all] Error 2/
>
> I'm interested in a correction that has been made to the next
> version will not be available
>
> https://developer.pidgin.im/ticket/15756
>
>
>
>
> -- View this message in context:
> http://pidgin.10357.n7.nabble.com/Cross-compiling-Pidgin-2-10-7-multiple-definition-of-stack-chk-fail-tp126854p127945.html
>
>
Sent from the Pidgin - Development mailing list archive at Nabble.com.

>
> _______________________________________________ Devel mailing list
> [hidden email] <mailto:[hidden email]>
> http://pidgin.im/cgi-bin/mailman/listinfo/devel
>
>
>
>
> _______________________________________________ Devel mailing list
> [hidden email] http://pidgin.im/cgi-bin/mailman/listinfo/devel
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSh9ySAAoJEHds/QNB2vCoV0sIAIxxtQJQMh6TJCZwsM+KfI2q
pOQWh5ZTtm5kOpKTdqN8sGGVSnw6WxjhQeKEwSPs9sc2LuDg/Fwt7F4AMmm41aId
1gnXCQE09bmPXuTu3WvbGiYI2t4q5B4nIskWmH/DK6wo+Oeq75BjQOo5uyc0oBLI
xqw5LD1u3YYoTKs0q1STD1TBHHyCKbCXx5SQE/eI3zNS0sxdnwkrTRkDLOcHX10r
ueWut+2jGKEWKIaeIc+Fg23uW3xR75mub87W5fAV+SlH2puv7D/l/PYD72inxaP5
NnAhUAfFEVWXmb0cFm6+wrqyZ/vgBkklGas/V7IiCLrz0iS7Z7st6eyvUafXP7w=
=scQ2
-----END PGP SIGNATURE-----

_______________________________________________
Devel mailing list
[hidden email]
http://pidgin.im/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: Cross-compiling Pidgin 2.10.7: multiple definition of `___stack_chk_fail'

Jeronimo17
I've achieved, strictly respecting the versions of everything, and taking care that make NSS seeks an older version to the version of the web
Reply | Threaded
Open this post in threaded view
|

Re: Cross-compiling Pidgin 2.10.7: multiple definition of `___stack_chk_fail'

Konrad Gräfe-2
Hello there,

I finally fixed the issue for Pidgin 2.10.9. The key was to not install
the mingw32 package but the gcc-mingw32 package which gives you a more
recent gcc (4.6.3 vs. 4.2.1, on Ubuntu 13.10 by now).

Additionally I had to modify libpurple/protocols/mxit/markup.c as it
uses uint8_t without including stdint.h (though I don't understand why
others aren't affected). See the attached fix_mxit_missing_header.patch.

Furthermore I adopted some patches to fix some recurring warnings in
Pidgin 2.10.9 (fix_errno_warning_mingw.patch) and win32/gtk_2_0-2.14
(fix_gtk_apple_cc_warning.patch). I hope I labeled the sources
sufficiently as I did not made the Patches by myself.

To be able to build a distribution package (installer_zip) I copied the
libssp-0.dll from the official Pidgin distribution to win32-dev/gcc_ssp/
and added the following line to my local.mak:
GCC_SSP_TOP := $(PIDGIN_TREE_TOP)/../win32-dev/gcc_ssp

Unfortunately I still have a problem: the officially distributed Pidgin
is not able to load plugins I built against "my" Pidgin. It says it
could not found some symbols but it didn't say which one and I had no
time to investigate it any further. "My" Pidgin is running well on
Windows and loads my plugin just fine. Does anyone have any thoughts on
that?

Besides I would like to know what versions of the compiler and the
w32api were used to build the official Pidgin as this is somewhat
unclear in the wiki [1].

Regards,
Konrad Gräfe

[1] https://developer.pidgin.im/wiki/BuildingWinPidgin

_______________________________________________
Devel mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/devel

fix_mxit_missing_header.patch (551 bytes) Download Attachment
fix_errno_warning_mingw.patch (1K) Download Attachment
fix_gtk_apple_cc_warning.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Cross-compiling Pidgin 2.10.7: multiple definition of `___stack_chk_fail'

Daniel Atallah

On Fri, Feb 7, 2014 at 9:02 AM, Konrad Gräfe <[hidden email]> wrote:
Hello there,
 
Additionally I had to modify libpurple/protocols/mxit/markup.c as it
uses uint8_t without including stdint.h (though I don't understand why
others aren't affected). See the attached fix_mxit_missing_header.patch.

I think the right fix is to use the glib data types, which will be exposed at that time.
I'm not sure why this isn' t a problem building with the native compiler.

Furthermore I adopted some patches to fix some recurring warnings in
Pidgin 2.10.9 (fix_errno_warning_mingw.patch) and win32/gtk_2_0-2.14
(fix_gtk_apple_cc_warning.patch). I hope I labeled the sources
sufficiently as I did not made the Patches by myself.

Hmm... those errno constants ideally would not be defined - they're not part of the normal windows headers.
Where are they being defined?

The latter isn't something that we maintain, so I don't think we should be patching it.

Unfortunately I still have a problem: the officially distributed Pidgin
is not able to load plugins I built against "my" Pidgin. It says it
could not found some symbols but it didn't say which one and I had no
time to investigate it any further. "My" Pidgin is running well on
Windows and loads my plugin just fine. Does anyone have any thoughts on
that?

It's hard to say without more details.
The Dependency Walker "depends" utility and/or cygwin's "ldd" command may shed some light.
 
Besides I would like to know what versions of the compiler and the
w32api were used to build the official Pidgin as this is somewhat
unclear in the wiki [1].

As per the mingw site linked to from the BuildingWinPidgin wiki page:
 * gcc 4.7.2
 * win32api 3.17.2

-D

_______________________________________________
Devel mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: Cross-compiling Pidgin 2.10.7: multiple definition of `___stack_chk_fail'

Elliott Sales de Andrade-2
On 7 February 2014 10:47, Daniel Atallah <[hidden email]> wrote:

On Fri, Feb 7, 2014 at 9:02 AM, Konrad Gräfe <[hidden email]> wrote:
Hello there,
Unfortunately I still have a problem: the officially distributed Pidgin
is not able to load plugins I built against "my" Pidgin. It says it
could not found some symbols but it didn't say which one and I had no
time to investigate it any further. "My" Pidgin is running well on
Windows and loads my plugin just fine. Does anyone have any thoughts on
that?

It's hard to say without more details.
The Dependency Walker "depends" utility and/or cygwin's "ldd" command may shed some light.
 

Have you tried checking the debug window? You can have Pidgin attempt to reload the plugins by opening the Plugins window.


_______________________________________________
Devel mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: Cross-compiling Pidgin 2.10.7: multiple definition of `___stack_chk_fail'

Konrad Gräfe-2
In reply to this post by Daniel Atallah

Am 07.02.2014 16:47, schrieb Daniel Atallah:
> On Fri, Feb 7, 2014 at 9:02 AM, Konrad Gräfe <[hidden email]> wrote:
>
>> Hello there,
>> Additionally I had to modify libpurple/protocols/mxit/markup.c as it
>> uses uint8_t without including stdint.h (though I don't understand why
>> others aren't affected). See the attached fix_mxit_missing_header.patch.
> I think the right fix is to use the glib data types, which will be exposed
> at that time.
> I'm not sure why this isn' t a problem building with the native compiler.
You're right. I attached another patch although I think that you
wouldn't need it. ;)

> Furthermore I adopted some patches to fix some recurring warnings in
>> Pidgin 2.10.9 (fix_errno_warning_mingw.patch) and win32/gtk_2_0-2.14
>> (fix_gtk_apple_cc_warning.patch). I hope I labeled the sources
>> sufficiently as I did not made the Patches by myself.
>>
> Hmm... those errno constants ideally would not be defined - they're not
> part of the normal windows headers.
> Where are they being defined?
Please see the attached make.log. libpurple/internal.h includes errno.h
in line 86.

> The latter isn't something that we maintain, so I don't think we should be
> patching it.
I know. It has been fixed in the current version of GTK+ anyway. I just
attached it in case someone else is stumbling over this thread.

> Unfortunately I still have a problem: the officially distributed Pidgin
>> is not able to load plugins I built against "my" Pidgin. It says it
>> could not found some symbols but it didn't say which one and I had no
>> time to investigate it any further. "My" Pidgin is running well on
>> Windows and loads my plugin just fine. Does anyone have any thoughts on
>> that?
>>
> It's hard to say without more details.
> The Dependency Walker "depends" utility and/or cygwin's "ldd" command may
> shed some light.
>
My plugin wants a function named "InterlockedCompareExchange@12" from
libpurple.dll which my libpurple.dll does offer and the official one
does not. From what Google says that was a bug in mingw that has been
resolved though I cannot find a change log that says when the fix was
introduced exactly. Additionally [1] says that there are binary
incompatibilities between libraries compiled with mingw32-gcc before and
after version 4.7.0 so I guess version 4.7.0 or later is required and I
have to install a more recent mingw32-gcc manually instead of using any
Ubuntu package, hm.

>
>> Besides I would like to know what versions of the compiler and the
>> w32api were used to build the official Pidgin as this is somewhat
>> unclear in the wiki [1].
>>
> As per the mingw site linked to from the BuildingWinPidgin wiki page:
>  * gcc 4.7.2
>  * win32api 3.17.2
Thank you.

Regards,
Konrad Gräfe

[1]
http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.7.2-1/

_______________________________________________
Devel mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/devel

make.log (7K) Download Attachment
fix_mxit_use_glib_data_type_guint8.patch (569 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Cross-compiling Pidgin 2.10.7: multiple definition of `___stack_chk_fail'

Konrad Gräfe-2

Am 10.02.2014 01:49, schrieb Konrad Gräfe:

>
> Am 07.02.2014 16:47, schrieb Daniel Atallah:
>> On Fri, Feb 7, 2014 at 9:02 AM, Konrad Gräfe <[hidden email]> wrote:
>>
>>> Hello there,
>>> Additionally I had to modify libpurple/protocols/mxit/markup.c as it
>>> uses uint8_t without including stdint.h (though I don't understand why
>>> others aren't affected). See the attached fix_mxit_missing_header.patch.
>> I think the right fix is to use the glib data types, which will be exposed
>> at that time.
>> I'm not sure why this isn' t a problem building with the native compiler.
> You're right. I attached another patch although I think that you
> wouldn't need it. ;)
>
>> Furthermore I adopted some patches to fix some recurring warnings in
>>> Pidgin 2.10.9 (fix_errno_warning_mingw.patch) and win32/gtk_2_0-2.14
>>> (fix_gtk_apple_cc_warning.patch). I hope I labeled the sources
>>> sufficiently as I did not made the Patches by myself.
>>>
>> Hmm... those errno constants ideally would not be defined - they're not
>> part of the normal windows headers.
>> Where are they being defined?
> Please see the attached make.log. libpurple/internal.h includes errno.h
> in line 86.
>
>> The latter isn't something that we maintain, so I don't think we should be
>> patching it.
> I know. It has been fixed in the current version of GTK+ anyway. I just
> attached it in case someone else is stumbling over this thread.
>
>> Unfortunately I still have a problem: the officially distributed Pidgin
>>> is not able to load plugins I built against "my" Pidgin. It says it
>>> could not found some symbols but it didn't say which one and I had no
>>> time to investigate it any further. "My" Pidgin is running well on
>>> Windows and loads my plugin just fine. Does anyone have any thoughts on
>>> that?
>>>
>> It's hard to say without more details.
>> The Dependency Walker "depends" utility and/or cygwin's "ldd" command may
>> shed some light.
>>
> My plugin wants a function named "InterlockedCompareExchange@12" from
> libpurple.dll which my libpurple.dll does offer and the official one
> does not. From what Google says that was a bug in mingw that has been
> resolved though I cannot find a change log that says when the fix was
> introduced exactly. Additionally [1] says that there are binary
> incompatibilities between libraries compiled with mingw32-gcc before and
> after version 4.7.0 so I guess version 4.7.0 or later is required and I
> have to install a more recent mingw32-gcc manually instead of using any
> Ubuntu package, hm.
>
>>
>>> Besides I would like to know what versions of the compiler and the
>>> w32api were used to build the official Pidgin as this is somewhat
>>> unclear in the wiki [1].
>>>
>> As per the mingw site linked to from the BuildingWinPidgin wiki page:
>>  * gcc 4.7.2
>>  * win32api 3.17.2
> Thank you.
>
> Regards,
> Konrad Gräfe
>
> [1]
> http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.7.2-1/
>
>
>
> _______________________________________________
> Devel mailing list
> [hidden email]
> https://pidgin.im/cgi-bin/mailman/listinfo/devel
>

FTR: Ubuntu 14.04 brings gcc 4.8.2 (package "gcc-mingw-w64-i686", NOT
"mingw") which works. I still had to apply the patches
"fix_mxit_missing_header.patch" and "fix_errno_warning_mingw.patch" that
I posted earlier in this thread.

Regards,
Konrad Gräfe

_______________________________________________
Devel mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/devel