trying to build X from git on Debian 6.0.6

Dennis Clarke dclarke at blastwave.org
Mon Jan 21 09:53:24 PST 2013


> > However needing "xorg-macros version 1.12 or higher" I do not see what
> > the issue is there because the blog says you get everything you need
> > in one shot. 
> 
> Running 'apt-cache search xorg-macros' leads to the xutils-dev package,
> which includes these macros.

Tried that right away and then had to back the package out. Turns out that a version
level is required and the deb package in the stable repo is too far out of date. 
 
> However, it rather looks like you're missing the pkg-config package:

Thank you .. I will give that a shot .. let's see here : 

aster $ su - 
Password: 
root at aster:~# 
root at aster:~# aptitude search pkg-config
p   pkg-config                      - manage compile and link flags for librarie
root at aster:~# aptitude install pkg-config
The following NEW packages will be installed:
  libglib2.0-0{a} libglib2.0-data{a} libpcre3{a} pkg-config 
  shared-mime-info{a} 
0 packages upgraded, 5 newly installed, 0 to remove and 4 not upgraded.
Need to get 3,251 kB of archives. After unpacking 10.9 MB will be used.
Do you want to continue? [Y/n/?] 
Get:1 http://mirror.csclub.uwaterloo.ca/debian/ squeeze/main libpcre3 amd64 8.02-1.1 [234 kB]
Get:2 http://mirror.csclub.uwaterloo.ca/debian/ squeeze/main libglib2.0-0 amd64 2.24.2-1 [1,122 kB]
Get:3 http://mirror.csclub.uwaterloo.ca/debian/ squeeze/main libglib2.0-data all 2.24.2-1 [994 kB]
Get:4 http://mirror.csclub.uwaterloo.ca/debian/ squeeze/main pkg-config amd64 0.25-1.1 [59.2 kB]
Get:5 http://mirror.csclub.uwaterloo.ca/debian/ squeeze/main shared-mime-info amd64 0.71-4 [841 kB]
Fetched 3,251 kB in 4s (727 kB/s)         
Selecting previously deselected package libpcre3.
(Reading database ... 29177 files and directories currently installed.)
Unpacking libpcre3 (from .../libpcre3_8.02-1.1_amd64.deb) ...
Selecting previously deselected package libglib2.0-0.
Unpacking libglib2.0-0 (from .../libglib2.0-0_2.24.2-1_amd64.deb) ...
Selecting previously deselected package libglib2.0-data.
Unpacking libglib2.0-data (from .../libglib2.0-data_2.24.2-1_all.deb) ...
Selecting previously deselected package pkg-config.
Unpacking pkg-config (from .../pkg-config_0.25-1.1_amd64.deb) ...
Selecting previously deselected package shared-mime-info.
Unpacking shared-mime-info (from .../shared-mime-info_0.71-4_amd64.deb) ...
Processing triggers for man-db ...
Setting up libpcre3 (8.02-1.1) ...
Setting up libglib2.0-0 (2.24.2-1) ...
Setting up libglib2.0-data (2.24.2-1) ...
Setting up pkg-config (0.25-1.1) ...
Setting up shared-mime-info (0.71-4) ...
                                         
root at aster:~# exit
logout
aster $ 

aster $ rm -rf xorg/
aster $ rm -rf /opt/xorg/*
aster $ mkdir -p xorg/util
aster $ git clone git://anongit.freedesktop.org/git/xorg/util/modular xorg/util/modular
Cloning into xorg/util/modular...
remote: Counting objects: 2345, done.
remote: Compressing objects: 100% (1214/1214), done.
remote: Total 2345 (delta 1487), reused 1765 (delta 1125)
Receiving objects: 100% (2345/2345), 1.05 MiB | 835 KiB/s, done.
Resolving deltas: 100% (1487/1487), done.
aster $ cd xorg

aster $ ./util/modular/build.sh --clone --autoresume built.modules /opt/xorg
Building to run Linux / x86_64 ()
Mon Jan 21 12:36:04 EST 2013

======================================================================
==  Processing module/component:  "util/macros"
==        configuration options:   
Cloning into util/macros...
remote: Counting objects: 582, done.
remote: Compressing objects: 100% (421/421), done.
remote: Total 582 (delta 355), reused 263 (delta 161)
Receiving objects: 100% (582/582), 124.37 KiB, done.
Resolving deltas: 100% (355/355), done.
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I /opt/xorg/share/aclocal 
configure.ac:25: warning: AC_INIT: not a literal: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
autoreconf: configure.ac: tracing
configure.ac:25: warning: AC_INIT: not a literal: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf
configure.ac:25: warning: AC_INIT: not a literal: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --no-force
configure.ac:25: warning: AC_INIT: not a literal: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
configure.ac:30: installing `./install-sh'
configure.ac:30: installing `./missing'
autoreconf: Leaving directory `.'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
configure: creating ./config.status
config.status: creating xorg-macros.pc
config.status: creating Makefile
config.status: creating xorg-macros.m4
make: Nothing to be done for `all'.
make[1]: Entering directory `/home/dclarke/xorg/util/macros'
make[1]: Nothing to be done for `install-exec-am'.
test -z "/opt/xorg/share/aclocal" || /bin/mkdir -p "/opt/xorg/share/aclocal"
 /usr/bin/install -c -m 644 xorg-macros.m4 '/opt/xorg/share/aclocal'
test -z "/opt/xorg/share/util-macros" || /bin/mkdir -p "/opt/xorg/share/util-macros"
 /usr/bin/install -c -m 644 INSTALL '/opt/xorg/share/util-macros'
test -z "/opt/xorg/share/pkgconfig" || /bin/mkdir -p "/opt/xorg/share/pkgconfig"
 /usr/bin/install -c -m 644 xorg-macros.pc '/opt/xorg/share/pkgconfig'
make  install-data-hook
make[2]: Entering directory `/home/dclarke/xorg/util/macros'
rm -f /opt/xorg/share/aclocal/xorgversion.m4
make[2]: Leaving directory `/home/dclarke/xorg/util/macros'
make[1]: Leaving directory `/home/dclarke/xorg/util/macros'

======================================================================
==  Processing module/component:  "font/util"
==        configuration options:   
Cloning into font/util...
remote: Counting objects: 290, done.
remote: Compressing objects: 100% (166/166), done.
remote: Total 290 (delta 179), reused 197 (delta 123)
Receiving objects: 100% (290/290), 81.31 KiB, done.
Resolving deltas: 100% (179/179), done.
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I /opt/xorg/share/aclocal 
configure.ac:26: warning: AC_INIT: not a literal: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
autoreconf: configure.ac: tracing
configure.ac:26: warning: AC_INIT: not a literal: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf
configure.ac:26: warning: AC_INIT: not a literal: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
autoreconf: running: /usr/bin/autoheader
configure.ac:26: warning: AC_INIT: not a literal: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
autoreconf: running: automake --add-missing --copy --no-force
configure.ac:26: warning: AC_INIT: not a literal: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
configure.ac:38: installing `./config.guess'
configure.ac:38: installing `./config.sub'
configure.ac:32: installing `./install-sh'
configure.ac:32: installing `./missing'
Makefile.am: installing `./depcomp'
autoreconf: Leaving directory `.'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... unsupported
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether __clang__ is declared... no
checking whether __INTEL_COMPILER is declared... no
checking whether __SUNPRO_C is declared... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking if gcc supports -Werror=unknown-warning-option... no
checking if gcc supports -Werror=unused-command-line-argument... no
checking if gcc supports -Wall... yes
checking if gcc supports -Wpointer-arith... yes
checking if gcc supports -Wmissing-declarations... yes
checking if gcc supports -Wformat=2... yes
checking if gcc supports -Wstrict-prototypes... yes
checking if gcc supports -Wmissing-prototypes... yes
checking if gcc supports -Wnested-externs... yes
checking if gcc supports -Wbad-function-cast... yes
checking if gcc supports -Wold-style-definition... yes
checking if gcc supports -Wdeclaration-after-statement... yes
checking if gcc supports -Wunused... yes
checking if gcc supports -Wuninitialized... yes
checking if gcc supports -Wshadow... yes
checking if gcc supports -Wcast-qual... yes
checking if gcc supports -Wmissing-noreturn... yes
checking if gcc supports -Wmissing-format-attribute... yes
checking if gcc supports -Wredundant-decls... yes
checking if gcc supports -Werror=implicit... yes
checking if gcc supports -Werror=nonnull... yes
checking if gcc supports -Werror=init-self... yes
checking if gcc supports -Werror=main... yes
checking if gcc supports -Werror=missing-braces... yes
checking if gcc supports -Werror=sequence-point... yes
checking if gcc supports -Werror=return-type... yes
checking if gcc supports -Werror=trigraphs... yes
checking if gcc supports -Werror=array-bounds... yes
checking if gcc supports -Werror=write-strings... yes
checking if gcc supports -Werror=address... yes
checking if gcc supports -Werror=int-to-pointer-cast... yes
checking if gcc supports -Werror=pointer-to-int-cast... yes
checking if gcc supports -pedantic... yes
checking if gcc supports -Werror... yes
checking if gcc supports -Werror=attributes... yes
checking for root directory for font files... ${datadir}/fonts/X11
configure: creating ./config.status
config.status: creating Makefile
config.status: creating man/Makefile
config.status: creating fontutil.m4
config.status: creating fontutil.pc
config.status: creating config.h
config.status: executing depfiles commands
make  all-recursive
make[1]: Entering directory `/home/dclarke/xorg/font/util'
Making all in man
make[2]: Entering directory `/home/dclarke/xorg/font/util/man'
  GEN    bdftruncate.1
  GEN    ucs2any.1
make[2]: Leaving directory `/home/dclarke/xorg/font/util/man'
make[2]: Entering directory `/home/dclarke/xorg/font/util'
  CC     bdftruncate.o
bdftruncate.c: In function 'main':
bdftruncate.c:170: error: 'SSIZE_MAX' undeclared (first use in this function)
bdftruncate.c:170: error: (Each undeclared identifier is reported only once
bdftruncate.c:170: error: for each function it appears in.)
make[2]: *** [bdftruncate.o] Error 1
make[2]: Leaving directory `/home/dclarke/xorg/font/util'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/dclarke/xorg/font/util'
make: *** [all] Error 2
build.sh: "make " failed on font/util
build.sh: error processing module/component:  "font/util"
aster $ 

I'm going to go out on a limb here and say that the problem is in the source : 

aster $ cat -n ./font/util/bdftruncate.c | head -180 | tail -20 
   161          if ((line = malloc(line_len)) == NULL) {
   162                  fprintf(stderr, "malloc failed");
   163                  exit(EXIT_FAILURE);
   164          }
   165
   166          for (;;) {
   167                  if (fgets(line, line_len, stdin) == NULL)
   168                       break;
   169                  while (strlen(line) == line_len - 1 && !feof(stdin)) {
   170                          if (line_len > SSIZE_MAX) {
   171                                  fprintf(stderr, "input line too large");
   172                                  exit(EXIT_FAILURE);
   173                          }
   174                          line = realloc(line, line_len * 2);
   175                          if (line == NULL) {
   176                                  fprintf(stderr, "realloc failed");
   177                                  exit(EXIT_FAILURE);
   178                          }
   179                          input_ptr = line + line_len - 1;
   180                          rest_len = line_len + 1;

yep ... looks like SSIZE_MAX should probably be in a #define somewhere : 

aster $ grep SSIZE_MAX ./font/util/bdftruncate.c
                        if (line_len > SSIZE_MAX) {

Nope .. no define seen there. 

Maybe in a header somewhere ? 

aster $ grep "\<include" ./font/util/bdftruncate.c
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Nope, from experience it won't be in there. 

Probabaly someone is working from a different song sheet and using a limits.h other than what I see in Debian stable : 

aster $ grep _MAX /usr/include/limits.h                                         #define MB_LEN_MAX      16                                        
#  define SCHAR_MAX     127
#  define UCHAR_MAX     255
#   define CHAR_MAX     UCHAR_MAX
#   define CHAR_MAX     SCHAR_MAX
#  define SHRT_MAX      32767
#  define USHRT_MAX     65535
#  define INT_MIN       (-INT_MAX - 1)
#  define INT_MAX       2147483647
#  define UINT_MAX      4294967295U
#   define LONG_MAX     9223372036854775807L
#   define LONG_MAX     2147483647L
#  define LONG_MIN      (-LONG_MAX - 1L)
#   define ULONG_MAX    18446744073709551615UL
#   define ULONG_MAX    4294967295UL
#   define LLONG_MAX    9223372036854775807LL
#   define LLONG_MIN    (-LLONG_MAX - 1LL)
#   define ULLONG_MAX   18446744073709551615ULL
   LLONG_MAX, and ULLONG_MAX.  Instead only the values gcc defined for
#  define LLONG_MIN     (-LLONG_MAX-1)
# ifndef LLONG_MAX
#  define LLONG_MAX     __LONG_LONG_MAX__
# ifndef ULLONG_MAX
#  define ULLONG_MAX    (LLONG_MAX * 2ULL + 1)

No SSIZE_MAX seen there. 

Is this variable used anywhere else in the tree?  

aster $ find . -type f | xargs grep SSIZE_MAX | cut -f1 -d\: | sort -u 
./font/util/bdftruncate.c

nope. 

So the problem, at the moment, is the source me thinks. 

Dennis 



More information about the xorg mailing list