https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113192

            Bug ID: 113192
           Summary: [14 Regression] ERROR: couldn't execute
                    "../../../gcc/libgomp/testsuite/flock": no such file
                    or directory
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgomp
          Assignee: unassigned at gcc dot gnu.org
          Reporter: danglin at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org, tschwinge at gcc dot gnu.org
  Target Milestone: ---
              Host: hppa64-hp-hpux11.11
            Target: hppa64-hp-hpux11.11
             Build: hppa64-hp-hpux11.11

HP-UX doesn't have flock but it does have perl. configure tries to create
a fallback but a relative path to libgomp/testsuite/flock is generated.
It is wrong when the testsuite is run.

AC_MSG_NOTICE([checking for flock implementation])
AC_CHECK_PROGS(FLOCK, flock)
# Fallback if 'perl' is available.
if test -z "$FLOCK"; then
  AC_CHECK_PROG(FLOCK, perl, $srcdir/testsuite/flock)
fi

configure: checking for flock implementation
checking for flock... no
checking for perl... ../../../gcc/libgomp/testsuite/flock

Running /home/dave/gnu/gcc/gcc/libgomp/testsuite/libgomp.c/c.exp ...
ERROR: tcl error sourcing
/home/dave/gnu/gcc/gcc/libgomp/testsuite/libgomp.c/c.exp.
ERROR: tcl error code NONE
ERROR: couldn't execute "../../../gcc/libgomp/testsuite/flock": no such file or
directory
    while executing
"exec $FLOCK $lock_kind 1 >@ $lock_fd"
    (procedure "saved_libgomp_load" line 10)
    invoked from within
"saved_libgomp_load ./alloc-1.exe"
    ("eval" body line 1)
    invoked from within
"eval [list saved_${tool}_load $program] $args"
    (procedure "libgomp_load" line 13)
    invoked from within
"${tool}_load $output_file"
    (procedure "saved-dg-test" line 218)
    invoked from within
"saved-dg-test
/home/dave/gnu/gcc/gcc/libgomp/testsuite/libgomp.c/../libgomp.c-c++-common/alloc-1.c
{} -O2"
    ("eval" body line 1)
    invoked from within
"eval saved-dg-test $args "
    (procedure "dg-test" line 1)
    invoked from within
"dg-test $testcase $options ${default-extra-options}"
    (procedure "dg-runtest" line 10)
    invoked from within
"dg-runtest $tests "" $DEFAULT_CFLAGS"
    (file "/home/dave/gnu/gcc/gcc/libgomp/testsuite/libgomp.c/c.exp" line 27)
    invoked from within
"source /home/dave/gnu/gcc/gcc/libgomp/testsuite/libgomp.c/c.exp"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 source /home/dave/gnu/gcc/gcc/libgomp/testsuite/libgomp.c/c.exp"
    invoked from within
"catch "uplevel #0 source $test_file_name" msg"

This problem was introduced by the following commit:

commit 04abe1944d30eb18a2060cfcd9695d085f7b4752
Author: Thomas Schwinge <tho...@codesourcery.com>
Date:   Mon May 15 20:00:07 2023 +0200

    Support parallel testing in libgomp: fallback Perl 'flock' [PR66005]

It appears this problem can be worked around by exporting FLOCK.

Reply via email to