Solved [SOLVED] Debian 9 QT Program Compile
-
Go to the command line and run
ldd TEST
-
Hi @SGaist
Here is the output of "ldd TEST".
linux-vdso.so.1 (0x00007fff823b2000) libQt5Widgets.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 (0x00007f4342b05000) libQt5Gui.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007f43425cc000) libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f43420fd000) libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f4341e8b000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4341c6e000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f43418ea000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f43415e6000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f43413cf000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4341030000) libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f4340d9b000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f4340b81000) libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f434094c000) libicui18n.so.57 => /usr/lib/x86_64-linux-gnu/libicui18n.so.57 (0x00007f43404d2000) libicuuc.so.57 => /usr/lib/x86_64-linux-gnu/libicuuc.so.57 (0x00007f434012a000) libpcre16.so.3 => /usr/lib/x86_64-linux-gnu/libpcre16.so.3 (0x00007f433fec1000) libdouble-conversion.so.1 => /usr/lib/x86_64-linux-gnu/libdouble-conversion.so.1 (0x00007f433fcb0000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f433faac000) libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f433f796000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f433f58e000) /lib64/ld-linux-x86-64.so.2 (0x0000561999426000) libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f433f364000) libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007f433f161000) libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007f433ef5e000) libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f433ed57000) libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007f433eb53000) libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f433e924000) libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f433e712000) libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f433e50f000) libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f433e309000) libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f433e107000) libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f433ddc5000) libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f433db9d000) libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f433d982000) libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f433d77d000) libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f433d577000) libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f433d367000) libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f433d0b6000) libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f433ce89000) libicudata.so.57 => /usr/lib/x86_64-linux-gnu/libicudata.so.57 (0x00007f433b40c000) libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f433b199000) libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f433af95000) libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f433ad8d000) libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f433ab77000)
-
And what about
file TEST
? -
I was having this same issue after updating to Stretch. It isn't QtCreator doing it but a default setting of GCC6. I would get the so from a simple command line compiled program. To fix this you need to add the switch -no-pie to the gcc settings.
I did this by making the small change to my .pro file.QMAKE_LFLAGS += -no-pie
After that I got the executable I used to get. Hopefully you were having the same issue.
-
@Mark.Roth said in Debian 9 QT Program Compile:
QMAKE_LFLAGS += -no-pie
Thank you Mark Roth!!!! It is now fixed :)
Many thanks for your helpful suggestion.
-
@djme I'm glad it worked out. I know it was driving me mad until I figured out why. Just another check mark on the after upgrade list. :)
-
@Mark-Roth Is this something you notified the Qt Project about ?
-
@SGaist I don't see how the Qt Project is responsible. It is to do with GCC6. Debian 8 (Jessie) was using gcc 4.6 I think (strike that 4.9 https://packages.debian.org/jessie/gcc) so it was a huge jump in Stretch. This problem occurs even compiling a simple program (non-qt) from the command line.
I did a little digging but can't find out when the -pie (and I suppose the compiler flag pairs) became the default. I supposed it could have been in GCC5. Using Debian does have it's down-sides.
https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#index-no-pieI'll have to see if using one of the compiler side switches creates a binary that can be run normally. Like I said, I only just ran into this when I upgraded to Stretch this past week.
-
I didn't wrote they were responsible. I was just asking you whether you shared that information with them so that they can act accordingly with e.g. documentation update etc.
-
@SGaist Ah, then I should have just said, "No I haven't."
What I was getting at is that this may have been around for quite some time. Some of the hits I found while searching were from over 2 years ago. The only people this sort of thing may be new to are those who have been using an old version of GCC. Or perhaps it is Debian specific with the way it associates files. I'm just a hobbiest hack that created an account here to help out the OP.
If you think it should be passed along, by all means do so. :) -
It's very nice of you and highly appreciated :)
Thank you !