php / php/php-src

Building apache2handler with APR 1.7.5 fails if compiler doesn't support __has_attribute

オープン
#16,682 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Bug SAPI: apache2handler Status: Needs Triage
主要言語
C
スター
40.4k
フォーク
8.1k
平均マージ
2日 13時間
マージ済み PR(30日)
96

説明

Description

Not quite sure where to report this yet, so I'm starting here.

A commit exhibiting the problem has made it into latest APR 1.7.5. The assumption that __has_attribute would be predefined is valid in theory, but not in practise. E.g. ap_config.h defines __has_attribute to 0 in case it is not defined. php-src does the same at least in TSRM.h, zend_portability.h and zend_cpuinfo.h. In my opinion, this is bad practise and should be fixed; see e.g. xxhash.h for a proper solution. Of course, the existing definitions might be relied upon by downstream consumers of our headers, so changing this would be an API break.

Anyhow, coming back to the issue at hand, I wonder whether apache2handler is even supposed to include ap_config.h explicitly. If not, we can neither blame httpd nor APR, since latest httpd can apparently be successfully built against latest APR with a compiler not supporting __has_attribute.

PHP Version

any

Operating System

any

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず apache2handler のビルドと ap_config.h の取り込みを追跡し、次に関連する __has_attribute の扱いを APR 1.7.5 および TSRM.h、zend_portability.h、zend_cpuinfo.h の定義と比較します。__has_attribute を持たないコンパイラーで失敗を再現し、原因が取り込みにあるのか互換性の挙動にあるのかを特定します。対象のビルドが、記載されたヘッダー互換性を損なうことなく成功すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
apache, c
領域
backend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。