[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] Cross-linking issues [Was: Cross-compiling lmi from Linux to MSW]
From: |
Greg Chicares |
Subject: |
[lmi] Cross-linking issues [Was: Cross-compiling lmi from Linux to MSW] |
Date: |
Tue, 26 Jan 2016 14:21:50 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 |
On 2016-01-21 01:52, Greg Chicares wrote:
> On 2016-01-14 01:35, Vadim Zeitlin wrote:
[...]
>> Second, we need to
>> add the "force linking" stuff to alert_wx.cpp and main_wx.cpp to ensure
>> that the alert function pointers are set correctly in lmi_wx.exe as
>> otherwise they were not, resulting in an error message and abort, for the
>> same reason as in the MSVS build: alert_wx object file was simply omitted
>> entirely by the linker.
>
> Committed (with additions) 20160121T0032Z, revision 6486.
More work is required. The issue is not confined to wx-dependent code.
I copied a cross-compiled 'elapsed_time.exe' into native msw-xp,
verified that its dependencies are minimal:
/cygdrive/c/downloads[0]$cygcheck ./elapsed_time.exe
C:\downloads\elapsed_time.exe
C:\WINDOWS\system32\KERNEL32.dll
C:\WINDOWS\system32\ntdll.dll
C:\WINDOWS\system32\msvcrt.dll
C:\WINDOWS\system32\USER32.dll
C:\WINDOWS\system32\GDI32.dll
C:\opt\lmi\local\bin\libgcc_s_sjlj-1.dll
C:\opt\lmi\local\bin\libstdc++-6.dll
and ran it:
/cygdrive/c/downloads[0]$./elapsed_time.exe xyzzy
zsh: segmentation fault ./elapsed_time.exe xyzzy
Messagebox:
Catastrophic error
Not all alert function pointers have been set.
It seems to work correctly with valid arguments:
/cygdrive/c/downloads[0]$./elapsed_time.exe ls elapsed_time.exe
elapsed_time.exe
Elapsed time: 77 milliseconds
/cygdrive/c/downloads[0]$./elapsed_time.exe pwd
/cygdrive/c/downloads
Elapsed time: 99 milliseconds
And it gives the intended diagnostic with zero arguments:
/cygdrive/c/downloads[0]$./elapsed_time.exe
elapsed_time: at least one argument required.
because that message is reported directly on stderr, without going
through the 'alert' facility.
Re: [lmi] Cross-compiling lmi from Linux to MSW, Greg Chicares, 2016/01/21