git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: PEEX Gamer <czupux@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Unable to cross compile git. http.c generating errors.
Date: Thu, 11 May 2023 02:28:24 -0400	[thread overview]
Message-ID: <20230511062824.GA1971463@coredump.intra.peff.net> (raw)
In-Reply-To: <CALpgS-OQzoopjKd2a3NBkaefHoqR_wLop5x3Y7U8e0eVUO7XJQ@mail.gmail.com>

On Sat, May 06, 2023 at 08:38:40PM +0200, PEEX Gamer wrote:

> I was trying to compile git for x86_64 FreeBSD 13.2 on x86_64 linux
> without any success.
> I was using clang toolchain that worked for native Freebsd 13.2 compilation.
> The errors i had:
> First thing was that config.mak.uname was trying to include sysinfo
> because of host machine being linux which was weird. I ommited this
> error by replacing linux section with freebsd and everythink was
> smooth until http.c which generates output attached in email. 

Looks like you're having problems with fileno() being passed a void
pointer. Try compiling with:

  make FILENO_IS_A_MACRO=Yes

That is generally set automatically on FreeBSD via config.mak.uname;
perhaps you missed it when moving things around there.

I've never tried cross-compiling Git, but I'd guess that your best bet
is to override the uname_* variables, like:

  make uname_S=FreeBSD uname_R=13.2

(there are others, but those are the main ones we use to set defaults
for various Makefile knobs). Of course you can tweak all the Makefile
knobs yourself, but that may be tedious.

-Peff

      parent reply	other threads:[~2023-05-11  6:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-06 18:38 Unable to cross compile git. http.c generating errors PEEX Gamer
2023-05-11  3:39 ` Bagas Sanjaya
2023-05-11  6:28 ` Jeff King [this message]

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=20230511062824.GA1971463@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=czupux@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).