Skip to content

rootcling --cxxmodule exits with zero status code on error #13675

Open
@greenc-FNAL

Description

@greenc-FNAL

Check duplicate issues.

  • Checked for duplicates

Description

When attempting to produce a PCM from a module map specifying a header that cannot be found, I get the message

/scratch/greenc/build/mrb-art-summer/e28-prof/build_slf7.x86_64/critic/critic/test/art/sampling-input/module.modulemap:3:10: error: cannot emit module critic_test_art_sampling-input_dict: size must be explicitly specified for missing header file "canvas/Persistency/Common/Sampled.h"
  header "canvas/Persistency/Common/Sampled.h"
         ^

This—while unwelcome—is reasonable. However, rootcling then exits with status code 0 and the continues with the PCM file never generated.

Reproducer

  1. Create a simple module map attempting to use a nonexistent header, e.g.
    module "critic_test_art_sampling-input_dict" {
      requires cplusplus
      header "canvas/Persistency/Common/Sampled.h"
      link "libcanvas.so"
    }
    
  2. Attempt to create a PCM from it:
    rootcling --cxxmodule -f -v4 ...
    
  3. Check the error code:
    echo $?
    

ROOT version

   ------------------------------------------------------------------
  | Welcome to ROOT 6.28/04                        https://root.cern |
  | (c) 1995-2022, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on May 08 2023, 02:44:07                 |
  | From tags/v6-28-04@v6-28-04                                      |
  | With g++ (GCC) 13.1.0                                            |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |
   ------------------------------------------------------------------

Installation method

UPS

Operating system

SL7

Additional context

  • GCC13.1.0/C++20

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions