[Nix-dev] mxe on NixOS
Andrew Kelley
superjoe30 at gmail.com
Tue Aug 18 07:05:11 CEST 2015
On Mon, Aug 17, 2015 at 10:01 PM James Cook <james.cook at utoronto.ca> wrote:
> Thanks. Adding autoconf, automake and libtool to buildInputs for glib
> and running nix-shell -A glib put be in an environment where I can
> successfully run autogen.sh.
>
> Any idea why it only works in a nix-shell instance? I have autoconf,
> automake, libtool installed via nix-env.
>
> (Andrew, are you still hoping to get this working?)
>
Yes I am.
My current strategy is this .nix file:
with import <nixpkgs> {}; {
mxeEnv = stdenv.mkDerivation {
name = "mxe";
buildInputs = [
autoconf
automake
gnumake
bison
cmake
flex
gettext
gperf
intltool
libtool
openssl
ruby
scons
unzip
pkgconfig
python
wget
];
};
}
Then I use `nix-shell mxe.nix` and attempt to `make glib`, and I get the
issue I originally reported.
Am I understanding correctly that you are doing something slightly
different and successfully able to build glib with mxe?
>
> James
>
>
> On 17 August 2015 at 02:07, Luca Bruno <lethalman88 at gmail.com> wrote:
> > Using nix-shell -A glib is wrong if you are going to use autogen.sh,
> because
> > autogen.sh is used to build from git not from tarball. So the glib nix
> > expression does not have neither autoconf nor automake in the buildInputs
> > for this reason.
> >
> > Put autoconf and automake in the buildInputs of the glib nix expression,
> > then it should work.
> >
> > On Mon, Aug 17, 2015 at 6:45 AM, James Cook <james.cook at utoronto.ca>
> wrote:
> >>
> >> pkg-config is in my environment.
> >>
> >> If it means anything, I see the same error if I run ./autogen.sh
> >> inside nix-shell -A glib (still using my manually-cloned glib).
> >>
> >> James
> >>
> >> On 16 August 2015 at 01:41, Luca Bruno <lethalman88 at gmail.com> wrote:
> >> >
> >> >
> >> > On Sunday, August 16, 2015, James Cook <james.cook at utoronto.ca>
> wrote:
> >> >>
> >> >> To perhaps simplify the problem, does anyone know how to build glib
> on
> >> >> a NixOS system the old-fashioned way, without using nix? If I just
> run
> >> >> ./autogen.sh in a fresh glib checkout, I get a similar error to the
> >> >> one Andrew is getting.
> >> >>
> >> >> A parallel question: Andrew, are you familiar enough with nixpkgs to
> >> >> try writing an nix expression that unpacks mxe and tells it to build
> >> >> glib? That might be another approach, though I think it would be nice
> >> >> if users had the option of not doing it that way.
>
I'm not familiar enough to do so currently but I'm willing to learn. I do
agree with you that it would be nice if users had the option of not doing
it this way.
> >> >>
> >> >> $ ./autogen.sh
> >> >> You don't have gtk-doc installed, and thus won't be able to generate
> >> >> the documentation.
> >> >> autoreconf: Entering directory `.'
> >> >> autoreconf: configure.ac: not using Gettext
> >> >> autoreconf: running: aclocal --force -I m4macros ${ACLOCAL_FLAGS}
> >> >> autoreconf: configure.ac: tracing
> >> >> autoreconf: configure.ac: not using Libtool
> >> >> autoreconf: running:
> >> >>
> /nix/store/prmn46fajbj2ymcw43aqrdfbii1bj8bz-autoconf-2.69/bin/autoconf
> >> >> --force
> >> >> configure.ac:88: error: possibly undefined macro: AC_DEFINE
> >> >> If this token and others are legitimate, please use
> >> >> m4_pattern_allow.
> >> >> See the Autoconf documentation.
> >> >> autoreconf:
> >> >>
> /nix/store/prmn46fajbj2ymcw43aqrdfbii1bj8bz-autoconf-2.69/bin/autoconf
> >> >> failed with exit status: 1
> >> >
> >> >
> >> > You need pkgconfig in your env.
> >> >
> >> >
> >> > --
> >> > NixOS Linux
> >> >
> >
> >
> >
> >
> > --
> > NixOS Linux
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150817/c76834bd/attachment.html
More information about the nix-dev
mailing list