Building apache2handler with APR 1.7.5 fails if compiler doesn't support __has_attribute
Nessuno ha ancora preso questa issue.
- Lingua principale
- C
- Stelle
- 40.4k
- Fork
- 8.1k
- Merge medio
- 2g 13h
- PR unite (30g)
- 96
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia tracciando la build di apache2handler e la sua inclusione di ap_config.h, quindi confronta la gestione pertinente di __has_attribute con APR 1.7.5 e con le definizioni in TSRM.h, zend_portability.h e zend_cpuinfo.h. Riproduci il fallimento con un compilatore privo di __has_attribute e determina se la causa è l’inclusione o il comportamento di compatibilità; il lavoro è completato quando la build interessata ha esito positivo senza compromettere la compatibilità degli header indicata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- apache, c
- Ambito
- backend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100