Skycoder42 / QtService

A platform independent library to easily create system services and use some of their features

Home Page:https://skycoder42.github.io/QtService/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example EchoControl on exit has error undefined symbol: _ZdlPvm, version Qt_5

Light-Wizzard opened this issue · comments

Update: Running Arch Linux Manjaro, after troubleshooting this more, I found out that it was caused by the Qt Online Installer version, installing it with pacman, and a reboot, and recompile and it started working, I have not found this fix anywhere on the Internet, but this is a strange error, and I could not figure out why Qt was compiled with a different compiler version, and it turns out to be the Online installer.

I wrote a bash file to see what the deal is, and as usual, its a problem with compiling with different versions of a compiler between Qt and the stdc++ library.

/usr/lib/libQt5Core.so.5 >> U _ZdlPvm /usr/lib/libstdc++.so.6 >> 00000000000a1ca0 T _ZdlPvm00000000000a3c30 T _ZdlPvmSt11align_val_t

This is the script you can test it yourself, the QtCore is compiled with a different version of gcc, so the signatures do not match.

#!/bin/bash
# Written by Jeffrey Scott Flesher
# Last update 21 May 2020
# This script is used to help find Library Programs
# undefined symbol: _ZdlPvm, version Qt_5
# given an Executalbe is will show you all the results, look for ones that differ.
#
# "${HOME}/findLibProblem.sh" EchoControl
#
if [ $# -ne 1 ]; then echo "Pass Executable name in as argument"; fi
findIssues()
{
    OIFS=$IFS;
    IFS=' => ';
    # Skip the first line
    for item in "${@:2}"; do 
        # only look at paths
        if [[ $item = /* ]]; then
            #myValue="$(nm --with-symbol-versions -D "$item" | grep _ZdlPvm;)";
            myValue="$(nm -D "$item" | grep _ZdlPvm;)";
            if [ -n "$myValue" ]; then
                myValue="${myValue//[$'\t\r\n']}";
                myValue="$(echo -e "${myValue}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')";     
                echo "$item >> $myValue";
            fi
        fi
    done
    IFS=$OIFS;
}
declare MyLdd="$(ldd $1)";
findIssues $MyLdd;
# End of File 

I tried a few things to fix it with no solution

linux: {
    # undefined symbol: _ZdlPvm, version Qt_5
    QMAKE_CXXFLAGS   *= "-fno-sized-deallocation"
    #CONFIG          *= "c++11"
    #CONFIG          *= "c++14"
    CONFIG           *= "c++latest"
    INCLUDEPATH      *= /usr/include/qt
    INCLUDEPATH      *= /usr/include/qt/QtService
    LIBS             *= -L"/usr/lib"
    LIBS             *= -L"/usr/lib64"
    # suppress the default RPATH if you wish but it did not help
    # QMAKE_LFLAGS_RPATH=
    # add your own with quoting gyrations to make sure $ORIGIN gets to the command line unexpanded
    QMAKE_LFLAGS *= "-Wl,-rpath,\'\$$ORIGIN\'"
}

I am running Arch Linux Manajaro, with latest updates.

My guess is that I need to compile Qt and or the stdc++ library to sync them, any ideas?

Thanks, Flesh

There might be a compiler incompability, but I have never seen that. I cannot use the same gcc as Qt, because the compile their binaries with a Red-Head distro. I use Ubuntu 18 for the CI, so that might be the problem here. I'll keep it open for further investigation, thanks.

I do not have this issue on my Ubuntu LTS, so it is Arch Linux or Manjaro, and why you may not know about it, but if you ever have an issue, the bash file will check to see if there is a problem, grant you it could be better like it could have done the test and told you, but its clear that you compiled code, and my Offical Qt build are the same, but not the Online installer, anyone with Arch Linux or Manjaro should be able to verify this, also the code is specific to that version of the compiler, so next version that value will change, but not the problem.

A while back I filled a bug report that follows this issue somewhat, the issue is that the Online version is made to be generic, so it runs on Ubuntu LTS but is compiled differently than Arch Linux or Manajaro, and keep in mind that AUR is compiled on my machine, so that would not even be your issue, but mine, even if I install it from GitHub, which is what I am now doing, the reason I filled the issue, was because I was at a loss as to why I could not connect to the service, now I know why, and why I am writing a tutorial on my site about it, so other will not have to troubleshoot this issue, I must admit that the reason why I filed the issue here, was because I thought it was from the Offical Repository, and not AUR because in my notes I wrote Pacman and not AUR, I installed it from a GUI, that was my first mistake.

I am going to get back to getting the app running, but I did get a start on the Tutorial, but it has a long way to go, but its time to Feed the Dogs, but its ready for a rough draft review.

I only use Ubuntu as my Production machine, I never release anything me Dev Machine, because of this issue, and why I like Travis and AppVeyor.

Anyways, check it out when you get the time, and see how to fill in the blanks, I will get back to it after I get the app running, and can know more about it to write about it:

https://github.com/Light-Wizzard/WeBookServer/wiki/System.d

Flesh

I am going to close this, as it is just a linking problem, nothing tied to the Sourcecode itself