Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Building from source on Slackware Current. [SUCCESS]

Building from source on Slackware Current. [SUCCESS]

Hello,

I have been struggling to build the SVN-22725 version on Slackware Current. I have all the dependencies installed as per instructions given in README.Linux.txt. This is my configure line:

./configure --prefix=/usr --disable-omshell-terminal --with-omniORB --disable-modelica3d

After this I am giving the command

make

Build runs for some time and stops after about nearly one and half hour with error message.

Please suggest the correct method to configure and make and also all the dependencies which are essential to build. This would help a lot to make pre-compiled package of OpenModelica for Slackware.

Thanks for your help.

Anand

Edited by: rsamurti - Oct-19-14 17:27:13

Re: Building from source on Slackware Current. [SUCCESS]

You need to post the error-message for support. Right now I can't tell if it fails to build omc or one of the graphical clients.

Note that OpenModelica supports parallel make (make -j4 is reasonable for 4-core machines; we use make -j40 on the build servers)

Re: Building from source on Slackware Current. [SUCCESS]

Hello,

This is the error message:

ar -s -r libomcruntime.a Error_omc.o Print_omc.o System_omc.o Settings_omc.o IOStreamExt_omc.o ErrorMessage.o FMI_omc.o systemimplmisc.o UnitParserExt_omc.o unitparser.o BackendDAEEXT_omc.o Socket_omc.o matching.o matching_cheap.o Database_omc.o Dynload_omc.o SimulationResults_omc.o TaskGraphResults_omc.o HpcOmSchedulerExt_omc.o HpcOmBenchmarkExt_omc.o ptolemyio_omc.o Lapack_omc.o getMemorySize.o GraphStreamExt_omc.o omc_communication.o omc_communication_impl.o Corba_omc.o
ar: creating libomcruntime.a
cp libomcruntime.a ../../build/lib/omc/
make[4]: Leaving directory `/home/anand/Downloads/openmodelica/openmodelica_22725/Compiler/runtime'
make[3]: Leaving directory `/home/anand/Downloads/openmodelica/openmodelica_22725/Compiler/omc_release'
make[2]: Leaving directory `/home/anand/Downloads/openmodelica/openmodelica_22725/Compiler/omc_release'
make[1]: Leaving directory `/home/anand/Downloads/openmodelica/openmodelica_22725'
make: *** [all] Error 2

This is the config.log:


I did make -j4 while building.

Anand

Re: Building from source on Slackware Current. [SUCCESS]

The error-message is not shown. If you make a parallel make, it may be megabytes above the end of the message.

Re: Building from source on Slackware Current. [SUCCESS]

How do I log the messages generated by make?

Re: Building from source on Slackware Current. [SUCCESS]

Code:

make -j4 > out.log 2>&1

Adeel.

Re: Building from source on Slackware Current. [SUCCESS]

Hello,

Please see the log files here:





Anand

Re: Building from source on Slackware Current. [SUCCESS]

It should work in r22729. There were some generated omniorb files checked into svn because of silly Windows developers (I assume). This made omniORB choke since you use a different version of omniORB than the one we use (it should work fine now though).

Re: Building from source on Slackware Current. [SUCCESS]

Hello,

Even SVN Version 22729 failed to build with the error messages shown below.







Should I disable RML-MMC?

Anand

Re: Building from source on Slackware Current. [SUCCESS]

That's again a problem with omoptim:
OMOPTIM_CC='gcc'
OMOPTIM_CXX='g++'

But your version of gcc/g++ is not compatible with paradiseo (requires g++-4.4 since paradiseo uses non-standard c++; the configure script automatically looks for /usr/bin/g++-4.4).

Re: Building from source on Slackware Current. [SUCCESS]

Hello,

Which version of paradiseo should I use?

Anand

Re: Building from source on Slackware Current. [SUCCESS]

Only the version that requires g++-4.4 works with OpenModelica, so that one... Else use --without-paradiseo (just disabled OMOptim).

Re: Building from source on Slackware Current. [SUCCESS]

Hello,

Again failed to build even --without-paradiseo. Here are the logs.







Anand

Re: Building from source on Slackware Current. [SUCCESS]

The code is not a full svn checkout:

Code:

/bin/sh: line 0: cd: libraries/Modelica 3.1/Modelica: No such file or directory

make[3]: *** [omlibrary-31] Error 1
make[3]: *** Waiting for unfinished jobs....

If you are compiling using the tarballs, note that you need to use the same make sequence as in the debian builds:
        $(MAKE) $(MAKEFLAGS) NOLIBRARIES=Yes

Or if you want all the libraries and have git, python, and some etc modules installed:
        $(MAKE) $(MAKEFLAGS) GITLIBRARIES=Yes

It is also possible to download the full library collection here (put the libraries under build/lib/omlibrary or ~/.openmodelica/libraries):
https://build.openmodelica.org/libraries/

Re: Building from source on Slackware Current. [SUCCESS]

Hello,

One more trial of compiling. Here are the log files:





I did ./configure --prefix=/usr --disable-omshell-terminal --with-omniORB --disable-modelica3d --without-paradiseo --disable-rml-trace --with-lapack="-llapack -lblas"

Then,

make -j2 NOLIBRARIES=Yes release mosh omlibrary qtclients > out-4.log 2>&1

After make stops build/bin does not contain any files !!

What is going on?

Anand

Edited by: rsamurti - Oct-14-14 17:14:40

Re: Building from source on Slackware Current. [SUCCESS]

Hello,

I am now able to build SVN Version 22761 on Slackware Current  by following the same sequence given in rules for Debian build!!

But when I try to

make -j2 install DESTDIR=/tmp/SBo/package > out-6.log 2>&1

I get the error message given in the log file below:

(time make -C PythonInterface -f Makefile)
if [ "" = ".app" ]; then mkdir -p /tmp/SBo/package/Applications/MacPorts/; fi
make[1]: Entering directory `/home/anand/Downloads/openmodelica/openmodelica_22761/PythonInterface'
# create directories
mkdir -p /tmp/SBo/package/usr/bin
mkdir -p /tmp/SBo/package/usr/lib/
mkdir -p /tmp/SBo/package/usr/include/omc
mkdir -p /tmp/SBo/package/usr/share/doc//omc/testmodels
mkdir -p /tmp/SBo/package/usr/share/man//man1/
mkdir -p /tmp/SBo/package/usr/share/locale
test ! -d ./build/share/doc/omedit/ || mkdir -p /tmp/SBo/package/usr/share/doc//omedit/
mkdir -p ..//build/lib/python/omniORB
mkdir -p ..//build/share/omc/scripts/PythonInterface/OMPython/OMParser
omniidl -bpython -Wbglobal=_OMCIDL -Wbpackage=OMPythonIDL ..//Compiler/runtime/omc_communication.idl
test ! -d ./build/share//omnotebook/ || mkdir -p /tmp/SBo/package/usr/share//omnotebook/
test ! -d ./build/share//omshell/nls/ || mkdir -p /tmp/SBo/package/usr/share//omshell/nls/
test ! -d ./build/share//omedit/nls/ || mkdir -p /tmp/SBo/package/usr/share//omedit/nls/
mkdir -p /tmp/SBo/package/usr/share//omc/scripts /tmp/SBo/package/usr/share/omc/java
omniidl: Could not import back-end 'python'
omniidl: Maybe you need to use the -p option?
omniidl: (The error was 'No module named python')
make[1]: *** [OMPythonIDL/omc_communication_idl.py] Error 1
make[1]: Leaving directory `/home/anand/Downloads/openmodelica/openmodelica_22761/PythonInterface'

real    0m0.027s
user    0m0.020s
sys    0m0.003s
make: *** [install-python] Error 2

Any solutiions?

Anand

Re: Building from source on Slackware Current. [SUCCESS]

You need to have compiled omniidl with python support. It could possibly be part of an omniidl-python package.

Re: Building from source on Slackware Current. [SUCCESS]

Hello,

I installed omniORBpy. After this I did

make -j2 install DESTDIR=/tmp/SBo/package

and got this error message:

(time make -C PythonInterface -f Makefile)
if [ "" = ".app" ]; then mkdir -p /tmp/SBo/package/Applications/MacPorts/; fi
make[1]: Entering directory `/home/anand/Downloads/openmodelica/openmodelica_22761/PythonInterface'
# create directories
mkdir -p /tmp/SBo/package/usr/bin
mkdir -p /tmp/SBo/package/usr/lib/
mkdir -p /tmp/SBo/package/usr/include/omc
mkdir -p /tmp/SBo/package/usr/share/doc//omc/testmodels
mkdir -p /tmp/SBo/package/usr/share/man//man1/
mkdir -p /tmp/SBo/package/usr/share/locale
test ! -d ./build/share/doc/omedit/ || mkdir -p /tmp/SBo/package/usr/share/doc//omedit/
mkdir -p ..//build/lib/python/omniORB
mkdir -p ..//build/share/omc/scripts/PythonInterface/OMPython/OMParser
! which python2.6 || python2.6 setup.py install --no-compile `test -d /etc/apt && echo --install-layout=deb` --prefix=..//build
test ! -d ./build/share//omnotebook/ || mkdir -p /tmp/SBo/package/usr/share//omnotebook/
which: no python2.6 in (/usr/local/bin:/usr/bin:/bin:/usr/games:/opt/blender:/usr/lib/java/bin:/usr/lib/java/jre/bin:/opt/kde3/lib/qt3/bin:/opt/kde3/bin:/usr/lib/qt/bin:/opt/sage:/opt/scilab/bin:/usr/lib/smlnj/bin)
! which python2.7 || python2.7 setup.py install --no-compile `test -d /etc/apt && echo --install-layout=deb` --prefix=..//build
test ! -d ./build/share//omshell/nls/ || mkdir -p /tmp/SBo/package/usr/share//omshell/nls/
/usr/bin/python2.7
test ! -d ./build/share//omedit/nls/ || mkdir -p /tmp/SBo/package/usr/share//omedit/nls/
mkdir -p /tmp/SBo/package/usr/share//omc/scripts /tmp/SBo/package/usr/share/omc/java
running install
Checking .pth file support in ..//build/lib/python2.7/site-packages/
/usr/bin/python2.7 -E -c pass
TEST FAILED: ..//build/lib/python2.7/site-packages/ does NOT support .pth files
error: bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    ..//build/lib/python2.7/site-packages/

and your PYTHONPATH environment variable currently contains:

    ''

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is
  on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment
  variable.  (It must then also be on PYTHONPATH whenever you run
  Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by
  using one of the approaches described here:

  https://pythonhosted.org/setuptools/eas … -locations

Please make the appropriate changes for your system and try again.
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/anand/Downloads/openmodelica/openmodelica_22761/PythonInterface'

real    0m0.185s
user    0m0.152s
sys    0m0.020s
make: *** [install-python] Error 2

Re: Building from source on Slackware Current. [SUCCESS]

Hello,

I have successfully built OpenModelica-SVN22802 on Slackware Current using the build script given below:

I will be uploading this build script at http://www.slackbuilds.org/

#-----------------------------------------------------------------------------------------
#!/bin/sh

# Slackware build script for openmodelica

# Copyright 2014 R. S. Ananda Murthy, Mysore, India
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

PRGNAM=openmodelica
VERSION=${VERSION:-svn22802}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf ${PRGNAM}_22802
tar xvf $CWD/${PRGNAM}_22802.orig.tar.gz
cd ${PRGNAM}_22802
fakeroot chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

autoconf

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --build=$ARCH-slackware-linux \
  --with-omniORB \
  --disable-modelica3d \
  --disable-omshell-terminal \
  --without-paradiseo \
  --disable-rml-trace \
  --with-lapack="-llapack -lblas" \
  --with-METIS=/usr \
  --with-qwt \
  --with-BOOST \
  --disable-python-interface
 
make -j2 NOLIBRARIES=Yes all
make -j2 install DESTDIR=$PKG

find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

mv $PKG/usr/share/man $PKG/usr
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a *.txt COPYING REVISION $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc

mkdir -p $PKG/usr/share/applications
mkdir -p $PKG/usr/share/pixmaps
cp ./OMEdit/OMEditGUI/Resources/icons/omedit.png $PKG/usr/share/pixmaps/omedit.png
cp ./OMNotebook/OMNotebookGUI/Resources/OMNotebook_icon.svg $PKG/usr/share/pixmaps/OMNotebook_icon.svg
cp ./OMShell/OMShellGUI/Resources/omshell-large.svg $PKG/usr/share/pixmaps/omshell-large.svg

cat <<EOF > $PKG/usr/share/applications/omedit.desktop
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=OMEdit
GenericName=Physical modeling and simulation tool
Comment=A Modelica connection editor
TryExec=OMEdit
Exec=OMEdit %f
Icon=/usr/share/pixmaps/omedit.png
Terminal=false
Type=Application
StartupNotify=true
Categories=Development;Education;Science;Math;
MimeType=text/x-onb;application/x-omnotebook;
EOF

cat <<EOF > $PKG/usr/share/applications/omnotebook.desktop
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=OMNotebook
GenericName=Physical modeling and simulation tool
Comment=An open-source software tool for an electronic notebook\nsupporting Modelica.
TryExec=OMNotebook
Exec=OMNotebook %f
Icon=/usr/share/pixmaps/OMNotebook_icon.svg
Terminal=false
Type=Application
StartupNotify=true
Categories=Development;Education;Science;Math;
MimeType=text/x-onb;application/x-omnotebook;
EOF

cat <<EOF > $PKG/usr/share/applications/omshell.desktop
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=OMShell
GenericName=Physical modeling and simulation tool
Comment=A complete Modelica modeling, compilation and simulation environment based on free software.
TryExec=OMShell
Exec=OMShell
Icon=/usr/share/pixmaps/omshell-large.svg
Terminal=false
Type=Application
StartupNotify=true
Categories=Development;IDE;
EOF

cd $PKG
fakeroot /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
#---------------------------------------------------------------------------------------------------------------------------

There are 0 guests and 0 other users also viewing this topic
You are here: