Summary: | -fPIC missing in CFLAGS_STANDARD for libgs.so build | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | keinbiervorvier <keinbiervorvier> |
Component: | Build Process | Assignee: | Hin-Tak Leung <htl10> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P4 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | Word Size: | --- | |
Attachments: | minimal eps file which shows pdfwriter bug with glyph omission |
Created attachment 5670 [details]
minimal eps file which shows pdfwriter bug with glyph omission
apologies, wrong bug for the attached file. must have been a stale cookie or something else in my browser history ignore test.eps it was meant for bug 690738 Cheers T. Grabbing a Ralph's bugs. The libtiff problem is known for some time and attempts to fix and reverts are r10520 , r10540, r11256, r11265 and r11398 . The general case (and lcms specific problems) were fixed again in r11450, r11451, r11452. As of r11453, ./autogen.sh && ./configure && make so on Linux Fedora/Redhat x86_64 should just work. (and hope it doesn't get broken again...). |
this applies to current svn HEAD on linux fedora/redhat x86_64 the build system fails to build a shared library (libgs.so) because of missing compiler flag -fPIC > make distclean; ./autogen.sh && make so ... /bin/sh <./obj/../soobj/ldt.tr /usr/bin/ld: ./obj/../soobj/gp_unix.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC ./obj/../soobj/gp_unix.o: could not read symbols: Bad value collect2: ld returned 1 exit status make[1]: *** [bin/../sobin/libgs.so.8.71] Error 1 make[1]: Leaving directory `/usr/local/src/ghost/gs' make: *** [so] Error 2 I found that adding -fPIC in 2 places allows me to build libgs.so There is probably a better place in the build system to consolidate these flags. Therefore I don't propose this to be a proper patch but simply a helpful observation # svn diff base/Makefile.in Index: base/Makefile.in =================================================================== --- base/Makefile.in (revision 10320) +++ base/Makefile.in (working copy) @@ -254,7 +254,7 @@ # Define the added flags for standard, debugging, profiling # and shared object builds. -CFLAGS_STANDARD=@OPT_CFLAGS@ +CFLAGS_STANDARD=@OPT_CFLAGS@ -fPIC CFLAGS_DEBUG=-g -O0 CFLAGS_PROFILE=-pg @OPT_CFLAGS@ CFLAGS_SO=@DYNAMIC_CFLAGS@ # svn diff base/libtiff.mak Index: base/libtiff.mak =================================================================== --- base/libtiff.mak (revision 10320) +++ base/libtiff.mak (working copy) @@ -31,7 +31,7 @@ # Define the name of this makefile. LIBTIFF_MAK=$(GLSRC)libtiff.mak -TIFFCC=$(CC) $(I_)$(TI_) $(II)$(JI_)$(_I) $(PF_) +TIFFCC=$(CC) -fPIC $(I_)$(TI_) $(II)$(JI_)$(_I) $(PF_) PDEP = $(AK) $(TIFFGEN)tif_config.h $(TIFFGEN)tiffconf.h Cheers T.