Xorg 7.6: Problems getting libXfont to compile

Christoph Thompson cjsthompson at gmail.com
Sat Dec 25 18:37:11 PST 2010


Hi,

I'm trying currently trying to build Xorg packages which bundle all
components together. In order for that to work, each package must find it's
dependencies from the package build root and not from already installed
components. Mostly it all revolves around setting a bunch of environment
variables so that the components know where to find their dependencies. And
it's working pretty well so far I must say. Except for one missbehaving
package, namely libXfont. I'm at a loss on how to properly fix the following
problem :

---

  make[3]: Entering directory `/var/tmp/build-JUCWCT/libXfont-1.4.3/src/fc'
  \
  # source='fserve.c' object='fserve.lo' libtool=yes
  /bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
-I../.. -I../../include/X11/fonts -I../../include
-I/var/tmp/build-JUCWCT/package-root/usr/include -D_XOPEN_SOURCE  -Wall
-Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing
-Wbad-function-cast -Wformat=2 -Wold-style-definition -
 Wdeclaration-after-statement  -O2 -fno-strength-reduce -fomit-frame-pointer
-ffast-math -c -o fserve.lo fserve.c
  libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../..
-I../../include/X11/fonts -I../../include
-I/var/tmp/build-JUCWCT/package-root/usr/include -D_XOPEN_SOURCE -Wall
-Wpointer-arith -Wstrict-  prototypes -Wmissing-prototypes
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing
-Wbad-function-cast -Wformat=2 -Wold-style-definition
-Wdeclaration-after-statement -O2 -fno-    strength-reduce
-fomit-frame-pointer -ffast-math -c fserve.c  -fPIC -DPIC -o .libs/fserve.o
  fserve.c: In function 'fs_block_handler':
  fserve.c:1210: error: 'fd_mask' undeclared (first use in this function)
  fserve.c:1210: error: (Each undeclared identifier is reported only once
  fserve.c:1210: error: for each function it appears in.)
  make[3]: *** [fserve.lo] Error 1
  make[3]: Leaving directory `/var/tmp/build-JUCWCT/libXfont-1.4.3/src/fc'
  make[2]: *** [all-recursive] Error 1
  make[2]: Leaving directory `/var/tmp/build-JUCWCT/libXfont-1.4.3/src'
  make[1]: *** [all-recursive] Error 1
  make[1]: Leaving directory `/var/tmp/build-JUCWCT/libXfont-1.4.3'
  make: *** [all] Error 2

---

At first, I tried adding <sys/select.h> to fc/fserve.c but that didn't work.
But then I found out that by commenting out Xpoll.h in fc/fserve.c the
compilation would work despite some warnings :

  fserve.c: In function 'fs_block_handler':
  fserve.c:1210: warning: implicit declaration of function 'XFD_ORSET'
  fserve.c:1210: warning: nested extern declaration of 'XFD_ORSET'

So I thought that might be just good enough to get it to work properly but
then when I later tried to build 'bdftopcf' I got the following 'undefined
references' at link time :

gcc -std=gnu99 -Wall -Wpointer-arith -Wstrict-prototypes
-Wmissing-prototypes -Wmissing-declarations -Wnested-externs
-fno-strict-aliasing -Wbad-function-cast -Wformat=2 -Wold-style-definition
-Wdeclaration-after-statement  -I/usr/include/freetype2   -O2
-fno-strength-reduce -fomit-frame-pointer -ffast-math   -o bdftopcf
bdftopcf.o -lXfont
/usr/lib64/gcc/x86_64-slackware-linux/4.4.4/../../../../lib64/libXfont.so:
undefined reference to `FontEncIdentify'
/usr/lib64/gcc/x86_64-slackware-linux/4.4.4/../../../../lib64/libXfont.so:
undefined reference to `XFD_ORSET'
/usr/lib64/gcc/x86_64-slackware-linux/4.4.4/../../../../lib64/libXfont.so:
undefined reference to `FontEncFind'
/usr/lib64/gcc/x86_64-slackware-linux/4.4.4/../../../../lib64/libXfont.so:
undefined reference to `FontEncName'
/usr/lib64/gcc/x86_64-slackware-linux/4.4.4/../../../../lib64/libXfont.so:
undefined reference to `FontEncRecode'
/usr/lib64/gcc/x86_64-slackware-linux/4.4.4/../../../../lib64/libXfont.so:
undefined reference to `FontEncFromXLFD'
collect2: ld returned 1 exit status
make[1]: *** [bdftopcf] Error 1
make[1]: Leaving directory `/var/tmp/build-DDh1jO/bdftopcf-1.0.3'
make: *** [all] Error 2

When I build libXfont against components that are already installed on the
system everything works.

I'd really appreciate it if someone could give me some clues on how to fix
this.

Thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20101226/c969b3b1/attachment.html>


More information about the xorg mailing list