Summary: | use shared library instead static | ||
---|---|---|---|
Product: | MuPDF | Reporter: | Pavel Zhukov <Pavel.Y.Zhukov> |
Component: | mupdf | Assignee: | Tor Andersson <tor.andersson> |
Status: | RESOLVED WONTFIX | ||
Severity: | major | CC: | michael, pikachu.2014 |
Priority: | P4 | ||
Version: | unspecified | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | Word Size: | --- | |
Attachments: | patch to use shared libraries |
Description
Pavel Zhukov
2011-01-13 17:24:13 UTC
We do not intend to support building MuPDF as a shared library. Shared libraries are a lot more trouble than they are worth. If you are willing to take on the task of maintaining a shared library build for Fedora, I will not object, but please bear in mind that any such patches will not make it into the upstream sources. ok. I'll not build mupdf for fedora.Because I do not intend to support building MuPDF as a static library. Using static libs in Fedora is not recommended. What's your point against shared libs? The resulting bins are dynamically linked against freetype/X11/ anyway. (Gentoo does not split libmupdf and mupdf, so the mu* bins will always match corresponding libfitz. My approach to build shared libs: -redefine LIB_FITZ and the rule to create it and pass the -fpic via XCFLAGS my_soname=libfitz.so.1.2 sed -e "\$a\$(FITZ_LIB):" \ -e "\$a\\\t\$(QUIET_LINK) \$(CC) \$(LDFLAGS) --shared -Wl,-soname -Wl,${my_soname} -o \$@ \$^" \ -e "/^FITZ_LIB :=/s:=.*:= build/debug/${my_soname}:" \ -i Makefile || die make XCFLAGS=-fpic The static libs are created in a different copy of the source tree. And you can archive a real static binary by having static-libs of the deps and pass XLIBS="-static" cp -a "${S}" "${S}"-static || die #add missing Libs.private for xcb and freetype sed -e 's:\(pkg-config --libs\):\1 --static:' \ -e '/^SYS_X11_LIBS :=/s:\(.*\):\1 -lpthread:' \ -e '/^SYS_FREETYPE_LIBS :=/s:\(.*\):\1 -lbz2:' \ -i "${S}"-static/Makerules || die make -C "${S}"-static XLIBS="-static" The combined Gentoo ebuild (version 9999) can be found at http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-text/mupdf/ (In reply to comment #3) > -e "\$a\\\t\$(QUIET_LINK) \$(CC) \$(LDFLAGS) --shared -Wl,-soname > -Wl,${my_soname} -o \$@ \$^" \ one extra \$(LIBS) at the end, and to fail on problems: -Wl,--no-undefined. |