You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu下使用eProsima FastRTPS编译makefile_x64Linux2.6gcc遇阻求助

FastRTPS Compilation with makefile_x64Linux2.6gcc on Ubuntu

Hey there! Let's work through this compilation issue you're hitting with eProsima FastRTPS on Ubuntu. That makefile_x64Linux2.6gcc is a platform-specific Makefile, and the problem is likely that make isn't picking it up by default—here's how to fix it:

1. Directly Specify the Makefile to make

By default, make looks for files named Makefile (uppercase) or makefile (lowercase). To use your custom-named Makefile, use the -f flag to point directly to it:

make -f makefile_x64Linux2.6gcc

Make sure you run this command from the same directory where the makefile_x64Linux2.6gcc file lives. If it's in a subfolder, include the full or relative path:

make -f ./subfolder/path/makefile_x64Linux2.6gcc

2. Verify Your Build Dependencies

First, double-check you have the basic Ubuntu build tools installed—missing these can cause silent or confusing failures:

sudo apt update && sudo apt install build-essential

This installs gcc, g++, make, and other core utilities needed for compiling C/C++ code.

3. Fix Compatibility Issues (if the Makefile is outdated)

The x64Linux2.6gcc in the filename suggests this Makefile was built for older Linux kernels (2.6 series) and possibly older GCC versions. If you hit errors about unsupported compiler flags, try:

  • Explicitly specify your system's current GCC version (replace 11 with your installed version—check with gcc --version):
    CC=gcc-11 CXX=g++-11 make -f makefile_x64Linux2.6gcc
    
  • Open the makefile_x64Linux2.6gcc file in a text editor and remove any deprecated compiler flags (e.g., old -W flags that aren't supported in modern GCC releases).

eProsima FastRTPS now officially recommends using CMake for builds, which is more robust and compatible with modern Ubuntu systems. If the custom Makefile gives you persistent issues, switch to this approach:

  1. Navigate to your FastRTPS source directory
  2. Create and enter a dedicated build folder:
    mkdir build && cd build
    
  3. Configure the build with CMake:
    cmake ..
    
  4. Compile (use -j$(nproc) to speed up using all your CPU cores):
    make -j$(nproc)
    
  5. Install the library (optional but useful for system-wide access):
    sudo make install
    

Give these steps a try—starting with the -f flag for the Makefile should resolve the immediate issue. If you hit specific error messages, feel free to share them for more targeted help!

内容的提问来源于stack exchange,提问作者Teddy 1993

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 08:05:33