This is an automated email from the ASF dual-hosted git repository.

gengliangwang pushed a commit to branch branch-4.3
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-4.3 by this push:
     new bf19e5c17df1 [SPARK-60478][INFRA] Fix tpcds-kit build failure with GCC 
15 on Ubuntu 26.04 GitHub runners
bf19e5c17df1 is described below

commit bf19e5c17df1cc189976231fca783e94bf77a814
Author: Gengliang Wang <[email protected]>
AuthorDate: Thu Oct 22 10:37:34 2026 -0700

    [SPARK-60478][INFRA] Fix tpcds-kit build failure with GCC 15 on Ubuntu 
26.04 GitHub runners
    
    ### What changes were proposed in this pull request?
    
    Build tpcds-kit with `-std=gnu89` (via `LINUX_CFLAGS="-O3 -std=gnu89"`) in 
the `Build tpcds-kit` step of both `build_and_test.yml` (the `Run TPC-DS 
queries with SF=1` job) and `benchmark.yml` (the `tpcds-1g-gen` job, which must 
be kept in sync).
    
    ### Why are the changes needed?
    
    The `Run TPC-DS queries with SF=1` job has been failing intermittently in 
the `Build tpcds-kit` step. GitHub's `ubuntu-latest` label is gradually moving 
to Ubuntu 26.04 (starting October 19, 2026), which ships GCC 15. GCC 14+ turns 
implicit-int into an error, and GCC 15 defaults to C23, so the old tpcds-kit C 
code no longer compiles:
    
    ```
    date.c:566:1: error: type of 'jDay' defaults to 'int' [-Wimplicit-int]
    date.c:566:1: error: type of 'nDistribution' defaults to 'int' 
[-Wimplicit-int]
    make: *** [<builtin>: date.o] Error 1
    ```
    
    Examples: 
https://github.com/ForVic/spark/actions/runs/39739475067/job/119709170091, 
https://github.com/pratham76/spark/actions/runs/39796929675/job/119898127546 
(both on image `ubuntu-26.04`). The job looks flaky because it only fails when 
it lands on a migrated runner and the TPC-DS data cache misses.
    
    Setting the C standard explicitly works on both the old and the new 
compilers and doesn't depend on which runner image the job gets.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No, CI only.
    
    ### How was this patch tested?
    
    Reproduced locally in Docker:
    - `gcc:15` (GCC 15.3.0) with `make OS=LINUX`: fails with the error above.
    - `gcc:15` with `make OS=LINUX LINUX_CFLAGS="-O3 -std=gnu89"`: builds 
`dsdgen` and `dsqgen`.
    - The `call_center`, `customer`, `date_dim`, `item`, `web_sales` and 
`web_returns` data generated at SF=1 is byte-identical (same md5) between 
`gcc:13` with the default flags (what Ubuntu 24.04 runners use today) and 
`gcc:15` with `-std=gnu89`, so the expected TPC-DS query results don't change.
    
    Changing `build_and_test.yml` also changes the TPC-DS data cache key, so 
this PR's CI rebuilds tpcds-kit with the new flags.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    Generated-by: Claude Code (Claude Opus 5.5)
    
    This pull request and its description were written by Isaac.
    
    Closes #59714 from gengliangwang/SPARK-60478.
    
    Authored-by: Gengliang Wang <[email protected]>
    Signed-off-by: Gengliang Wang <[email protected]>
    (cherry picked from commit 668fdddb148513af2b35b68871ec905968ca1d89)
    Signed-off-by: Gengliang Wang <[email protected]>
---
 .github/workflows/benchmark.yml      | 5 ++++-
 .github/workflows/build_and_test.yml | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml
index 4e10641cd13a..f45b34afcec0 100644
--- a/.github/workflows/benchmark.yml
+++ b/.github/workflows/benchmark.yml
@@ -127,7 +127,10 @@ jobs:
           path: ./tpcds-kit
       - name: Build tpcds-kit
         if: steps.cache-tpcds-sf-1.outputs.cache-hit != 'true'
-        run: cd tpcds-kit/tools && make OS=LINUX
+        run: |
+          # tpcds-kit is old C code (implicit int, K&R declarations) that 
newer GCC
+          # versions (e.g. GCC 15 on Ubuntu 26.04) reject by default, so pin 
the C standard.
+          cd tpcds-kit/tools && make OS=LINUX LINUX_CFLAGS="-O3 -std=gnu89"
       - name: Install Java ${{ inputs.jdk }}
         if: steps.cache-tpcds-sf-1.outputs.cache-hit != 'true'
         uses: actions/setup-java@v5
diff --git a/.github/workflows/build_and_test.yml 
b/.github/workflows/build_and_test.yml
index ad1fbfca30ee..a71e07168604 100644
--- a/.github/workflows/build_and_test.yml
+++ b/.github/workflows/build_and_test.yml
@@ -1372,7 +1372,10 @@ jobs:
         path: ./tpcds-kit
     - name: Build tpcds-kit
       if: steps.cache-tpcds-sf-1.outputs.cache-hit != 'true'
-      run: cd tpcds-kit/tools && make OS=LINUX
+      run: |
+        # tpcds-kit is old C code (implicit int, K&R declarations) that newer 
GCC
+        # versions (e.g. GCC 15 on Ubuntu 26.04) reject by default, so pin the 
C standard.
+        cd tpcds-kit/tools && make OS=LINUX LINUX_CFLAGS="-O3 -std=gnu89"
     - name: Generate TPC-DS (SF=1) table data
       if: steps.cache-tpcds-sf-1.outputs.cache-hit != 'true'
       run: build/sbt "sql/Test/runMain org.apache.spark.sql.GenTPCDSData 
--dsdgenDir `pwd`/tpcds-kit/tools --location `pwd`/tpcds-sf-1 --scaleFactor 1 
--numPartitions 1 --overwrite"


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to