# Unable to build x11/libICE



## Pawtuxet (May 6, 2014)

Hey everyone,

For a couple of weeks now, I've been unable to build x11/libICE (1.0.8_2,1) from ports. Prior to that, I switched to 10.0-STABLE and was able to build 1.0.8_1,1 and indeed all other installed ports without trouble. But I assume the problem is on my system, since no one else is talking about it and quite a few ports depend on libICE.

The build fails with the following message.


```
===>  Building for libICE-1.0.8_2,1
--- all ---
/usr/bin/make  all-recursive
--- all-recursive ---
Making all in doc
make[3]: make[3]: don't know how to make ICElib.html. Stop

make[3]: stopped in /usr/ports/x11/libICE/work/libICE-1.0.8/doc
*** [all-recursive] Error code 1

make[2]: stopped in /usr/ports/x11/libICE/work/libICE-1.0.8
1 error

make[2]: stopped in /usr/ports/x11/libICE/work/libICE-1.0.8
*** [all] Error code 2

make[1]: stopped in /usr/ports/x11/libICE/work/libICE-1.0.8
1 error

make[1]: stopped in /usr/ports/x11/libICE/work/libICE-1.0.8
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/x11/libICE
```

I tried `make WITH="" WITHOUT="DOCS"` to simply skip the documentation stage, as well as the suggested `make MAKE_JOBS_UNSAFE=yes`, but neither made any difference.

Does anyone know why it's failing?

The system is running 10.0-STABLE FreeBSD 10.0-STABLE #1 r265381: Tue May  6 and /etc/make.conf looks like this:

```
WITH_NEW_XORG=yes
WITH_KMS=yes
CC=clang
CXX=clang++
CPP=clang-cpp
WITH_PKGNG=yes
```

This is the entire output:

```
# make
===>   libICE-1.0.8_2,1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by libICE-1.0.8_2,1 for building
===>  Extracting for libICE-1.0.8_2,1
=> SHA256 Checksum OK for xorg/lib/libICE-1.0.8.tar.bz2.
===>  Patching for libICE-1.0.8_2,1
===>   libICE-1.0.8_2,1 depends on executable: pkgconf - found
===>   libICE-1.0.8_2,1 depends on file: /usr/local/libdata/pkgconfig/xtrans.pc - found
===>   libICE-1.0.8_2,1 depends on file: /usr/local/libdata/pkgconfig/xorg-macros.pc - found
===>   libICE-1.0.8_2,1 depends on file: /usr/local/libdata/pkgconfig/xproto.pc - found
===>  Configuring for libICE-1.0.8_2,1
===>   FreeBSD 10 autotools fix applied to /usr/ports/x11/libICE/work/libICE-1.0.8/configure
===>   FreeBSD 10 autotools fix applied to /usr/ports/x11/libICE/work/libICE-1.0.8/aclocal.m4
configure: WARNING: unrecognized options: --enable-malloc0returnsnull
configure: loading site script /usr/ports/Templates/config.site
checking for gcc... clang
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 clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking how to run the C preprocessor... clang-cpp
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... (cached) /usr/bin/egrep
checking for ANSI C header files... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking for minix/config.h... (cached) no
checking whether it is safe to define __EXTENSIONS__... yes
checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... (cached) /bin/mkdir -p
checking for gawk... (cached) /usr/bin/awk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of clang... gcc3
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... amd64-portbld-freebsd10.0
checking host system type... amd64-portbld-freebsd10.0
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... (cached) /usr/bin/fgrep
checking for ld used by clang... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... (cached) 262144
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... no
checking how to convert amd64-portbld-freebsd10.0 file names to amd64-portbld-freebsd10.0 format... func_convert_file_noop
checking how to convert amd64-portbld-freebsd10.0 file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from clang object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... (cached) yes
checking for objdir... .libs
checking if clang supports -fno-rtti -fno-exceptions... yes
checking for clang option to produce PIC... -fPIC -DPIC
checking if clang PIC flag -fPIC -DPIC works... yes
checking if clang static flag -static works... yes
checking if clang supports -c -o file.o... yes
checking if clang supports -c -o file.o... (cached) yes
checking whether the clang linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... freebsd10.0 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for clang option to accept ISO C99... none needed
checking whether __clang__ is declared... yes
checking whether __INTEL_COMPILER is declared... no
checking whether __SUNPRO_C is declared... no
checking pkg-config is at least version 0.9.0... yes
checking if clang supports -Werror=unknown-warning-option... yes
checking if clang supports -Werror=unused-command-line-argument... yes
checking if clang supports -Wall... yes
checking if clang supports -Wpointer-arith... yes
checking if clang supports -Wstrict-prototypes... yes
checking if clang supports -Wmissing-prototypes... yes
checking if clang supports -Wmissing-declarations... yes
checking if clang supports -Wnested-externs... yes
checking if clang supports -Wbad-function-cast... yes
checking if clang supports -Wformat=2... yes
checking if clang supports -Wold-style-definition... yes
checking if clang supports -Wdeclaration-after-statement... yes
checking if clang supports -Wunused... yes
checking if clang supports -Wuninitialized... yes
checking if clang supports -Wshadow... yes
checking if clang supports -Wcast-qual... yes
checking if clang supports -Wmissing-noreturn... yes
checking if clang supports -Wmissing-format-attribute... yes
checking if clang supports -Wredundant-decls... yes
checking if clang supports -Werror=implicit... yes
checking if clang supports -Werror=nonnull... yes
checking if clang supports -Werror=init-self... yes
checking if clang supports -Werror=main... yes
checking if clang supports -Werror=missing-braces... yes
checking if clang supports -Werror=sequence-point... yes
checking if clang supports -Werror=return-type... yes
checking if clang supports -Werror=trigraphs... yes
checking if clang supports -Werror=array-bounds... yes
checking if clang supports -Werror=write-strings... yes
checking if clang supports -Werror=address... yes
checking if clang supports -Werror=int-to-pointer-cast... yes
checking if clang supports -Werror=pointer-to-int-cast... yes
checking if clang supports -pedantic... yes
checking if clang supports -Werror... yes
checking if clang supports -Werror=attributes... yes
checking whether to build documentation... yes
checking whether to build functional specifications... yes
checking for xmlto... /usr/local/bin/xmlto
checking the xmlto version... 0.0.26
checking for fop... /usr/local/bin/fop
checking for xsltproc... /usr/local/bin/xsltproc
checking for X.Org SGML entities >= 1.8... /usr/local/share/sgml
checking for ICE... yes
checking return type of signal handlers... void
checking if Xtrans should support UNIX socket connections... yes
checking if Xtrans should support TCP socket connections... yes
checking for library containing socket... none required
checking for library containing gethostbyname... none required
checking for getaddrinfo... (cached) yes
checking if IPv6 support should be built... yes
checking for struct sockaddr_in.sin_len... yes
checking for socklen_t... (cached) yes
checking if Xtrans should support os-specific local connections... no
checking for asprintf... (cached) yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating specs/Makefile
config.status: creating src/Makefile
config.status: creating ice.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure: WARNING: unrecognized options: --enable-malloc0returnsnull
===>  Building for libICE-1.0.8_2,1
--- all ---
/usr/bin/make  all-recursive
--- all-recursive ---
Making all in doc
make[3]: make[3]: don't know how to make ICElib.html. Stop

make[3]: stopped in /usr/ports/x11/libICE/work/libICE-1.0.8/doc
*** [all-recursive] Error code 1

make[2]: stopped in /usr/ports/x11/libICE/work/libICE-1.0.8
1 error

make[2]: stopped in /usr/ports/x11/libICE/work/libICE-1.0.8
*** [all] Error code 2

make[1]: stopped in /usr/ports/x11/libICE/work/libICE-1.0.8
1 error

make[1]: stopped in /usr/ports/x11/libICE/work/libICE-1.0.8
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/x11/libICE
```


----------



## Pawtuxet (May 8, 2014)

After rebuilding most of my installed ports, I've come across others that seem to have the same problem: x11-fonts/fontsproto, x11-toolkits/libXmu, x11/bigreqsproto and x11/kbproto. Three of them have not had any recent updates.
What they seem to have in common, is reliance on textproc/docbook-xml to complete the stage that fails. I've tried removing and reinstalling all docbook ports, but this didn't make any difference.
So it's likely not a problem with libICE at all, and other ports that make use of docbook build just fine. I don't get what I might have changed, or neglected to change, to bring this about.

I found I can get around the issue by altering the Makefiles to skip the part that fails, but it would be preferable to get it sorted out.


----------



## wblock@ (May 8, 2014)

Have you been following /usr/ports/UPDATING, particularly the 20140219 entry?


----------



## Pawtuxet (May 9, 2014)

wblock@ said:
			
		

> Have you been following /usr/ports/UPDATING, particularly the 20140219 entry?



Well, I did follow that, but it was some time before I upgraded to STABLE.
I tried those instructions again yesterday, as well as simply deleting everything docbook-related and letting portmaster pull it back in.
I have about 500 ports installed, and three weeks ago I spent about half a day rebuilding every one of them. None of the ports listed above gave any problems back then.

This is the same machine that up until a week ago, had a recurring freezing problem. I'm wondering if something was damaged in one of the many lock-ups, or if one of my attempts to put a stop to them, had an unforeseen consequence. Now that the system is stable and the cause determined to be unrelated to software, perhaps the best course of action at this point would be starting over. I can't remember even half of the things I did, trying to pin down the problem.


----------

