Cannot compute Inventor representation for the shape of...

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
jagaudin
Posts: 3
Joined: Wed Jul 01, 2009 4:29 pm

Cannot compute Inventor representation for the shape of...

Post by jagaudin »

Hi !
I'm coming to my freeCAD activity after a few month looking for a flat and settling in. Well, I'm in trouble with both two version I've compiled, one which is two month old and the newest one. When I load a file or draw anything with the draft module I get the following error :

Code: Select all

Cannot compute Inventor representation for the shape of Line
Does someone know what I've done wrong since I've been using freeCAD for the last time ?

Cheers,
Jacques-Antoine
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Cannot compute Inventor representation for the shape of...

Post by yorik »

Hi Jacques-Antoine,
Cool to see you, how is London?
There are many people who had that error recently... Probably something to do with different libraries version, or something like that
What system are you running? Did you upgrade recently?
jagaudin
Posts: 3
Joined: Wed Jul 01, 2009 4:29 pm

Re: Cannot compute Inventor representation for the shape of...

Post by jagaudin »

Hi yorik,
Well London is a very nice city, a bit hot at the moment...
I'm running Ubuntu 8.04 iX86 32 bit and haven't upgraded recently neither have I made major changes in my package installed.
I've checked prerequisite section in the readme file of the source and everything is up to date.
That's a bit confusing. Well I'll try to fix it maybe starting from scratch...

Thanks
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Cannot compute Inventor representation for the shape of...

Post by wmayer »

Hi everybody,

we had this problem in the recent past quite often on 64-bit platforms in combination with the 64-bit package of OpenCascade. Internally there is used the _OCC64 define which must be set when building the OCC libs and also must bet set for all applications that link the OCC libs. Only on Debian-based system this is not needed because the package maintainer(s) have fixed that issue on the .deb packages. If the user compiled the sources and forgot that flag FreeCAD reported the error message you mentioned before it crashed. Today I have fixed this on our configure script to set this define automatically on 64-bit platform. Hope this works!

So, this only happened on 64-bit platforms. That it now also happens on a 32-bit platform that's new to me. Did you do a complete rebuild before? If it still happens please run gdb which is always a good friend reporting some useful information :)

Cheers,
Werner
Jacques-Antoine Gaudin

Re: Cannot compute Inventor representation for the shape of...

Post by Jacques-Antoine Gaudin »

Hi there,
I got nothing really interesting running freeCAD with gdb. Hope I did it well...
So I've tried solving my problem with inventor by compiling Qt4, Coin, SoQt4 but I run into an error while ./configure with my qt4 specific installation (4.5.2) :

Code: Select all

checking for Qt >= 4.1... configure: error: Version of Qt4 found but < 4.1
The log file reports :

Code: Select all

configure:25254: checking for Qt >= 4.1
configure:25309: /usr/local/Trolltech/Qt-4.5.2/bin/moc myqt.h -o moc_myqt.cpp
configure:25312: $? = 0
configure:25321: g++ -I/usr/local/Trolltech/Qt-4.5.2/include -I/usr/local/Trolltech/Qt-4.5.2/include/Qt3Support -I/usr/local/Trolltech/Qt-4.5.2/include/QtGui -I/usr/local/Trolltech/Qt-4.5.2/include/QtCore -I/usr/local/Trolltech/Qt-4.5.2/include/QtOpenGL -I/usr/local/Trolltech/Qt-4.5.2/include/QtNetwork -I/usr/local/Trolltech/Qt-4.5.2/include/QtSvg -I/usr/local/Trolltech/Qt-4.5.2/include/QtXml -I/usr/local/Trolltech/Qt-4.5.2/include/QtUiTools  -c -g -O2 -o moc_myqt.o moc_myqt.cpp
configure:25324: $? = 0
configure:25333: g++ -I/usr/local/Trolltech/Qt-4.5.2/include -I/usr/local/Trolltech/Qt-4.5.2/include/Qt3Support -I/usr/local/Trolltech/Qt-4.5.2/include/QtGui -I/usr/local/Trolltech/Qt-4.5.2/include/QtCore -I/usr/local/Trolltech/Qt-4.5.2/include/QtOpenGL -I/usr/local/Trolltech/Qt-4.5.2/include/QtNetwork -I/usr/local/Trolltech/Qt-4.5.2/include/QtSvg -I/usr/local/Trolltech/Qt-4.5.2/include/QtXml -I/usr/local/Trolltech/Qt-4.5.2/include/QtUiTools  -c -g -O2 -o myqt.o myqt.cpp
configure:25336: $? = 0
configure:25347: g++ -L/usr/local/Trolltech/Qt-4.5.2/lib -lQtCore  -o myqt myqt.o moc_myqt.o
configure:25350: $? = 0
configure:25358: ./myqt
./myqt: symbol lookup error: ./myqt: undefined symbol: _Z13qFlagLocationPKc
configure:25361: $? = 127
configure:25366: error: Version of Qt4 found but < 4.1
Can I use this version of Qt4 to compile FreeCAD ?
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Cannot compute Inventor representation for the shape of...

Post by wmayer »

Hi,

very interesting bug. Basically FreeCAD should also work together with 4.5.x, of course.

During the configure a small Qt test application is created which should return the version number. For any reason this test application isn't correctly built and when trying to start it the message "undefined symbol: _Z13qFlagLocationPKc" comes up. Would be interesting what library is missing here.

The source code of the test application is:
myqt.h

Code: Select all

#include <QObject>
class Test : public QObject
{
Q_OBJECT
public:
  Test() {}
  ~Test() {}
public slots:
  void receive() {}
signals:
  void send();
};
myqt.cpp

Code: Select all

#include "myqt.h"
#include <QCoreApplication>
#include <QByteArray>
#include <QGlobalStatic>
#include <QStringList>
#include <stdio.h>
#include <stdlib.h>
int main( int argc, char **argv )
{
  QCoreApplication app( argc, argv );
  Test t;
  QObject::connect( &t, SIGNAL(send()), &t, SLOT(receive()) );

  // major, minor, patch
  QString version = "$min_qt_version";
  QStringList numbers = version.split('.');

  int shift[[3]] = {16,8,0};
  int minversion = 0, i = 0;
  for (QStringList::ConstIterator it = numbers.begin(); it != numbers.end(); ++it, ++i) {
    bool ok;
    int val = (*it).toInt(&ok);
    if (ok) {
      minversion = minversion + (val << shift[[i]]);
    }
  }

  exit(QT_VERSION < minversion);
}
To build the application follow these steps:
* moc myqt.h -o moc_myqt.cpp
* g++ -I/usr/local/Trolltech/Qt-4.5.2/include -I/usr/local/Trolltech/Qt-4.5.2/include/QtCore -c -g -O2 -o moc_myqt.o moc_myqt.cpp
* g++ -I/usr/local/Trolltech/Qt-4.5.2/include -I/usr/local/Trolltech/Qt-4.5.2/include/QtCore -c -g -O2 -o myqt.o myqt.cpp
* g++ -L/usr/local/Trolltech/Qt-4.5.2/lib -lQtCore -o myqt myqt.o moc_myqt.o
* ./myqt

If it fails then add the other Qt libs step by step. If it works please tell me which one this is.

Cheers,
Werner
jagaudin
Posts: 3
Joined: Wed Jul 01, 2009 4:29 pm

Re: Cannot compute Inventor representation for the shape of...

Post by jagaudin »

Hi Werner.

thanks for the quick answer. I've tried what you told without results, so I've been thinking there was something wrong with my own system. Indeed, I used to have an older version (4.4.0) of qt4 in /usr/share/qt4 and my newest one in /usr/local/...
So I've updated my version in /usr/share/qt4 to match the one I've compiled recently.
No everything works nice ! :D
I think the problem was that when executing this little test, my system was looking for librairies in the 4.4.0 version although I had set the LD_LIBRAIRY_PATH to point to the newest one.
Sorry for that. :oops:

Cheers,
Jacques
Post Reply