Follow-up Comment #2, bug #66143 (group groff):

> I've not aware of uchardet library detection being broken anywhere else, and
there are no recent reports of such breakage that I can remember.

I do not think it's 'broken' -- it's more like too exact, or specific?


$ rg uchardet
....
config.status
...
685:S["UCHARDET_LIBS"]="-L/opt/homebrew/Cellar/uchardet/0.0.8/lib -luchardet"
686:S["UCHARDET_CFLAGS"]="-I/opt/homebrew/Cellar/uchardet/0.0.8/include/uchardet"
...


Here, this line 686: The added include path already contains the subfolder, so
there is no need to specify it in the header file.

Anyway, I think, I was being too ominous with my hint, that I am seeing test
failures. 

But to first do what you asked me for:


./preconv -v
GNU preconv (groff) version 1.23.0.1842-c9b3c with iconv support and with
uchardet support


I think preconv is working fine.

I've attached my test-suite.log file, so you can see what is going on for me.

Those mom tests failing are not related to preconv not functioning correctly,
but actually one is caused by the version of pdfimages on my machine takes a
different amount of arguments, than what seems to be expected in the test
case. This is what I get in the test-suite.log:


...
FAIL: contrib/mom/examples/tests-mom.sh
=======================================

Checking number of pages of
/Users/svenschober/src/groff/build/contrib/mom/examples/letter.pdf
Checking number of pages of
/Users/svenschober/src/groff/build/contrib/mom/examples/mom-pdf.pdf
Checking number of pages of
/Users/svenschober/src/groff/build/contrib/mom/examples/mon_premier_doc.pdf
Checking number of pages of
/Users/svenschober/src/groff/build/contrib/mom/examples/sample_docs.pdf
Checking number of pages of
/Users/svenschober/src/groff/build/contrib/mom/examples/slide-demo.pdf
Checking number of pages of
/Users/svenschober/src/groff/build/contrib/mom/examples/typesetting.pdf
Checking number of pages of
/Users/svenschober/src/groff/build/contrib/mom/examples/copyright-chapter.pdf
Checking number of pages of
/Users/svenschober/src/groff/build/contrib/mom/examples/copyright-default.pdf
Checking if
/Users/svenschober/src/groff/build/contrib/mom/examples/typesetting.pdf has
images
pdfimages version 4.05 [www.xpdfreader.com]
Copyright 1996-2024 Glyph & Cog, LLC
Usage: pdfimages [options] <PDF-file> <image-root>
  -f <int>         : first page to convert
  -l <int>         : last page to convert
  -j               : write JPEG images as JPEG files
  -raw             : write raw data in PDF-native formats
  -list            : write information to stdout for each image
  -opw <string>    : owner password (for encrypted files)
  -upw <string>    : user password (for encrypted files)
  -verbose         : print per-page status information
  -q               : don't print any messages or errors
  -cfg <string>    : configuration file to use in place of .xpdfrc
  -v               : print copyright and version info
  -h               : print usage information
  -help            : print usage information
  --help           : print usage information
  -?               : print usage information
 no images found
...


My version of pdfimages is:


pdfimages -v
pdfimages version 4.05 [www.xpdfreader.com]
Copyright 1996-2024 Glyph & Cog, LLC


And I've installed it via homebrew and the xpdf package:


brew info xpdf
==> xpdf: stable 4.05 (bottled)
PDF viewer
https://www.xpdfreader.com/
Conflicts with:
  pdf2image (because poppler, pdftohtml, pdf2image, and xpdf install
conflicting executables)
  pdftohtml (because poppler, pdftohtml, pdf2image, and xpdf install
conflicting executables)
  poppler (because poppler, pdftohtml, pdf2image, and xpdf install conflicting
executables)
Installed
/opt/homebrew/Cellar/xpdf/4.05 (26 files, 14.9MB) *
  Poured from bottle using the formulae.brew.sh API on 2024-02-16 at 20:11:31
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/x/xpdf.rb
License: GPL-2.0-only OR GPL-3.0-only
==> Dependencies
Build: cmake ✔
Required: fontconfig ✔, freetype ✔, libpng ✔, qt@5 ✔
==> Analytics
install: 316 (30 days), 977 (90 days), 5,427 (365 days)
install-on-request: 316 (30 days), 977 (90 days), 5,427 (365 days)
build-error: 0 (30 days)


I can fix this, adding an image root argument of 1 to the invocation and then
I get:


...
Checking if
/Users/svenschober/src/groff/build/contrib/mom/examples/typesetting.pdf has
images
 no images found
Checking if
/Users/svenschober/src/groff/build/contrib/mom/examples/slide-demo.pdf has
images
 no images found
...


Hmm... I check what pdfimage is giving me on those files:


pdfimages -list contrib/mom/examples/typesetting.pdf 1
1-0000.ppm: page=3 width=81 height=96 hdpi=72.00 vdpi=72.00
colorspace=DeviceRGB bpc=8
1-0001.pgm: page=3 width=81 height=96 hdpi=72.00 vdpi=72.00
colorspace=DeviceGray bpc=8


This seems now to be caused by pdfimages spitting out two lines and the test
expects there to be more (?). I check the file and I see only one image on
page three to be sure.

Now, again, I don't know the expectations of the test and the results, but I
can change that to -lt and the test passes. :) 

So, my changes to the test would be:


git diff
diff --git a/contrib/mom/examples/test-mom.sh.in
b/contrib/mom/examples/test-mom.sh.in
index 21c8835b8..e2b1364da 100644
--- a/contrib/mom/examples/test-mom.sh.in
+++ b/contrib/mom/examples/test-mom.sh.in
@@ -63,8 +63,8 @@ check_number_pages()
 check_has_images()
 {
     echo "Checking if $1 has images"
-    n_lines=`pdfimages -list $1 | wc -l `
-    if test $n_lines -le 2; then
+    n_lines=`pdfimages -list $1 1 | wc -l `
+    if test $n_lines -lt 2; then
         echo " no images found"
         ret=255
     fi


But continuing from there, there are further failures.

There is one about unicode escaping:


...
XFAIL: src/roff/groff/tests/string_case_xform_unicode_escape.sh
===============================================================

XFAIL src/roff/groff/tests/string_case_xform_unicode_escape.sh (exit status:
1)
...


Now, this is not terribly helpful, so I added a set -x to that script and
got:


XFAIL: src/roff/groff/tests/string_case_xform_unicode_escape.sh
===============================================================

+ groff=/Users/svenschober/src/groff/build/test-groff
+ expected='attaché ATTACHÉ'
++ /Users/svenschober/src/groff/build/test-groff -Tutf8
+ actual='troff:<standard input>:5: warning: special character
'\''U0065_0301'\'' not defined
attaché ATTACH'
+ echo 'troff:<standard input>:5: warning: special character
'\''U0065_0301'\'' not defined
attaché ATTACH'
+ grep -Fqx 'attaché ATTACHÉ'
XFAIL src/roff/groff/tests/string_case_xform_unicode_escape.sh (exit status:
1)


So, if I interpret this correctly, groff is issuing a warning, which is then
part of the string to be compared and thus the comparison fails... 

I can continue like this, and I kindly ask you, if you think, this is time
well spent? 

Would you be interessted in a short write-up of my experiences of building
groff on macos?

(file #56398)

    _______________________________________________________

Additional Item Attachment:

File name: test-suite.log.macos           Size: 11KiB
    <https://file.savannah.gnu.org/file/test-suite.log.macos?file_id=56398>


    AGPL NOTICE

These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://git.savannah.nongnu.org/cgit/administration/savane.git/snapshot/savane-7f26dae152cb6d51fd34e0dd6b4ab984b68c4926.tar.gz


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66143>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to