liblouis / liblouisutdml

An open-source library providing complete braille transcription services for xml, html and text documents
http://liblouis.io
GNU General Public License v3.0
24 stars 16 forks source link

32 bit Windows master branch builded Liblouisutdml version doesn't found and import libgcc_s_dw2-1.dll #86

Closed hammera closed 1 year ago

hammera commented 1 year ago

Hi Chris or Bert,

Inside Docker I generated the make distwin command a test 32 bit and 64 bit Liblouisutdml version from master branch. The zip files generated correctly, but the 32 bit Liblouisutdml version drop me following error messages:

ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. 0009:err:module:import_dll Library libgcc_s_dw2-1.dll (which is needed by L"Z:\home\hammera\liblouisutdml\bin\libxml2-2.dll") not found 0009:err:module:import_dll Library libxml2-2.dll (which is needed by L"Z:\home\hammera\liblouisutdml\bin\liblouisutdml.dll") not found 0009:err:module:import_dll Library libgcc_s_dw2-1.dll (which is needed by L"Z:\home\hammera\liblouisutdml\bin\liblouisutdml.dll") not found 0009:err:module:import_dll Library liblouisutdml.dll (which is needed by L"Z:\home\hammera\liblouisutdml\bin\file2brl.exe") not found 0009:err:module:LdrInitializeThunk Importing dlls for L"Z:\home\hammera\liblouisutdml\bin\file2brl.exe" failed, status c0000135

I suspect the problem is happening because into Dockerfile.win32 file only Liblouis related make command uses following commandline option the 71. line:

make LDFLAGS="-L${PREFIX}/lib/ -avoid-version -Xcompiler -static-libgcc"

Following diff patch I tested earlyer, and if I using following change the 32 bit Windows related Dockerfile version, file2brl.exe rans correct into Wine emulator:

diff --git a/Dockerfile.win32 b/Dockerfile.win32
index a358710..7466c11 100644
--- a/Dockerfile.win32
+++ b/Dockerfile.win32
@@ -47,7 +47,7 @@ ADD https://raw.githubusercontent.com/liblouis/liblouis/master/libyaml_mingw.pat
 RUN patch -p1 <libyaml_mingw.patch
 RUN ./bootstrap && \
     ./configure --host ${HOST} --prefix=${PREFIX} && \
-    make && \
+    make LDFLAGS="-L${PREFIX}/lib/ -avoid-version -Xcompiler -static-libgcc" && \
     make install

 # Build and install libxml2
@@ -56,7 +56,7 @@ RUN curl -L ftp://xmlsoft.org/libxml2/libxml2-${LIBXML2_VERSION}.tar.gz | tar zx
 WORKDIR ${SRCDIR}/libxml2-${LIBXML2_VERSION}
 RUN autoreconf -i && \
     ./configure --with-zlib=no --with-iconv=no --with-python=no --with-threads=no --host ${HOST} --prefix=${PREFIX} && \
-    make && \
+    make LDFLAGS="-L${PREFIX}/lib/ -avoid-version -Xcompiler -static-libgcc" && \
     make install

 # Build and install liblouis
@@ -76,7 +76,7 @@ ADD . ${SRCDIR}/liblouisutdml
 WORKDIR ${SRCDIR}/liblouisutdml
 RUN ./autogen.sh && \
     ./configure  --host ${HOST} --disable-java-bindings --prefix=${PREFIX} && \
-    make && \
+    make LDFLAGS="-L${PREFIX}/lib/ -avoid-version -Xcompiler -static-libgcc" && \
     make install && \
     cd ${PREFIX} && \
     zip -r ${SRCDIR}/liblouisutdml/liblouisutdml.zip *

I will test the fix again with the 32-bit version, I will report the result to you in the afternoon at the latest. 64 bit Windows version are unaffected this issue related.

Attila

hammera commented 1 year ago

Ok, My machine done the build test. :-):-) I forgot this machine have more strong hardware components, shorter time need a 32 bit and 64 bit make distwin command result. I unzipped the generated 32 bit LiblouisUTDML zip file (I use the previous comment wrote diff patch). When I ran bin/file2brl.exe into Wine emulator, I get following output:

ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. Z:\home\hammera\liblouisutdml\bin\file2brl.exe (liblouisutdml) 2.11.0 Copyright (C) 2023 ViewPlus Technologies, Inc. and JJB Software, Inc. License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Written by John J. Boyer.

32 bit architecture file2brl.exe launch correctly in Wine emulator when I using the patched Dockerfile.win32 file, I am unsure 64 bit version need this modification or not, because the 64 bit version launch correct in Wine emulator. :-):-) The „libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.” error message is not interesting I think, because LiblouisUTDML doesn't use this component and doesn't have a gui.

Basic test results:

  1. Both 32 bit and 64 bit custom builds convert right plain text files.
  2. HTML files only the 64 bit version converting right, the 32 bit version not. This is a different issue and reproducible a single html file, so I will opening an another issue this issue related. Unfortunatelly when the 32 bit version I trying a html conversion, Wine drops me a screen reader inaccessible window, so I don't no a helpful error message.

Please review the previous comment wrote diff file, and if you would like, I will opening a pull request this patch related.

Attila