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

Update Docker files to latest 3.24 Liblouis version #83

Closed hammera closed 1 year ago

hammera commented 1 year ago

Hi Chris or any maintainer,

Hopefully this change rans correctly with online build workflows. If yes, please apply the Liblouisutdml master branch this simple commit, and if this is possible, generate a new stable Liblouisutdml 3.12.0 version with based Liblouis latest 3.24.0 release for 64 bit Windows operating systems and 32 bit Windows operating systems. Linux related binary build is not a problem, because if present a new stable source code version, distro maintainers will doing Linux related packages.

My committed change not do a drastical change, only updated with DOCKERfile.win32 and DOCKERFILE.win64 the Liblouis version from 3.21.0 version to latest 3.24.0 version.

Why very need this change (only my openion)? Since Liblouisutdml version 3.11.0 are released ( in 2022. March 0), Liblouis stepped up three versions (3.22.0, 3.23.0, 3.24.0 versions). Lot of Braille table changes are happened, new Braille tables are awailable with newest previous not implemented languages, or changed an already supported Braille standard (for example Danish braille), the swedish tables are full refactored to latest standard into 3.23.0 release, etc.

I not see scheduled new Liblouisutdml version publication date and new 3.12.0 milestone. I think in April Samuel doed importanter code related fixups since 3.11.0 version are released.

I suggest a think with future: If the three month release date period for Liblouis UTDML is difficult to Liblouisutdml and Liblouis always sinchronized, we perhaps schedule Liblouisutdml new release with two Liblouis version release date, two release/year. For example, 3.11.0 release publicated march 08, next release are perhaps easy publicating december if not have any regression errors the build and test generation.

I doed a small offline test, but I don't no right doing the test or not:

  1. I ran make distwin command, my system I get right from Docker the Liblouisutdml 3.11.0 32 bit and 64 bit versions.
  2. I unzip the 32 bit build.
  3. I exported following variable, because I have only possibility into Wine looks the build:
    export LOUIS_TABLEPATH=z:\\home\\hammera\\liblouisutdml\\share\\liblouis\\tables
  4. I ran wine bin/file2brl.exe --version command. I get following error messages my terminal: „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” This dll I think not prepackaged the build or not linked statically, I not have C experience. So if I use wrong terminology, very sorry. I usual programming with Python3.

I looked same method the 64 bit build, the 64 build works fine. I ran wine bin/file2brl.exe --version command, and get following proper result: „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) 2013 ViewPlus Technologies, Inc. and JJB Software, Inc. License GPLv3+: GNU GPL version 3 or later http://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.”

The gtk3 related issue I think is not important for 64 bit build version. I connverted right a html file to hungarian braille without no problem for 64 bit builded version.

Thanks,

Attila

hammera commented 1 year ago

Very fine, all checks are passed right. :-):-)

Sorry, I wrote wrong version numbers my previous comment with lot of Liblouisutdml version numbers related. Not 3.11.0 the latest stable Liblouisutdml version number the right version number, 2.11.0 the proper number.

The make distwin generated 32 bit offline build why missing the libgcc_s_dw2-1.dll library? In Docker win32 build this dll file is not packaged the final 32 bit zip file? I need anything optimize my Ubuntu 20.04.5 build system to make distwin command correct generate in Docker the 32 bit version? My system is Ubuntu 20.04.5 Mate edition, but in Docker environment build system uses Debian 11 Bullseye system.

Look the entire error message display content when I ran into Wine the file2brl --version command (32 build version, 64 bit build is works fine):

wine bin/file2brl.exe  --version
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

Thanks,

Attila

hammera commented 1 year ago

I found this bugreport with an user search same dll in Debian unstable version, in Bullseye the wine and mingw package version is different: https://www.mail-archive.com/debian-wine@lists.debian.org/msg01212.html

Samuel, you have any ydea this issue part related? Very interestting, the Liblouis homepage awailable downloadable 32 bit Liblouis version works fine, not search this dll file. Possible I doing wrong the 32 bit test build. Perhaps I will looking this my Debian Bullseye virtual machine. In Dockerfile.win32 file the compile happening after configure with the following command in the 71 line: Liblouis compile: make LDFLAGS="-L${PREFIX}/lib/ -avoid-version -Xcompiler -static-libgcc"

In the liblouisutdml related the 79 line: make (missing the static flags) So, missing the following part: LDFLAGS="-L${PREFIX}/lib/ -avoid-version -Xcompiler -static-libgcc"

For example, the manual compiled liblouisutdml 32 bit version the bin/file2brl.exe produces the described error message, but for example the packaged lou_translate.exe works perfect. Attila

hammera commented 1 year ago

Ok, I tryed an another test. Previous comment I wrote Liblouis compiled for Liblouisutdml with static linking, but other components not. I applyed following diff output, and doed a make distwin command. Before committing this change, I would like you please review this change:

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 *

this modifyed 32 bit version not converting html file, a very simple html example:

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Test text</title>
</head>
<body>
<p>Test text</p>
</body>
</html>

Openions? I apply this little diff change the 64 bit Dockerfile.win64 make parts? Have chance not produce problem this change (offline build rans previous succesfully), but I not known the code base, so please ask a review.

Attila

egli commented 1 year ago

Hi @hammera I like your change to the Dockerfiles. But I was a bit confused about the other issues. Are you saying that the generated exe does not work? If yes then the related discussion should probably go into a separate issue/pr.

egli commented 1 year ago

Maybe it should even go into two separate issues/PRs. One for the exe that doesn't work and one for your proposal for a release schedule.

hammera commented 1 year ago

Hi Chris,

Thanks the merge. With 32 bit architecture local Windows builded exe in Wine not worked me when I doed the build in my Ubuntu 20.04 system me local machine, but I think this day happened a gnu lib update the source repository. When you doing the official release, usual what commands use to generate official releases? You simple doing the make distwin command?

Now building automatically a 32 bit or 64 bit release the Liblouis UTDML master branch for Windows and possible download the builded master branch version from Github? I welcome testing the 32 bit and 64 bit version the HTML file conversion related problem, if awailable an official binary test build.

With release schedule suggestion related: How can I open a request this suggestion related? Enough a simple issue for Liblouis utdml github page (open a new issue)?

Attila

egli commented 1 year ago

Hi Attila

When you doing the official release, usual what commands use to generate official releases? You simple doing the make distwin command?

I just run make distwin. That in turn uses the docker images to do the cross compilation. As far as I know that works. In fact I just tested it: it does work. I can generate the zip files from the liblouisutdml master branch.

How can I open a request this suggestion related? Enough a simple issue for Liblouis utdml github page (open a new issue)?

You can just open an issue asking for a new release :-)

hammera commented 1 year ago

Hi Chris,

Thanks your answer. Next week I will trying testing the 32 bit and 64 bit generated version in real Windows virtual machine system. Previous I founded an issue a HTML conversion the 32 bit releases related, so want verify this issue present or not the master branch release. If the issue is still reproducible, I will reporting for you next week a new issue.

Thanks,

Attila