mesonbuild / meson

The Meson Build System
http://mesonbuild.com
Apache License 2.0
5.35k stars 1.53k forks source link

meson and NVIDIA HPC SDK #13216

Open icamps opened 1 month ago

icamps commented 1 month ago

Describe the bug Running meson.build.txt with NVIDIA HPC compilers returned:

meson/meson.build:168:12: ERROR: Delimiters not found in preprocessor output.

    This is a Meson bug and should be reported!

To Reproduce File included. It is part of the xTB software.

Expected behavior Compile without any issue.

system parameters

eli-schwartz commented 1 month ago

The uploaded file is incorrect. The error message says it is this meson.build file in a subdirectory to blame:

https://github.com/grimme-lab/xtb/blob/v6.7.0/meson/meson.build#L168

  omp_dep = dependency('openmp', required: fc.get_id() != 'intel' and fc.get_id() != 'nvidia_hpc')

This comes from:

https://github.com/mesonbuild/meson/blob/7d28ff29396f9d7043204de8ddc52226b9903811/mesonbuild/dependencies/misc.py#L108-L113 get_define raises this: https://github.com/mesonbuild/meson/blob/7d28ff29396f9d7043204de8ddc52226b9903811/mesonbuild/compilers/mixins/clike.py#L664-L669

@icamps please post your meson-log.txt as it should have the debug information relevant to solving your issue.

icamps commented 1 month ago

@eli-schwartz sorry for my mistake.

Here is the meson-log.txt file attached. meson-log.txt

eli-schwartz commented 1 month ago

Thanks.

Running compile:
Working directory:  /tmp/tmpfezuttav
Code:

        #ifndef _OPENMP
        # define _OPENMP "MESON_GET_DEFINE_UNDEFINED_SENTINEL"
        #endif
        "MESON_GET_DEFINE_DELIMITER_START"
_OPENMP
"MESON_GET_DEFINE_DELIMITER_END"
-----------
Command line: `nvc /tmp/tmpfezuttav/testfile.c -E -P -P -O0 -mp` -> 0

meson/meson.build:168:12: ERROR: Delimiters not found in preprocessor output.

So the question is, what is nvc actually returning for that code...

icamps commented 1 month ago

That file, testfile.c, is not part of the xTB program. I didn't find it and the temporary folders are deleted.