file globbing broken on armhf

Bug #1900076 reported by Ben Nizette
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cmake (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Running cmake on ubuntu armhf fails compiler ID detection with errors like:

CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
 list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
 /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
 /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)

Looking in more detail, the `file(GLOB ...)`s regularly (though not always?) return empty results. For example, with
#: mkdir -p path/1/2/3
#: cat CMakeLists.txt
file(GLOB p1 "./path/*")
file(GLOB p2 "./path/1/*")
file(GLOB p3 "./path/1/2/*")
message("${p1}: ${p2}: ${p3}")
#: cmake .

.. I see on amd64
/root/./path/1: /root/./path/1/2/: /root/./path/1/2/3

but on ARMHF just
: :

For different choices of path, sometimes I'll get results at some depth but not at others.

tested on Docker amd64/ubuntu:latest and arm32v7/ubuntu:latest + build-essential + cmake (3.16.3-1ubuntu1)

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Hello, I can't reproduce with cmake 3.18 on impish...

CMake Warning (dev) in //CMakeLists.txt:
  No project() command is present. The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command. Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers. Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 10.3.0
-- The CXX compiler identification is GNU 10.3.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
//./path/1: //./path/1/2: //./path/1/2/3
CMake Warning (dev) in //CMakeLists.txt:
  No cmake_minimum_required command is present. A line of code such as

    cmake_minimum_required(VERSION 3.18)

  should be added at the top of the file. The version specified may be lower
  if you wish to support older CMake versions for this project. For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /

same with paths created under /foo/
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present. The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command. Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers. Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 10.3.0
-- The CXX compiler identification is GNU 10.3.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
/foo/./path/1: /foo/./path/1/2: /foo/./path/1/2/3
CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present. A line of code such as

    cmake_minimum_required(VERSION 3.18)

  should be added at the top of the file. The version specified may be lower
  if you wish to support older CMake versions for this project. For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /foo/bar

Changed in cmake (Ubuntu):
status: New → Fix Released
Revision history for this message
BestSteve (beststeve) wrote :

20.04 focal -> reproducible on my qemu vm
20.10 groovy -> reproducible on my qemu vm
21.04 hirsute -> can't reproduce

Revision history for this message
Brad King (brad.king) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.