On Tue, 2020-10-13 at 13:42 -0500, Bruce Dubbs via blfs-dev wrote: > On 10/13/20 11:11 AM, Bruce Dubbs wrote: > > > > > > They seem to be using system JBIG2DEC, JPEGXR, and GUMBO which we > > do not > > have. The package certainly doesn't document user.make. I see it > > now > > for the first time. The options -DJBIG_NO_MEMENTO -DTOFU > > -DTOFU_CJK are > > mysterious but appear to have soemthing to do with noto fonts. > > > > I can use that to do some tests, but I don't think it builds a > > shared > > library. Maybe we don't need a library though. > > > > I'll do some more with this tomorrow, thanks. > > > > ------------- > > > > I was able to build mupdf with: > > > > > > cat > user.make << EOF > > USE_SYSTEM_FREETYPE := yes > > USE_SYSTEM_HARFBUZZ := yes > > USE_SYSTEM_JBIG2DEC := no > > USE_SYSTEM_JPEGXR := no # not used without HAVE_JPEGXR > > USE_SYSTEM_LCMS2 := no # need lcms2-art fork > > USE_SYSTEM_LIBJPEG := yes > > USE_SYSTEM_MUJS := no # build needs source anyways > > USE_SYSTEM_OPENJPEG := yes > > USE_SYSTEM_ZLIB := yes > > USE_SYSTEM_GLUT := no # need freeglut2-art fork > > USE_SYSTEM_CURL := yes > > USE_SYSTEM_GUMBO := no > > EOF > > > > export XCFLAGS=-fPIC && > > > > make $BFLAGS build=release && > > make prefix=/usr install > > > > With the above I get: > > > > $ ll -h install/usr/lib > > total 50M > > -rw-r--r-- 1 bdubbs bdubbs 48M Oct 13 00:02 libmupdf.a > > -rw-r--r-- 1 bdubbs bdubbs 2.2M Oct 13 00:02 libmupdf-third.a > > > > $ ll -h install/usr/bin > > total 172M > > -rwxr-xr-x 1 bdubbs bdubbs 35M Oct 13 00:02 mupdf-gl > > -rwxr-xr-x 1 bdubbs bdubbs 35M Oct 13 00:02 mupdf-x11 > > -rwxr-xr-x 1 bdubbs bdubbs 35M Oct 13 00:02 mupdf-x11-curl > > -rwxr-xr-x 1 bdubbs bdubbs 35M Oct 13 00:02 muraster > > -rwxr-xr-x 1 bdubbs bdubbs 35M Oct 13 00:02 mutool > > > > If I add 'shared=yes to the 'make install' line, the build time > > goes > > from about 0.1 SBU to 0.7 SBU (at -j22) and the sizes are: > > > > $ ll -h install/usr/lib > > total 46M > > -rw-r--r-- 1 bdubbs bdubbs 46M Oct 13 10:58 libmupdf.so > > > > $ ll -h install/usr/bin > > total 836K > > -rwxr-xr-x 1 bdubbs bdubbs 364K Oct 13 10:58 mupdf-gl > > -rwxr-xr-x 1 bdubbs bdubbs 72K Oct 13 10:58 mupdf-x11 > > -rwxr-xr-x 1 bdubbs bdubbs 76K Oct 13 10:58 mupdf-x11-curl > > -rwxr-xr-x 1 bdubbs bdubbs 35K Oct 13 10:58 muraster > > -rwxr-xr-x 1 bdubbs bdubbs 287K Oct 13 10:58 mutool > > > > The extra time is used during the 'nmake install'. Adding > > 'shared=yes' > > to both the make and install lines fixes the build time. > > > > I think the package is good to go now. Will commit later today. > > Well it wasn't good. The linking was messed up. It took a while > but > I've got it solved and the package tested. Will update in a few > minutes. > > -- Bruce >
I've tried the new instructions, and it failed to build because it was trying to link against the old libraries: -------- /usr/bin/ld: build/shared-release/source/tools/murun.o: undefined reference to symbol 'js_newuserdata' /usr/bin/ld: /usr/lib/libmupdf-third.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make: *** [Makefile:247: build/shared-release/mutool] Error 1 make: *** Waiting for unfinished jobs.... /usr/bin/ld: build/shared-release/source/tools/muraster.o: undefined reference to symbol 'mu_unlock_mutex' /usr/bin/ld: /usr/lib/libmupdf-threads.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make: *** [Makefile:253: build/shared-release/muraster] Error 1 -------- Removing previously installed libraries (and adding verbose=yes), I get another error: ----------- mkdir -p build/shared-release/ ; cc -Wl,--gc-sections -Wl,-s -o build/shared-release/mutool build/shared-release/source/tools/mutool.o build/shared-release/source/tools/muconvert.o build/shared- release/source/tools/mudraw.o build/shared-release/source/tools/murun.o build/shared-release/source/tools/mutrace.o build/shared- release/source/tools/cmapdump.o build/shared- release/source/tools/pdfclean.o build/shared- release/source/tools/pdfcreate.o build/shared- release/source/tools/pdfextract.o build/shared- release/source/tools/pdfinfo.o build/shared- release/source/tools/pdfmerge.o build/shared- release/source/tools/pdfpages.o build/shared- release/source/tools/pdfposter.o build/shared- release/source/tools/pdfshow.o build/shared- release/source/tools/pdfsign.o -lm -lfreetype -lharfbuzz -ljpeg -lz -lopenjp2 -lpthread -lcrypto -lmupdf /usr/bin/ld: cannot find -lmupdf collect2: error: ld returned 1 exit status make: *** [Makefile:247: build/shared-release/mutool] Error 1 ----------- After changing "-lmudpf' in the sed to "-lmudpf -L$(OUT)", it could build at -j1. But I got a race condition at -j4, so that I had to change again the sed to remove the "s/.(MUPDF_LIB)//" line. Will commit. Pierre -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page