git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ilya Kantor <iliakan@gmail.com>
To: git@vger.kernel.org
Cc: avarab@gmail.com
Subject: CMakeLists.txt from contrib/buildsystems fails to build on Mac
Date: Wed, 8 Feb 2023 12:45:06 +0100	[thread overview]
Message-ID: <BFC8139A-0A9A-4E84-BC0B-D6EE5F469F82@gmail.com> (raw)

Hello,

I've just tried to build git as described in contrib/buildsystems/CMakeLists.txt, and it doesn't work.

Is this route supposed to work at all?

I'm on MacOS Ventura,
first running this:
```
mkdir -p contrib/buildsystems/out
cd contrib/buildsystems/out
cmake ../ -DCMAKE_BUILD_TYPE=Release
```

This works fine (the full output is here: https://gist.github.com/11f6786eb195a4bc939e010d4f759a22).

And then I run `make`:

```
make
```

Although it dies with an error.

The full output is here: https://gist.github.com/24e2eb21613668c44d81f6f0cc78e1a1

Here's the ending error:

```
/opt/tmp/git/read-cache.c:170:22: error: no member named 'st_ctim' in 'struct stat'
        sd->sd_ctime.nsec = ST_CTIME_NSEC(*st);
                            ^~~~~~~~~~~~~~~~~~
/opt/tmp/git/contrib/buildsystems/../../git-compat-util.h:1380:48: note: expanded from macro 'ST_CTIME_NSEC'
#define ST_CTIME_NSEC(st) ((unsigned int)((st).st_ctim.tv_nsec))
                                          ~~~~ ^
/opt/tmp/git/read-cache.c:171:22: error: no member named 'st_mtim' in 'struct stat'
        sd->sd_mtime.nsec = ST_MTIME_NSEC(*st);
                            ^~~~~~~~~~~~~~~~~~
/opt/tmp/git/contrib/buildsystems/../../git-compat-util.h:1381:48: note: expanded from macro 'ST_MTIME_NSEC'
#define ST_MTIME_NSEC(st) ((unsigned int)((st).st_mtim.tv_nsec))
                                          ~~~~ ^
/opt/tmp/git/read-cache.c:2410:27: error: no member named 'st_mtim' in 'struct stat'
        istate->timestamp.nsec = ST_MTIME_NSEC(st);
                                 ^~~~~~~~~~~~~~~~~
/opt/tmp/git/contrib/buildsystems/../../git-compat-util.h:1381:48: note: expanded from macro 'ST_MTIME_NSEC'
#define ST_MTIME_NSEC(st) ((unsigned int)((st).st_mtim.tv_nsec))
                                          ~~~~ ^
/opt/tmp/git/read-cache.c:3177:27: error: no member named 'st_mtim' in 'struct stat'
        istate->timestamp.nsec = ST_MTIME_NSEC(st);
                                 ^~~~~~~~~~~~~~~~~
/opt/tmp/git/contrib/buildsystems/../../git-compat-util.h:1381:48: note: expanded from macro 'ST_MTIME_NSEC'
#define ST_MTIME_NSEC(st) ((unsigned int)((st).st_mtim.tv_nsec))
                                          ~~~~ ^
4 errors generated.
make[2]: *** [CMakeFiles/libgit.dir/opt/tmp/git/read-cache.c.o] Error 1
make[1]: *** [CMakeFiles/libgit.dir/all] Error 2
```

May that be because of some changes in MacOs Ventura? 
Or is the CMakeLists.txt "dead and forgotten"? ;)

P.S. The regular "make" route works.

Kind regards,
Ilya Kantor

             reply	other threads:[~2023-02-08 11:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08 11:45 Ilya Kantor [this message]
2023-02-08 11:57 ` CMakeLists.txt from contrib/buildsystems fails to build on Mac Ævar Arnfjörð Bjarmason
2023-02-08 14:31   ` Phillip Wood
2023-02-08 14:34     ` Ilya Kantor
2023-02-08 16:53     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BFC8139A-0A9A-4E84-BC0B-D6EE5F469F82@gmail.com \
    --to=iliakan@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).