9

I am trying to run an executable on Linux Mint 16 x64 that was compiled for Ubuntu 12 x64. The executable uses Qt 5.1.1 dynamically during runtime. I get the error:

loaded the dummy plugin 
loaded the Linux plugin 
updating server status 
./executableName: symbol lookup error: ./executableName: undefined symbol: _ZN18QXmlDefaultHandlerC2Ev

When I run

ldd executableName | grep "not found"

searching for missing dependencies I get no result; all dynamic dependencies seem to be found, but the undefined symbol error above persists.

Thoughts?

peterh
  • 11,875
  • 18
  • 85
  • 108
Daniel Arnett
  • 493
  • 2
  • 8
  • 18

2 Answers2

25

A quick help:

$ echo _ZN18QXmlDefaultHandlerC2Ev|c++filt
QXmlDefaultHandler::QXmlDefaultHandler()

Thus, you don't have a constructor for QXmlDefaultHandler. Googling for that we can found here, that at least Qt-4.8 and Qt-5.3 contains this library.

I think, there is some type of incompatibility between your actual running Qt library and between for which the executable was compiled for. My suggestion were to recompile that executable from source, but on your mint.

It is not impossible, that porting the source package from ubuntu will be a little bit hard for you, in this case I suggest a simple upstream source recompilation (or even binary download, if there is one).

peterh
  • 11,875
  • 18
  • 85
  • 108
  • 1
    @peterh: I have a similar problem which says `tsk_img_open_sing` function of `sleuthkit` library as `undefined symbol`. I have included `libtsk.h` and `echo tsk_img_open_sing|c++filt` gives output as `tsk_img_open_sing`. Why is it so? – Jackzz Jul 10 '15 at 06:20
  • @Jackz `c++filt` is needed only to convert cryptic c++ function names to their c++ form (normal binaries can't have X::~X() and similar function names, this is why it is needed.). But this is a C function, so c++filt isn't needed. `nm --dynamic /path/to/sleuthkit.so` says which function names are exported by this library, your sleuthkit.so must contain that. If not, there is a problem with your sleuthkit. If yet, then probably this sleuthkit library can't be found somehow by your compiler. – peterh Jul 10 '15 at 13:17
  • @Jackz Better if you ask this in a new question, and then refer me here into that in a comment. So I could write a clear answer, and you could upvote me. :-) – peterh Jul 10 '15 at 13:18
3

You can't run Ubuntu binaries on Mint like that; binaries are generally not binary-compatible between distributions. Can you find a Mint build? If not, you'll have to build it yourself.

C. K. Young
  • 219,335
  • 46
  • 382
  • 435
  • 3
    *"binaries are generally not binary-compatible between distributions"*: that is *generally* not true. I regularly run binaries compiled on other distributions - if the right versions of the right libraries are there, executables often work without a problem... – thkala Aug 08 '14 at 17:28
  • I agree that something compiled for a Fedora based OS might have trouble executing on say Debian, but considering Mint is a [fork off of Ubuntu](http://distrowatch.com/table.php?distribution=mint), Ubuntu binaries often can be coaxed into executing. I do agree though that if I had source for my particular problem that building for Mint would be a better solution. – Daniel Arnett Aug 08 '14 at 17:50
  • 1
    Yes, but the greatest difference between Mint and Ubuntu that Mint is based on KDE. Probably it has its own Qt distro, which differs a lot from the Ubuntu one (for example, some of its help libs to the Qt are distributed in separate packages). – peterh Aug 10 '14 at 13:44