[erlang-bugs] SmartOS compilation problems

Christopher Meiklejohn <>
Tue Oct 15 17:22:03 CEST 2013

There are a few places where the generated Makefiles for the interface integration fail compilation because they assume that /bin/sh supports the '-d' flag, which it does not on SmartOS.

I believe the solution here is to adapt the Makefile so that this command is changed to:

if [ ! test -d "/root/repos/otp_src_R16B02/lib/jinterface/priv/" ]

See the following example:

=== Entering application jinterface
make[3]: Entering directory `/root/repos/otp_src_R16B02/lib/jinterface/java_src'
make[4]: Entering directory `/root/repos/otp_src_R16B02/lib/jinterface/java_src/com/ericsson/otp/erlang'
if [ ! -d "/root/repos/otp_src_R16B02/lib/jinterface/priv/" ];then mkdir "/root/repos/otp_src_R16B02/lib/jinterface/priv/"; fi
CLASSPATH=/root/repos/otp_src_R16B02/lib/jinterface/java_src/ -d /root/repos/otp_src_R16B02/lib/jinterface/priv/ OtpAuthException.java
/bin/sh: line 1: -d: not found
make[4]: *** [/root/repos/otp_src_R16B02/lib/jinterface/priv/com/ericsson/otp/erlang/OtpAuthException.class] Error 127
make[4]: Leaving directory `/root/repos/otp_src_R16B02/lib/jinterface/java_src/com/ericsson/otp/erlang'
make[3]: *** [opt] Error 2
make[3]: Leaving directory `/root/repos/otp_src_R16B02/lib/jinterface/java_src'
make[2]: *** [opt] Error 2
make[2]: Leaving directory `/root/repos/otp_src_R16B02/lib/jinterface'
make[1]: *** [opt] Error 2
make[1]: Leaving directory `/root/repos/otp_src_R16B02/lib'
make: *** [tertiary_bootstrap_build] Error 2

This is running on the following build of SmartOS:

SunOS 5.11 joyent_20130322T181205Z i86pc i386 i86pc Solaris

- Chris 

Christopher Meiklejohn
Software Engineer
Basho Technologies, Inc.

More information about the erlang-bugs mailing list