mtconnect / cppagent

C++ Agent toolkit - Pre-built binaries, visit: https://github.com/mtconnect/cppagent/releases Docker images available at https://hub.docker.com/repositories/mtconnect
http://mtcup.org/
Apache License 2.0
141 stars 90 forks source link

Compilation on x86_64 Linux #156

Closed tukusejssirs closed 2 years ago

tukusejssirs commented 3 years ago

I’m just trying to compile cppagent on Fedora 32 (x86_64 Linux). The following commands I wanted to issue in order build the program:

# Clone MTConnect agent with all the submodules
git clone --recurse-submodules git@github.com:mtconnect/cppagent.git mtconnect_cpp_agent

# Create `build` folder
mkdir mtconnect_cpp_agent/build

# Enter `build` folder
cd mtconnect_cpp_agent/build

# Install dependencies
# Note: I am not sure if I don’t miss any dependencies yet
sudo dnf -y groupinstall "Development Tools"
sudo dnf -y install cmake

# Build `cppagent`
cmake ..
make
sudo make install

cmake .. completed successfully, however, make complains:

[ 17%] Building CXX object agent/CMakeFiles/agent.dir/cppagent.cpp.o
In file included from /home/ts/git/itens/mtconnect_cpp_agent/agent/cppagent.cpp:18:
/home/ts/git/itens/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything
   55 |   using IncomingThings = struct dlib::incoming_things;
      |                                       ^~~~~~~~~~~~~~~
make[2]: *** No rule to make target 'install/dlib/lib/libdlib.a', needed by 'agent/agent'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:372: agent/CMakeFiles/agent.dir/all] Error 2
make: *** [Makefile:183: all] Error 2

There is no such folder as mtconnect_cpp_agent/build/install/dlib/lib/, but there is mtconnect_cpp_agent/build/install/dlib/lib64/.

I have read BUILD.TXT, but I need to build and install an MTConnect agent on headless Linux (aka server without GUI).

I’ve checked mtconnect-agent repo (which I like more as it is coded in JS), but it is archived, therefore I presume it is not developed/maintained anymore.

Any help is appreciated! Thanks in advance!

Update: Using cmake -D CMAKE_BUILD_TYPE=Release .. instead of cmake .. (as it is suggested here) does not make any difference.

wsobel commented 3 years ago

The cmake .. should have compiled the required libraries as part of the initial project creation. Not sure why it did not work on fedora. I can see about testing the build. Only verified on Mac, windows, and Ubuntu.

Best W

(Sent from mobile)

On Oct 8, 2020, at 09:57, Tukusej’s Sirs notifications@github.com wrote:

 I’m just trying to compile cppagent on Fedora 32 (x86_64 Linux). The following commands I wanted to issue in order build the program:

Clone MTConnect agent with all the submodules

git clone --recurse-submodules git@github.com:mtconnect/cppagent.git mtconnect_cpp_agent

Create build folder

mkdir mtconnect_cpp_agent/build

Enter build folder

cd mtconnect_cpp_agent/build

Install dependencies

Note: I am not sure if I don’t miss any dependencies yet

sudo dnf -y groupinstall "Development Tools" sudo dnf -y install cmake

Build cppagent

cmake .. make sudo make install cmake .. completed successfully, however, make complains:

[ 17%] Building CXX object agent/CMakeFiles/agent.dir/cppagent.cpp.o In file included from /home/ts/git/itens/mtconnect_cpp_agent/agent/cppagent.cpp:18: /home/ts/git/itens/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~ make[2]: No rule to make target 'install/dlib/lib/libdlib.a', needed by 'agent/agent'. Stop. make[1]: [CMakeFiles/Makefile2:372: agent/CMakeFiles/agent.dir/all] Error 2 make: *** [Makefile:183: all] Error 2 There is no such folder as mtconnect_cpp_agent/build/install/dlib/lib/, but there is mtconnect_cpp_agent/build/install/dlib/lib64/.

I have read BUILD.TXT, but I need to build and install an MTConnect agent on headless Linux (aka server without GUI).

I’ve checked mtconnect-agent repo (which I like more as it is coded in JS), but it is archived, therefore I presume it is not developed/maintained anymore.

Any help is appreciated! Thanks in advance!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

tukusejssirs commented 3 years ago

Thanks for comment, @wsobel!

Is there anything I could help you with?

tukusejssirs commented 3 years ago

Any progress? Can I help you with testing?

wsobel commented 3 years ago

I have not had a chance to install Fedora to test.

You can check if when you do the cmake .. if the dependencies are built. That would be a big help.

Do you get an error when you run cmake ..?

Thanks, W

On Oct 23, 2020, at 07:39, Tukusej’s Sirs notifications@github.com wrote:

Any progress? Can I help you with testing?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mtconnect/cppagent/issues/156#issuecomment-715383524, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ6BCJ65RWJ7SU2SA63UITSMGITZANCNFSM4SJAIIXQ.

tukusejssirs commented 3 years ago

You can check if when you do the cmake .. if the dependencies are built. That would be a big help.

From my point of view, yes, all dependencies are built.

Here are full command-line outputs.

cmake .. (success) ```bash -- The C compiler identification is GNU 10.2.1 -- The CXX compiler identification is GNU 10.2.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc - works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ - works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Setting build type to 'Debug'. -- Make LibXML2 (v2.9.10) available. -- * Donwload LibXML2 -- * Configure LibXML2 ============================================================ -- The C compiler identification is GNU 10.2.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc - works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project: WINVER -- Build files have been written to: /home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-build ============================================================ -- * Build LibXML2 ============================================================ Scanning dependencies of target libxml2 [ 6%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/catalog.c.o [ 6%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/chvalid.c.o [ 6%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/buf.c.o [ 9%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/c14n.c.o [ 11%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/dict.c.o [ 13%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/encoding.c.o [ 16%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/entities.c.o [ 18%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/error.c.o [ 20%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/globals.c.o [ 23%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/hash.c.o [ 25%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/HTMLparser.c.o [ 27%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/HTMLtree.c.o [ 30%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/legacy.c.o [ 32%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/list.c.o [ 34%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/nanoftp.c.o [ 37%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/nanohttp.c.o [ 39%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/parser.c.o [ 41%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/parserInternals.c.o [ 44%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/pattern.c.o [ 46%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/relaxng.c.o [ 48%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/SAX2.c.o [ 51%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/SAX.c.o [ 53%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/schematron.c.o [ 55%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/threads.c.o [ 58%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/tree.c.o [ 60%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/uri.c.o [ 62%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/valid.c.o [ 65%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/xinclude.c.o [ 67%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/xlink.c.o [ 69%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/xmlIO.c.o [ 72%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/xmlmemory.c.o [ 74%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/xmlreader.c.o [ 76%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/xmlregexp.c.o [ 79%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/xmlmodule.c.o [ 81%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/xmlsave.c.o [ 83%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/xmlschemas.c.o [ 86%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/xmlschemastypes.c.o [ 88%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/xmlunicode.c.o [ 90%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/xmlwriter.c.o [ 93%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/xpath.c.o [ 95%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/xpointer.c.o [ 97%] Building C object CMakeFiles/libxml2.dir/home/ts/mtconnect_cpp_agent/build/_deps/libxmlprovider-src/xmlstring.c.o [100%] Linking C static library liblibxml2.a [100%] Built target libxml2 Install the project... -- Install configuration: "Release" -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/lib/liblibxml2.a -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/DOCBparser.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/HTMLparser.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/HTMLtree.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/SAX.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/SAX2.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/c14n.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/catalog.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/chvalid.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/debugXML.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/dict.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/encoding.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/entities.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/globals.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/hash.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/list.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/nanoftp.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/nanohttp.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/parser.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/parserInternals.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/pattern.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/relaxng.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/schemasInternals.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/schematron.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/threads.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/tree.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/uri.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/valid.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xinclude.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xlink.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xmlIO.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xmlautomata.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xmlerror.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xmlexports.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xmlmemory.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xmlmodule.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xmlreader.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xmlregexp.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xmlsave.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xmlschemas.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xmlschemastypes.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xmlstring.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xmlunicode.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xmlwin32version.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xmlwriter.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xpath.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xpathInternals.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/xpointer.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/win32config.h -- Installing: /home/ts/mtconnect_cpp_agent/build/install/libxml2/include/libxml/wsockcompat.h ============================================================ -- Make dlib library (v19.18) available. -- * Donwload dlib library -- * Patch dlib library /home/ts/mtconnect_cpp_agent/build/_deps/dlibprovider-src/dlib -- * Configure dlib library ============================================================ -- The C compiler identification is GNU 10.2.1 -- The CXX compiler identification is GNU 10.2.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc - works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ - works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Using CMake version: 3.17.4 -- Compiling dlib version: 19.18.0 -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- C++11 activated. -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project: CMAKE_DEBUG_POSTFIX WINVER -- Build files have been written to: /home/ts/mtconnect_cpp_agent/build/_deps/dlibprovider-build ============================================================ -- * Build Release dlib library ============================================================ Scanning dependencies of target dlib [ 8%] Building CXX object CMakeFiles/dlib.dir/bigint/bigint_kernel_2.cpp.o [ 8%] Building CXX object CMakeFiles/dlib.dir/base64/base64_kernel_1.cpp.o [ 8%] Building CXX object CMakeFiles/dlib.dir/bigint/bigint_kernel_1.cpp.o [ 8%] Building CXX object CMakeFiles/dlib.dir/bit_stream/bit_stream_kernel_1.cpp.o [ 10%] Building CXX object CMakeFiles/dlib.dir/entropy_decoder/entropy_decoder_kernel_1.cpp.o [ 12%] Building CXX object CMakeFiles/dlib.dir/entropy_decoder/entropy_decoder_kernel_2.cpp.o [ 14%] Building CXX object CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_1.cpp.o [ 17%] Building CXX object CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_2.cpp.o [ 19%] Building CXX object CMakeFiles/dlib.dir/md5/md5_kernel_1.cpp.o [ 21%] Building CXX object CMakeFiles/dlib.dir/tokenizer/tokenizer_kernel_1.cpp.o [ 23%] Building CXX object CMakeFiles/dlib.dir/unicode/unicode.cpp.o [ 25%] Building CXX object CMakeFiles/dlib.dir/data_io/image_dataset_metadata.cpp.o [ 27%] Building CXX object CMakeFiles/dlib.dir/data_io/mnist.cpp.o [ 29%] Building CXX object CMakeFiles/dlib.dir/global_optimization/global_function_search.cpp.o [ 31%] Building CXX object CMakeFiles/dlib.dir/filtering/kalman_filter.cpp.o [ 34%] Building CXX object CMakeFiles/dlib.dir/test_for_odr_violations.cpp.o [ 36%] Building CXX object CMakeFiles/dlib.dir/svm/auto.cpp.o In file included from /home/ts/mtconnect_cpp_agent/build/_deps/dlibprovider-src/dlib/filtering/../matrix.h:11, from /home/ts/mtconnect_cpp_agent/build/_deps/dlibprovider-src/dlib/filtering/kalman_filter.h:7, from /home/ts/mtconnect_cpp_agent/build/_deps/dlibprovider-src/dlib/filtering/kalman_filter.cpp:6: /home/ts/mtconnect_cpp_agent/build/_deps/dlibprovider-src/dlib/filtering/../matrix/matrix_la.h: In function ‘long int dlib::svd4(dlib::svd_u_mode, bool, const dlib::matrix_exp&, dlib::matrix&, dlib::matrix&, dlib::matrix&) [with EXP = dlib::matrix_op, dlib::row_major_layout> > > > >; long int qN = 1; long int qX = 1; long int uM = 1; long int uN = 1; long int vM = 2; long int vN = 1; MM1 = dlib::memory_manager_stateless_kernel_1; MM2 = dlib::memory_manager_stateless_kernel_1; MM3 = dlib::memory_manager_stateless_kernel_1; L1 = dlib::row_major_layout]’: /home/ts/mtconnect_cpp_agent/build/_deps/dlibprovider-src/dlib/filtering/../matrix/matrix_la.h:225:32: warning: iteration 1 invokes undefined behavior [-Waggressive-loop-optimizations] 225 | y = abs(q(i)) + abs(e(i)); | ~~~^~~~~~ /home/ts/mtconnect_cpp_agent/build/_deps/dlibprovider-src/dlib/filtering/../matrix/matrix_la.h:163:20: note: within this loop 163 | for (i=0; i
make (error 2) ```bash Scanning dependencies of target UPDATE_VERSION [ 0%] Built target UPDATE_VERSION Scanning dependencies of target agent_lib [ 0%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/adapter.cpp.o In file included from /home/ts/mtconnect_cpp_agent/src/adapter.hpp:20, from /home/ts/mtconnect_cpp_agent/src/adapter.cpp:19: /home/ts/mtconnect_cpp_agent/src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 1%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/agent.cpp.o In file included from /home/ts/mtconnect_cpp_agent/src/agent.cpp:18: /home/ts/mtconnect_cpp_agent/src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 2%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/asset.cpp.o [ 3%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/change_observer.cpp.o [ 4%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/checkpoint.cpp.o [ 4%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/component.cpp.o In file included from /home/ts/mtconnect_cpp_agent/src/component.cpp:20: /home/ts/mtconnect_cpp_agent/src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 5%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/config.cpp.o In file included from /home/ts/mtconnect_cpp_agent/src/config.cpp:20: /home/ts/mtconnect_cpp_agent/src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 6%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/connector.cpp.o [ 7%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/cutting_tool.cpp.o [ 8%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/data_item.cpp.o In file included from /home/ts/mtconnect_cpp_agent/src/adapter.hpp:20, from /home/ts/mtconnect_cpp_agent/src/data_item.cpp:21: /home/ts/mtconnect_cpp_agent/src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 8%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/device.cpp.o [ 9%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/globals.cpp.o [ 10%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/json_printer.cpp.o [ 11%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/observation.cpp.o [ 12%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/options.cpp.o [ 12%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/rolling_file_logger.cpp.o [ 13%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/service.cpp.o [ 14%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/version.cpp.o [ 15%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/xml_parser.cpp.o [ 16%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/xml_printer.cpp.o [ 16%] Linking CXX static library libagent_lib.a [ 16%] Built target agent_lib Scanning dependencies of target agent [ 17%] Building CXX object agent/CMakeFiles/agent.dir/cppagent.cpp.o In file included from /home/ts/mtconnect_cpp_agent/agent/cppagent.cpp:18: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ make[2]: *** No rule to make target 'install/dlib/lib/libdlib.a', needed by 'agent/agent'. Stop. make[1]: *** [CMakeFiles/Makefile2:372: agent/CMakeFiles/agent.dir/all] Error 2 ```
wsobel commented 3 years ago

There was a small change to fix an issue with earlier versions of ubuntu and gcc that may help. It was a C++ compatibility issue and now builds on Ubuntu 14 with gcc 8 (i believe)

Best, W

On Nov 5, 2020, at 03:10, Tukusej’s Sirs notifications@github.com wrote:

You can check if when you do the cmake .. if the dependencies are built. That would be a big help.

From my point of view, yes, all dependencies are built.

Here are full command-line outputs.

cmake .. (success) make (error 2) — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mtconnect/cppagent/issues/156#issuecomment-722310296, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ6BCNPFQH6S2LAJENYZ2TSOKB3NANCNFSM4SJAIIXQ.

tukusejssirs commented 3 years ago

Well, some link to that issue would be helpful, but I believe you mean #1 and this comment of yours. However, I believe that the code has since evolved and that is not a solution I’d like to see. :smiley:

Anyway, I use gcc (GCC) 10.2.1 20200723 (Red Hat 10.2.1-1).


I’ve just tried to simply rename the {repo_root}/buildinstall/dlib/lib64 to {repo_root}/buildinstall/dlib/lib and make works as expected, therefore the issue is definitely in the Makefile (or the scripts it is calling), however, I’ve never packaged anything, therefore I can’t help you with fixing this issue. Note that I use x86_64 system and the 64-bit libraries are placed into lib64.

Anyway for reference, below I post you the output of make, which was successfull.

make ```bash [ 0%] Built target UPDATE_VERSION Scanning dependencies of target agent_lib [ 1%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/version.cpp.o [ 1%] Linking CXX static library libagent_lib.a [ 16%] Built target agent_lib [ 17%] Linking CXX executable agent [ 18%] Built target agent Scanning dependencies of target gtest [ 19%] Building CXX object _deps/googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o [ 20%] Linking CXX static library ../../../lib/libgtestd.a [ 20%] Built target gtest Scanning dependencies of target json_printer_asset_test [ 21%] Building CXX object test/CMakeFiles/json_printer_asset_test.dir/json_printer_asset_test.cpp.o [ 22%] Building CXX object test/CMakeFiles/json_printer_asset_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 23%] Building CXX object test/CMakeFiles/json_printer_asset_test.dir/test_globals.cpp.o [ 23%] Building CXX object test/CMakeFiles/json_printer_asset_test.dir/agent_test_helper.cpp.o In file included from /home/ts/mtconnect_cpp_agent/test/agent_test_helper.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 24%] Linking CXX executable json_printer_asset_test [ 24%] Built target json_printer_asset_test Scanning dependencies of target json_printer_error_test [ 25%] Building CXX object test/CMakeFiles/json_printer_error_test.dir/json_printer_error_test.cpp.o [ 26%] Building CXX object test/CMakeFiles/json_printer_error_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 27%] Building CXX object test/CMakeFiles/json_printer_error_test.dir/test_globals.cpp.o [ 27%] Building CXX object test/CMakeFiles/json_printer_error_test.dir/agent_test_helper.cpp.o In file included from /home/ts/mtconnect_cpp_agent/test/agent_test_helper.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 28%] Linking CXX executable json_printer_error_test [ 28%] Built target json_printer_error_test Scanning dependencies of target globals_test [ 29%] Building CXX object test/CMakeFiles/globals_test.dir/globals_test.cpp.o [ 30%] Building CXX object test/CMakeFiles/globals_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 31%] Linking CXX executable globals_test [ 31%] Built target globals_test Scanning dependencies of target data_item_test [ 32%] Building CXX object test/CMakeFiles/data_item_test.dir/data_item_test.cpp.o In file included from /home/ts/mtconnect_cpp_agent/agent_lib/../src/adapter.hpp:20, from /home/ts/mtconnect_cpp_agent/test/data_item_test.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 33%] Building CXX object test/CMakeFiles/data_item_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 34%] Linking CXX executable data_item_test [ 34%] Built target data_item_test Scanning dependencies of target coordinate_system_test [ 35%] Building CXX object test/CMakeFiles/coordinate_system_test.dir/coordinate_system_test.cpp.o In file included from /home/ts/mtconnect_cpp_agent/agent_lib/../src/adapter.hpp:20, from /home/ts/mtconnect_cpp_agent/test/coordinate_system_test.cpp:5: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 36%] Building CXX object test/CMakeFiles/coordinate_system_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 37%] Building CXX object test/CMakeFiles/coordinate_system_test.dir/test_globals.cpp.o [ 38%] Building CXX object test/CMakeFiles/coordinate_system_test.dir/agent_test_helper.cpp.o In file included from /home/ts/mtconnect_cpp_agent/test/agent_test_helper.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 38%] Linking CXX executable coordinate_system_test [ 38%] Built target coordinate_system_test Scanning dependencies of target json_printer_probe_test [ 39%] Building CXX object test/CMakeFiles/json_printer_probe_test.dir/json_printer_probe_test.cpp.o In file included from /home/ts/mtconnect_cpp_agent/test/json_printer_probe_test.cpp:32: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 40%] Building CXX object test/CMakeFiles/json_printer_probe_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 41%] Building CXX object test/CMakeFiles/json_printer_probe_test.dir/test_globals.cpp.o [ 41%] Building CXX object test/CMakeFiles/json_printer_probe_test.dir/agent_test_helper.cpp.o In file included from /home/ts/mtconnect_cpp_agent/test/agent_test_helper.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 42%] Linking CXX executable json_printer_probe_test [ 42%] Built target json_printer_probe_test Scanning dependencies of target connector_test [ 43%] Building CXX object test/CMakeFiles/connector_test.dir/connector_test.cpp.o [ 44%] Building CXX object test/CMakeFiles/connector_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 44%] Linking CXX executable connector_test [ 44%] Built target connector_test Scanning dependencies of target checkpoint_test [ 45%] Building CXX object test/CMakeFiles/checkpoint_test.dir/checkpoint_test.cpp.o In file included from /home/ts/mtconnect_cpp_agent/agent_lib/../src/adapter.hpp:20, from /home/ts/mtconnect_cpp_agent/test/checkpoint_test.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 45%] Building CXX object test/CMakeFiles/checkpoint_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 46%] Linking CXX executable checkpoint_test [ 46%] Built target checkpoint_test Scanning dependencies of target device_test [ 47%] Building CXX object test/CMakeFiles/device_test.dir/device_test.cpp.o [ 48%] Building CXX object test/CMakeFiles/device_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 48%] Linking CXX executable device_test [ 48%] Built target device_test Scanning dependencies of target change_observer_test [ 49%] Building CXX object test/CMakeFiles/change_observer_test.dir/change_observer_test.cpp.o [ 50%] Building CXX object test/CMakeFiles/change_observer_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 51%] Linking CXX executable change_observer_test [ 51%] Built target change_observer_test Scanning dependencies of target data_set_test [ 52%] Building CXX object test/CMakeFiles/data_set_test.dir/data_set_test.cpp.o In file included from /home/ts/mtconnect_cpp_agent/agent_lib/../src/adapter.hpp:20, from /home/ts/mtconnect_cpp_agent/test/data_set_test.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 52%] Building CXX object test/CMakeFiles/data_set_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 53%] Building CXX object test/CMakeFiles/data_set_test.dir/test_globals.cpp.o [ 54%] Building CXX object test/CMakeFiles/data_set_test.dir/agent_test_helper.cpp.o In file included from /home/ts/mtconnect_cpp_agent/test/agent_test_helper.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 55%] Linking CXX executable data_set_test [ 55%] Built target data_set_test Scanning dependencies of target component_test [ 56%] Building CXX object test/CMakeFiles/component_test.dir/component_test.cpp.o [ 57%] Building CXX object test/CMakeFiles/component_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o l[ 58%] Linking CXX executable component_test [ 58%] Built target component_test Scanning dependencies of target config_test [ 58%] Building CXX object test/CMakeFiles/config_test.dir/config_test.cpp.o In file included from /home/ts/mtconnect_cpp_agent/test/config_test.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 59%] Building CXX object test/CMakeFiles/config_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 60%] Linking CXX executable config_test [ 60%] Built target config_test Scanning dependencies of target adapter_test [ 60%] Building CXX object test/CMakeFiles/adapter_test.dir/adapter_test.cpp.o In file included from /home/ts/mtconnect_cpp_agent/agent_lib/../src/adapter.hpp:20, from /home/ts/mtconnect_cpp_agent/test/adapter_test.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 61%] Building CXX object test/CMakeFiles/adapter_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 62%] Linking CXX executable adapter_test Copying to output directory [ 62%] Built target adapter_test Scanning dependencies of target json_printer_stream_test [ 63%] Building CXX object test/CMakeFiles/json_printer_stream_test.dir/json_printer_stream_test.cpp.o [ 64%] Building CXX object test/CMakeFiles/json_printer_stream_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 65%] Building CXX object test/CMakeFiles/json_printer_stream_test.dir/test_globals.cpp.o [ 66%] Building CXX object test/CMakeFiles/json_printer_stream_test.dir/agent_test_helper.cpp.o In file included from /home/ts/mtconnect_cpp_agent/test/agent_test_helper.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 66%] Linking CXX executable json_printer_stream_test [ 66%] Built target json_printer_stream_test Scanning dependencies of target agent_test [ 67%] Building CXX object test/CMakeFiles/agent_test.dir/agent_test.cpp.o In file included from /home/ts/mtconnect_cpp_agent/agent_lib/../src/adapter.hpp:20, from /home/ts/mtconnect_cpp_agent/test/agent_test.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 68%] Building CXX object test/CMakeFiles/agent_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 69%] Building CXX object test/CMakeFiles/agent_test.dir/test_globals.cpp.o [ 70%] Building CXX object test/CMakeFiles/agent_test.dir/agent_test_helper.cpp.o In file included from /home/ts/mtconnect_cpp_agent/test/agent_test_helper.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 70%] Linking CXX executable agent_test [ 70%] Built target agent_test Scanning dependencies of target observation_test [ 71%] Building CXX object test/CMakeFiles/observation_test.dir/observation_test.cpp.o [ 72%] Building CXX object test/CMakeFiles/observation_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 73%] Building CXX object test/CMakeFiles/observation_test.dir/test_globals.cpp.o [ 74%] Building CXX object test/CMakeFiles/observation_test.dir/agent_test_helper.cpp.o In file included from /home/ts/mtconnect_cpp_agent/test/agent_test_helper.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 74%] Linking CXX executable observation_test [ 74%] Built target observation_test Scanning dependencies of target specification_test [ 75%] Building CXX object test/CMakeFiles/specification_test.dir/specification_test.cpp.o In file included from /home/ts/mtconnect_cpp_agent/agent_lib/../src/adapter.hpp:20, from /home/ts/mtconnect_cpp_agent/test/specification_test.cpp:5: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 76%] Building CXX object test/CMakeFiles/specification_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 77%] Building CXX object test/CMakeFiles/specification_test.dir/test_globals.cpp.o [ 78%] Building CXX object test/CMakeFiles/specification_test.dir/agent_test_helper.cpp.o In file included from /home/ts/mtconnect_cpp_agent/test/agent_test_helper.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 78%] Linking CXX executable specification_test [ 78%] Built target specification_test Scanning dependencies of target relationship_test [ 79%] Building CXX object test/CMakeFiles/relationship_test.dir/relationship_test.cpp.o In file included from /home/ts/mtconnect_cpp_agent/agent_lib/../src/adapter.hpp:20, from /home/ts/mtconnect_cpp_agent/test/relationship_test.cpp:5: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 80%] Building CXX object test/CMakeFiles/relationship_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 81%] Building CXX object test/CMakeFiles/relationship_test.dir/test_globals.cpp.o [ 82%] Building CXX object test/CMakeFiles/relationship_test.dir/agent_test_helper.cpp.o In file included from /home/ts/mtconnect_cpp_agent/test/agent_test_helper.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 82%] Linking CXX executable relationship_test [ 82%] Built target relationship_test Scanning dependencies of target table_test [ 83%] Building CXX object test/CMakeFiles/table_test.dir/table_test.cpp.o In file included from /home/ts/mtconnect_cpp_agent/agent_lib/../src/adapter.hpp:20, from /home/ts/mtconnect_cpp_agent/test/table_test.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 84%] Building CXX object test/CMakeFiles/table_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 85%] Building CXX object test/CMakeFiles/table_test.dir/test_globals.cpp.o [ 86%] Building CXX object test/CMakeFiles/table_test.dir/agent_test_helper.cpp.o In file included from /home/ts/mtconnect_cpp_agent/test/agent_test_helper.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 86%] Linking CXX executable table_test [ 86%] Built target table_test Scanning dependencies of target xml_parser_test [ 87%] Building CXX object test/CMakeFiles/xml_parser_test.dir/xml_parser_test.cpp.o [ 88%] Building CXX object test/CMakeFiles/xml_parser_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 89%] Building CXX object test/CMakeFiles/xml_parser_test.dir/test_globals.cpp.o [ 90%] Building CXX object test/CMakeFiles/xml_parser_test.dir/agent_test_helper.cpp.o In file included from /home/ts/mtconnect_cpp_agent/test/agent_test_helper.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 90%] Linking CXX executable xml_parser_test [ 90%] Built target xml_parser_test Scanning dependencies of target xml_printer_test [ 91%] Building CXX object test/CMakeFiles/xml_printer_test.dir/xml_printer_test.cpp.o [ 92%] Building CXX object test/CMakeFiles/xml_printer_test.dir/__/_deps/googletest-src/googletest/src/gtest_main.cc.o [ 93%] Building CXX object test/CMakeFiles/xml_printer_test.dir/test_globals.cpp.o [ 94%] Building CXX object test/CMakeFiles/xml_printer_test.dir/agent_test_helper.cpp.o In file included from /home/ts/mtconnect_cpp_agent/test/agent_test_helper.cpp:22: /home/ts/mtconnect_cpp_agent/agent_lib/../src/agent.hpp:55:39: warning: declaration ‘struct dlib::incoming_things’ does not declare anything 55 | using IncomingThings = struct dlib::incoming_things; | ^~~~~~~~~~~~~~~ [ 95%] Linking CXX executable xml_printer_test [ 95%] Built target xml_printer_test Scanning dependencies of target gmock [ 96%] Building CXX object _deps/googletest-build/googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o [ 96%] Linking CXX static library ../../../lib/libgmockd.a [ 96%] Built target gmock Scanning dependencies of target gmock_main [ 97%] Building CXX object _deps/googletest-build/googlemock/CMakeFiles/gmock_main.dir/src/gmock_main.cc.o [ 98%] Linking CXX static library ../../../lib/libgmock_maind.a [ 98%] Built target gmock_main Scanning dependencies of target gtest_main [ 98%] Building CXX object _deps/googletest-build/googletest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o [100%] Linking CXX static library ../../../lib/libgtest_maind.a [100%] Built target gtest_main ```
wsobel commented 3 years ago

thanks, i’ll take a look at the logs and what you did. thx - W

On Nov 5, 2020, at 13:09, Tukusej’s Sirs notifications@github.com wrote:

Well, some link to that issue would be helpful, but I believe you mean #1 https://github.com/mtconnect/cppagent/issues/1 and this comment of yours https://github.com/mtconnect/cppagent/issues/1#issuecomment-16830987. However, I believe that the code has since evolved and that is not a solution I’d like to see. 😃

Anyway, I use gcc (GCC) 10.2.1 20200723 (Red Hat 10.2.1-1).

I’ve just tried to simply rename the {repo_root}/buildinstall/dlib/lib64 to {repo_root}/buildinstall/dlib/lib and make works as expected, therefore the issue is definitely in the Makefile (or the scripts it is calling), however, I’ve never packaged anything, therefore I can’t help you with fixing this issue. Note that I use x86_64 system and the 64-bit libraries are placed into lib64.

Anyway for reference, below I post you the output of make, which was successfull.

make — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mtconnect/cppagent/issues/156#issuecomment-722646503, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ6BCKINT5QLI57664XCLDSOMIAVANCNFSM4SJAIIXQ.

tukusejssirs commented 2 years ago

@wsobel, after some time, here I am again trying to build cppagent on Fedora 34 x86_64. Now the error is different:

[ 18%] Building CXX object _deps/googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
In file included from /git/others/cppagent/build/_deps/googletest-src/googletest/src/gtest-all.cc:42:
/git/others/cppagent/build/_deps/googletest-src/googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’:
/git/others/cppagent/build/_deps/googletest-src/googletest/src/gtest-death-test.cc:1301:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
 1301 |   StackLowerThanAddress(&dummy, &result);
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/git/others/cppagent/build/_deps/googletest-src/googletest/src/gtest-death-test.cc:1290:13: note: by argument 1 of type ‘const void*’ to ‘void testing::internal::StackLowerThanAddress(const void*, bool*)’ declared here
 1290 | static void StackLowerThanAddress(const void* ptr, bool* result) {
      |             ^~~~~~~~~~~~~~~~~~~~~
/git/others/cppagent/build/_deps/googletest-src/googletest/src/gtest-death-test.cc:1299:7: note: ‘dummy’ declared here
 1299 |   int dummy;
      |       ^~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [_deps/googletest-build/googletest/CMakeFiles/gtest.dir/build.make:76: _deps/googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1674: _deps/googletest-build/googletest/CMakeFiles/gtest.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
full make log ```bash [ 0%] Built target UPDATE_VERSION [ 0%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/agent.cpp.o [ 1%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/agent_loopback_pipeline.cpp.o [ 1%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/config.cpp.o [ 1%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/utilities.cpp.o [ 2%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/json_printer.cpp.o [ 2%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/options.cpp.o [ 3%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/rolling_file_logger.cpp.o [ 3%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/service.cpp.o [ 4%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/version.cpp.o [ 4%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/xml_parser.cpp.o [ 4%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/xml_printer.cpp.o [ 5%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/adapter/adapter.cpp.o [ 5%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/adapter/connector.cpp.o [ 6%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/adapter/adapter_pipeline.cpp.o [ 6%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/pipeline/shdr_token_mapper.cpp.o [ 6%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/pipeline/timestamp_extractor.cpp.o [ 7%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/pipeline/deliver.cpp.o [ 7%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/assets/asset.cpp.o [ 8%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/assets/asset_buffer.cpp.o [ 8%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/assets/file_asset.cpp.o [ 9%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/assets/cutting_tool.cpp.o [ 9%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/device_model/agent_device.cpp.o [ 9%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/device_model/component.cpp.o [ 10%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/device_model/data_item.cpp.o [ 10%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/device_model/device.cpp.o [ 11%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/device_model/specifications.cpp.o [ 11%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/entity/requirement.cpp.o [ 12%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/entity/factory.cpp.o [ 12%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/entity/json_parser.cpp.o [ 12%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/entity/json_printer.cpp.o [ 13%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/entity/xml_parser.cpp.o [ 13%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/entity/xml_printer.cpp.o [ 14%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/http_server/server.cpp.o [ 14%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/http_server/file_cache.cpp.o [ 14%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/http_server/response.cpp.o [ 15%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/http_server/routing.cpp.o [ 15%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/observation/observation.cpp.o [ 16%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/observation/checkpoint.cpp.o [ 16%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/observation/change_observer.cpp.o [ 17%] Linking CXX static library libagent_lib.a [ 17%] Built target agent_lib [ 17%] Building CXX object agent/CMakeFiles/agent.dir/cppagent.cpp.o [ 18%] Linking CXX executable agent [ 18%] Built target agent [ 18%] Building CXX object _deps/googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o In file included from /git/others/cppagent/build/_deps/googletest-src/googletest/src/gtest-all.cc:42: /git/others/cppagent/build/_deps/googletest-src/googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’: /git/others/cppagent/build/_deps/googletest-src/googletest/src/gtest-death-test.cc:1301:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized] 1301 | StackLowerThanAddress(&dummy, &result); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /git/others/cppagent/build/_deps/googletest-src/googletest/src/gtest-death-test.cc:1290:13: note: by argument 1 of type ‘const void*’ to ‘void testing::internal::StackLowerThanAddress(const void*, bool*)’ declared here 1290 | static void StackLowerThanAddress(const void* ptr, bool* result) { | ^~~~~~~~~~~~~~~~~~~~~ /git/others/cppagent/build/_deps/googletest-src/googletest/src/gtest-death-test.cc:1299:7: note: ‘dummy’ declared here 1299 | int dummy; | ^~~~~ cc1plus: all warnings being treated as errors make[2]: *** [_deps/googletest-build/googletest/CMakeFiles/gtest.dir/build.make:76: _deps/googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:1674: _deps/googletest-build/googletest/CMakeFiles/gtest.dir/all] Error 2 make: *** [Makefile:166: all] Error 2 ```

Do I miss a dependency? Could help me out please? :wink: :pray:

wsobel commented 2 years ago

I’ll start Fedora and try again. Not sure if this is a real issue or if it is just a warning that is taken as an error. The dummy is not used and therefor should not cause an actual problem. This is in the gtest library, so is not under our control.

Did you change the settings to make warnings treated as errors?

On Oct 27, 2021, at 05:35, Tukusej’s Sirs @.***> wrote:

@wsobel https://github.com/wsobel, after some time, here I am again trying to build cppagent on Fedora 34 x86_64. Now the error is different:

[ 18%] Building CXX object _deps/googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o In file included from /git/others/cppagent/build/_deps/googletest-src/googletest/src/gtest-all.cc:42: /git/others/cppagent/build/_deps/googletest-src/googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’: /git/others/cppagent/build/_deps/googletest-src/googletest/src/gtest-death-test.cc:1301:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized] 1301 | StackLowerThanAddress(&dummy, &result); | ~~~~~^~~~~ /git/others/cppagent/build/_deps/googletest-src/googletest/src/gtest-death-test.cc:1290:13: note: by argument 1 of type ‘const void’ to ‘void testing::internal::StackLowerThanAddress(const void, bool)’ declared here 1290 | static void StackLowerThanAddress(const void ptr, bool* result) { | ^~~~~ /git/others/cppagent/build/_deps/googletest-src/googletest/src/gtest-death-test.cc:1299:7: note: ‘dummy’ declared here 1299 | int dummy; | ^~~~~ cc1plus: all warnings being treated as errors make[2]: [_deps/googletest-build/googletest/CMakeFiles/gtest.dir/build.make:76: _deps/googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1 make[1]: [CMakeFiles/Makefile2:1674: _deps/googletest-build/googletest/CMakeFiles/gtest.dir/all] Error 2 make: *** [Makefile:166: all] Error 2 full make log Do I miss a dependency? Could help me out please? 😉 🙏

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mtconnect/cppagent/issues/156#issuecomment-952881203, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ6BCORNJFHFF2DBQAWDQTUI7W2JANCNFSM4SJAIIXQ.

tukusejssirs commented 2 years ago

Did you change the settings to make warnings treated as errors?

No, I did exactly what I wrote in the OP.

tukusejssirs commented 2 years ago

@wsobel, why did you close this issue?

wsobel commented 2 years ago

I had not heard back in a month and assumed that the issue was resolved. I could not reproduce the issue on multiple versions of linux. I can reopen.

tukusejssirs commented 2 years ago

Well, actually the issue is not resolved since October 2020. Also I provided you with the build steps I used and the error I get.

I you cannot reproduce it on multiple versions of Linux (I assume you also tried to build it on at least one RHEL-like system), I presume you used some other build instructions—could you share them with me please?

wsobel commented 2 years ago

I'll check it out tomorrow. Can you provide the following:

That will help. I built it on Fedora a while ago without an issue. My CI/CD is with windows 10 ms-dev 15, Ubuntu 20.04 w/ gcc 9, and Mac clang 11.

tukusejssirs commented 2 years ago

dist and version of Linux

Fedora 34 x86_64; any RHEL-like system

compiler version for gcc

gcc installed using dnf (gcc-11.2.1-1.fc34). Output of gcc -v:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.2.1-20210728/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.1 20210728 (Red Hat 11.2.1-1) (GCC) 

any dependencies you installed

All I installed are the dev tools (see below). Are there any other deps?

sudo dnf -y groupinstall 'Development Tools'  # Not all of the packages are required
sudo dnf -y install cmake gcc

additional environment variables that may effect the compiler like cflags, include, and libraries

I didn’t modify any env variables globally that might affect compiling. I use the defaults set by Fedora / Red Hat.


Here’s once again the guide I followed:

compilation guide ```bash # Clone MTConnect agent with all the submodules git clone --recurse-submodules git@github.com:mtconnect/cppagent.git mtconnect_cpp_agent # Create `build` folder mkdir mtconnect_cpp_agent/build # Enter `build` folder cd mtconnect_cpp_agent/build # Install dependencies # Note: I am not sure if I don’t miss any dependencies yet sudo dnf -y groupinstall "Development Tools" sudo dnf -y install cmake # Build `cppagent` cmake .. make sudo make install ```

I have just tested this and now it fails in sudo make install with the following error (this whole output of that command):

sudo make install ```bash [ 0%] Built target UPDATE_VERSION [ 0%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/agent.cpp.o [ 1%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/agent_loopback_pipeline.cpp.o [ 1%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/config.cpp.o [ 1%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/utilities.cpp.o [ 2%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/json_printer.cpp.o [ 2%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/options.cpp.o [ 3%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/rolling_file_logger.cpp.o [ 3%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/service.cpp.o [ 3%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/version.cpp.o [ 4%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/xml_parser.cpp.o [ 4%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/xml_printer.cpp.o [ 5%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/adapter/adapter.cpp.o [ 5%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/adapter/connector.cpp.o [ 6%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/adapter/adapter_pipeline.cpp.o [ 6%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/pipeline/shdr_token_mapper.cpp.o [ 6%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/pipeline/timestamp_extractor.cpp.o [ 7%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/pipeline/deliver.cpp.o [ 7%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/assets/asset.cpp.o [ 8%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/assets/asset_buffer.cpp.o [ 8%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/assets/file_asset.cpp.o [ 9%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/assets/cutting_tool.cpp.o [ 9%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/device_model/agent_device.cpp.o [ 9%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/device_model/component.cpp.o [ 10%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/device_model/data_item.cpp.o [ 10%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/device_model/device.cpp.o [ 11%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/device_model/specifications.cpp.o [ 11%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/entity/entity.cpp.o [ 11%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/entity/requirement.cpp.o [ 12%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/entity/factory.cpp.o [ 12%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/entity/json_parser.cpp.o [ 13%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/entity/json_printer.cpp.o [ 13%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/entity/xml_parser.cpp.o [ 14%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/entity/xml_printer.cpp.o [ 14%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/http_server/server.cpp.o [ 14%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/http_server/file_cache.cpp.o [ 15%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/http_server/response.cpp.o [ 15%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/http_server/routing.cpp.o [ 16%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/observation/observation.cpp.o [ 16%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/observation/checkpoint.cpp.o [ 17%] Building CXX object agent_lib/CMakeFiles/agent_lib.dir/__/src/observation/change_observer.cpp.o [ 17%] Linking CXX static library libagent_lib.a [ 17%] Built target agent_lib [ 17%] Building CXX object agent/CMakeFiles/agent.dir/cppagent.cpp.o [ 18%] Linking CXX executable agent [ 18%] Built target agent [ 19%] Building CXX object _deps/googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o In file included from /home/ts/git/itens/mtconnect_cpp_agent/build/_deps/googletest-src/googletest/src/gtest-all.cc:42: /home/ts/git/itens/mtconnect_cpp_agent/build/_deps/googletest-src/googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’: /home/ts/git/itens/mtconnect_cpp_agent/build/_deps/googletest-src/googletest/src/gtest-death-test.cc:1301:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized] 1301 | StackLowerThanAddress(&dummy, &result); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /home/ts/git/itens/mtconnect_cpp_agent/build/_deps/googletest-src/googletest/src/gtest-death-test.cc:1290:13: note: by argument 1 of type ‘const void*’ to ‘void testing::internal::StackLowerThanAddress(const void*, bool*)’ declared here 1290 | static void StackLowerThanAddress(const void* ptr, bool* result) { | ^~~~~~~~~~~~~~~~~~~~~ /home/ts/git/itens/mtconnect_cpp_agent/build/_deps/googletest-src/googletest/src/gtest-death-test.cc:1299:7: note: ‘dummy’ declared here 1299 | int dummy; | ^~~~~ cc1plus: all warnings being treated as errors make[2]: *** [_deps/googletest-build/googletest/CMakeFiles/gtest.dir/build.make:76: _deps/googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:1674: _deps/googletest-build/googletest/CMakeFiles/gtest.dir/all] Error 2 make: *** [Makefile:166: all] Error 2 ```
wsobel commented 2 years ago

One thing that jumps out at me is gcc 11. I have only tested through 9 for the existing version and the dev version through 10. I’ll see if this could be the issue.

They did rearrange their headers and the issue you were having was in google test, I library widely used and not maintained by us.

One option is to install gcc 9 and see if the problem is still there. You will need to use update-alternatives to switch.

https://linuxconfig.org/how-to-switch-between-multiple-gcc-and-g-compiler-versions-on-ubuntu-20-04-lts-focal-fossa

(Sent from mobile)

On Nov 28, 2021, at 03:31, Tukusej’s Sirs @.***> wrote:

 dist and version of Linux

Fedora 34 x86_64; any RHEL-like system

compiler version for gcc

gcc installed using dnf (gcc-11.2.1-1.fc34). Output of gcc -v:

Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.2.1-20210728/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.2.1 20210728 (Red Hat 11.2.1-1) (GCC) any dependencies you installed

All I installed are the dev tools (see below). Are there any other deps?

sudo dnf -y groupinstall 'Development Tools' # Not all of the packages are required sudo dnf -y install cmake gcc additional environment variables that may effect the compiler like cflags, include, and libraries

I didn’t modify any env variables globally that might affect compiling. I use the defaults set by Fedora / Red Hat.

Here’s once again the guide I followed:

compilation guide I have just tested this and now it fails in sudo make install with the following error (this whole output of that command):

sudo make install — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.

wsobel commented 2 years ago

Currently gtest does not support g++ version 11. We will not be able to fix this or address this without google.

To compile successfully: do the following:

mkdir build
cd build
cmake .. -D AGENT_ENABLE_UNITTESTS=OFF
cmake --build .

This will turn the compilation of unit tests off. I tried to change the version of gtest to 1.11, but it still failed.

The only other option is to install g++ version 9 or 10, but I am not a Fedora/dnf savant and do not know how to get update-alternatives working properly on the environment. If you figure out how to get this working, please post here.

Best,