From jason_eveleth at brown.edu Mon Nov 14 05:52:32 2022 From: jason_eveleth at brown.edu (Jason Eveleth) Date: Sun, 13 Nov 2022 23:52:32 -0500 Subject: [pdftex] Compiling on M1 Mac Message-ID: Dear pdftex developers, I'm trying to get pdftex to compile on M1 mac. For some reason it is failing to compile some arm specific files for libpng. I found that if I compiled it up to the point where the actual pdftex binary is produced (which is a command like this [1] for me) and then swapped in a correctly compiled libpng.a file, then the rest of it worked smoothly. So, the issue is the compilation of libpng. Now, I've never used automake/autoconf before, but I've tracked down the issue to whether I'm using --enable-arm-neon=yes when the src/libs/libpng/configure is called. I think that would get the arm specific files complied into the library. Where is src/libs/libpng/configure called? Or what file generates the file that calls that? Another possible way to go is to set PNG_ARM_NEON somewhere in the call to configure. I got this idea here . The other alternative is to bump the version of libpng in the src directory. I compiled the current version libpng just fine, but when I tried to swap the code for it into the src/libs/libpng, I got an error for "No rule to make target `rebuild'. Stop." So, it seems like more tweaking would be necessary to go that route. I've included the linker output [2] in case that helps. I've also included the output of `uname -a` and current OS version [3]. The ./build-pdftex.sh file selects the `make` (which is GNU Make). If there's any other system information you'd like, let me know. Best, Jason [1]: "g++ -std=gnu++11 -Wreturn-type -Wno-write-strings -g -o pdftex pdftexdir/pdftex-pdftexextra.o synctexdir/pdftex-synctex.o pdftex-pdftexini.o pdftex-pdftex0.o pdftex-pdftex-pool.o -Wl,-bind_at_load libpdftex.a /Users/jason/src/pdflatex/build-pdftex/libs/libpng/libpng.a /Users/jason/src/pdflatex/build-pdftex/libs/zlib/libz.a /Users/jason/src/pdflatex/build-pdftex/libs/xpdf/libxpdf.a libmd5.a lib/lib.a /Users/jason/src/pdflatex/build-pdftex/texk/kpathsea/.libs/libkpathsea.a" [2]: /bin/bash ./libtool --tag=CXX --mode=link g++ -std=gnu++11 -Wreturn-type -Wno-write-strings -g -o pdftex pdftexdir/pdftex-pdftexextra.o synctexdir/pdftex-synctex.o pdftex-pdftexini.o pdftex-pdftex0.o pdftex-pdftex-pool.o libpdftex.a /Users/jason/src/pdflatex/build-pdftex/libs/libpng/libpng.a /Users/jason/src/pdflatex/build-pdftex/libs/zlib/libz.a /Users/jason/src/pdflatex/build-pdftex/libs/xpdf/libxpdf.a libmd5.a lib/lib.a /Users/jason/src/pdflatex/build-pdftex/texk/kpathsea/ libkpathsea.la libtool: link: g++ -std=gnu++11 -Wreturn-type -Wno-write-strings -g -o pdftex pdftexdir/pdftex-pdftexextra.o synctexdir/pdftex-synctex.o pdftex-pdftexini.o pdftex-pdftex0.o pdftex-pdftex-pool.o -Wl,-bind_at_load libpdftex.a /Users/jason/src/pdflatex/build-pdftex/libs/libpng/libpng.a /Users/jason/src/pdflatex/build-pdftex/libs/zlib/libz.a /Users/jason/src/pdflatex/build-pdftex/libs/xpdf/libxpdf.a libmd5.a lib/lib.a /Users/jason/src/pdflatex/build-pdftex/texk/kpathsea/.libs/libkpathsea.a Undefined symbols for architecture arm64: "_png_do_expand_palette_rgb8_neon", referenced from: _png_do_expand_palette in libpng.a(pngrtran.o) "_png_do_expand_palette_rgba8_neon", referenced from: _png_do_expand_palette in libpng.a(pngrtran.o) "_png_init_filter_functions_neon", referenced from: _png_init_filter_functions in libpng.a(pngrutil.o) "_png_riffle_palette_neon", referenced from: _png_do_read_transformations in libpng.a(pngrtran.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [pdftex] Error 1 [3]: Darwin ocean 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 arm64 macOS Ventura 13.0 (22A380) -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl at freefriends.org Mon Nov 14 22:10:32 2022 From: karl at freefriends.org (Karl Berry) Date: Mon, 14 Nov 2022 14:10:32 -0700 Subject: [pdftex] Compiling on M1 Mac In-Reply-To: Message-ID: <202211142110.2AELAW9w023140@freefriends.org> Hi Jason - I synced the pdftex repo from tex live, which I think will get the latest libpng. If that works, great. Another possibility is to run ./build-pdftex --enable-arm-neon=yes I believe the command line arguments will be passed down to (all the) subconfigures, and dutifully ignored except by libpng. Another possibility is to try compiling tl. It's easiest to grab the entire source tree, but then it's somewhat straightforward, if annoying, to disable compilation of everything but a given engine: https://tug.org/texinfohtml/tlbuild.html#Build-one-engine Hope something in there works. The whole arm/neon thing has been nothing but trouble. Thanks for the report. -k From news3 at nililand.de Tue Nov 29 14:41:22 2022 From: news3 at nililand.de (Ulrike Fischer) Date: Tue, 29 Nov 2022 14:41:22 +0100 Subject: [pdftex] option to suppress the /Info dictionary References: <202204172010.23HKAY92022391@freefriends.org> Message-ID: <1cuoz6qt5u06u.dlg@nililand.de> Am Sun, 17 Apr 2022 14:10:34 -0600 schrieb Karl Berry: > Subject: [pdftex] option to suppress the /Info dictionary > > Thanh implemented \pdfomitinfodict. If its value is nonzero, /Info is > omitted completely. I merged the change into web2c, so I imagine the > next time Akira rebuilds his binaries, it will show up for Windows. > (pdftex r877, texlive r63056) --best, karl. miktex updated its binaries and so I could finally test it. \pdfomitinfodict=1 suppresses the /Info in the trailer: trailer << /Size 12 /Root 10 0 R /ID [ ] >> so that is fine. But the info dictionary itself is still there 11 0 obj << /Producer (MiKTeX pdfTeX-1.40.24) /Creator (TeX) /CreationDate (D:20221129143703+01'00') /ModDate (D:20221129143703+01'00') /Trapped /False /PTEX.Fullbanner (This is MiKTeX-pdfTeX 4.12.0 (1.40.24)) >> endobj the object is not referenced, so it is only dangling around. With luatex both the reference in trailer and the object are gone. -- Ulrike Fischer http://www.troubleshooting-tex.de/ From karl at freefriends.org Wed Nov 30 22:50:40 2022 From: karl at freefriends.org (Karl Berry) Date: Wed, 30 Nov 2022 14:50:40 -0700 Subject: [pdftex] option to suppress the /Info dictionary In-Reply-To: <1cuoz6qt5u06u.dlg@nililand.de> Message-ID: <202211302150.2AULoexD029404@freefriends.org> Hi Ulrike, \pdfomitinfodict=1 ... But the info dictionary itself is still there Thanks for the report, as always. Thanh made the patch below (pdftex r885, thanks Thanh!), which I imported into TL (r65154). Not sure if there's any good way for you to get an updated binary now, but should be fixed for tl23 anyway ... -k --- branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web 2022-11-14 21:05:34 UTC (rev 884) +++ branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web 2022-11-30 17:06:32 UTC (rev 885) @@ -19862,7 +19862,7 @@ @; @; @; - pdf_print_info; {last candidate for object stream} + if pdf_omit_info_dict = 0 then pdf_print_info; {last candidate for object stream} if pdf_os_enable then begin pdf_os_switch(true); pdf_os_write_objstream;