How to link shared library against alternate version of libGL? - opengl

I built a local version of OpenGL under my home directory. I want to link another shared library against it, but for some reason the linker still links it against the one under /usr/lib, as reported by ldd:
$ cc -o lib/libtfont.so -shared -Wl,-soname,/home/wknight/proj/wkl/tfont.lib/lib/libtfont.so tfont.o -L/home/wknight/proj/wkl/img.lib/lib -limg -L/home/wknight/swtools/opengl/lib -lGL -lGLU
$ ldd lib/libtfont.so
linux-gate.so.1 => (0xb7710000)
/home/wknight/proj/wkl/img.lib/lib/libimg.so (0xb76fc000)
libGL.so.1 => /usr/lib/libGL.so.1 (0xb7689000)
libGLU.so.1 => /usr/lib/libGLU.so.1 (0xb7618000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb74d1000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb73b4000)
libXext.so.6 => /usr/lib/libXext.so.6 (0xb73a5000)
libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xb73a0000)
libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb739c000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb7397000)
libdrm.so.2 => /usr/lib/libdrm.so.2 (0xb738d000)
libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7367000)
libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb734e000)
libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7349000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7254000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7236000)
/lib/ld-linux.so.2 (0xb7711000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb721d000)
librt.so.1 => /lib/i686/cmov/librt.so.1 (0xb7214000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb7211000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb720b000)
$ ls -l /home/wknight/swtools/opengl/lib/libGL*
lrwxrwxrwx 1 wknight wknight 10 Jan 25 16:57 /home/wknight/swtools/opengl/lib/libGL.so -> libGL.so.1
lrwxrwxrwx 1 wknight wknight 12 Jan 25 16:57 /home/wknight/swtools/opengl/lib/libGL.so.1 -> libGL.so.1.2
-rwxr-xr-x 1 wknight wknight 1836469 Jan 25 16:57 /home/wknight/swtools/opengl/lib/libGL.so.1.2
lrwxrwxrwx 1 wknight wknight 11 Jan 25 16:57 /home/wknight/swtools/opengl/lib/libGLU.so -> libGLU.so.1
lrwxrwxrwx 1 wknight wknight 20 Jan 25 16:57 /home/wknight/swtools/opengl/lib/libGLU.so.1 -> libGLU.so.1.3.070900
-rwxr-xr-x 1 wknight wknight 1634905 Jan 25 16:57 /home/wknight/swtools/opengl/lib/libGLU.so.1.3.070900
lrwxrwxrwx 1 wknight wknight 11 Jan 25 16:57 /home/wknight/swtools/opengl/lib/libGLw.so -> libGLw.so.1
lrwxrwxrwx 1 wknight wknight 15 Jan 25 16:57 /home/wknight/swtools/opengl/lib/libGLw.so.1 -> libGLw.so.1.0.0
-rwxr-xr-x 1 wknight wknight 37068 Jan 25 16:57 /home/wknight/swtools/opengl/lib/libGLw.so.1.0.0
$
This happens even if I rename my local version of libGL.so and link against the new name. So something is happening behind the scenes that I don't understand. Is the linker looking in ld.so.cache or something? How can I override it?

I found the answer - I just needed to set LD_LIBRARY_PATH to my local version of libGL.so:
$ export LD_LIBRARY_PATH=$HOME/swtools/opengl/lib
$ ldd lib/libtfont.so
linux-gate.so.1 => (0xb778c000)
/home/wknight/proj/wkl/img.lib/lib/libimg.so (0xb7778000)
libGL.so.1 => /home/wknight/swtools/opengl/lib/libGL.so.1 (0xb771f000)
libGLU.so.1 => /home/wknight/swtools/opengl/lib/libGLU.so.1 (0xb76ae000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7559000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb743c000)
libXext.so.6 => /usr/lib/libXext.so.6 (0xb742d000)
libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb742a000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb7424000)
libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xb741f000)
libdrm.so.2 => /usr/lib/libdrm.so.2 (0xb7415000)
libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb73fc000)
libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb73f8000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7302000)
libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb72dc000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb72be000)
/lib/ld-linux.so.2 (0xb778d000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb72a5000)
librt.so.1 => /lib/i686/cmov/librt.so.1 (0xb729c000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb7299000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb7293000)
$
This now makes sense to me when I consider that ldd must use the runtime environment in reporting shared library dependencies, not just what is present in the shared library itself. I would have set LD_LIBRARY_PATH before using some executable linked against the shared library, but it didn't occur to me until now that I must also set it for examining the shared library itself.

I built a local version of OpenGL under my home directory
Why? What is your intention doing this? OpenGL is not so much a library, but a specification. What you built is most likely MesaGL. MesaGL does offer HW accelerated OpenGL only with a certain subset of drivers, which also must match your very MesaGL version. Without them, MesaGL will drop into a slow software rasterizer fallback.
As a general rule you always link your program dynamically to the system's libGL.so. If there's no libGL.so present shipping a fallback implementation makes sense only if you can deal with a very slow software rasterizer. Otherwise I'd be better to just inform the user about his systems shortcomings and that either a better GPU must be installed, or the driver installation fixed.
Anyway, if you want to change the path a library is searched in, you should look into the rpath linker flag.

Related

"rrdtool graph" command executes with no errors, but no file is created

I am trying to use rrdtool to store and graph the number of BGP updates per origin ASN. I am using the python-rrdtool package to create the RRD and populate it with data parsed from a historical CSV file.
The RRD gets created successfully and the updates seem to be stored correctly:
$ rrdtool fetch -e 1635077700 -s 1635074400 updates-2021-10-25-originas.rrd AVERAGE
45609 9829 4758 24560 134371 45769 45528 134033 134674 17439
1635074700: -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan
1635075000: 5.3247000000e+04 4.7140000000e+03 2.8530000000e+03 1.5900000000e+03 1.8880000000e+03 1.1760000000e+03 9.7800000000e+02 4.8300000000e+02 2.3500000000e+02 5.7900000000e+02
1635075300: 9.0302000000e+04 5.1010000000e+03 2.9060000000e+03 2.6160000000e+03 2.0000000000e+03 1.5190000000e+03 1.3270000000e+03 1.2370000000e+03 1.1120000000e+03 7.8500000000e+02
1635075600: 1.0403100000e+05 5.2270000000e+03 3.0260000000e+03 2.8990000000e+03 2.1260000000e+03 1.5740000000e+03 1.4100000000e+03 1.6890000000e+03 1.7640000000e+03 9.2000000000e+02
1635075900: 9.7802000000e+04 5.2220000000e+03 2.8260000000e+03 2.6140000000e+03 2.0850000000e+03 1.5500000000e+03 1.3400000000e+03 1.8530000000e+03 1.4570000000e+03 9.4600000000e+02
1635076200: 9.1486000000e+04 5.7090000000e+03 3.5840000000e+03 2.8870000000e+03 2.0980000000e+03 1.7810000000e+03 1.2890000000e+03 3.2900000000e+02 3.2900000000e+02 8.6100000000e+02
1635076500: 1.0457200000e+05 6.6210000000e+03 3.6170000000e+03 3.2040000000e+03 2.2840000000e+03 1.8300000000e+03 1.5070000000e+03 1.2450000000e+03 8.1600000000e+02 9.0700000000e+02
1635076800: 6.8104000000e+04 3.2830000000e+03 1.9570000000e+03 1.8700000000e+03 1.7000000000e+03 1.0960000000e+03 9.3700000000e+02 9.1100000000e+02 6.6900000000e+02 6.5600000000e+02
1635077100: 2.5433000000e+04 1.0370000000e+03 7.2600000000e+02 7.4800000000e+02 4.8600000000e+02 3.6000000000e+02 3.8400000000e+02 2.4200000000e+02 1.6900000000e+02 1.8300000000e+02
1635077400: -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan
1635077700: -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan
1635078000: -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan
When I attempt to generate the graph using the command line tool, the process exits with error code 0. But no graph appears to be generated:
$ ls -l
total 260469
-rwxrwxrwx 1 root root 385626 Oct 26 20:41 updates-2021-10-25-head100k.txt.bz2
-rwxrwxrwx 1 root root 7232 Oct 26 11:15 updates-2021-10-25-head1k.txt.bz2
-rwxrwxrwx 1 root root 3653614 Oct 26 23:19 updates-2021-10-25-head1m.txt.bz2
-rwxrwxrwx 1 root root 613376 Oct 27 10:14 updates-2021-10-25-originas.rrd
-rwxrwxrwx 1 root root 613376 Oct 27 10:14 updates-2021-10-25-prefix.rrd
-rwxrwxrwx 1 root root 53683974 Oct 26 18:00 updates-2021-10-25-report.txt
-rwxrwxrwx 1 root root 207761131 Oct 25 13:51 updates-2021-10-25.txt.bz2
$ rrdtool graph -e 1635077700 -s 1635074400 -a PNG updates-2021-10-25-originas.png DEF:45609=updates-2021-10-25-originas.rrd:45609:AVERAGE
$ echo $?
0
$ ls -l
total 260469
-rwxrwxrwx 1 root root 385626 Oct 26 20:41 updates-2021-10-25-head100k.txt.bz2
-rwxrwxrwx 1 root root 7232 Oct 26 11:15 updates-2021-10-25-head1k.txt.bz2
-rwxrwxrwx 1 root root 3653614 Oct 26 23:19 updates-2021-10-25-head1m.txt.bz2
-rwxrwxrwx 1 root root 613376 Oct 27 10:14 updates-2021-10-25-originas.rrd
-rwxrwxrwx 1 root root 613376 Oct 27 10:14 updates-2021-10-25-prefix.rrd
-rwxrwxrwx 1 root root 53683974 Oct 26 18:00 updates-2021-10-25-report.txt
-rwxrwxrwx 1 root root 207761131 Oct 25 13:51 updates-2021-10-25.txt.bz2
I've tried different combinations of command line switches like --imgformat, --height, --width, -t (for title), but nothing seems to work.
(The -s (start time) and -e (end time) switches are in "rrdtool fetch" and "rrdtool graph" to constrain the time period for which I have data.)
I'm running this on Ubuntu 20.04.3, with rrdtool installed from Canonical's repo.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
$ which rrdtool
/usr/bin/rrdtool
$ dpkg -S /usr/bin/rrdtool
rrdtool: /usr/bin/rrdtool
$ dpkg -l | grep rrdtool
ii python3-rrdtool:amd64 1.7.2-3build2 amd64 time-series data storage and display system (Python3 interface)
ii python3-rrdtool-dbg:amd64 1.7.2-3build2 amd64 time-series data storage and display system (Python3 debug interface)
ii rrdtool 1.7.2-3build2 amd64 time-series data storage and display system (programs)
Some answers I've googled indicated that rrdtool might not have all the libraries it needs. I checked that and everything seems to be okay, with one exception.
$ ldd /usr/bin/rrdtool
linux-vdso.so.1 (0x00007ffd299c6000)
librrd.so.8 => /lib/x86_64-linux-gnu/librrd.so.8 (0x00007f2dde736000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2dde713000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2dde521000)
libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f2dde4e9000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2dde39a000)
libdbi.so.1 => /lib/x86_64-linux-gnu/libdbi.so.1 (0x00007f2dde18a000)
libpangocairo-1.0.so.0 => /lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007f2dde176000)
libpango-1.0.so.0 => /lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007f2dde127000)
libgobject-2.0.so.0 => /lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f2dde0c7000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f2dddf9e000)
libcairo.so.2 => /lib/x86_64-linux-gnu/libcairo.so.2 (0x00007f2ddde7b000)
libxml2.so.2 => /lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f2dddcc1000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2dde7b2000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f2dddca3000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2dddc9d000)
libpangoft2-1.0.so.0 => /lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007f2dddc84000)
libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f2dddc3d000)
libfribidi.so.0 => /lib/x86_64-linux-gnu/libfribidi.so.0 (0x00007f2dddc20000)
libthai.so.0 => /lib/x86_64-linux-gnu/libthai.so.0 (0x00007f2dddc15000)
libharfbuzz.so.0 => /lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f2dddb0e000)
libffi.so.7 => /lib/x86_64-linux-gnu/libffi.so.7 (0x00007f2dddb02000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f2ddda8f000)
libpixman-1.so.0 => /lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007f2ddd9e8000)
libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f2ddd929000)
libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f2ddd924000)
libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f2ddd8f8000)
libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f2ddd8e9000)
libXrender.so.1 => /lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f2ddd6df000)
libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f2ddd5a2000)
libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007f2ddd58d000)
libicuuc.so.66 => /lib/x86_64-linux-gnu/libicuuc.so.66 (0x00007f2ddd3a7000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f2ddd37c000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f2ddd34e000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f2ddd345000)
libdatrie.so.1 => /lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007f2ddd33b000)
libgraphite2.so.3 => /lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f2ddd30e000)
libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f2ddd306000)
libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f2ddd2fe000)
libicudata.so.66 => /lib/x86_64-linux-gnu/libicudata.so.66 (0x00007f2ddb83d000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f2ddb65b000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f2ddb640000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f2ddb624000)
$ ls `ldd /usr/bin/rrdtool | sed -e 's/.*=>[ \t]*//' | sed -e 's/ (0x.*//'`
ls: cannot access 'linux-vdso.so.1': No such file or directory
/lib64/ld-linux-x86-64.so.2 /lib/x86_64-linux-gnu/libfribidi.so.0 /lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 /lib/x86_64-linux-gnu/libXau.so.6
/lib/x86_64-linux-gnu/libbsd.so.0 /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 /lib/x86_64-linux-gnu/libxcb-render.so.0
/lib/x86_64-linux-gnu/libcairo.so.2 /lib/x86_64-linux-gnu/libglib-2.0.so.0 /lib/x86_64-linux-gnu/libpcre.so.3 /lib/x86_64-linux-gnu/libxcb-shm.so.0
/lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libgobject-2.0.so.0 /lib/x86_64-linux-gnu/libpixman-1.so.0 /lib/x86_64-linux-gnu/libxcb.so.1
/lib/x86_64-linux-gnu/libdatrie.so.1 /lib/x86_64-linux-gnu/libgraphite2.so.3 /lib/x86_64-linux-gnu/libpng16.so.16 /lib/x86_64-linux-gnu/libXdmcp.so.6
/lib/x86_64-linux-gnu/libdbi.so.1 /lib/x86_64-linux-gnu/libharfbuzz.so.0 /lib/x86_64-linux-gnu/libpthread.so.0 /lib/x86_64-linux-gnu/libXext.so.6
/lib/x86_64-linux-gnu/libdl.so.2 /lib/x86_64-linux-gnu/libicudata.so.66 /lib/x86_64-linux-gnu/librrd.so.8 /lib/x86_64-linux-gnu/libxml2.so.2
/lib/x86_64-linux-gnu/libexpat.so.1 /lib/x86_64-linux-gnu/libicuuc.so.66 /lib/x86_64-linux-gnu/libstdc++.so.6 /lib/x86_64-linux-gnu/libXrender.so.1
/lib/x86_64-linux-gnu/libffi.so.7 /lib/x86_64-linux-gnu/liblzma.so.5 /lib/x86_64-linux-gnu/libthai.so.0 /lib/x86_64-linux-gnu/libz.so.1
/lib/x86_64-linux-gnu/libfontconfig.so.1 /lib/x86_64-linux-gnu/libm.so.6 /lib/x86_64-linux-gnu/libuuid.so.1
/lib/x86_64-linux-gnu/libfreetype.so.6 /lib/x86_64-linux-gnu/libpango-1.0.so.0 /lib/x86_64-linux-gnu/libX11.so.6
I'm suspecting "linux-vdso.so.1" may be a red herring since I'm able to run rrdtool with no missing-library errors.
What would cause rrdtool graph not to generate any output file?
After some readjustment of my search terms, I did find the answer here (thank you thank you jwilson!)
From the rrdtool graph documentation:
You need at least one DEF and one LINE, AREA, GPRINT, PRINT statement to generate anything useful.
The documentation is not clear that, if you do not have a LINE, AREA, GPRINT or PRINT statement, no file gets written and rrdtool exits without doing anything.

OGRE 3D shared libraries linked with CMake not found when executing binary on Linux

I am currently porting my OGRE 3D-based C++ application from pure Windows to Linux. I am using Ubuntu 18.04 LTS and a manually build OGRE 3D 1.12.1 which was compiled and installed to /usr/local/lib and /usr/local/lib/OGRE which is the default install location.
See:
$ ls -lah /usr/local/lib/
total 9,2M
drwxr-xr-x 6 root root 4,0K Aug 3 11:38 .
drwxr-xr-x 10 root root 4,0K Feb 10 01:12 ..
lrwxrwxrwx 1 root root 22 Aug 3 11:38 libOgreBites.so -> libOgreBites.so.1.12.1
-rw-r--r-- 1 root root 337K Aug 3 11:33 libOgreBites.so.1.12.1
-rw-r--r-- 1 root root 681K Aug 3 11:21 libOgreGLSupport.a
lrwxrwxrwx 1 root root 21 Aug 3 11:38 libOgreHLMS.so -> libOgreHLMS.so.1.12.1
-rw-r--r-- 1 root root 177K Aug 3 11:36 libOgreHLMS.so.1.12.1
lrwxrwxrwx 1 root root 21 Aug 3 11:38 libOgreMain.so -> libOgreMain.so.1.12.1
-rw-r--r-- 1 root root 5,7M Aug 3 11:20 libOgreMain.so.1.12.1
lrwxrwxrwx 1 root root 33 Aug 3 11:38 libOgreMeshLodGenerator.so -> libOgreMeshLodGenerator.so.1.12.1
-rw-r--r-- 1 root root 362K Aug 3 11:34 libOgreMeshLodGenerator.so.1.12.1
lrwxrwxrwx 1 root root 24 Aug 3 11:38 libOgreOverlay.so -> libOgreOverlay.so.1.12.1
-rw-r--r-- 1 root root 576K Aug 3 11:28 libOgreOverlay.so.1.12.1
lrwxrwxrwx 1 root root 25 Aug 3 11:38 libOgreProperty.so -> libOgreProperty.so.1.12.1
-rw-r--r-- 1 root root 79K Aug 3 11:34 libOgreProperty.so.1.12.1
lrwxrwxrwx 1 root root 31 Aug 3 11:38 libOgreRTShaderSystem.so -> libOgreRTShaderSystem.so.1.12.1
-rw-r--r-- 1 root root 1,3M Aug 3 11:31 libOgreRTShaderSystem.so.1.12.1
drwxr-xr-x 3 root root 4,0K Aug 3 11:38 OGRE
drwxr-xr-x 2 root root 4,0K Aug 3 11:38 pkgconfig
drwxrwsr-x 4 root staff 4,0K Jun 23 15:36 python2.7
drwxrwsr-x 3 root staff 4,0K Feb 10 01:12 python3.6
$ ls -lah /usr/local/lib/OGRE
total 1,2M
drwxr-xr-x 3 root root 4,0K Aug 3 11:38 .
drwxr-xr-x 6 root root 4,0K Aug 3 11:38 ..
drwxr-xr-x 2 root root 4,0K Aug 3 11:38 cmake
lrwxrwxrwx 1 root root 25 Aug 3 11:38 Codec_FreeImage.so -> Codec_FreeImage.so.1.12.1
-rw-r--r-- 1 root root 70K Aug 3 11:26 Codec_FreeImage.so.1.12.1
lrwxrwxrwx 1 root root 20 Aug 3 11:38 Codec_STBI.so -> Codec_STBI.so.1.12.1
-rw-r--r-- 1 root root 200K Aug 3 11:26 Codec_STBI.so.1.12.1
lrwxrwxrwx 1 root root 30 Aug 3 11:38 RenderSystem_GL3Plus.so -> RenderSystem_GL3Plus.so.1.12.1
-rw-r--r-- 1 root root 886K Aug 3 11:26 RenderSystem_GL3Plus.so.1.12.1
My CMake build is finding all the required libraries (also the ones in /usr/local/lib/OGRE), but after I have compiled my binaries, my Ubuntu is unable to find the shared libraries located under /usr/local/lib/OGRE:
$ ldd client
linux-vdso.so.1 (0x00007ffd2fde2000)
libhoibase.so => /home/thomas/game/build/hoibase/libhoibase.so (0x00007fbcb3b0c000)
libOgreMain.so.1.12.1 => /usr/local/lib/libOgreMain.so.1.12.1 (0x00007fbcb343e000)
libOgreBites.so.1.12.1 => /usr/local/lib/libOgreBites.so.1.12.1 (0x00007fbcb31fc000)
libOgreOverlay.so.1.12.1 => /usr/local/lib/libOgreOverlay.so.1.12.1 (0x00007fbcb2f8a000)
libOgreRTShaderSystem.so.1.12.1 => /usr/local/lib/libOgreRTShaderSystem.so.1.12.1 (0x00007fbcb2c77000)
RenderSystem_GL3Plus.so.1.12.1 => not found
libSDL2-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 (0x00007fbcb2945000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fbcb25bc000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbcb221e000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fbcb2006000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbcb1c15000)
libCGAL.so.13 => /usr/lib/x86_64-linux-gnu/libCGAL.so.13 (0x00007fbcb19f6000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fbcb17ef000)
libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007fbcb156e000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fbcb136a000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbcb114b000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fbcb0e13000)
libXt.so.6 => /usr/lib/x86_64-linux-gnu/libXt.so.6 (0x00007fbcb0baa000)
libXaw.so.7 => /usr/lib/x86_64-linux-gnu/libXaw.so.7 (0x00007fbcb0936000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fbcb0682000)
libasound.so.2 => /usr/lib/x86_64-linux-gnu/libasound.so.2 (0x00007fbcb037b000)
libpulse.so.0 => /usr/lib/x86_64-linux-gnu/libpulse.so.0 (0x00007fbcb012b000)
libsndio.so.6.1 => /usr/lib/x86_64-linux-gnu/libsndio.so.6.1 (0x00007fbcaff1b000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fbcafd09000)
libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007fbcafaff000)
libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007fbcaf8fc000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007fbcaf6ec000)
libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007fbcaf4e1000)
libXss.so.1 => /usr/lib/x86_64-linux-gnu/libXss.so.1 (0x00007fbcaf2dd000)
libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007fbcaf0d7000)
libwayland-egl.so.1 => /usr/lib/x86_64-linux-gnu/libwayland-egl.so.1 (0x00007fbcaeed5000)
libwayland-client.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007fbcaecc6000)
libwayland-cursor.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-cursor.so.0 (0x00007fbcaeabe000)
libxkbcommon.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007fbcae87f000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fbcae677000)
/lib64/ld-linux-x86-64.so.2 (0x00007fbcb4350000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fbcae44f000)
libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007fbcae247000)
libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007fbcae02c000)
libXmu.so.6 => /usr/lib/x86_64-linux-gnu/libXmu.so.6 (0x00007fbcade13000)
libXpm.so.4 => /usr/lib/x86_64-linux-gnu/libXpm.so.4 (0x00007fbcadc01000)
libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fbcad9cf000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fbcad7b2000)
libpulsecommon-11.1.so => /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-11.1.so (0x00007fbcad534000)
libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007fbcad2e7000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fbcad0d2000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fbcacec8000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fbcaccc2000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fbcacaba000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fbcac8b6000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fbcac6b0000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007fbcac42c000)
libwrap.so.0 => /lib/x86_64-linux-gnu/libwrap.so.0 (0x00007fbcac222000)
libsndfile.so.1 => /usr/lib/x86_64-linux-gnu/libsndfile.so.1 (0x00007fbcabfa9000)
libasyncns.so.0 => /usr/lib/x86_64-linux-gnu/libasyncns.so.0 (0x00007fbcabda3000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fbcabb7d000)
liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007fbcab961000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007fbcab646000)
libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007fbcab42c000)
libFLAC.so.8 => /usr/lib/x86_64-linux-gnu/libFLAC.so.8 (0x00007fbcab1b5000)
libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0 (0x00007fbcaafac000)
libvorbis.so.0 => /usr/lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007fbcaad81000)
libvorbisenc.so.2 => /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x00007fbcaaad8000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fbcaa8bd000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fbcaa6a8000)
What am I doing wrong? What is the trick to make Ubuntu find my RenderSystem_GL3Plus.so.1.12.1?
I am currently porting my OGRE 3D-based C++ application from pure Windows to Linux. I am using Ubuntu 18.04 LTS and a manually build OGRE 3D 1.12.1 which was compiled and installed to /usr/local/lib and /usr/local/lib/OGRE which is the default install location...
As others have stated, the various OGRE libraries cannot be found by the runtime linker. When executing in the build folder, you usually use LD_LIBRARY_PATH to provide the override you need to put a library on path.
Once you perform a make install the binary should be able to find the library because either (1) library is in a well known path; or (2) binary has a RUNPATH with the location of the library. Sometimes you use (3) use LD_LIBRARY_PATH after install. Doing (3) kind of sucks and you should avoid it.
It sounds like the program client lacks a RUNPATH with the location of OGRE libraries. client should have a DT_RUNPATH with /usr/local/lib/OGRE (and not a DT_RPATH). Also see Is there a way to inspect the current rpath on Linux?.
You want a DT_RUNPATH because DT_RUNPATH allows LD_LIBRARY_PATH overrides. DT_RPATH does not allow LD_LIBRARY_PATH overrides.
If the RUNPATH is not there, then add it with LDFLAGS += -Wl,-R,/usr/local/lib/OGRE -Wl,--enable-new-dtags. In CMake, you add linker flags using CMAKE_MODULE_LINKER_FLAGS, CMAKE_SHARED_LINKER_FLAGS and CMAKE_STATIC_LINKER_FLAGS. -Wl,-R,/usr/local/lib/OGRE -Wl,--enable-new-dtags should be added to each one you are using. Also see How to set the LDFLAGS in CMakeLists.txt?.
Note: you probably need to add the options to LDFLAGS for both client and the OGRE libraries since the OGRE libraries probably have dependencies on one another.
Something a little more flexible for you may be to use -Wl,-R,'$$ORIGIN/../lib/OGRE' -Wl,--enable-new-dtags. $ORIGIN is where your program is located, and it tells the runtime linker to look in the relative directory ../lib/OGRE for its libraries. It allows you to move your program (in .../bin/) and libraries (in .../lib/ and .../lib/OGRE) around on the filesystem.
You can thank the glibc folks for the Linux path problems that have plagued Linux for the last 25 years or so. They think it is normal to compile against a version of a library, link against a version of the library, and then load the wrong version of the library at runtime or lose the library at runtime. They should get a Darwin Award for not fixing the idiotic decision.
(Making the wrong descision was OK since we all make mistakes. However, they have never fixed it. Instead they allow these problems to fester for decades.)

Thrown exception never caught, but thread not killed?

This is happening on a Solaris sparc machine:
-bash-3.2$ uname -a
SunOS b2s-sol10spr-1 5.10 Generic_147147-26 sun4v sparc sun4v
I'm seeing a strange issue with exception handling. Here's a log of a short debugging session:
GNU gdb (GDB) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.10".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./Touchstone_solaris64_iodbc...done.
(gdb) catch throw
Catchpoint 1 (throw)
(gdb) catch catch
Catchpoint 2 (catch)
(gdb) r
Starting program: /bamboo/mattheww/Touchstone_solaris64_iodbc -te Tests/Touchstone/SQL/SqlTestEnv_utf32.xml -ts Tests/Touchstone/SQL/SqlTestSuite.xml -o failure -rtn EXPECTEDFAILURES_QUERIESONLY-15
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
Simba Test Verbose Log Started on Fri Aug 17 12:51:50 2018
Starting test run
---------------------------
Touchstone test utility for ODBC and OLE DB for OLAP
Version: 4.5.0.5 (64-bit)
Copyright (c) 2018 Simba Technologies Incorporated
__BUILD_INFO__ built at __BUILD_TIME__
getpid=22056
[Switching to Thread 1 (LWP 1)]
Catchpoint 1 (exception thrown), __cxxabiv1::__cxa_throw (obj=0x101ec52f0, tinfo=0xffffffff7b8d0138 <typeinfo for Simba::SQLEngine::SESqlErrorException>, dest=
0xffffffff7a697850 <Simba::SQLEngine::SESqlErrorException::~SESqlErrorException()>) at /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_throw.cc:65
65 /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_throw.cc: No such file or directory.
(gdb) where
#0 __cxxabiv1::__cxa_throw (obj=0x101ec52f0, tinfo=0xffffffff7b8d0138 <typeinfo for Simba::SQLEngine::SESqlErrorException>, dest=0xffffffff7a697850 <Simba::SQLEngine::SESqlErrorException::~SESqlErrorException()>)
at /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_throw.cc:65
#1 0xffffffff7a6f4188 in Simba::SQLEngine::AEScalarFnMetadataFactory::ValidateCotArgs (in_argument=0) at AEBuilder/Value/AEScalarFnMetadataFactory.cpp:2186
#2 0xffffffff7ab72d28 in Simba::SQLEngine::ETCotFn::RetrieveData (this=0x101db8ff0, io_dataRequest=...) at ETree/Value/ScalarFunctions/ETCotFn.cpp:37
#3 0xffffffff7a98c96c in Simba::SQLEngine::ETComparisonT<Simba::SQLEngine::ETEQFunctorT<double> >::GetLeftData (this=0x101db90f0) at Include/ETree/ETComparisonT.h:80
#4 0xffffffff7a976ac4 in Simba::SQLEngine::ETComparisonT<Simba::SQLEngine::ETEQFunctorT<double> >::Evaluate (this=0x101db90f0) at Include/ETree/ETComparisonT.h:104
#5 0xffffffff7a9c2510 in Simba::SQLEngine::ETSelect::DoMove (this=0x101ec53f0, in_moveRequest=...) at ETree/Relational/ETSelect.cpp:143
#6 0xffffffff7a8b4e18 in Simba::SQLEngine::ETRelationalExpr::Move (this=0x101ec53f0, in_moveRequest=...) at ../../../Include/SQLEngine/Executor/ETree/ETRelationalExpr.h:352
#7 0xffffffff7a9b8c90 in Simba::SQLEngine::ETProject::DoMove (this=0x101ec5450, in_moveRequest=...) at ETree/Relational/ETProject.cpp:143
#8 0xffffffff7a8b4e18 in Simba::SQLEngine::ETRelationalExpr::Move (this=0x101ec5450, in_moveRequest=...) at ../../../Include/SQLEngine/Executor/ETree/ETRelationalExpr.h:352
#9 0xffffffff7a8b4ae8 in Simba::SQLEngine::ETResultSet::Move (this=0x101dd6c40, in_direction=Simba::DSI::DSI_DIR_NEXT, in_offset=0) at ETResultSet.cpp:158
#10 0xffffffff7ad4f590 in Simba::ODBC::ForwardOnlyCursor::FetchRowset (this=0x101ec5650, in_orientation=1, in_offset=0, in_rowsetSize=1, in_ard=0x1014de6f0, in_rowStatusPtr=0x0, in_rowsProcessedPtr=0x0)
at Cursor/ForwardOnlyCursor.cpp:329
#11 0xffffffff7adc0c88 in Simba::ODBC::QueryManager::FetchRowset (this=0x101eb4810, in_orientation=1, in_offset=0, in_rowsetSize=1, in_rowStatusPtr=0x0, in_rowsProcessedPtr=0x0) at QueryManager/QueryManager.cpp:87
#12 0xffffffff7adf93a0 in Simba::ODBC::StatementStateCursor::DoFetchScroll (this=0x101b12280, in_fetchOrientation=1, in_fetchOffset=0) at Statement/StatementStateCursor.cpp:823
#13 0xffffffff7ae06f18 in Simba::ODBC::StatementState5::SQLFetch (this=0x101b12280) at Statement/StatementState5.cpp:74
#14 0xffffffff7add6f20 in Simba::ODBC::Statement::SQLFetch (this=0x101e63c30) at Statement/Statement.cpp:986
#15 0xffffffff7acb1610 in Simba::ODBC::SQLFetchTask::DoSynchronously (in_stmt=..., in_params=...) at CInterface/SQLFetchTask.h:73
#16 0xffffffff7acc5884 in DoTask<Simba::ODBC::SQLFetchTask> (in_functionName=0xffffffff7af8fcb0 "SQLFetch", in_handle=0x3, in_parameters=...) at CInterface/CInterface.cpp:679
#17 0xffffffff7ac9ab3c in SQLFetch (StatementHandle=0x3) at CInterface/CInterface.cpp:1693
#18 0xffffffff7d32a1f4 in SQLFetch_Internal (hstmt=0x101b04fb0) at fetch.c:161
#19 0xffffffff7d32a560 in SQLFetch (hstmt=0x101b04fb0) at fetch.c:230
#20 0x00000001001f7454 in Simba::ODBCTest::Cli::SqlFetch (this=0x10143a3b0 <Simba::ODBCTest::Singleton<Simba::ODBCTest::Cli>::m_instance>, handle=0x101b04fb0) at SimbaODBCTestFramework/Cli/Cli.cpp:1109
#21 0x00000001002c9c98 in Simba::ODBCTest::Statement::SqlFetch (this=0x101e640a0, outcome=..., callerFile=0x100df8af0 "TestCases/SQLTests/ODBCXmlResultTestsBase.cpp", callerLine=828) at SimbaODBCTestFramework/ODBC/Statement.cpp:200
#22 0x0000000100c9ae98 in Simba::ODBCTest::ODBCXmlResultTestsBase::Pimpl::ValidateRows (this=0x1014e0640, test=..., xmlResult=0x1014df050) at TestCases/SQLTests/ODBCXmlResultTestsBase.cpp:828
#23 0x0000000100c96a94 in Simba::ODBCTest::ODBCXmlResultTestsBase::DoResultValidation (this=0x1018fc800, test=..., xmlFileName=..., expectedFileName=..., queryFileName=...) at TestCases/SQLTests/ODBCXmlResultTestsBase.cpp:504
#24 0x0000000100ca5ca4 in Simba::ODBCTest::ODBCXmlSimpleResultTestsBase::executeTest (this=0x1018fc800) at TestCases/SQLTests/ODBCXmlSimpleResultTestsBase.cpp:215
#25 0x0000000100ca8478 in Simba::Test::Case::runTest (this=0x1018fc800, runId=...) at TestFrameworkLibrary/SBTCase.cpp:180
#26 0x0000000100cb3b58 in Simba::Test::Engine::runTest (this=0xffffffff7ffff2a0, test=0x1018fc800) at TestFrameworkLibrary/SBTEngine.cpp:219
#27 0x0000000100cb3368 in Simba::Test::Engine::RunTests (this=0xffffffff7ffff2a0, testEnv=0x1014dfed0, loopCount=1) at TestFrameworkLibrary/SBTEngine.cpp:186
#28 0x00000001001f2090 in (anonymous namespace)::DoMain (argc=9, argv=0xffffffff7ffff898) at Main.cpp:557
#29 0x00000001001f256c in main (argc=9, argv=0xffffffff7ffff898) at Main.cpp:581
(gdb) cont
Continuing.
Catchpoint 1 (exception thrown), __cxxabiv1::__cxa_throw (obj=0x101ff73b0, tinfo=0x1013b9960 <typeinfo for Simba::Test::ValueMismatchException>, dest=0x100ce4e34 <Simba::Test::ValueMismatchException::~ValueMismatchException()>)
at /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_throw.cc:65
65 in /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_throw.cc
(gdb) where
#0 __cxxabiv1::__cxa_throw (obj=0x101ff73b0, tinfo=0x1013b9960 <typeinfo for Simba::Test::ValueMismatchException>, dest=0x100ce4e34 <Simba::Test::ValueMismatchException::~ValueMismatchException()>)
at /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_throw.cc:65
#1 0x0000000100ce4f28 in Simba::Test::ValueMismatchException::raise (this=0xffffffff7fffdd38) at TestFrameworkLibrary/Exceptions/SBTValueMismatchException.cpp:28
#2 0x000000010029e524 in Simba::ODBCTest::RaiseMismatchException (msg=...) at SimbaODBCTestFramework/Framework/VerifyValues.h:29
#3 0x000000010033c3d4 in Simba::ODBCTest::VerifyAndThrowComparator<Simba::ODBCTest::Comparator<short> > (comparator=..., msg=..., callerFile=0x100df8af0 "TestCases/SQLTests/ODBCXmlResultTestsBase.cpp", callerLine=888)
at SimbaODBCTestFramework/Framework/VerifyValues.h:227
#4 0x000000010033c1b0 in Simba::ODBCTest::VerifyAndThrow<short> (expected=#0xffffffff7fffe34e: 1, actual=#0xffffffff7fffe396: 100, msg=..., callerFile=0x100df8af0 "TestCases/SQLTests/ODBCXmlResultTestsBase.cpp", callerLine=888)
at SimbaODBCTestFramework/Framework/VerifyValues.h:251
#5 0x0000000100c9b450 in Simba::ODBCTest::ODBCXmlResultTestsBase::Pimpl::ValidateRows (this=0x1014e0640, test=..., xmlResult=0x1014df050) at TestCases/SQLTests/ODBCXmlResultTestsBase.cpp:888
#6 0x0000000100c96a94 in Simba::ODBCTest::ODBCXmlResultTestsBase::DoResultValidation (this=0x1018fc800, test=..., xmlFileName=..., expectedFileName=..., queryFileName=...) at TestCases/SQLTests/ODBCXmlResultTestsBase.cpp:504
#7 0x0000000100ca5ca4 in Simba::ODBCTest::ODBCXmlSimpleResultTestsBase::executeTest (this=0x1018fc800) at TestCases/SQLTests/ODBCXmlSimpleResultTestsBase.cpp:215
#8 0x0000000100ca8478 in Simba::Test::Case::runTest (this=0x1018fc800, runId=...) at TestFrameworkLibrary/SBTCase.cpp:180
#9 0x0000000100cb3b58 in Simba::Test::Engine::runTest (this=0xffffffff7ffff2a0, test=0x1018fc800) at TestFrameworkLibrary/SBTEngine.cpp:219
#10 0x0000000100cb3368 in Simba::Test::Engine::RunTests (this=0xffffffff7ffff2a0, testEnv=0x1014dfed0, loopCount=1) at TestFrameworkLibrary/SBTEngine.cpp:186
#11 0x00000001001f2090 in (anonymous namespace)::DoMain (argc=9, argv=0xffffffff7ffff898) at Main.cpp:557
#12 0x00000001001f256c in main (argc=9, argv=0xffffffff7ffff898) at Main.cpp:581
(gdb) cont
Continuing.
Catchpoint 2 (exception caught), __cxxabiv1::__cxa_begin_catch (exc_obj_in=0x101ff7390) at /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_catch.cc:41
41 /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_catch.cc: No such file or directory.
(gdb) where
#0 __cxxabiv1::__cxa_begin_catch (exc_obj_in=0x101ff7390) at /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_catch.cc:41
#1 0x0000000100ca8774 in Simba::Test::Case::runTest (this=0x1018fc800, runId=...) at TestFrameworkLibrary/SBTCase.cpp:183
#2 0x0000000100cb3b58 in Simba::Test::Engine::runTest (this=0xffffffff7ffff2a0, test=0x1018fc800) at TestFrameworkLibrary/SBTEngine.cpp:219
#3 0x0000000100cb3368 in Simba::Test::Engine::RunTests (this=0xffffffff7ffff2a0, testEnv=0x1014dfed0, loopCount=1) at TestFrameworkLibrary/SBTEngine.cpp:186
#4 0x00000001001f2090 in (anonymous namespace)::DoMain (argc=9, argv=0xffffffff7ffff898) at Main.cpp:557
#5 0x00000001001f256c in main (argc=9, argv=0xffffffff7ffff898) at Main.cpp:581
(gdb) info share
From To Syms Read Shared Object Library
0xffffffff7f606ca0 0xffffffff7f634270 Yes (*) /usr/lib/sparcv9/ld.so.1
Yes (*) /bamboo/mattheww/icu-53.1.x/release64/lib//libicudata_sb64.so.53
0xffffffff7d8e00e8 0xffffffff7da07e0c Yes (*) /bamboo/mattheww/icu-53.1.x/release64/lib//libicui18n_sb64.so.53
0xffffffff7d56a798 0xffffffff7d62c31c Yes (*) /bamboo/mattheww/icu-53.1.x/release64/lib//libicuuc_sb64.so.53
Yes (*) /lib/64/libpthread.so.1
0xffffffff7d30f8b0 0xffffffff7d377994 Yes /usr/local/odbc/dm/iodbc-3.52.8_gcc/64/debug/lib//libiodbc.so.2
0xffffffff7d104fe0 0xffffffff7d10cc20 Yes (*) /lib/64/libsocket.so.1
0xffffffff7cf22340 0xffffffff7cf9e350 Yes (*) /lib/64/libnsl.so.1
0xffffffff7cca9d38 0xffffffff7cd4a6a8 Yes /opt/csw/lib/64/libstdc++.so.6
0xffffffff7ca0b080 0xffffffff7ca7b7a8 Yes (*) /lib/64/libm.so.2
0xffffffff7c802d68 0xffffffff7c806000 Yes (*) /lib/64/librt.so.1
0xffffffff7c602ef8 0xffffffff7c610028 Yes /opt/csw/lib/64/libgcc_s.so.1
0xffffffff7c32ed60 0xffffffff7c3dd4b0 Yes (*) /lib/64/libc.so.1
Yes (*) /lib/64/libdl.so.1
0xffffffff7bf02328 0xffffffff7bf09b38 Yes /usr/sfw/lib/64/libgcc_s.so.1
0xffffffff7bd01e60 0xffffffff7bd076ac Yes (*) /lib/64/libaio.so.1
0xffffffff7bb008a0 0xffffffff7bb0c880 Yes (*) /lib/64/libmd.so.1
0xffffffff7c000460 0xffffffff7c00137c Yes (*) /platform/sun4v/lib/sparcv9/libc_psr.so.1
0xffffffff79dece38 0xffffffff7ae0d3ec Yes /bamboo/mattheww/DRIVER
0xffffffff796009b8 0xffffffff7960c840 Yes (*) /platform/sun4v/lib/sparcv9/libmd_psr.so.1
0xffffffff79400bb0 0xffffffff79402bb0 Yes (*) /lib/64/libmp.so.2
0xffffffff79207690 0xffffffff79217630 Yes (*) /lib/64/libscf.so.1
0xffffffff79001358 0xffffffff79002008 Yes (*) /lib/64/libdoor.so.1
0xffffffff78e02518 0xffffffff78e06c58 Yes (*) /lib/64/libuutil.so.1
0xffffffff78c01f08 0xffffffff78c06104 Yes (*) /lib/64/libgen.so.1
0xffffffff78a03030 0xffffffff78a21078 Yes /usr/local/odbc/dm/iodbc-3.52.8_gcc/64/debug/lib//libiodbcinst.so
(*): Shared library is missing debugging information.
(gdb) quit
After the first exception is thrown, frame 14 has a catch block for a base class of SESqlErrorException, so it should be caught there (and there are no intervening catch blocks that should). Yet, gdb's catch catch fails to break.
Also, the thread/process isn't killed; instead it seems like execution continues somehow (without causing any other problems) until we return into the main binary (frame 20 after the initial throw). I'm still not sure exactly where execution continues after the throw, will need to look into that later.
But, it seems that exception handling is working in the main binary, as we break when the main binary throws & catches an exception.
I don't have it in the log above, but I've noticed that the address of the instruction it breaks on when throwing the exception (i.e __cxxabiv1::__cxa_begin_catch) is actually slightly outside of the memory range that info share shows for libstdc++.so.6. How do I interpret that? I was looking at that, because earlier I had noticed that we had incorrectly built libicui18n_sb64.so.53 to be statically-linked with the C++ runtime, and when this issue occurred, the instruction doing the throw was (as far as I could tell, again it was a little outside of the info share range, but not in any other library's range) in libicui18n_sb64.so.53. I thought this was the source of the issue (throwing an exception using code from one copy of the runtime, so it wouldn't be caught by another copy), but fixing that library didn't make the issue go away.
Something else I noticed was that it claims that __cxxabiv1::__cxa_throw comes from /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_throw.cc:65, which makes me a bit suspicious since we compiled everything with gcc 4.9, but not sure if that's an issue.
Here's some information about the dependencies of all the libraries/binaries in the callstack:
Dependencies for /bamboo/mattheww/icu-53.1.x/release64/lib//libicui18n_sb64.so.53:
libicuuc_sb64.so.53 => /bamboo/mattheww/icu-53.1.x/release64/lib//libicuuc_sb64.so.53
libicudata_sb64.so.53 => /bamboo/mattheww/icu-53.1.x/release64/lib//libicudata_sb64.so.53
libpthread.so.1 => /lib/64/libpthread.so.1
libstdc++.so.6 => /opt/csw/lib/64/libstdc++.so.6
libm.so.2 => /lib/64/libm.so.2
librt.so.1 => /lib/64/librt.so.1
libgcc_s.so.1 => /opt/csw/lib/64/libgcc_s.so.1
libc.so.1 => /lib/64/libc.so.1
libaio.so.1 => /lib/64/libaio.so.1
libmd.so.1 => /lib/64/libmd.so.1
/lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
/platform/sun4v/lib/sparcv9/libc_psr.so.1
/platform/sun4v/lib/sparcv9/libmd_psr.so.1
Dependencies for /bamboo/mattheww/icu-53.1.x/release64/lib//libicuuc_sb64.so.53:
libicudata_sb64.so.53 => /bamboo/mattheww/icu-53.1.x/release64/lib//libicudata_sb64.so.53
libpthread.so.1 => /lib/64/libpthread.so.1
libstdc++.so.6 => /opt/csw/lib/64/libstdc++.so.6
libm.so.2 => /lib/64/libm.so.2
librt.so.1 => /lib/64/librt.so.1
libgcc_s.so.1 => /opt/csw/lib/64/libgcc_s.so.1
libc.so.1 => /lib/64/libc.so.1
libaio.so.1 => /lib/64/libaio.so.1
libmd.so.1 => /lib/64/libmd.so.1
/lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
/platform/sun4v/lib/sparcv9/libc_psr.so.1
/platform/sun4v/lib/sparcv9/libmd_psr.so.1
Dependencies for /usr/local/odbc/dm/iodbc-3.52.8_gcc/64/debug/lib//libiodbc.so.2:
libdl.so.1 => /lib/64/libdl.so.1
libc.so.1 => /lib/64/libc.so.1
libgcc_s.so.1 => /usr/sfw/lib/64/libgcc_s.so.1
libm.so.2 => /lib/64/libm.so.2
/lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
/platform/sun4v/lib/sparcv9/libc_psr.so.1
Dependencies for /bamboo/mattheww/DRIVER:
libstdc++.so.6 => /opt/csw/lib/64/libstdc++.so.6
libicudata_sb64.so.53 => /bamboo/mattheww/icu-53.1.x/release64/lib//libicudata_sb64.so.53
libicui18n_sb64.so.53 => /bamboo/mattheww/icu-53.1.x/release64/lib//libicui18n_sb64.so.53
libicuuc_sb64.so.53 => /bamboo/mattheww/icu-53.1.x/release64/lib//libicuuc_sb64.so.53
libpthread.so.1 => /lib/64/libpthread.so.1
libsocket.so.1 => /lib/64/libsocket.so.1
libnsl.so.1 => /lib/64/libnsl.so.1
libm.so.2 => /lib/64/libm.so.2
librt.so.1 => /lib/64/librt.so.1
libgcc_s.so.1 => /opt/csw/lib/64/libgcc_s.so.1
libc.so.1 => /lib/64/libc.so.1
libmp.so.2 => /lib/64/libmp.so.2
libmd.so.1 => /lib/64/libmd.so.1
libscf.so.1 => /lib/64/libscf.so.1
libaio.so.1 => /lib/64/libaio.so.1
libdoor.so.1 => /lib/64/libdoor.so.1
libuutil.so.1 => /lib/64/libuutil.so.1
libgen.so.1 => /lib/64/libgen.so.1
/lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
/platform/sun4v/lib/sparcv9/libc_psr.so.1
/platform/sun4v/lib/sparcv9/libmd_psr.so.1
Dependencies for ./Touchstone_solaris64_iodbc:
libicudata_sb64.so.53 => /bamboo/mattheww/icu-53.1.x/release64/lib//libicudata_sb64.so.53
libicui18n_sb64.so.53 => /bamboo/mattheww/icu-53.1.x/release64/lib//libicui18n_sb64.so.53
libicuuc_sb64.so.53 => /bamboo/mattheww/icu-53.1.x/release64/lib//libicuuc_sb64.so.53
libpthread.so.1 => /lib/64/libpthread.so.1
libiodbc.so.2 => /usr/local/odbc/dm/iodbc-3.52.8_gcc/64/debug/lib//libiodbc.so.2
libsocket.so.1 => /lib/64/libsocket.so.1
libnsl.so.1 => /lib/64/libnsl.so.1
libstdc++.so.6 => /opt/csw/lib/64/libstdc++.so.6
libm.so.2 => /lib/64/libm.so.2
librt.so.1 => /lib/64/librt.so.1
libgcc_s.so.1 => /opt/csw/lib/64/libgcc_s.so.1
libc.so.1 => /lib/64/libc.so.1
libdl.so.1 => /lib/64/libdl.so.1
libgcc_s.so.1 => /usr/sfw/lib/64/libgcc_s.so.1
libmp.so.2 => /lib/64/libmp.so.2
libmd.so.1 => /lib/64/libmd.so.1
libscf.so.1 => /lib/64/libscf.so.1
libaio.so.1 => /lib/64/libaio.so.1
libdoor.so.1 => /lib/64/libdoor.so.1
libuutil.so.1 => /lib/64/libuutil.so.1
libgen.so.1 => /lib/64/libgen.so.1
/lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
/platform/sun4v/lib/sparcv9/libc_psr.so.1
/platform/sun4v/lib/sparcv9/libmd_psr.so.1
They all depend on /opt/csw/lib/64/libstdc++.so.6 & /opt/csw/lib/64/libgcc_s.so.1, I'm not sure if any other libraries would be relevant w.r.t. exception handling? (I've read about/seen issues when mixing gcc & 'native' runtimes, but I don't think that's happening here?)
Here's how the library (/bamboo/mattheww/DRIVER) was built:
Example command for compiling one of the .cpp files (I removed a bunch of include directories)
/opt/csw/gcc4/bin/g++ -DSIZEOF_LONG_INT=8 -DSQL_WCHART_CONVERT -DHAVE_MEMMOVE -m64 -fPIC -pthread -Wall -Wno-unknown-pragmas -DSIMBA -D_REENTRANT -DCLUNIX -DNDEBUG -D_POSIX_PTHREAD_SEMANTICS -O0 -g -D_DEBUG -c Common/QSTableMetadataFile.cpp -o Common/QSTableMetadataFile_solaris10sparc_gcc4_9_debug64.cpp.o
Command used to link (removed a bunch of .o files)
/opt/csw/gcc4/bin/g++ -DSIMBA -D_REENTRANT -m64 -fPIC -pthread -Wall -Wno-unknown-pragmas -lrt -O0 -g -shared -L/bamboo/bamboo-agent-home/xml-data/build-dir/ThirdParty/icu/53.1.x/solaris10sparc/gcc4_9/release64/lib -lstdc++ -licudata_sb64 -licui18n_sb64 -licuuc_sb64 -lpthread -lm -lsocket -lnsl -Wl,-M,exports_SunOS.map -Wl,-zallextract,/bamboo/bamboo-agent-home/xml-data/build-dir/SimbaEngine/Maintenance/10.1/Product/Lib/solaris10sparc/gcc4_9/debug64/libSimbaDSI.a,/bamboo/bamboo-agent-home/xml-data/build-dir/SimbaEngine/Maintenance/10.1/Product/Lib/solaris10sparc/gcc4_9/debug64/libSimbaSupport.a,/bamboo/bamboo-agent-home/xml-data/build-dir/SimbaEngine/Maintenance/10.1/Product/Lib/solaris10sparc/gcc4_9/debug64/libAEProcessor.a,/bamboo/bamboo-agent-home/xml-data/build-dir/SimbaEngine/Maintenance/10.1/Product/Lib/solaris10sparc/gcc4_9/debug64/libCore.a,/bamboo/bamboo-agent-home/xml-data/build-dir/SimbaEngine/Maintenance/10.1/Product/Lib/solaris10sparc/gcc4_9/debug64/libDSIExt.a,/bamboo/bamboo-agent-home/xml-data/build-dir/SimbaEngine/Maintenance/10.1/Product/Lib/solaris10sparc/gcc4_9/debug64/libExecutor.a,/bamboo/bamboo-agent-home/xml-data/build-dir/SimbaEngine/Maintenance/10.1/Product/Lib/solaris10sparc/gcc4_9/debug64/libParser.a,/bamboo/bamboo-agent-home/xml-data/build-dir/SimbaEngine/Maintenance/10.1/Product/Lib/solaris10sparc/gcc4_9/debug64/libSimbaODBC.a -Wl,-zweakextract -o ../Bin/solaris10sparc/gcc4_9/debug64/libQuickstart64.so
Another thing to mention is that this happens in 64-bit, but not 32-bit. Originally, the 32-bit version of libicui18n_sb64.so.53 had been dynamically-linked to the runtime, while libicui18n_sb64.so.53 hadn't, so I thought that difference was the cause, but it didn't change the observed behaviour.
edit:
(gdb) where
#0 __cxxabiv1::__cxa_throw (obj=0x101ec52f0, tinfo=0xffffffff7b8d0138 <typeinfo for Simba::SQLEngine::SESqlErrorException>, dest=0xffffffff7a697850 <Simba::SQLEngine::SESqlErrorException::~SESqlErrorException()>)
at /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_throw.cc:65
#1 0xffffffff7a6f4188 in Simba::SQLEngine::AEScalarFnMetadataFactory::ValidateCotArgs (in_argument=0) at AEBuilder/Value/AEScalarFnMetadataFactory.cpp:2186
#2 0xffffffff7ab72d28 in Simba::SQLEngine::ETCotFn::RetrieveData (this=0x101db8ff0, io_dataRequest=...) at ETree/Value/ScalarFunctions/ETCotFn.cpp:37
#3 0xffffffff7a98c96c in Simba::SQLEngine::ETComparisonT<Simba::SQLEngine::ETEQFunctorT<double> >::GetLeftData (this=0x101db90f0) at Include/ETree/ETComparisonT.h:80
#4 0xffffffff7a976ac4 in Simba::SQLEngine::ETComparisonT<Simba::SQLEngine::ETEQFunctorT<double> >::Evaluate (this=0x101db90f0) at Include/ETree/ETComparisonT.h:104
#5 0xffffffff7a9c2510 in Simba::SQLEngine::ETSelect::DoMove (this=0x101ec53f0, in_moveRequest=...) at ETree/Relational/ETSelect.cpp:143
#6 0xffffffff7a8b4e18 in Simba::SQLEngine::ETRelationalExpr::Move (this=0x101ec53f0, in_moveRequest=...) at ../../../Include/SQLEngine/Executor/ETree/ETRelationalExpr.h:352
#7 0xffffffff7a9b8c90 in Simba::SQLEngine::ETProject::DoMove (this=0x101ec5450, in_moveRequest=...) at ETree/Relational/ETProject.cpp:143
#8 0xffffffff7a8b4e18 in Simba::SQLEngine::ETRelationalExpr::Move (this=0x101ec5450, in_moveRequest=...) at ../../../Include/SQLEngine/Executor/ETree/ETRelationalExpr.h:352
#9 0xffffffff7a8b4ae8 in Simba::SQLEngine::ETResultSet::Move (this=0x101dd6c40, in_direction=Simba::DSI::DSI_DIR_NEXT, in_offset=0) at ETResultSet.cpp:158
<Snipped as this post is now too long>
(gdb) fin
Run till exit from #0 __cxxabiv1::__cxa_throw (obj=0x101ec52f0, tinfo=0xffffffff7b8d0138 <typeinfo for Simba::SQLEngine::SESqlErrorException>, dest=0xffffffff7a697850 <Simba::SQLEngine::SESqlErrorException::~SESqlErrorException()>)
at /home/dam/mgar/pkg/gcc5/trunk/work/solaris10-sparc/build-isa-sparcv8plus/gcc-5.5.0/libstdc++-v3/libsupc++/eh_throw.cc:65
0xffffffff7a8b4e38 in Simba::SQLEngine::ETRelationalExpr::Move (this=0x101ec5450, in_moveRequest=...) at ../../../Include/SQLEngine/Executor/ETree/ETRelationalExpr.h:357
357 ../../../Include/SQLEngine/Executor/ETree/ETRelationalExpr.h: No such file or directory.
(gdb) where
#0 0xffffffff7a8b4e38 in Simba::SQLEngine::ETRelationalExpr::Move (this=0x101ec5450, in_moveRequest=...) at ../../../Include/SQLEngine/Executor/ETree/ETRelationalExpr.h:357
#1 0xffffffff7a8b4ae8 in Simba::SQLEngine::ETResultSet::Move (this=0x101dd6c40, in_direction=Simba::DSI::DSI_DIR_NEXT, in_offset=0) at ETResultSet.cpp:158
<Snipped as this post is now too long>
(gdb)
I'm not sure what exactly it means to do a fin in GDB when the exception handling machinery is about to unwind the stack, but it's back in the non-exceptional flow of code, without the exception being caught...
Edit:
I've uploaded a zip file containing two binaries, one that works and one that doesn't (when I rebuild myself, it works, when our automated build system does, it doesn't): https://simba.app.box.com/s/qzo8735h9nzyv6t4x2lhzze896v361t1
You can reproduce the issue with iodbctest using a connection string like
DRIVER=<path to driver>;DBF=<path to DBF directory>
and executing the query
select dbl_zero from trig where COT(dbl_zero) = dbl_zero
Also, I dissassembled both the function throwing the exception, and the function which should catch that exception, in both binaries, and they were they same (other than some constants which I assume corresponded to different addresses).
Edit:
I've created logs of when the test is run, with both working & broken binaries, using LD_DEBUG=bindings: https://simba.box.com/s/w5y246hb4ydm97krjeyjykc90zvjqfo3
I've noticed a few differences, but not sure exactly how to interpret them

Cannot use xercesc with new c+11 flags in Solaris' newest compiler

Using xerces-c-3.1.1 and SolarisStudio12.5Beta-solaris-x86-bin (on Solaris 10).
./configure CXX=CC CC=cc CXXFLAGS="-std=c++11"
gmake
gmake check
results in 37 core dumps and the error messages
terminate called after throwing an instance of 'xercesc_3_1::EndOfEntityException'
a pstack on 1 of the core files show
core 'core_gs580w_XSerializerTest_132_10_1462965423_23542' of 23542: /usr/local/src/xerces-c-3.1.3/tests/.libs/XSerializerTest -v=always pe
fdb5c925 _lwp_kill (1, 6) + 15
fdb03783 raise (6) + 1f
fdae29f5 abort (fdc725cc, 107, 8118140, fdbc3cd8, fedb04d0, fdc725cc) + cd
fdd71eb5 _ZN9__gnu_cxx27__verbose_terminate_handlerEv (1, 0, fdd6eb0b, fddb3468, 8114df0, 8045f00) + 175
fdd6eb17 ???????? (fdd71d40, 0, fdd6eb75, fdd6eba7, fdd6eb99, fddb3468)
fdd6ebb0 ???????? (8114df0, fedb04d0, fdd6eb75, fdd6ee0f, fecfa708, 807b0c0)
fdd6ee3e ???????? (8114e10, fed7d848, feb24d00, feb24aec, 8114db8, fe8f3468)
feb24bff _ZN11xercesc_3_19ReaderMgr9popReaderEv (80df840, 8045b14, 0, feb21a2c) + 11f
feb21a60 _ZN11xercesc_3_19ReaderMgr14skipPastSpacesEv (80df840, 0, 0, febf3911) + 40
febf3d4e _ZN11xercesc_3_110DTDScanner17scanExtSubsetDeclEbb (8045f00, 0, 1, 64) + 44e
feb09db0 _ZN11xercesc_3_112IGXMLScanner15scanDocTypeDeclEv (80df7b8, fec9dec8, fef90c18, feb512f1) + 1610
feb5154f _ZN11xercesc_3_110XMLScanner10scanPrologEv (80df7b8, 80e5c38, feb24700, 0) + 26f
feb0483f _ZN11xercesc_3_112IGXMLScanner12scanDocumentERKNS_11InputSourceE (80df7b8, 80e5c38, 807b0c0, feb4cb51) + 9f
feb4d0ad _ZN11xercesc_3_110XMLScanner12scanDocumentEPKt (80df7b8, 80e5c08, 807b0c0, feb4d96e) + 56d
feb4d9c4 _ZN11xercesc_3_110XMLScanner12scanDocumentEPKc (80df7b8, 8046d5c, feb98f00, 0) + 64
feb9500f _ZN11xercesc_3_117SAX2XMLReaderImpl5parseEPKc (80df500, 8046d5c, 1, 8046ca8) + af
0805e1d2 _Z8parseOnePN11xercesc_3_115BinOutputStreamEPKc (80dd6c0, 8046d5c, 807adf0, fdd2305c) + 112
0805dd70 _Z9parseCasePKc (8046d5c, 0, 3e8, 0) + b0
0805d8a6 main (3, 8046bb0, 8046bc0) + be6
0805a932 _start (3, 8046d18, 8046d52, 8046d5c, 0, 8046d69) + 72
removing CXXFLAGS="-std=c++11" from the configure results in a successful "gmake check"
Any tips on making xerces-c work with sun studio 12.5 and c++11?
Assuming the build process for Xerces 3.1.1 is the same as Xerces 3.1.4, Xerces is explicitly linking in the standard Solaris C++ run-time libraries. That's a problem because specifying -std=c++11 causes Solaris Studio to use the g++ ABI and runtime.
This is ldd output on one of the test executables from compiling Xerces 3.1.4, admittedly on Solaris 11:
bash-4.1$ ldd XSValueTest
libxerces-c-3.1.so => /home/achenle/xerces/xerces-c-3.1.4/src/.libs/libxerces-c-3.1.so
libpthread.so.1 => /lib/libpthread.so.1
libcurl.so.3 => /usr/lib/libcurl.so.3
libidn.so.11 => /usr/lib/libidn.so.11
libsldap.so.1 => /usr/lib/libsldap.so.1
libldap.so.5 => /usr/lib/libldap.so.5
libsocket.so.1 => /lib/libsocket.so.1
libnsl.so.1 => /lib/libnsl.so.1
libgss.so.1 => /usr/lib/libgss.so.1
libssl.so.1.0.0 => /lib/libssl.so.1.0.0
libcrypto.so.1.0.0 => /lib/libcrypto.so.1.0.0
libz.so.1 => /lib/libz.so.1
libstdc++.so.6 => /opt/SUNWspro/lib/compilers/CC-gcc/lib/libstdc++.so.6
libgcc_s.so.1 => /opt/SUNWspro/lib/compilers/CC-gcc/lib/libgcc_s.so.1
librt.so.1 => /lib/librt.so.1
libm.so.2 => /lib/libm.so.2
libc.so.1 => /lib/libc.so.1
libstatomic.so.1 => /opt/SUNWspro/lib/compilers/atomic/libstatomic.so.1
libCstd.so.1 => /usr/lib/libCstd.so.1
libCrun.so.1 => /usr/lib/libCrun.so.1
libscf.so.1 => /lib/libscf.so.1
libsasl.so.1 => /usr/lib/libsasl.so.1
libmd.so.1 => /lib/libmd.so.1
libnspr4.so => /usr/lib/mps/libnspr4.so
libplc4.so => /usr/lib/mps/libplc4.so
libnss3.so => /usr/lib/mps/libnss3.so
libssl3.so => /usr/lib/mps/libssl3.so
libmp.so.2 => /lib/libmp.so.2
libuutil.so.1 => /lib/libuutil.so.1
libgen.so.1 => /lib/libgen.so.1
libnvpair.so.1 => /lib/libnvpair.so.1
libsmbios.so.1 => /usr/lib/libsmbios.so.1
libsoftcrypto.so.1 => /lib/libsoftcrypto.so.1
libelf.so.1 => /lib/libelf.so.1
libdl.so.1 => /lib/libdl.so.1
libnssutil3.so => /usr/lib/mps/libnssutil3.so
libplds4.so => /usr/lib/mps/libplds4.so
libthread.so.1 => /lib/libthread.so.1
libcryptoutil.so.1 => /lib/libcryptoutil.so.1
Note the presence of libstdc++.so.6 (the g++ runtime) and libCstd.so.1 and libCrun.so.1 (the standard Solaris C++ runtime).
This is from the "What's New" documentation on Solaris Studio 12.4:
Using C++11 Features
In Oracle Solaris Studio 12.4, the C++ compiler supports C++11, a new
language and ABI (Application Binary Interface).
In C++ 11 mode, the CC compiler uses the g++ ABI and a version of
the g++ runtime library that is supplied with Oracle Solaris Studio.
For this release, version 4.8.2 of the g++ runtime library is used.
The C++11 implying the use of the g++ ABI and runtime also applies to Solaris Studio 12.5:
A.2.88 –std=v
...
c++11
Selects C++ 11 dialect and g++ binary compatibility. It sets the
__SUNPRO_CC_COMPAT preprocessor macro to 'G'.
But the Xerces build explicitly links in the standard Solaris C++ runtime in addition to the implicitly-linked g++ runtime.

Qt 4.8.4 Release version not working on Windows 7 64 bit

I am trying to make a releasable version of a project. I tested the exe with the dlls included in the same directory on several different machines. It is running on my computer (windows 8 64 bit), a 32 bit windows xp virtual machine, a 32 bit windows 7 virtual machine, and another windows 7 64 bit laptop. Someone else, however, is trying to run it on another windows 7 64 bit machine. He is getting a Microsoft Visual C++ Runtime Library error that says:
This application has requested the Runtime to terminate in an unusual way. Please contact the application's support team for more information.
dlls I'm including in the application's directory:
libgcc_s_dw2-1.dll
libstdc++-6.dll
mingwm10.dll
QtCore4.dll
QtCored4.dll
QtGui4.dll
QtNetwork4.dll
QtSerialPortd.dll
This is what a ldd on the exe file looks like on my windows 8 computer where it is working:
ntdll.dll => /cygdrive/c/windows/SYSTEM32/ntdll.dll (0x7fc44b50000)
ntdll.dll => /cygdrive/c/windows/SYSTEM32/ntdll.dll (0x77730000)
wow64.dll => /cygdrive/c/windows/SYSTEM32/wow64.dll (0x776e0000)
wow64win.dll => /cygdrive/c/windows/system32/wow64win.dll (0x77670000)
wow64cpu.dll => /cygdrive/c/windows/system32/wow64cpu.dll (0x776d0000)
??? => ??? (0x540000)
KERNEL32.DLL => /cygdrive/c/windows/SYSTEM32/KERNEL32.DLL (0x75680000)
??? => ??? (0x540000)
??? => ??? (0x540000)
KERNEL32.DLL => /cygdrive/c/windows/SYSTEM32/KERNEL32.DLL (0x75680000)
KERNELBASE.dll => /cygdrive/c/windows/SYSTEM32/KERNELBASE.dll (0x76da0000)
msvcrt.dll => /cygdrive/c/windows/SYSTEM32/msvcrt.dll (0x76ba0000)
WSOCK32.DLL => /cygdrive/c/windows/SYSTEM32/WSOCK32.DLL (0x747e0000)
libgcc_s_dw2-1.dll => /cygdrive/c/Mingw32/bin/libgcc_s_dw2-1.dll (0x6e940000)
libstdc++-6.dll => /cygdrive/c/Mingw32/bin/libstdc++-6.dll (0x6fc40000)
QtCore4.dll => /cygdrive/c/Qt/4.8.4/bin/QtCore4.dll (0x6e0c0000)
QtGui4.dll => /cygdrive/c/Qt/4.8.4/bin/QtGui4.dll (0x67700000)
QtNetwork4.dll => /cygdrive/c/Qt/4.8.4/bin/QtNetwork4.dll (0x65c80000)
QtSerialPortd.dll => /cygdrive/c/Qt/4.8.4/bin/QtSerialPortd.dll (0x63680000)
WS2_32.dll => /cygdrive/c/windows/SYSTEM32/WS2_32.dll (0x76e50000)
ADVAPI32.DLL => /cygdrive/c/windows/SYSTEM32/ADVAPI32.DLL (0x74e60000)
mingwm10.dll => /cygdrive/c/Mingw32/bin/mingwm10.dll (0x6fbc0000)
OLE32.dll => /cygdrive/c/windows/SYSTEM32/OLE32.dll (0x74f20000)
USER32.dll => /cygdrive/c/windows/SYSTEM32/USER32.dll (0x76c80000)
COMDLG32.DLL => /cygdrive/c/windows/SYSTEM32/COMDLG32.DLL (0x75800000)
GDI32.dll => /cygdrive/c/windows/SYSTEM32/GDI32.dll (0x75250000)
IMM32.DLL => /cygdrive/c/windows/SYSTEM32/IMM32.DLL (0x76eb0000)
OLEAUT32.DLL => /cygdrive/c/windows/SYSTEM32/OLEAUT32.DLL (0x76ed0000)
SHELL32.DLL => /cygdrive/c/windows/SYSTEM32/SHELL32.DLL (0x75ad0000)
WINMM.DLL => /cygdrive/c/windows/SYSTEM32/WINMM.DLL (0x747b0000)
WINSPOOL.DRV => /cygdrive/c/windows/SYSTEM32/WINSPOOL.DRV (0x73800000)
setupapi.dll => /cygdrive/c/windows/SYSTEM32/setupapi.dll (0x750a0000)
QtCored4.dll => /cygdrive/c/Qt/4.8.4/bin/QtCored4.dll (0x69cc0000)
RPCRT4.dll => /cygdrive/c/windows/SYSTEM32/RPCRT4.dll (0x775c0000)
NSI.dll => /cygdrive/c/windows/SYSTEM32/NSI.dll (0x76ea0000)
sechost.dll => /cygdrive/c/windows/SYSTEM32/sechost.dll (0x77510000)
combase.dll => /cygdrive/c/windows/SYSTEM32/combase.dll (0x753d0000)
SHLWAPI.dll => /cygdrive/c/windows/SYSTEM32/SHLWAPI.dll (0x75a90000)
COMCTL32.dll => /cygdrive/c/windows/WinSxS/x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9200.16658_none_bf1359a245f1cd12/COMCTL32.dll (0x73cd0000)
MSCTF.dll => /cygdrive/c/windows/SYSTEM32/MSCTF.dll (0x74d80000)
WINMMBASE.dll => /cygdrive/c/windows/SYSTEM32/WINMMBASE.dll (0x74780000)
CFGMGR32.dll => /cygdrive/c/windows/SYSTEM32/CFGMGR32.dll (0x77020000)
DEVOBJ.dll => /cygdrive/c/windows/SYSTEM32/DEVOBJ.dll (0x77070000)
SspiCli.dll => /cygdrive/c/windows/SYSTEM32/SspiCli.dll (0x74d60000)
CRYPTBASE.dll => /cygdrive/c/windows/SYSTEM32/CRYPTBASE.dll (0x74d50000)
SHCORE.DLL => /cygdrive/c/windows/SYSTEM32/SHCORE.DLL (0x74700000)
bcryptPrimitives.dll => /cygdrive/c/windows/SYSTEM32/bcryptPrimitives.dll (0x74cf0000)
Edit:
I rebuilt the release version on an XP machine. It looks like the libstdc++-6.dll is no longer showing up in ldd.
ldd on the 32 bit Windows XP machine it was built on (working):
ntdll.dll => /cygdrive/c/WINDOWS/system32/ntdll.dll (0x7c900000)
kernel32.dll => /cygdrive/c/WINDOWS/system32/kernel32.dll (0x7c800000)
QtCore4.dll => /cygdrive/c/QtSDK/Desktop/Qt/4.7.4/mingw/bin/QtCore4.dll (0x6a1c0000)
ADVAPI32.DLL => /cygdrive/c/WINDOWS/system32/ADVAPI32.DLL (0x77dd0000)
RPCRT4.dll => /cygdrive/c/WINDOWS/system32/RPCRT4.dll (0x77e70000)
Secur32.dll => /cygdrive/c/WINDOWS/system32/Secur32.dll (0x77fe0000)
mingwm10.dll => /cygdrive/c/QtSDK/mingw/bin/mingwm10.dll (0x6fbc0000)
msvcrt.dll => /cygdrive/c/WINDOWS/system32/msvcrt.dll (0x77c10000)
OLE32.dll => /cygdrive/c/WINDOWS/system32/OLE32.dll (0x774e0000)
GDI32.dll => /cygdrive/c/WINDOWS/system32/GDI32.dll (0x77f10000)
USER32.dll => /cygdrive/c/WINDOWS/system32/USER32.dll (0x7e410000)
WS2_32.DLL => /cygdrive/c/WINDOWS/system32/WS2_32.DLL (0x71ab0000)
WS2HELP.dll => /cygdrive/c/WINDOWS/system32/WS2HELP.dll (0x71aa0000)
libgcc_s_dw2-1.dll => /cygdrive/c/QtSDK/mingw/bin/libgcc_s_dw2-1.dll (0x6e940000)
QtGui4.dll => /cygdrive/c/QtSDK/Desktop/Qt/4.7.4/mingw/bin/QtGui4.dll (0x65100000)
COMDLG32.DLL => /cygdrive/c/WINDOWS/system32/COMDLG32.DLL (0x763b0000)
COMCTL32.dll => /cygdrive/c/WINDOWS/system32/COMCTL32.dll (0x5d090000)
SHELL32.dll => /cygdrive/c/WINDOWS/system32/SHELL32.dll (0x7c9c0000)
SHLWAPI.dll => /cygdrive/c/WINDOWS/system32/SHLWAPI.dll (0x77f60000)
IMM32.DLL => /cygdrive/c/WINDOWS/system32/IMM32.DLL (0x76390000)
OLEAUT32.DLL => /cygdrive/c/WINDOWS/system32/OLEAUT32.DLL (0x77120000)
WINMM.DLL => /cygdrive/c/WINDOWS/system32/WINMM.DLL (0x76b40000)
WINSPOOL.DRV => /cygdrive/c/WINDOWS/system32/WINSPOOL.DRV (0x73000000)
QtNetwork4.dll => /cygdrive/c/QtSDK/Desktop/Qt/4.7.4/mingw/bin/QtNetwork4.dll (0x6ff00000)
QtSerialPortd.dll => /cygdrive/c/QtSDK/Desktop/Qt/4.7.4/mingw/bin/QtSerialPortd.dll (0x6ef80000)
QtCored4.dll => /cygdrive/c/QtSDK/Desktop/Qt/4.7.4/mingw/bin/QtCored4.dll (0x680000)
setupapi.dll => /cygdrive/c/WINDOWS/system32/setupapi.dll (0x77920000)
WSOCK32.DLL => /cygdrive/c/WINDOWS/system32/WSOCK32.DLL (0x71ad0000)
ldd on the Windows 8 computer (working) :
ntdll.dll => /cygdrive/c/windows/SYSTEM32/ntdll.dll (0x7fc44b50000)
ntdll.dll => /cygdrive/c/windows/SYSTEM32/ntdll.dll (0x77730000)
wow64.dll => /cygdrive/c/windows/SYSTEM32/wow64.dll (0x776e0000)
wow64win.dll => /cygdrive/c/windows/system32/wow64win.dll (0x77670000)
wow64cpu.dll => /cygdrive/c/windows/system32/wow64cpu.dll (0x776d0000)
??? => ??? (0x2b0000)
KERNEL32.DLL => /cygdrive/c/windows/SYSTEM32/KERNEL32.DLL (0x75680000)
??? => ??? (0x2b0000)
??? => ??? (0x2b0000)
KERNEL32.DLL => /cygdrive/c/windows/SYSTEM32/KERNEL32.DLL (0x75680000)
KERNELBASE.dll => /cygdrive/c/windows/SYSTEM32/KERNELBASE.dll (0x76da0000)
apphelp.dll => /cygdrive/c/windows/system32/apphelp.dll (0x73de0000)
msvcrt.dll => /cygdrive/c/windows/SYSTEM32/msvcrt.dll (0x76ba0000)
WSOCK32.DLL => /cygdrive/c/windows/SYSTEM32/WSOCK32.DLL (0x747e0000)
libgcc_s_dw2-1.dll => /cygdrive/c/users/jared/documents/telkonet/ESU Release/test/esutest/libgcc_s_dw2-1.dll (0x6e940000)
libstdc++-6.dll => /cygdrive/c/users/jared/documents/telkonet/ESU Release/test/esutest/libstdc++-6.dll (0x6fc40000)
QtCore4.dll => /cygdrive/c/users/jared/documents/telkonet/ESU Release/test/esutest/QtCore4.dll (0x6e0c0000)
QtGui4.dll => /cygdrive/c/users/jared/documents/telkonet/ESU Release/test/esutest/QtGui4.dll (0x67700000)
QtNetwork4.dll => /cygdrive/c/users/jared/documents/telkonet/ESU Release/test/esutest/QtNetwork4.dll (0x65c80000)
QtSerialPortd.dll => /cygdrive/c/users/jared/documents/telkonet/ESU Release/test/esutest/QtSerialPortd.dll (0x63680000)
WS2_32.dll => /cygdrive/c/windows/SYSTEM32/WS2_32.dll (0x76e50000)
ADVAPI32.DLL => /cygdrive/c/windows/SYSTEM32/ADVAPI32.DLL (0x74e60000)
mingwm10.dll => /cygdrive/c/users/jared/documents/telkonet/ESU Release/test/esutest/mingwm10.dll (0x6fbc0000)
OLE32.dll => /cygdrive/c/windows/SYSTEM32/OLE32.dll (0x74f20000)
USER32.dll => /cygdrive/c/windows/SYSTEM32/USER32.dll (0x76c80000)
COMDLG32.DLL => /cygdrive/c/windows/SYSTEM32/COMDLG32.DLL (0x75800000)
GDI32.dll => /cygdrive/c/windows/SYSTEM32/GDI32.dll (0x75250000)
IMM32.DLL => /cygdrive/c/windows/SYSTEM32/IMM32.DLL (0x76eb0000)
OLEAUT32.DLL => /cygdrive/c/windows/SYSTEM32/OLEAUT32.DLL (0x76ed0000)
SHELL32.DLL => /cygdrive/c/windows/SYSTEM32/SHELL32.DLL (0x75ad0000)
WINMM.DLL => /cygdrive/c/windows/SYSTEM32/WINMM.DLL (0x747b0000)
WINSPOOL.DRV => /cygdrive/c/windows/SYSTEM32/WINSPOOL.DRV (0x73800000)
setupapi.dll => /cygdrive/c/windows/SYSTEM32/setupapi.dll (0x750a0000)
QtCored4.dll => /cygdrive/c/Qt/4.8.4/bin/QtCored4.dll (0x69cc0000)
RPCRT4.dll => /cygdrive/c/windows/SYSTEM32/RPCRT4.dll (0x775c0000)
NSI.dll => /cygdrive/c/windows/SYSTEM32/NSI.dll (0x76ea0000)
sechost.dll => /cygdrive/c/windows/SYSTEM32/sechost.dll (0x77510000)
combase.dll => /cygdrive/c/windows/SYSTEM32/combase.dll (0x753d0000)
SHLWAPI.dll => /cygdrive/c/windows/SYSTEM32/SHLWAPI.dll (0x75a90000)
COMCTL32.dll => /cygdrive/c/windows/WinSxS/x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9200.16658_none_bf1359a245f1cd12/COMCTL32.dll (0x73cd0000)
MSCTF.dll => /cygdrive/c/windows/SYSTEM32/MSCTF.dll (0x74d80000)
WINMMBASE.dll => /cygdrive/c/windows/SYSTEM32/WINMMBASE.dll (0x74780000)
CFGMGR32.dll => /cygdrive/c/windows/SYSTEM32/CFGMGR32.dll (0x77020000)
DEVOBJ.dll => /cygdrive/c/windows/SYSTEM32/DEVOBJ.dll (0x77070000)
SspiCli.dll => /cygdrive/c/windows/SYSTEM32/SspiCli.dll (0x74d60000)
CRYPTBASE.dll => /cygdrive/c/windows/SYSTEM32/CRYPTBASE.dll (0x74d50000)
SHCORE.DLL => /cygdrive/c/windows/SYSTEM32/SHCORE.DLL (0x74700000)
bcryptPrimitives.dll => /cygdrive/c/windows/SYSTEM32/bcryptPrimitives.dll (0x74cf0000)
ldd on the Windows 7 64 bit (working):
ntdll.dll => /cygdrive/c/Windows/SYSTEM32/ntdll.dll (0x76f30000)
ntdll.dll => /cygdrive/c/Windows/SysWOW64/ntdll.dll (0x77110000)
wow64.dll => /cygdrive/c/Windows/SYSTEM32/wow64.dll (0x72c50000)
wow64win.dll => /cygdrive/c/Windows/SYSTEM32/wow64win.dll (0x72bf0000)
wow64cpu.dll => /cygdrive/c/Windows/SYSTEM32/wow64cpu.dll (0x72be0000)
??? => ??? (0x76d10000)
kernel32.dll => /cygdrive/c/Windows/syswow64/kernel32.dll (0x75670000)
??? => ??? (0x76d10000)
??? => ??? (0x76e30000)
kernel32.dll => /cygdrive/c/Windows/syswow64/kernel32.dll (0x75670000)
KERNELBASE.dll => /cygdrive/c/Windows/syswow64/KERNELBASE.dll (0x76a30000)
QtCore4.dll => /cygdrive/c/users/admin/downloads/esutestexe/QtCore4.dll (0x6a1c0000)
ADVAPI32.DLL => /cygdrive/c/Windows/syswow64/ADVAPI32.DLL (0x74c90000)
msvcrt.dll => /cygdrive/c/Windows/syswow64/msvcrt.dll (0x75570000)
sechost.dll => /cygdrive/c/Windows/SysWOW64/sechost.dll (0x74f70000)
RPCRT4.dll => /cygdrive/c/Windows/syswow64/RPCRT4.dll (0x75480000)
SspiCli.dll => /cygdrive/c/Windows/syswow64/SspiCli.dll (0x74b60000)
CRYPTBASE.dll => /cygdrive/c/Windows/syswow64/CRYPTBASE.dll (0x74b50000)
mingwm10.dll => /cygdrive/c/users/admin/downloads/esutestexe/mingwm10.dll (0x6fbc0000)
OLE32.dll => /cygdrive/c/Windows/syswow64/OLE32.dll (0x768c0000)
GDI32.dll => /cygdrive/c/Windows/syswow64/GDI32.dll (0x76c80000)
USER32.dll => /cygdrive/c/Windows/syswow64/USER32.dll (0x76740000)
LPK.dll => /cygdrive/c/Windows/syswow64/LPK.dll (0x74fe0000)
USP10.dll => /cygdrive/c/Windows/syswow64/USP10.dll (0x74bc0000)
WS2_32.DLL => /cygdrive/c/Windows/syswow64/WS2_32.DLL (0x74f90000)
NSI.dll => /cygdrive/c/Windows/syswow64/NSI.dll (0x76a20000)
libgcc_s_dw2-1.dll => /cygdrive/c/users/admin/downloads/esutestexe/libgcc_s_dw2-1.dll (0x6e940000)
QtGui4.dll => /cygdrive/c/users/admin/downloads/esutestexe/QtGui4.dll (0x65100000)
COMDLG32.DLL => /cygdrive/c/Windows/syswow64/COMDLG32.DLL (0x764c0000)
SHLWAPI.dll => /cygdrive/c/Windows/syswow64/SHLWAPI.dll (0x76b20000)
COMCTL32.dll => /cygdrive/c/Windows/WinSxS/x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18201_none_ec80f00e8593ece5/COMCTL32.dll (0x72010000)
SHELL32.dll => /cygdrive/c/Windows/syswow64/SHELL32.dll (0x75790000)
IMM32.DLL => /cygdrive/c/Windows/syswow64/IMM32.DLL (0x76840000)
MSCTF.dll => /cygdrive/c/Windows/syswow64/MSCTF.dll (0x763e0000)
OLEAUT32.DLL => /cygdrive/c/Windows/syswow64/OLEAUT32.DLL (0x76a90000)
WINMM.DLL => /cygdrive/c/Windows/system32/WINMM.DLL (0x725b0000)
WINSPOOL.DRV => /cygdrive/c/Windows/system32/WINSPOOL.DRV (0x720a0000)
QtNetwork4.dll => /cygdrive/c/users/admin/downloads/esutestexe/QtNetwork4.dll (0x6ff00000)
QtSerialPortd.dll => /cygdrive/c/users/admin/downloads/esutestexe/QtSerialPortd.dll (0x6ef80000)
QtCored4.dll => /cygdrive/c/users/admin/downloads/esutestexe/QtCored4.dll (0x7f0000)
setupapi.dll => /cygdrive/c/Windows/syswow64/setupapi.dll (0x74ff0000)
CFGMGR32.dll => /cygdrive/c/Windows/syswow64/CFGMGR32.dll (0x74d40000)
DEVOBJ.dll => /cygdrive/c/Windows/syswow64/DEVOBJ.dll (0x768a0000)
WSOCK32.DLL => /cygdrive/c/Windows/system32/WSOCK32.DLL (0x661d0000)
ldd on the Windows 7 64 bit machine (not working):
ntdll.dll => /cygdrive/c/Windows/SYSTEM32/ntdll.dll (0x76cf0000)
ntdll.dll => /cygdrive/c/Windows/SysWOW64/ntdll.dll (0x76ed0000)
wow64.dll => /cygdrive/c/Windows/SYSTEM32/wow64.dll (0x748b0000)
wow64win.dll => /cygdrive/c/Windows/SYSTEM32/wow64win.dll (0x74850000)
wow64cpu.dll => /cygdrive/c/Windows/SYSTEM32/wow64cpu.dll (0x74840000)
??? => ??? (0x76ad0000)
kernel32.dll => /cygdrive/c/Windows/syswow64/kernel32.dll (0x76560000)
??? => ??? (0x76ad0000)
??? => ??? (0x76bf0000)
kernel32.dll => /cygdrive/c/Windows/syswow64/kernel32.dll (0x76560000)
KERNELBASE.dll => /cygdrive/c/Windows/syswow64/KERNELBASE.dll (0x7522000 0)
QtCore4.dll => /cygdrive/c/Users/bschwanke/Desktop/ESUtestEXE/QtCore4.dl l (0x6a1c0000)
ADVAPI32.DLL => /cygdrive/c/Windows/syswow64/ADVAPI32.DLL (0x74a70000)
msvcrt.dll => /cygdrive/c/Windows/syswow64/msvcrt.dll (0x74e10000)
sechost.dll => /cygdrive/c/Windows/SysWOW64/sechost.dll (0x76ab0000)
RPCRT4.dll => /cygdrive/c/Windows/syswow64/RPCRT4.dll (0x75130000)
SspiCli.dll => /cygdrive/c/Windows/syswow64/SspiCli.dll (0x74920000)
CRYPTBASE.dll => /cygdrive/c/Windows/syswow64/CRYPTBASE.dll (0x74910000)
mingwm10.dll => /cygdrive/c/Users/bschwanke/Desktop/ESUtestEXE/mingwm10. dll (0x6fbc0000)
OLE32.dll => /cygdrive/c/Windows/syswow64/OLE32.dll (0x76390000)
GDI32.dll => /cygdrive/c/Windows/syswow64/GDI32.dll (0x749e0000)
USER32.dll => /cygdrive/c/Windows/syswow64/USER32.dll (0x761a0000)
LPK.dll => /cygdrive/c/Windows/syswow64/LPK.dll (0x76ea0000)
USP10.dll => /cygdrive/c/Windows/syswow64/USP10.dll (0x75270000)
WS2_32.DLL => /cygdrive/c/Windows/syswow64/WS2_32.DLL (0x74b10000)
NSI.dll => /cygdrive/c/Windows/syswow64/NSI.dll (0x74ec0000)
libgcc_s_dw2-1.dll => /cygdrive/c/Users/bschwanke/Desktop/ESUtestEXE/lib gcc_s_dw2-1.dll (0x6e940000)
QtGui4.dll => /cygdrive/c/Users/bschwanke/Desktop/ESUtestEXE/QtGui4.dll (0x65100000)
COMDLG32.DLL => /cygdrive/c/Windows/syswow64/COMDLG32.DLL (0x76680000)
SHLWAPI.dll => /cygdrive/c/Windows/syswow64/SHLWAPI.dll (0x74ee0000)
COMCTL32.dll => /cygdrive/c/Windows/WinSxS/x86_microsoft.windows.common- controls_6595b64144ccf1df_5.82.7601.18201_none_ec80f00e8593ece5/COMCTL32.dll (0x 733e0000)
SHELL32.dll => /cygdrive/c/Windows/syswow64/SHELL32.dll (0x753b0000)
IMM32.DLL => /cygdrive/c/Windows/syswow64/IMM32.DLL (0x74980000)
MSCTF.dll => /cygdrive/c/Windows/syswow64/MSCTF.dll (0x762b0000)
OLEAUT32.DLL => /cygdrive/c/Windows/syswow64/OLEAUT32.DLL (0x767a0000)
WINMM.DLL => /cygdrive/c/Windows/system32/WINMM.DLL (0x73e80000)
WINSPOOL.DRV => /cygdrive/c/Windows/system32/WINSPOOL.DRV (0x74240000)
QtNetwork4.dll => /cygdrive/c/Users/bschwanke/Desktop/ESUtestEXE/QtNetwo rk4.dll (0x6ff00000)
QtSerialPortd.dll => /cygdrive/c/Users/bschwanke/Desktop/ESUtestEXE/QtSe rialPortd.dll (0x6ef80000)
QtCored4.dll => /cygdrive/c/Users/bschwanke/Desktop/ESUtestEXE/QtCored4. dll (0x780000)
setupapi.dll => /cygdrive/c/Windows/syswow64/setupapi.dll (0x76000000)
CFGMGR32.dll => /cygdrive/c/Windows/syswow64/CFGMGR32.dll (0x76770000)
DEVOBJ.dll => /cygdrive/c/Windows/syswow64/DEVOBJ.dll (0x74df0000)
WSOCK32.DLL => /cygdrive/c/Windows/system32/WSOCK32.DLL (0x73120000)
Does the computer that is giving you the Microsoft Visual C++ Runtime Library have the Microsoft Visual C++ redistributable package installed on it? Any computer that does not have the same version of the compiler used to build your program will need the redist package installed so that the executable can load those libraries at runtime.
This page has links to the various redist packages available for download.
Also, with your list of distributed DLLs, you have both QtCore4.dll and QtCored4.dll. The one with a 'd' is a debug DLL and won't be loaded by your Release-built executable. You are also only distributing the debug version of QtSerialPortd.dll, so you should switch that over to the release version as well (drop the 'd').
Well I figured it out. It is an issue with DB9 serial com port.
The application uses serial port connections to a device. The computer it wasn't working on had an old DB9 serial port on it. The other computers only had USB ports. When we plugged in a DB9 serial cable the application ran just fine.
There are some 3rd party libraries dealing with some of the serial port stuff so I'll have to take a look at that.