From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 161011F406 for ; Thu, 11 May 2023 06:28:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230224AbjEKG2d (ORCPT ); Thu, 11 May 2023 02:28:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236468AbjEKG2b (ORCPT ); Thu, 11 May 2023 02:28:31 -0400 Received: from cloud.peff.net (cloud.peff.net [104.130.231.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7543C103 for ; Wed, 10 May 2023 23:28:25 -0700 (PDT) Received: (qmail 21950 invoked by uid 109); 11 May 2023 06:28:25 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Thu, 11 May 2023 06:28:25 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 7065 invoked by uid 111); 11 May 2023 06:28:24 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Thu, 11 May 2023 02:28:24 -0400 Authentication-Results: peff.net; auth=none Date: Thu, 11 May 2023 02:28:24 -0400 From: Jeff King To: PEEX Gamer Cc: git@vger.kernel.org Subject: Re: Unable to cross compile git. http.c generating errors. Message-ID: <20230511062824.GA1971463@coredump.intra.peff.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org 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