[2022-02-14 18:26:31] [build-stdout] /usr/bin/g++ -D_GNU_SOURCE -D_DEFAULT_SOURCE -DPVD_INTERNAL -D_X86_64_ -DUNIX -Dlinux -O3 -g -Wall -mtune=generic -m64 -I. -I../O.Common -I. -I. -I.. -I../../testApp/misc -I../../testApp/pv -I../../testApp/property -I../../testApp/copy -I/opt/src/include/compiler/gcc -I/opt/src/include/os/Linux -I/opt/src/include -I/opt/src/include/compiler/gcc -I/opt/src/include/os/Linux -I/opt/src/include -c ../../testApp/misc/testSharedVector.cpp [2022-02-14 18:26:32] [build-stderr] In file included from /opt/src/include/pv/pvData.h:23, [2022-02-14 18:26:32] [build-stderr] from /opt/src/include/pv/pvUnitTest.h:15, [2022-02-14 18:26:32] [build-stderr] from ../../testApp/misc/testSharedVector.cpp:15: [2022-02-14 18:26:32] [build-stderr] /opt/src/include/pv/typeCast.h: In static member function ‘static epics::pvData::shared_vector<TO> epics::pvData::detail::shared_vector_converter<TO, FROM, Enable>::op(const epics::pvData::shared_vector<FROM>&) [with TO
= float; FROM = int; Enable = void]’: [2022-02-14 18:26:32] [build-stderr] /opt/src/include/pv/typeCast.h:195:24: error: inlining failed in call to always_inline ‘TO epics::pvData::castUnsafe(const FROM&) [with TO = float; FROM = int]’: indirect function call with a yet undetermined callee [2022-02-14 18:26:32] [build-stderr] 195 | static FORCE_INLINE TO castUnsafe(const FROM& from) [2022-02-14 18:26:32] [build-stderr] | ^~~~~~~~~~ [2022-02-14 18:26:32] [build-stderr] In file included from /usr/include/c++/9/algorithm:62, [2022-02-14 18:26:32] [build-stderr] from /opt/src/include/pv/pvData.h:15, [2022-02-14 18:26:32] [build-stderr] from /opt/src/include/pv/pvUnitTest.h:15, [2022-02-14 18:26:32] [build-stderr] from ../../testApp/misc/testSharedVector.cpp:15: [2022-02-14 18:26:32] [build-stderr] /usr/include/c++/9/bits/stl_algo.h:4337:24: note: called from here [2022-02-14 18:26:32] [build-stderr] 4337 | *__result = __unary_op(*__first); [2022-02-14 18:26:32] [build-stderr] |
~~~~~~~~~~^~~~~~~~~~ [2022-02-14 18:26:32] [build-stderr] In file included from /opt/src/include/pv/pvData.h:23, [2022-02-14 18:26:32] [build-stderr] from /opt/src/include/pv/pvUnitTest.h:15, [2022-02-14 18:26:32] [build-stderr] from ../../testApp/misc/testSharedVector.cpp:15: [2022-02-14 18:26:32] [build-stderr] /opt/src/include/pv/typeCast.h: In static member function ‘static epics::pvData::shared_vector<TO> epics::pvData::detail::shared_vector_converter<TO, FROM, Enable>::op(const epics::pvData::shared_vector<FROM>&) [with TO = double; FROM = int; Enable = void]’: [2022-02-14 18:26:32] [build-stderr] /opt/src/include/pv/typeCast.h:195:24: error: inlining failed in call to always_inline ‘TO epics::pvData::castUnsafe(const FROM&) [with TO = double; FROM = int]’: indirect function call with a yet undetermined callee [2022-02-14 18:26:32] [build-stderr] 195 | static FORCE_INLINE TO castUnsafe(const FROM& from) [2022-02-14 18:26:32] [build-stderr] | ^~~~~~~~~~ [2022-02-14
18:26:32] [build-stderr] In file included from /usr/include/c++/9/algorithm:62, [2022-02-14 18:26:32] [build-stderr] from /opt/src/include/pv/pvData.h:15, [2022-02-14 18:26:32] [build-stderr] from /opt/src/include/pv/pvUnitTest.h:15, [2022-02-14 18:26:32] [build-stderr] from ../../testApp/misc/testSharedVector.cpp:15: [2022-02-14 18:26:32] [build-stderr] /usr/include/c++/9/bits/stl_algo.h:4337:24: note: called from here [2022-02-14 18:26:32] [build-stderr] 4337 | *__result = __unary_op(*__first); [2022-02-14 18:26:32] [build-stderr] | ~~~~~~~~~~^~~~~~~~~~ [2022-02-14 18:26:34] [build-stdout] make[4]: Leaving directory '/opt/src/modules/pvData/testApp/O.linux-x86_64'
To play with it on lgtm.com (which builds on a recent version of Ubuntu) you can paste in some analysis configuration YAML here <https://lgtm.com/builds/test/g/epics-base/epics-base> to configure it without having to add a file to the repo, this is what I used to get the above:
|extraction: cpp: index: build_command: "make"|
It is possible to tell it to install a different version of gcc using a prepare: section but I don't know what the right packages would be. It was interesting to see that it automatically installed g++ /during/ the above build the first time it was called, is that something which Ubuntu does (or can do) now?
Not sure if this is likely to be useful for us, but I thought it might be worth exploring. I haven't been able to look into the actual code analysis it can do yet.
- Andrew
--
Complexity comes for free, Simplicity you have to work for.