Menu

#446 Fix out-of-tree builds by using full paths in generated #includes

NextRelease
closed-accepted
nobody
None
5
2026-03-30
2026-03-26
No

The Fuse build can break if it's done in a directory different from the source directory.

This is not trivial to reproduce if the build is done directly with the official tar.gz file, but it can happen if the timestamps of some files are modified, forcing make to regenerate some files.

$ tar xaf fuse-1.7.0.tar.gz 
$ cd fuse-1.7.0
$ touch --date '2000-01-01' z80/opcodes_base.c 
$ mkdir build
$ cd build
$ ../configure 
$ make
[...]
  CC       z80/z80_ops.o
In file included from ../z80/z80_ops.c:370:
./z80/opcodes_base.c: In function ‘z80_do_opcodes’:
./z80/opcodes_base.c:840:10: fatal error: z80_cb.c: No such file or directory
  840 | #include "z80_cb.c"
      |          ^~~~~~~~~~
compilation terminated.

The attached patch explains and solves the problem.

1 Attachments

Discussion

  • Fredrick Meunier

    • status: open --> closed-accepted
    • Group: future --> NextRelease
     
  • Fredrick Meunier

    Thanks, committed in 9a93922a

     

Log in to post a comment.

MongoDB Logo MongoDB