maharmstone / ntfs2btrfs

GNU General Public License v2.0
678 stars 29 forks source link

ntfs.h: include <memory> #77

Closed tchaikov closed 1 month ago

tchaikov commented 1 month ago

when building with libstdc++ from GCC-14, we have

In file included from /builddir/build/BUILD/ntfs2btrfs-20240115-build/ntfs2btrfs-20240115/src/ntfs.cpp:21:
/builddir/build/BUILD/ntfs2btrfs-20240115-build/ntfs2btrfs-20240115/src/ntfs.h:537:10: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
  537 |     std::unique_ptr<ntfs_file> mft;
      |          ^~~~~~~~~~

so include accordingly.

maharmstone commented 1 month ago

Which OS is this on? It builds fine for me with GCC 14.1.1_p20240622 on Gentoo.

tchaikov commented 1 month ago

@maharmstone hi Mark, i am building on fedora rawhide .

maharmstone commented 1 month ago

@maharmstone hi Mark, i am building on fedora rawhide .

Thanks. This is weird - I've tried it in the rawhide Docker image, and it works there too [g++ (GCC) 14.1.1 20240701 (Red Hat 14.1.1-7)]. Is there something screwy with your installation?

tchaikov commented 1 month ago

probably, i am using the latest rawhide. see https://download.copr.fedorainfracloud.org/results/tchaikov/fmt-11/fedora-rawhide-aarch64/07740392-ntfs2btrfs/builder-live.log.gz and https://download.copr.fedorainfracloud.org/results/tchaikov/fmt-11/fedora-rawhide-x86_64/07740392-ntfs2btrfs/builder-live.log.gz .

but anyhow, i think it's more resilient to include the header for using the symbols declared by it instead of relying on another (random) header to do this for us.

maharmstone commented 1 month ago

Thanks. I agree, I just want to make sure that this sort of thing gets picked up by CI if at all possible. It looks like we were including \<memory> transitively through libfmt.

Committed as https://github.com/maharmstone/ntfs2btrfs/commit/4375a142fe635044fe54e0c897bdc2bd07225d97, thank you