From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Todor_Kondi=C4=87?= Subject: Non-standard builds, autoconf and gcc Date: Wed, 02 Oct 2019 13:49:24 +0000 Message-ID: Reply-To: =?UTF-8?Q?Todor_Kondi=C4=87?= Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:60320) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFf0c-0008Mc-KT for help-guix@gnu.org; Wed, 02 Oct 2019 09:49:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFf0a-0002Nz-Ta for help-guix@gnu.org; Wed, 02 Oct 2019 09:49:38 -0400 Received: from mail2.protonmail.ch ([185.70.40.22]:57170) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFf0a-0002MC-Ca for help-guix@gnu.org; Wed, 02 Oct 2019 09:49:36 -0400 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: "help-guix\\@gnu.org" I am trying to define a package that builds a source which has a non-standard build procedure. It's a mix of autotools packages and someth= ing else. My first attempt was to use the trivial builder, pull in the gcc-= toolchain along with autotools and use this mixture for the parts where they can be used. The usual auto(re)conf e= t cetera method. This unfortunately is one huge mess: even when i patch the resulting confi= gure script not to use hardwired /bin/sh /lib/cpp and such, gcc checks alwa= ys fail. The glibc, gcc-toolchain-X.Y.Z and gcc-X.Y.Z(-lib), as well as bin= utils, all have overlapping, but not entirely same libraries, includes and = gcc programs. My first question, if I am unable to simply use the gnu build system, but = need autotools functionality, which packages should I pull in as native inp= uts for a regular C program? Is it the gcc-toolchain, or the hidden package= gcc? Additionally, should I pull in binutils and glibc? The second questio= n is, how to set the build environment? I realised that just installing the= gcc-related packages does not necessarily mean that gcc knows about where = the heck its brains and guts are. How to set COMPILER_PATH, LIBRARY_PATH an= d any other relevant environment variables? Finally, can I work around these problems by calling some of the functional= ity of gnu-build-system from the builder? Something like, ; trivial system on top-level . . . #:builder (... do preparatory stuff ... (with-directory-excursion "subpackage" (gnu-build-system-build-only ...))) . . . Cheers, Todor