cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

Error when trying to build AMD64 C++ samples

Error when trying to build AMD64 C++ samples

DanielToGo
New Poster

Hello community,

so I wanted to check out the C++ samples (newest version) and install them on a virtual core (V2.4.0) however I can't seem to build any of those samples into an AMD64 snap as I always get an error message. But it works with the ARM64 builder for some reason.

Does anyone know what's going on? Am I doing something wrong? Heres the error message:

*  Executing task: bash build-snap-amd64.sh 

~/ctrlx-automation-sdk-2.4.0/samples-cpp/datalayer.sharedmemory/build ~/ctrlx-automation-sdk-2.4.0/samples-cpp/datalayer.sharedmemory
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Selected BuildKit: GCC x86_64-linux-gnu
-- ######################################
-- Option: BUILD_SNAP ON
-- ######################################
-- Configuring done
-- Generating done
-- Build files have been written to: /home/boschrexroth/ctrlx-automation-sdk-2.4.0/samples-cpp/datalayer.sharedmemory/build
[ 25%] Building CXX object CMakeFiles/shmOwner.dir/main_owner.cpp.o
In file included from /usr/include/comm/datalayer/datalayer_rt.h:3,
                 from /usr/include/comm/datalayer/datalayer.h:9,
                 from /home/boschrexroth/ctrlx-automation-sdk-2.4.0/samples-cpp/datalayer.sharedmemory/main_owner.cpp:12:
/usr/include/comm/datalayer/memory_generated.h:11:41: error: static assertion failed: Non-compatible flatbuffers version included
   11 | static_assert(FLATBUFFERS_VERSION_MAJOR == 23 &&
      |                                         ^
In file included from /usr/include/comm/datalayer/datalayer_rt.h:4,
                 from /usr/include/comm/datalayer/datalayer.h:9,
                 from /home/boschrexroth/ctrlx-automation-sdk-2.4.0/samples-cpp/datalayer.sharedmemory/main_owner.cpp:12:
/usr/include/comm/datalayer/memory_map_generated.h:11:41: error: static assertion failed: Non-compatible flatbuffers version included
   11 | static_assert(FLATBUFFERS_VERSION_MAJOR == 23 &&
      |                                         ^
In file included from /usr/include/comm/datalayer/memory_map_generated.h:16,
                 from /usr/include/comm/datalayer/datalayer_rt.h:4,
                 from /usr/include/comm/datalayer/datalayer.h:9,
                 from /home/boschrexroth/ctrlx-automation-sdk-2.4.0/samples-cpp/datalayer.sharedmemory/main_owner.cpp:12:
/usr/include/comm/datalayer/metadata_generated.h:11:41: error: static assertion failed: Non-compatible flatbuffers version included
   11 | static_assert(FLATBUFFERS_VERSION_MAJOR == 23 &&
      |                                         ^
In file included from /usr/include/comm/datalayer/metadata_generated.h:16,
                 from /usr/include/comm/datalayer/memory_map_generated.h:16,
                 from /usr/include/comm/datalayer/datalayer_rt.h:4,
                 from /usr/include/comm/datalayer/datalayer.h:9,
                 from /home/boschrexroth/ctrlx-automation-sdk-2.4.0/samples-cpp/datalayer.sharedmemory/main_owner.cpp:12:
/usr/include/comm/datalayer/allowed_operations_generated.h:11:41: error: static assertion failed: Non-compatible flatbuffers version included
   11 | static_assert(FLATBUFFERS_VERSION_MAJOR == 23 &&
      |                                         ^
make[2]: *** [CMakeFiles/shmOwner.dir/build.make:76: CMakeFiles/shmOwner.dir/main_owner.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/shmOwner.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

 

 

4 REPLIES 4

nickH
Community Moderator
Community Moderator

Hi @DanielToGo 

what kind of App Build Environment are you using? Do you use the ctrlX WORKS integrated App Build Environment?

Best regards, 

Nick

Hey @nickH

thanks for the reply. Yeah I'm using the integrated Ctrlx works environment.

nickH
Community Moderator
Community Moderator

Hi @DanielToGo 

I just tried to reproduce your error:

  • Setup a new App Build Environment with ctrlX WORKS V2.4. 
  • Ran the scripts "install-cpp-aarch64-libs.sh" and "install-sdk.sh" 
  • And after that I ran "./build-snap-amd64.sh" in ~/ctrlx-automation-sdk/samples-cpp/datalayer.sharedmemory/ 

But I was able to build the snap and therefore I wasn't able to reproduce your error. 

Oh wow I just reinstalled the app environment from scratch and it's working!
I could've sworn I did all these steps but I guess I missed something or something went wrong.

Anyway, thanks for the help Nick.

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist