Tuning Linux compiler for EWO

Find and share HowTos to various installations / configurations!
9 posts • Page 1 of 1
sblancha
Posts:64
Joined: Thu Feb 18, 2016 4:18 pm

Tuning Linux compiler for EWO

Post by sblancha »

Hello,

I am developing an EWO on Linux, the Qt/C++ code compile without error but then loading the EWO in Gedi failed due to "undefined symbol". It seems to be a linker error but linux make does not report this kind of error and the PVSS log error is not good enough for debugging.
My question is how to tune linux compiler for reporting linker error with more meaningful error description?

Thanks
Sebastien

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Tuning Linux compiler for EWO

Post by mkoller »

What error messages do you find in the LogViewer ?
Check the ewo from the commandline via "ldd -r yourewo.ewo" - what missing symbols does it report ?
Dou you use additional libraries beside Qt for your ewo ?
If so, the OS must be able to find it otherwise you'll get undefined symbols.

sblancha
Posts:64
Joined: Thu Feb 18, 2016 4:18 pm

Re: Tuning Linux compiler for EWO

Post by sblancha »

I have the below error:
WCCOAui (1), 2017.08.15 10:03:01.676, SYS, WARNING, 133, Could not load shared library /opt/PVSS_projects/ucpcv_traininglab_dev/ucpcv_traininglab_dev/bin/widgets/linux-rhel-x86_64/unVacTrendingEwo.ewo, /opt/PVSS_projects/ucpcv_traininglab_dev/ucpcv_traininglab_dev/bin/widgets/linux-rhel-x86_64/unVacTrendingEwo.ewo: undefined symbol: _ZTI6Device
WCCOAui (1), 2017.08.15 10:03:01.676, SYS, WARNING, 36/uim, The EWO "/opt/PVSS_projects/ucpcv_traininglab_dev/ucpcv_traininglab_dev/bin/widgets/linux-rhel-x86_64/unVacTrendingEwo.ewo"
is version "1", but we can only load version "4"

So I guess it is a linker error for a function in class Device but it is light for debugging. If I compile the same EWO code on windows I got much more interesting error message from the Visual Studio compiler.

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Tuning Linux compiler for EWO

Post by mkoller »

c++filt _ZTI6Device
demangles the information and says: typeinfo for Device

Do you probably compile with no-rtti ? Or are you mixing libs with and without rtti ?

sblancha
Posts:64
Joined: Thu Feb 18, 2016 4:18 pm

Re: Tuning Linux compiler for EWO

Post by sblancha »

Thanks for your fast answer Martin

my qmake CONFIG options are:
CONFIG += qt thread release warn_on separate_debug_info
CONFIG += plugin no_plugin_name_prefix

I don't use 'rtti' flag, qmake documentation says " 'rtti' : RTTI support is enabled. By default, the compiler default is used" and so even if I add 'rtti' option nothing change I have a no error compilation.

Sebastien.

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Tuning Linux compiler for EWO

Post by mkoller »

do you mind sharing your code with me, so that I can try to build it locally ?

sblancha
Posts:64
Joined: Thu Feb 18, 2016 4:18 pm

Re: Tuning Linux compiler for EWO

Post by sblancha »

The bug in my EWO is not really the purpose of my question, I have already fixed this bug but for this I moved from Linux to Windows machine, compiled with MS VC compiler and fix the bug with the helpful reported linker error.
I wander how to get same linker error at compilation time with linux compiler. Is it a tuning in .pro file? If yes I can share here the .pro files (I have an EWO lib and a static lib)

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Tuning Linux compiler for EWO

Post by mkoller »

You probably could try to add the linker flag --no-allow-shlib-undefined
e.g. QMAKE_LFLAGS += --no-allow-shlib-undefined
I did not try it, just a guess

sblancha
Posts:64
Joined: Thu Feb 18, 2016 4:18 pm

Re: Tuning Linux compiler for EWO

Post by sblancha »

I get ":-1: error: error: unrecognized command line option ‘--no-allow-shlib-undefined’" using this flag

9 posts • Page 1 of 1