unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Non-standard builds, autoconf and gcc
@ 2019-10-02 13:49 Todor Kondić
  2019-10-02 16:25 ` John Soo
  0 siblings, 1 reply; 3+ messages in thread
From: Todor Kondić @ 2019-10-02 13:49 UTC (permalink / raw)
  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 something 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 et cetera method.

This unfortunately is one huge mess: even when i patch the  resulting configure script not to use hardwired /bin/sh /lib/cpp and such, gcc checks always fail. The glibc, gcc-toolchain-X.Y.Z and gcc-X.Y.Z(-lib), as well as binutils, 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 inputs 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 question 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 and any other relevant environment variables?

Finally, can I work around these problems by calling some of the functionality 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Non-standard builds, autoconf and gcc
  2019-10-02 13:49 Non-standard builds, autoconf and gcc Todor Kondić
@ 2019-10-02 16:25 ` John Soo
  2019-10-14 20:29   ` Maxim Cournoyer
  0 siblings, 1 reply; 3+ messages in thread
From: John Soo @ 2019-10-02 16:25 UTC (permalink / raw)
  To: Todor Kondić; +Cc: help-guix\@gnu.org

Hi Todor,


> 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 something else. My first attempt was to use the trivial builder...

What is the something else? If it the shape of the build follows the gnu steps with some extra autotools, you may be able to use modify-phases. You would get the majority of the unpacking, replacement of relevant paths, and more. Then you could add some extra steps to work in the autotools specifics. My experience with the trivial builder is that it is best for union builds and copying some files but not much more. 

Good luck,

John

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Non-standard builds, autoconf and gcc
  2019-10-02 16:25 ` John Soo
@ 2019-10-14 20:29   ` Maxim Cournoyer
  0 siblings, 0 replies; 3+ messages in thread
From: Maxim Cournoyer @ 2019-10-14 20:29 UTC (permalink / raw)
  To: John Soo; +Cc: help-guix@gnu.org

Hello,

John Soo <jsoo1@asu.edu> writes:

> Hi Todor,
>
>
>> 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 something else. My first attempt was to use the trivial builder...
>
> What is the something else? If it the shape of the build follows the
> gnu steps with some extra autotools, you may be able to use
> modify-phases. You would get the majority of the unpacking,
> replacement of relevant paths, and more. Then you could add some extra
> steps to work in the autotools specifics. My experience with the
> trivial builder is that it is best for union builds and copying some
> files but not much more.

+1

Good luck,

Maxim

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-14 20:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-02 13:49 Non-standard builds, autoconf and gcc Todor Kondić
2019-10-02 16:25 ` John Soo
2019-10-14 20:29   ` Maxim Cournoyer

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).