PointCloudLibrary / PointCloudLibrary/pcl

[compile error] No member name fallocate in global namespace

Open
#4,107 20 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind: compile error module: io needs: feedback platform: android
Dominant language
C++
Stars
11.1k
Forks
4.7k
Avg merge
4d 10h
Merged PRs (30d)
6

Description

Trying to cross build PCL for android and got the error below:

In file included from /home/username/.conan/data/pcl/1.11.0/zhijia/testing/build/9623c23234268deacc3642c6272978d18ec71295/source_subfolder/io/include/pcl/io/impl/pcd_io.hpp:49:
/home/username/.conan/data/pcl/1.11.0/zhijia/testing/build/9623c23234268deacc3642c6272978d18ec71295/source_subfolder/io/include/pcl/io/low_level_io.h:172:13: error: no member named 'fallocate' in the global namespace
      if (::fallocate(fd, 0, 0, length) == 0)
          ~~^

To Reproduce
PCL 1.11.0, using Conan for cross build
all dependencies are solved and then run Command below gives the above error
cmake --build '/home/username/.conan/data/pcl/1.11.0/zhijia/testing/build/9623c23234268deacc3642c6272978d18ec71295/build_subfolder' '--' '-j12'

Your Environment (please complete the following information):

  • OS: [ Ubuntu 18.04]
  • Compiler: [ GCC 9.3]
  • PCL Version e.g. 1.11.0
    Conan profile file used
    include(default)
    target_host=aarch64-linux-android
    api_level=21
    [settings]
    arch=armv8
    build_type=Release
    compiler=clang
    compiler.libcxx=libc++
    compiler.version=9
    os=Android
    os.api_level=$api_level
    [build_requires]
    [options]
    [env]
    PATH=[$android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin]
    CHOST=$target_host
    AR=$target_host-ar
    AS=$target_host-as
    RANLIB=$target_host-ranlib
    CC=$target_host$api_level-clang
    CXX=$target_host$api_level-clang++
    LD=$target_host-ld
    STRIP=$target_host-strip
    CONAN_MAKE_PROGRAM=$android_ndk/prebuilt/linux-x86_64/bin/make
    CONAN_CMAKE_TOOLCHAIN_FILE=$android_ndk/build/cmake/android.toolchain.cmake

If PCL was compiled from source or failure in compiling PCL itself:

  • GPU, Kinfu, CUDA enabled? No
  • List and Version of dependencies used
    boost/1.72.0
    eigen/3.3.7
    flann/1.9.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in io/include/pcl/io/low_level_io.h at line 172 and inspect the use of ::fallocate during the Android cross-build. Reproduce the failure with the provided Conan profile and CMake build command, then verify that the Android build no longer reports the missing global member while preserving the existing behavior on supported platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, cmake, cpp
Domain
build-system, mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.