Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mathematica 8.0
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Gh0str1d3r
Guru
Guru


Joined: 27 May 2008
Posts: 411

PostPosted: Thu Nov 25, 2010 3:41 pm    Post subject: mathematica 8.0 Reply with quote

Hi,

I just installed the latest version of mathematica on my Gentoo computer, but I can't
manage to start it. I get the following error message:

Code:
/usr/local/Wolfram/Mathematica/8.0/SystemFiles/FrontEnd/Binaries/Linux-x86-64/Mathematica: symbol lookup error: /usr/lib64/qt4/libQtDBus.so.4: undefined symbol: _ZN9QMetaType15registerTypedefEPKci


Can anybody tell me what this could mean? I can't find anything useful with google...
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2584
Location: userland

PostPosted: Thu Nov 25, 2010 3:58 pm    Post subject: Reply with quote

Your qt version is not recent enough. The function QMetaType::registerTypedef is not implemented in qt-4.6.3 (I searched the sources), however it seems to be present in my qt-wayland-9999 dev build. You might want to check out qt-4.7.1, it probably already has it (although online docs say it doesn't). You could also check the installer script for an option to install a new set of qt libs along with mathematica (for mathematica use only).
Back to top
View user's profile Send private message
Gh0str1d3r
Guru
Guru


Joined: 27 May 2008
Posts: 411

PostPosted: Thu Nov 25, 2010 4:28 pm    Post subject: Reply with quote

I am using Qt-4.7.1. Is there a newer version?
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2584
Location: userland

PostPosted: Thu Nov 25, 2010 4:46 pm    Post subject: Reply with quote

Gh0str1d3r wrote:
I am using Qt-4.7.1. Is there a newer version?

Ah. So the function is not there, at least it is not built. Can you unpack the qt source and run
Code:
grep -iR registertypedef *

in the source tree? If you get no hits, the function is not there. If you do, you probably need different build parameters (i. e. USE flags) for Qt to support it.
Back to top
View user's profile Send private message
Gh0str1d3r
Guru
Guru


Joined: 27 May 2008
Posts: 411

PostPosted: Thu Nov 25, 2010 5:01 pm    Post subject: Reply with quote

I found an interesting discussion where someone had a similar problem with QtCreator.

In the end, the solution was that LD_LIBRARY_PATH needs to be empty. I guess that this is the problem in the
mathematica startup routine, which looks like that:

Code:
#!/bin/sh
#
#  Mathematica 8.0 Front End command file
#  Copyright 1988-2010 Wolfram Research, Inc.

#  Make certain that ${PATH} includes /usr/bin and /bin
PATH="/usr/bin:/bin:${PATH}"




XLIB_SKIP_ARGB_VISUALS=1
export XLIB_SKIP_ARGB_VISUALS

#  Determine the SystemID by examining the output of `uname -s` and
#  `uname -m`. Failsafe to SystemIDList=Unknown.
if [ -z "${SystemIDList}" ]; then
   case `uname -s` in
      Linux)
         case `uname -m` in
            i?86)
               SystemIDList="Linux";;
            x86_64)
               SystemIDList="Linux-x86-64 Linux";;
            *)
               SystemIDList="Unknown";;
         esac;;
      *)
         SystemIDList="Unknown";;
   esac
fi

#  Find the full pathname and name of this script.
Script="${0}"
ProgramName=`basename "${0}"`

#  If ${SystemIDList} = Unknown, print an error message and exit
if [ "${SystemIDList}" = "Unknown" ]; then
   echo "${ProgramName} cannot determine operating system."
   exit 1
fi

#  Test to see if the script is being called via a symlink, if so, examine
#  the output of ls -l on the symlink to find the link target. Reset
#  ${Script}.
LinkDirectory=`pwd`
while `exec test -L "${Script}"`; do
   ScriptDirectory=`dirname "${Script}"`
   Script=`ls -l "${Script}" | sed -e 's/.*-> //g'`
   cd "${ScriptDirectory}"
done
ScriptDirectory=`dirname "${Script}"`
ScriptDirectory=`cd "${ScriptDirectory}"; pwd`
cd "${LinkDirectory}"

#  Determine $TopDirectory by removing "Executables" from
#  "${ScriptDirectory}".
ScriptLeafDirectory="Executables"
TopDirectory=`cd "${ScriptDirectory}"; pwd | \
   sed -e 's/\/'"${ScriptLeafDirectory}"'//g'`

#  Reset $PATH to include Mathematica and X11 directories
if [ -d "/usr/bin/X11" ]; then
    PATH="${PATH}:/usr/bin/X11"
fi
if [ -d "/usr/openwin/bin" ]; then
    PATH="/usr/openwin/bin:${PATH}"
fi
PATH="${TopDirectory}/${ScriptLeafDirectory}:${PATH}"
export PATH

#  Determine which X display is being used.
userDisplay=`echo "$@" | \
    sed 's/.*-display \{1,\}.*:[^ ]\{1,\}.*/setting user display/'`
if [ "${userDisplay}" = "setting user display" ]
then
    userDisplay=`echo "$@" | sed 's/.*\(-display[ ]*[^ ]*\).*/\1/'`
else
    userDisplay=""
fi

#  Check SystemID and Mathematica location
for SystemID in $SystemIDList; do
   MathematicaPath="${TopDirectory}/SystemFiles/FrontEnd/Binaries/${SystemID}"
   MathematicaFE="${MathematicaPath}/Mathematica"
   if [ ! -x "${MathematicaFE}" ]; then
      fail=1
      continue
   else
      fail=0
      break
   fi
done
if [ ! "${fail}" = "0" ] ; then
   for SystemID in $SystemIDList; do
      MathematicaPath="${TopDirectory}/SystemFiles/FrontEnd/Binaries/${SystemID}"
      MathematicaFE="${MathematicaPath}/Mathematica"
      echo "Mathematica front end executable"
      echo "${MathematicaFE}"
      echo "not found. Your Mathematica installation may be incomplete"
      echo "or corrupted."
   done
       exit 1
fi

# Check for the -mesa flag and remove it from the argument list.
mesa=`echo "$@" | tr ' ' '\n' | grep '^-[Mm][Ee][Ss][Aa]$'`

# Check for version 6.7 of Xlib.
XDpyInfo=`xdpyinfo ${userDisplay} 2> /dev/null`
VendorStringMatch=`echo ${XDpyInfo} | grep -i "Vendor string:" | \
   grep -i "The X.Org Foundation"`
VendorRelNum=`echo ${XDpyInfo} | grep -i "Vendor release number:" | \
   grep -i "60700000"`
if [ -n "${VendorStringMatch}" -a -n "${VendorRelNum}" ]; then
   mesa="-mesa"
fi

# Set up library paths
M_LIBRARY_PATH="${TopDirectory}/SystemFiles/Libraries/${SystemID}"
SED_LIBRARY_PATH=`echo "${M_LIBRARY_PATH}" | sed -e 's/\\//\\\\\//g'`

# Check for GL and GLU version
GLTest="env LD_LIBRARY_PATH=${M_LIBRARY_PATH} SHLIB_PATH=${M_LIBRARY_PATH} LIBPATH=${M_LIBRARY_PATH} ${TopDirectory}/SystemFiles/FrontEnd/Binaries/${SystemID}/gltest"
GLTestResult=`${GLTest} 1 1 1 2 ${userDisplay}  2> /dev/null | grep "GLTest_OK"`
if [ -z "${GLTestResult}" ]; then
   mesa="-mesa"
fi

SHLIB_PATH=`echo "${SHLIB_PATH}" | \
   sed -e 's/^'"${SED_LIBRARY_PATH}"'://g' | \
   sed -e 's/:'"${SED_LIBRARY_PATH}"':/:/g' | \
   sed -e 's/:'"${SED_LIBRARY_PATH}"'$//g' | \
   sed -e 's/^'"${SED_LIBRARY_PATH}"'$//g' | \
   sed -e 's/::/:/g' | sed -e 's/:$//'`
if [ -z "${SHLIB_PATH}" ]; then
   SHLIB_PATH="${M_LIBRARY_PATH}"
else
   SHLIB_PATH="${M_LIBRARY_PATH}:${SHLIB_PATH}"
fi
if [ "${mesa}" = "-mesa" ]; then
   SHLIB_PATH="${SHLIB_PATH}:${M_LIBRARY_PATH}/Mesa"
fi
export SHLIB_PATH

LIBPATH=`echo "${LIBPATH}" | \
   sed -e 's/^'"${SED_LIBRARY_PATH}"'://g' | \
   sed -e 's/:'"${SED_LIBRARY_PATH}"':/:/g' | \
   sed -e 's/:'"${SED_LIBRARY_PATH}"'$//g' | \
   sed -e 's/^'"${SED_LIBRARY_PATH}"'$//g' | \
   sed -e 's/::/:/g' | sed -e 's/:$//'`
if [ -z "${LIBPATH}" ]; then
   LIBPATH="${M_LIBRARY_PATH}"
else
   LIBPATH="${M_LIBRARY_PATH}:${LIBPATH}"
fi
if [ "${mesa}" = "-mesa" ]; then
   LIBPATH="${LIBPATH}:${M_LIBRARY_PATH}/Mesa"
fi
export LIBPATH

LD_LIBRARY_PATH=`echo "${LD_LIBRARY_PATH}" | \
   sed -e 's/^'"${SED_LIBRARY_PATH}"'://g' | \
   sed -e 's/:'"${SED_LIBRARY_PATH}"':/:/g' | \
   sed -e 's/:'"${SED_LIBRARY_PATH}"'$//g' | \
   sed -e 's/^'"${SED_LIBRARY_PATH}"'$//g' | \
   sed -e 's/::/:/g' | sed -e 's/:$//'`
if [ -z "${LD_LIBRARY_PATH}" ]; then
        LD_LIBRARY_PATH="${M_LIBRARY_PATH}"
else
        LD_LIBRARY_PATH="${M_LIBRARY_PATH}:${LD_LIBRARY_PATH}"
fi
if [ "${mesa}" = "-mesa" ]; then
        LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${M_LIBRARY_PATH}/Mesa"
fi

echo $LD_LIBRARY_PATH
export LD_LIBRARY_PATH

# Setup QT Plugin path
#QT_PLUGIN_PATH="${M_LIBRARY_PATH}/Qt-Plugins"
#export QT_PLUGIN_PATH

# Handle -singleLaunch before we bother making a fontconfig file...
singlelaunch=`echo "$@" | tr ' ' '\n' | grep '^--single[lL]aunch$'`
simplesl=`echo "$@" | tr ' ' '\n' | grep '^-[sS][lL]$'`
if [ "${singlelaunch}" ] || [ "${simplesl}" ]; then
   # check for existing FE
   sicheck="${TopDirectory}/SystemFiles/FrontEnd/Binaries/${SystemID}/sicheck"
   sicheckresult=`${sicheck} -p`

   if [ "${sicheckresult}" = 'FE_FOUND' ]; then
      # remove any additional options and -singleLaunch
      filelist=`echo "$@" | sed -e 's/-[a-zA-Z]*//g'`

      # send the FE the files
      sicheckresult=`${sicheck} -l "${filelist}"`
      if [ "${sicheckresult}" = 'FE_FOUND' ]; then
         exit 0
      else
         echo "Unable to launch in existing process'${0} $@.'"
         exit 1
      fi
   fi
fi

#  Append Mathematica font directories to system font directory list
ORIG_FONTCONFIG_FILE="/etc/fonts/fonts.conf"
if [ -f "${ORIG_FONTCONFIG_FILE}" ]; then
   
    TMP_FONTCONFIG_FILE="/tmp/fonts$$.conf"
   
    sed '
    /<fontconfig>/ a\
    <!-- \
    \ Mathematica font directories \
    --> \
    \       <dir>'"${TopDirectory}"'\/SystemFiles\/Fonts\/TTF<\/dir> \
    \       <dir>'"${TopDirectory}"'\/SystemFiles\/Fonts\/Type1<\/dir> \
    \
   \       <match target="pattern"> \
    \          <edit name="prefer_bitmap"> \
   \            <bool>false</bool> \
   \         </edit> \
     \      </match> \
    \
    ' ${ORIG_FONTCONFIG_FILE} > ${TMP_FONTCONFIG_FILE}
   
    FONTCONFIG_FILE="${TMP_FONTCONFIG_FILE}"
    export FONTCONFIG_FILE
   
fi

#  set espeak data directory
ESPEAK_DATA="${TopDirectory}/SystemFiles/FrontEnd/SystemResources/X/espeak-data"
export ESPEAK_DATA

"${MathematicaFE}" -topDirectory "${TopDirectory}" "$@"

rm -rf "${TMP_FONTCONFIG_FILE}"


When I remove the lines with LD_LIBRARY_PATH, I get a different error message:

Code:
/usr/local/Wolfram/Mathematica/8.0/SystemFiles/FrontEnd/Binaries/Linux-x86-64/Mathematica: error while loading shared libraries: libaspell.so.1: cannot open shared object file: No such file or directory


Apparently, I now can't find the mathematica libraries any more (the required lib is located in
Code:
/usr/local/Wolfram/Mathematica/8.0/SystemFiles/Libraries/Linux-x86-64/libaspell.so.1
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2584
Location: userland

PostPosted: Thu Nov 25, 2010 5:17 pm    Post subject: Reply with quote

Not sure if that is better or worse. But I just found that Mathematica does indeed come with its own set of Qt libs in directory SystemFiles/Libraries/Linux-x86-64 (not sure why it wants to use your already installed ones at all...). If you have Qt libs lying around there, you should make sure that this directory gets included in your LD_LIBRARY_PATH, before or better instead of /usr/lib/qt4, as this will override the usage of your own versions. Try to include
Code:
echo $LD_LIBRARY_PATH

after
Code:
export LD_LIBRARY_PATH

to check what path is really set by the script.
Back to top
View user's profile Send private message
Gh0str1d3r
Guru
Guru


Joined: 27 May 2008
Posts: 411

PostPosted: Thu Nov 25, 2010 5:26 pm    Post subject: Reply with quote

yes, it is set:

Code:
echo $LD_LIBRARY_PATH
/usr/local/Wolfram/Mathematica/8.0/SystemFiles/Libraries/Linux-x86-64


and this gives the above mentioned error message.
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2584
Location: userland

PostPosted: Thu Nov 25, 2010 5:41 pm    Post subject: Reply with quote

I don't see why it does try to pick up /usr/lib/qt4/libQt* then...
Edit: Wait, I know... that path is in /etc/ld.so.conf... better not mess this one up...

What happens if you add
Code:
export LD_LIBRARY_PRELOAD=/usr/local/Wolfram/Mathematica/8.0/SystemFiles/Libraries/Linux-x86-64

(forces precedence for libs in that directory) after
Code:
export LD_LIBRARY_PATH

?
Edit2: Scratch that, just look at the description of LD_PRELOAD in
Code:
man ld.so

It should do what you need to work around this.

And what I just thought of: Are the libraries in /usr/local/Wolfram/Mathematica/8.0/SystemFiles/Libraries/Linux-x86-64 readable and executable for your user?
Back to top
View user's profile Send private message
Gh0str1d3r
Guru
Guru


Joined: 27 May 2008
Posts: 411

PostPosted: Thu Nov 25, 2010 6:29 pm    Post subject: Reply with quote

I am not sure I understand this command. I included all *Qt* libs from the Library path
of this software, ie

Code:
LD_PRELOAD="/usr/local/Wolfram/Mathematica/8.0/SystemFiles/Libraries/Linux-x86-64/libQtSvg.so.4 /usr/local/Wolfram/Mathematica/8.0/SystemFiles/Libraries/Linux-x86-64/libQtGui.so.42 /usr/local/Wolfram/Mathematica/8.0/SystemFiles/Libraries/Linux-x86-64/libQt3Support.so.4 /usr/local/Wolfram/Mathematica/8.0/SystemFiles/Libraries/Linux-x86-64/libQtXml.so.4 /usr/local/Wolfram/Mathematica/8.0/SystemFiles/Libraries/Linux-x86-64/libQtNetwork.so.4 /usr/local/Wolfram/Mathematica/8.0/SystemFiles/Libraries/Linux-x86-64/libQtCore.so.4 /usr/local/Wolfram/Mathematica/8.0/SystemFiles/Libraries/Linux-x86-64/libQtSql.so.4"
export LD_PRELOAD


and removed everything containing LD_LIBRARY_PATH (otherwise I still get the old error).

Now, it complains:

Code:
ERROR: ld.so: object '/usr/local/Wolfram/Mathematica/8.0/SystemFiles/Libraries/Linux-x86-64/libQtGui.so.42' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/local/Wolfram/Mathematica/8.0/SystemFiles/Libraries/Linux-x86-64/libQtGui.so.42' from LD_PRELOAD cannot be preloaded: ignored.
tr: symbol lookup error: /usr/lib/qt4/libQtGui.so.4: undefined symbol: _ZN24QAbstractDeclarativeData9destroyedE
grep: symbol lookup error: /usr/lib/qt4/libQtGui.so.4: undefined symbol: _ZN24QAbstractDeclarativeData9destroyedE
ERROR: ld.so: object '/usr/local/Wolfram/Mathematica/8.0/SystemFiles/Libraries/Linux-x86-64/libQtGui.so.42' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/local/Wolfram/Mathematica/8.0/SystemFiles/Libraries/Linux-x86-64/libQtGui.so.42' from LD_PRELOAD cannot be preloaded: ignored.
grep: symbol lookup error: /usr/lib/qt4/libQtGui.so.4: undefined symbol: _ZN24QAbstractDeclarativeData9destroyedE
tr: symbol lookup error: /usr/lib/qt4/libQtGui.so.4: undefined symbol: _ZN24QAbstractDeclarativeData9destroyedE
ERROR: ld.so: object '/usr/local/Wolfram/Mathematica/8.0/SystemFiles/Libraries/Linux-x86-64/libQtGui.so.42' from LD_PRELOAD cannot be preloaded: ignored.
sed: symbol lookup error: /usr/lib/qt4/libQtGui.so.4: undefined symbol: _ZN24QAbstractDeclarativeData9destroyedE
ERROR: ld.so: object '/usr/local/Wolfram/Mathematica/8.0/SystemFiles/Libraries/Linux-x86-64/libQtGui.so.42' from LD_PRELOAD cannot be preloaded: ignored.
/usr/local/Wolfram/Mathematica/8.0/SystemFiles/FrontEnd/Binaries/Linux-x86-64/Mathematica: error while loading shared libraries: libaspell.so.1: cannot open shared object file: No such file or directory
ERROR: ld.so: object '/usr/local/Wolfram/Mathematica/8.0/SystemFiles/Libraries/Linux-x86-64/libQtGui.so.42' from LD_PRELOAD cannot be preloaded: ignored.
rm: symbol lookup error: /usr/lib/qt4/libQtGui.so.4: undefined symbol: _ZN24QAbstractDeclarativeData9destroyedE
Back to top
View user's profile Send private message
mnagl
n00b
n00b


Joined: 05 Jul 2003
Posts: 25

PostPosted: Fri Feb 18, 2011 11:07 am    Post subject: Reply with quote

For me the problem was solved by simply copying libQtDBus.so.4.6.3 from another 64-bit Gentoo installation (with stable Qt) to /usr/local/Wolfram/Mathematica/8.0/SystemFiles/Libraries/Linux-x86-64/libQtDBus.so.4
Back to top
View user's profile Send private message
Lustmored
Apprentice
Apprentice


Joined: 28 May 2010
Posts: 206
Location: Poland

PostPosted: Fri Feb 18, 2011 11:30 pm    Post subject: Reply with quote

I have Mathematica 8 working here out of box, without actually doing any hacks. I have ~amd64 system.

I can provide any useful info about my system to help you find out what's the difference, so simply ask if you'd like to know anything (I dunno what might be useful by myself, sorry)
Back to top
View user's profile Send private message
DirtyHairy
l33t
l33t


Joined: 03 Jul 2006
Posts: 608
Location: Würzburg, Deutschland

PostPosted: Mon May 16, 2011 11:50 am    Post subject: Reply with quote

Just for the record: I just ran into this problem with Mathematica 8 on a 32 bit machine after upgrading to KDE 4.6 and QT 4.7 and successfully solved it by removing the QT libraries shipped with Mathematica, forcing it to link against the system ones.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum