Building apache2handler with APR 1.7.5 fails if compiler doesn't support __has_attribute
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C
- Sterne
- 40.4k
- Forks
- 8.1k
- Ø Merge
- 2 T. 13 Std.
- Gemergte PRs (30 T.)
- 96
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, den apache2handler-Build und seine Einbindung von ap_config.h nachzuverfolgen; vergleiche anschließend die relevante __has_attribute-Behandlung mit APR 1.7.5 und den Definitionen in TSRM.h, zend_portability.h und zend_cpuinfo.h. Reproduziere den Fehler mit einem Compiler, dem __has_attribute fehlt, und ermittle, ob die Einbindung oder das Kompatibilitätsverhalten verantwortlich ist; abgeschlossen ist die Aufgabe, wenn der betroffene Build erfolgreich ist, ohne die angegebene Header-Kompatibilität zu beeinträchtigen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- apache, c
- Bereich
- backend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100