Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Converting from debian to ubuntu for development



  • I have a subdirs project that compiles and runs perfectly under debian 9.5. Because some of the libraries I use don't support debian (only ubuntu), I'm working to change to a ubuntu development environment. I have 2 VMWare virtual machines (debuan 9.5 and ubuntu 16.04). I have my code checked into a git repo on debian and it works great.

    On the ubuntu vm, I clone the same repo and install all of the sdk libraries. However, the exact same project fails to link properly. I get messages like:

    undefined reference to PvString::PvString(char const*)' which is a link error.

    The .pro file is exactly the same and the libraries are installed in the same locations on both systems. Is there anything else I can look at to try to see why it won't link on ubuntu but will on debian?



  • In case anyone runs across a similar issue. I was able to resolve it by re-writing my project files. I didn't "change" what was included, but how it was included. I had lines like:

    LIBS +=  -lPvDevice \
                     -lPvBuffer \ #etc
    

    I changed it to

    LIBS += -lPvDevice
    LIBS += -lPvBuffer
    

    I made a number of other similar changes and it suddenly started working.


  • Lifetime Qt Champion

    @Daniel-Williams without further information that's hard to tell.

    You should check the linker command lines on both systems. do they differ?

    Also, make sure the lib containing that symbol already exists at the point of linking (dependency order)

    Regards



  • Hi, also note that for Ubuntu 16.04 you need to have eBUS SDK 5.0 or 5.1 installed (older SDKs are not supported)



  • @hskoglund Thank you. I verified that I have version 5.1 installed.



  • @aha_1980 Thank you, I hadn't thought of checking the linker command. I have compared them character-by-character and they are exactly the same. That'll lead me to my next check of the environment settings and additional validation that the user can see the library files.



  • In case anyone runs across a similar issue. I was able to resolve it by re-writing my project files. I didn't "change" what was included, but how it was included. I had lines like:

    LIBS +=  -lPvDevice \
                     -lPvBuffer \ #etc
    

    I changed it to

    LIBS += -lPvDevice
    LIBS += -lPvBuffer
    

    I made a number of other similar changes and it suddenly started working.



  • @Daniel-Williams glad you find a workaround. If your issue is solved, please don't forget to mark your post as such



  • @Daniel-Williams It's weird since the semantic is the same here, maybe the comment #etc breaks any following append to LIBS, did you try without the comment ?



  • @X-Krys I didn't try what you suggested. I had worked through so many potential causes that I just went into a "re-write the whole file and take out anything that might cause an issue" mode and it started working.


Log in to reply