- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Error while compiling rml on Mac OS X
Error while compiling rml on Mac OS X
Error while compiling rml on Mac OS X
Hi,
I'm on Mac OS X 10.8 and I'm trying to build OpenModelica from sources because the OpenModelica OS X build seems old...
To perform the compilation, I need to install rml+mmc.
When I'm using the make command I get the following error :
Code:
[loading (sources.cm):Main.sml]
$Execute: required privileges are:
primitive
[New bindings added.]
[autoloading]
[autoloading done]
ls -l rml.
ls: rml.: No such file or directory
make[2]: *** [rml.] Error 1
make[1]: *** [compiler] Error 2
make: *** [default] Error 2
How can I solve this error ?
My configure file is the following :
Code:
#!/bin/sh
makeconfigureneeded=
TARGET=
PREFIX=
DESTDIR=/usr/local
SMLCM=
MLLEX=/usr/local/bin/mllex
MLYACC=/usr/local/bin/mlyacc
HEAP_SUFFIX=
DEBUGLIB=librml_g.a
PROFLIB=librml_p.a
TRACLIB=librml_t.a
if [ -r ./config.cache ]; then
. ./config.cache
fi
while [ "$#" != 0 ]; do
arg=$1
shift
case "$arg" in
--build=*)
TARGET=`echo $arg | sed 's/--build=//'`
if [ ! \( -d "config/$TARGET" -a -r "config/$TARGET/config.h" \) ]; then
echo ./configure: You have indicated target "'$TARGET'".
echo This software does not directly support that configuration.
echo For a list of supported configurations, see the directory config/.
exit 1
fi
makeconfigureneeded=1
;;
--prefix=*)
PREFIX=`echo $arg | sed 's/--prefix=//'`
;;
--destdir=*)
DESTDIR=`echo $arg | sed 's/--destdir=//'`
;;
--nosmlnj)
SMLCM=nosmlnj
MLLEX=mllex
MLYACC=mlyacc
HEAP_SUFFIX=nosmlnj
;;
--disable-debug)
DEBUGLIB=
;;
--enable-debug)
DEBUGLIB=librml_g.a
;;
--disable-profile)
PROFLIB=
;;
--enable-profile)
PROFLIB=librml_p.a
;;
--disable-tracing)
TRACLIB=
;;
--enable-tracing)
TRACLIB=librml_t.a
;;
*)
echo ./configure: bad option "'$arg'"
echo usage: ./configure [options]
echo valid options are:
echo '--build=<cpu-os-compiler>'
echo '--prefix=<path>'
echo '--destdir=<path>'
echo '--nosmlnj'
echo '--{disable,enable}-{debug,profile}'
exit 1
esac
done
if [ -z "$TARGET" ]; then
TARGET=`etc/config.guess`
if [ "$?" != 0 ]; then
echo ./configure: etc/config.guess failed to classify current host
exit 1
fi
eval $TARGET
echo ./configure: TARGET is $TARGET
makeconfigureneeded=1
fi
# SML/NJ configuration
# Note: --nosmlnj MUST be given if SML/NJ isn't available
if [ -z "$SMLCM" ]; then
makeconfigureneeded=1
PATH=/usr/lib/smlnj/bin:$PATH
MLLEX=`etc/which ml-lex` || MLLEX=`etc/which mllex` || MLLEX=`etc/which ml-lex.bat`
if [ "$?" != 0 ]; then
echo ./configure: unable to locate ml-lex or mllex in '$PATH'.
exit 1
fi
SMLCM=`echo $MLLEX | sed 's,ml-lex,sml-cm,'`
if [ ! -x $SMLCM ]; then
SMLCM=`echo $MLLEX | sed 's,ml-lex,sml,'`
if [ ! -x $SMLCM ]; then
SMLCM=`echo $MLLEX | sed 's,mllex,sml,'`
if [ ! -x $SMLCM ]; then
echo ./configure: unable to locate sml-cm or sml.
exit 1
fi
fi
fi
MLYACC=`echo $MLLEX | sed 's,ml-lex,ml-yacc,'`
if [ ! -x $MLYACC ]; then
MLYACC=`echo $MLLEX | sed 's,mllex,ml-yacc,'`
if [ ! -x $MLYACC ]; then
MLYACC=`echo $MLLEX | sed 's,mllex,mlyacc,'`
if [ ! -x $MLYACC ]; then
echo ./configure: unable to locate ml-yacc or mlyacc.
exit 1
fi
fi
fi
echo ./configure: SMLCM is $SMLCM
case "$TARGET" in
x86-cygwin-gcc|x86-mingw32-gcc|x86_64-mingw32-gcc)
HEAP_SUFFIX=x86-win32
;;
*)
if [ -z "$SMLNJ_HOME" ]; then
echo ./configure: unable to determine SML/NJ installation directory
echo Please set the SMLNJ_HOME environment variable as it is different on all platforms
exit 1
fi
BIN_DIR=$SMLNJ_HOME/bin/
if [ "$?" != 0 -o -z "$BIN_DIR" ]; then
echo ./configure: unable to determine SML/NJ installation directory
echo $SMLNJ_HOME/bin/ does not exist
exit 1
fi
ARCH_OPSYS_HEAPSUFFIX=`$BIN_DIR/.arch-n-opsys`
if [ "$?" != 0 ]; then
echo ./configure: unable to determine SML/NJ heap suffix
exit 1
fi
echo $ARCH_OPSYS_HEAPSUFFIX
eval $ARCH_OPSYS_HEAPSUFFIX
esac
echo ./configure: SML/NJ heap suffix is $HEAP_SUFFIX
fi
if [ -z "$PREFIX" ]; then
PREFIX=`pwd`/$TARGET
echo ./configure: PREFIX is $PREFIX
fi
echo TARGET=$TARGET > ./config.cache
echo PREFIX=$PREFIX >> ./config.cache
echo DESTDIR=$DESTDIR >> ./config.cache
case "$TARGET" in
x86-mingw32-gcc|x86_64-mingw32-gcc)
#SMLDIR=`etc/which_dir sml.bat`
SMLDIR=$SMLNJ_HOME
# transform c:\a\b -> '/c/a/b'
SMLDIR=`echo $SMLDIR | sed 's/://g'`
SMLDIR=`echo $SMLDIR | sed 's|\\\|/|g'`
HEAPDIR=$SMLNJ_HOME
HEAPDIR=`echo $HEAPDIR | sed 's|\\\|/|g'`
SMLDIR=/$SMLDIR/bin
SMLRUN=$SMLDIR/.run/run.x86-win32.exe
echo SMLCM=\`echo \"$SMLRUN @SMLload=$HEAPDIR/bin/.heap/sml\"\` >> ./config.cache
echo MLLEX=\`echo \"$SMLRUN @SMLload=$HEAPDIR/bin/.heap/ml-lex\"\` >> ./config.cache
echo MLYACC=\`echo \"$SMLRUN @SMLload=$HEAPDIR/bin/.heap/ml-yacc\"\` >> ./config.cache
;;
*)
echo SMLCM=$SMLCM >> ./config.cache
echo MLLEX=$MLLEX >> ./config.cache
echo MLYACC=$MLYACC >> ./config.cache
esac
echo HEAP_SUFFIX=$HEAP_SUFFIX >> ./config.cache
echo DEBUGLIB=$DEBUGLIB >> ./config.cache
echo PROFLIB=$PROFLIB >> ./config.cache
echo TRACLIB=$TRACLIB >> ./config.cache
echo ./configure: updated config.cache
if [ ! -z "$makeconfigureneeded" ]; then
echo ./configure: make configure
make configure
fi
echo ./configure: done
exit 0
Thanks in advance.
Regards,
Re: Error while compiling rml on Mac OS X
It is possible to compile without RML if you want to keep your sanity...
./configure --without-rml ...
- sjoelund.se
- 1700 Posts
Re: Error while compiling rml on Mac OS X
You are doing this configure in what revision of OpenModelica sources?
- sjoelund.se
- 1700 Posts
Re: Error while compiling rml on Mac OS X
Hi,
I'm using OM 1.9.0 revision.
I cannot setup lpsolve because it seems not to be available to OS X version above 10.3 and not available for x64.
Do you have any Mac OSX package from a recent OM distribution ?
The last revision available on the website is the revision 14584 from December 2012.
Thanks in advance.
Regards,
Re: Error while compiling rml on Mac OS X
Macports has lp_solve: port info lp_solve
lp_solve @5.5.2.0 (math)
And no, I do not have any OSX package more recent than December 2012.
- sjoelund.se
- 1700 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Error while compiling rml on Mac OS X