# Problems installing java/openjdk8



## nielsk (Mar 23, 2017)

Hi,

i have on a couple of new servers the problem that the configuration of the port java/openjdk8 fails. I found a bug in the bug reports from August or September but no response there. So maybe someone can help me here.
I am running 11.0-STABLE with a custom kernel and a stripped down world (but those settings are the same on the working servers as well). On one server I already rebuilt kernel and world twice. On another one I deleted all ports and installed java/openjdk8 as the first port after tmux.
When I try to install the port I get the following error:


```
root@computer:/usr/ports/java/openjdk8 # make install clean
===>   openjdk8-8.121.13 depends on executable: zip - found
===>   openjdk8-8.121.13 depends on file: /usr/local/include/cups/cups.h - found
===>   openjdk8-8.121.13 depends on executable: bash - found
===>   openjdk8-8.121.13 depends on file: /usr/local/libdata/pkgconfig/x11.pc - found
===>   openjdk8-8.121.13 depends on file: /usr/local/libdata/pkgconfig/xext.pc - found
===>   openjdk8-8.121.13 depends on file: /usr/local/libdata/pkgconfig/xrender.pc - found
===>   openjdk8-8.121.13 depends on file: /usr/local/libdata/pkgconfig/xt.pc - found
===>   openjdk8-8.121.13 depends on executable: gmake - found
===>   openjdk8-8.121.13 depends on package: pkgconf>=1.3.0_1 - found
===>   openjdk8-8.121.13 depends on file: /usr/local/bin/autoconf-2.69 - found
===>   openjdk8-8.121.13 depends on shared library: libasound.so - found (/usr/local/lib/libasound.so)
===>   openjdk8-8.121.13 depends on shared library: libfreetype.so - found (/usr/local/lib/libfreetype.so)
===>  Configuring for openjdk8-8.121.13
Warning: You are using legacy autoconf cross-compilation flags.
It is recommended that you use --openjdk-target instead.

Running generated-configure.sh
./../../common/autoconf/generated-configure.sh: redirection error: cannot duplicate fd: Bad file descriptor
./../../common/autoconf/generated-configure.sh: line 561: 1: Bad file descriptor
configure exiting with result code 1
===>  Script "../../configure" failed unexpectedly.
Please report the problem to java@FreeBSD.org [maintainer] and attach the
"/usr/ports/java/openjdk8/work/openjdk/common/autoconf/config.log" including
the output of the failure of your make command. Also, it might be a good idea
to provide an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/java/openjdk8
*** Error code 1

Stop.
make: stopped in /usr/ports/java/openjdk8
```

The file /usr/ports/java/openjdk8/work/openjdk/common/autoconf/config.log does not exist

The current state of installed ports on one of the servers is:


```
alsa-lib-1.1.2                 ALSA compatibility library
autoconf-2.69_1                Automatically configure source code on many Un*x platforms
autoconf-wrapper-20131203      Wrapper script for GNU autoconf
automake-1.15_1                GNU Standards-compliant Makefile generator
automake-wrapper-20131203      Wrapper script for GNU automake
bash-4.4.12_1                  GNU Project's Bourne Again SHell
bigreqsproto-1.1.2             BigReqs extension headers
bison-3.0.4,1                  Parser generator from FSF, (mostly) compatible with Yacc
bootstrap-openjdk-r351880_1    Oracle\'s Java 6 virtual machine release under the GPL v2
check-0.11.0                   Unit test framework for C
cups-2.2.2_1                   Common UNIX Printing System
dejavu-2.37                    Bitstream Vera Fonts clone with a wider range of characters
dialog4ports-0.1.6             Console Interface to configure ports
expat-2.2.0_1                  XML 1.0 parser written in C
fontconfig-2.12.1,1            XML-based font configuration API for X Windows
freetype2-2.7.1                Free and portable TrueType font rendering engine
gettext-runtime-0.19.8.1_1     GNU gettext runtime libraries and programs
gettext-tools-0.19.8.1         GNU gettext development and translation tools
gmake-4.2.1_1                  GNU version of 'make' utility
help2man-1.47.4                Automatically generating simple manual pages from program output
indexinfo-0.2.6                Utility to regenerate the GNU info page index
inputproto-2.3.2               Input extension headers
java-zoneinfo-2017.a           Updated Java timezone definitions
javavmwrapper-2.5_2            Wrapper script for various Java Virtual Machines
kbproto-1.0.7                  KB extension headers
libICE-1.0.9_1,1               Inter Client Exchange library for X11
libSM-1.2.2_3,1                Session Management library for X11
libX11-1.6.5,1                 X11 library
libXau-1.0.8_3                 Authentication Protocol library for X11
libXdmcp-1.1.2                 X Display Manager Control Protocol library
libXext-1.3.3_1,1              X11 Extension library
libXrender-0.9.10              X Render extension library
libXt-1.1.5,1                  X Toolkit library
libevent-2.1.8                 API for executing callback functions on events or timeouts
libffi-3.2.1                   Foreign Function Interface
libfontenc-1.1.3_1             The fontenc Library
libgcrypt-1.7.6                General purpose crypto library based on code used in GnuPG
libgpg-error-1.27              Common error values for all GnuPG components
libpthread-stubs-0.3_6         This library provides weak aliases for pthread functions
libtool-2.4.6                  Generic shared library support script
libxcb-1.12                    The X protocol C-language Binding (XCB) library
libxml2-2.9.4                  XML parser library for GNOME
libxslt-1.1.29_1               The XSLT C library for GNOME
m4-1.4.18,1                    GNU M4
mkfontdir-1.0.7                Create an index of X font files in a directory
mkfontscale-1.1.2              Creates an index of scalable font files for X
openjdk-7.111.01_3,1           Java Development Kit 7
openssl-1.0.2k_1,1             SSL and crypto library
perl5-5.24.1                   Practical Extraction and Report Language
pkg-1.10.0_2                   Package manager
pkgconf-1.3.0_3                Utility to help to configure compiler and linker flags
portmaster-3.17.10             Manage your ports without external databases or languages
python27-2.7.13_1              Interpreted object-oriented programming language
readline-6.3.8                 Library for editing command lines as they are typed
renderproto-0.11.1             RenderProto protocol headers
screen-4.5.0_2                 Multi-screen window manager
sudo-1.8.19p2                  Allow others to run commands as root
texinfo-6.1.20160425,1         Typeset documentation system with multiple format output
tmux-2.3_2                     Terminal Multiplexer
unzip-6.0_7                    List, test, and extract compressed files from a ZIP archive
xcb-proto-1.12                 The X protocol C-language Binding (XCB) protocol
xcmiscproto-1.2.2              XCMisc extension headers
xextproto-7.3.0                XExt extension headers
xf86bigfontproto-1.2.0         XFree86-Bigfont extension headers
xorg-macros-1.19.1             X.Org development aclocal macros
xproto-7.0.31                  X11 protocol headers
xtrans-1.3.5                   Abstract network code for X
zip-3.0_1                      Create/update ZIP files compatible with PKZIP
```

On another server I "solved" the problem by building the port on one server where it works and installing the package on the non-working server. But that is no solution if I have to do that with every update :/


----------



## SirDice (Mar 23, 2017)

nielsk said:


> On another server I "solved" the problem by building the port on one server where it works and installing the package on the non-working server. But that is no solution if I have to do that with every update


I highly recommend setting up your own repository using ports-mgmt/poudriere or ports-mgmt/synth. That will give you the freedom of using ports while keeping the ease of management of packages. It will also give you a lot of control regarding updates and all your systems will have the same packages with the same options making managing them a lot easier.


----------



## nielsk (Mar 23, 2017)

Problem solved. I hat do go back to revision 315311 for the kernel. Thanks to java@freebsd.org for helping out 

See here as well: PR 217846


----------

