Incidencia #43879

generate_gitrev.sh: Relative path to output file does not work

Abrir Fecha: 2022-02-16 23:03 Última actualización: 2022-02-19 19:25

Informador:
Propietario:
Tipo:
Estado:
Cerrado
Componente:
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Fixed
Fichero:
2

Details

generate_gitrev.sh writes output file relative to input (source) directory, not to the directory it was executed from.

This breaks meson builds 'gitrev' option. (gone unnoticed this far because there often is fc_gitrev_gen.h generated by earlier autotools build)

Ticket History (3/6 Histories)

2022-02-16 23:03 Updated by: cazfi
  • New Ticket "generate_gitrev.sh: Relative path to output file does not work" created
2022-02-16 23:34 Updated by: cazfi
Comentario

That the gitrev build with autotools goes through is by luck. It's supposed to generate the fc_gitrev_gen.h to the build dir: '$(top_builddir)/common/fc_gitrev_gen.h' -> '../common/fc_gitrev_gen.h'. With that output file name it actually gets generated to the source directory, and gets used from there.

2022-02-16 23:40 Updated by: cazfi
  • Propietario Update from (Ninguno) to cazfi
  • Resolución Update from Ninguno to Accepted
2022-02-19 19:25 Updated by: cazfi
  • Estado Update from Open to Cerrado
  • Resolución Update from Accepted to Fixed
Comentario

This has been pushed in, and no fc_gitrev_gen.h should get generated to a wrong location any more. Nothing removes the old stale files that may exist from older builds, and which now pose a risk of getting used instead of a freshly generated correct one. People should check their source trees, if different from a build tree, for common/fc_gitrev_gen.h and remove it if it exist. If one does not use separate build dir, but source dir = build dir, then the file's correct location is that common/fc_gitrev_gen.h. This is also why 'git status' won't show the file in the source dir. It's listed in .gitignore for the build dir = source dir case.

Editar

Please login to add comment to this ticket » Entrar