lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Cross-linking issues


From: Greg Chicares
Subject: Re: [lmi] Cross-linking issues
Date: Tue, 26 Jan 2016 14:58:56 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0

On 2016-01-26 14:21, Greg Chicares wrote:
[...]

Here's a different issue. First, a native program, built by lmi's makefiles:

/cygdrive/c/downloads[0]$/opt/lmi/local/bin/xmllint.exe --version
C:\opt\lmi\local\bin\xmllint.exe: using libxml version 20626
   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP 
HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude ISO8859X Unicode 
Regexps Automata Expr Schemas Debug

A cross-compiled version of the same program:

/cygdrive/c/downloads[0]$./xmllint.exe --version
/cygdrive/c/downloads[127]$

Run it under 'gdb':

/cygdrive/c/downloads[127]$gdb --quiet xmllint.exe
Reading symbols from xmllint.exe...done.
(gdb) r
Starting program: /cygdrive/c/downloads/xmllint.exe
[New Thread 292.0xfdc]
gdb: unknown target exception 0xc0000139 at 0x7c96478e
During startup program exited with code 0xc0000139.
(gdb) q

0xC0000139: Entry Point Not Found. Perhaps a problem loading a DLL...

Dependencies (note /opt/lmi/... on 'libxml2-2.dll' line):

/cygdrive/c/downloads[0]$cygcheck ./xmllint.exe
C:\downloads\xmllint.exe
  C:\opt\lmi\local\bin\libxml2-2.dll
    C:\WINDOWS\system32\KERNEL32.dll
      C:\WINDOWS\system32\ntdll.dll
    C:\WINDOWS\system32\msvcrt.dll
    C:\WINDOWS\system32\WS2_32.DLL
      C:\WINDOWS\system32\ADVAPI32.dll
        C:\WINDOWS\system32\RPCRT4.dll
          C:\WINDOWS\system32\Secur32.dll
      C:\WINDOWS\system32\WS2HELP.dll
  C:\WINDOWS\system32\USER32.dll
    C:\WINDOWS\system32\GDI32.dll
/cygdrive/c/downloads[0]$

Now download the cross-built version of 'libxml2-2.dll', and
observe that 'xmllint' no longer depends on the native-built DLL:

/cygdrive/c/downloads[0]$cygcheck ./xmllint.exe
C:\downloads\xmllint.exe
  C:\downloads\libxml2-2.dll
    C:\WINDOWS\system32\KERNEL32.dll
      C:\WINDOWS\system32\ntdll.dll
    C:\WINDOWS\system32\msvcrt.dll
    C:\WINDOWS\system32\WS2_32.dll
      C:\WINDOWS\system32\ADVAPI32.dll
        C:\WINDOWS\system32\RPCRT4.dll
          C:\WINDOWS\system32\Secur32.dll
      C:\WINDOWS\system32\WS2HELP.dll
  C:\WINDOWS\system32\USER32.dll
    C:\WINDOWS\system32\GDI32.dll

Now it works:

/cygdrive/c/downloads[0]$./xmllint.exe --version
C:\downloads\xmllint.exe: using libxml version 20626
   compiled with: Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP 
DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude ISO8859X Unicode 
Regexps Automata Expr Schemas Debug
Copy native-built output from above for comparison:
   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP 
HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude ISO8859X Unicode 
Regexps Automata Expr Schemas Debug
                  ^^^^^^^

The native- and cross-built DLLs aren't interoperable, and I'm guessing
that the reason is that the build options differ. But this is puzzling,
because the native-built version definitely seems to have been built
with threads--let's run it this way to make doubly sure:

/cygdrive/c/downloads[0]$pushd /opt/lmi/local/bin/
/opt/lmi/local/bin /cygdrive/c/downloads
/opt/lmi/local/bin[0]$./xmllint.exe --version
C:\opt\lmi\local\bin\xmllint.exe: using libxml version 20626
   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP 
HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude ISO8859X Unicode 
Regexps Automata Expr Schemas Debug

yet 'install_libxml2_libxslt.make' says '--without-threads':

libxml2-2.6.26_options := \
  $(common_options) \
  --with-schemas \
  --without-iconv \
  --without-modules \
  --without-schematron \
  --without-threads \
  --without-zlib \

Here's how it was configured for the cross compiler:

~/src/3rdparty/libxml2-2.6.26/configure \
  --disable-static --enable-shared \
  --with-{debug,schemas} --without-{iconv,modules,python,schematron} \
  --prefix=$HOME/msw/i686-w64-mingw32 \
  --build=x86_64-unknown-linux-gnu \
  --host=i686-w64-mingw32 \
  --without-threads

The options look different, but perhaps that's because these are defaults:
  --disable-static
  --enable-shared
  --with-debug
  --without-python
  --without-zlib
But both explicitly specify '--without-threads', yet that's the one option
for which 'xmllint.exe --version' shows a difference.

Vadim, do you have any idea how this could be?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]