Bug 701440 - [configure] genconf error
Summary: [configure] genconf error
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Build Process (show other bugs)
Version: unspecified
Hardware: PC Linux
: P4 normal
Assignee: Chris Liddell (chrisl)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-18 09:53 UTC by bernd.kuhls
Modified: 2019-11-22 12:16 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
fix genconf (1.07 KB, patch)
2019-08-18 09:53 UTC, bernd.kuhls
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bernd.kuhls 2019-08-18 09:53:03 UTC
Created attachment 18009 [details]
fix genconf

Hi,

while fixing https://bugs.ghostscript.com/show_bug.cgi?id=701439 it was pointed out to me[1] that the BUILD_PKGCONFIG vs. PKGCONFIG problem was buildroot-specific. To enable the usage of pkg-config during configure all was needed was adding BUILD_PKGCONFIG=/bin/false to the environment of the configure command.

This enables the usage of pkg-config for the first time in buildroot and led to a new problem which I am reporting in this bug report.

Unpatched ghostscript-9.27 causes this build error:

./obj/aux/genconf ./obj/devs.tr -h ./obj/gconfxx.h -p "%s&s&&" -pl "&-l%s&s&&" -pL "&-L%s&s&&" -ol ./obj/ld.tr
Definition not recognized: lbz2 -L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib.
make[1]: *** [base/gs.mak:472: obj/ld.tr] Error 1

ghostscript-9.27$ grep lbz2 Makefile
FT_LIBS=-L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -lfreetype -lpng16 -lbz2 -L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -lpng16 -lz -L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -lz 
FONTCONFIG_LIBS=-L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -lfontconfig -lfreetype -lpng16 -lbz2 -L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -lpng16 -lz -L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -lz -L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -luuid -lexpat 
EXTRALIBS=$(XTRALIBS) -lm  -liconv -lidn -L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -ltiff -lm  -rdynamic -L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -lfontconfig -lfreetype -lpng16 -lbz2 -L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -lpng16 -lz -L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -lz -L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -luuid -lexpat  -L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -lfreetype -lpng16 -lbz2 -L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -lpng16 -lz -L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -L/home/bernd/buildroot/br4/output/host/bin/../microblazeel-buildroot-linux-uclibc/sysroot/usr/lib -lz   

Using the attached patch fixes the problem.

[1] http://lists.busybox.net/pipermail/buildroot/2019-August/257315.html
Comment 1 Chris Liddell (chrisl) 2019-11-06 11:59:57 UTC
I'm a bit baffled by this one.

I don't understand what's causing the problem in the first place, and thus I don't understand how your patch fixes it....
Comment 2 Chris Liddell (chrisl) 2019-11-06 13:46:41 UTC
(In reply to Chris Liddell (chrisl) from comment #1)
> I'm a bit baffled by this one.
> 
> I don't understand what's causing the problem in the first place, and thus I
> don't understand how your patch fixes it....

Scratch that, I do get it.
Comment 3 Chris Liddell (chrisl) 2019-11-22 12:16:40 UTC
Applied:

https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=84a1bd8c73d7

Thanks!