[gambit-list] Trying to compile gambit head on NixOS

Marc Feeley feeley at iro.umontreal.ca
Wed Jun 21 17:09:30 EDT 2017


You need to build using the instructions in README.md .  Really follow each step…

Marc



> On Jun 21, 2017, at 5:03 PM, Faré <fahree at gmail.com> wrote:
> 
> I tried to build gambit head on NixOS, and I have a weird error while
> trying to compile gsi:
> 
> gcc -pthread -Wno-unused -Wno-write-strings -Wdisabled-optimization
> -O6 -fwrapv -fno-strict-aliasing -fno-trapping-math -fno-math-errno
> -fschedule-insns2 -fmodulo-sched -freschedule-modulo-scheduled-loops
> -fomit-frame-pointer -fPIC -fno-common -mpc64 -pthread -rdynamic
> -I"../include" -o "gsi" _gsi.o _gsi_.o "../lib/libgambit.so" -lutil
> -ldl -lm -L/usr/local/opt/openssl/lib -lssl -lcrypto libgambitgsi.so
> ../lib/libgambit.so: undefined reference to `___PAIRMUTABLEP'
> collect2: error: ld returned 1 exit status
> make[1]: *** [makefile:178: gsi] Error 1
> make[1]: Leaving directory
> '/tmp/nix-build-gambit-4.8.6.drv-0/gambit-2c34b63/gsi'
> while trying to compile gsi
> 
> Looking at the code, it looks like
> 81ffcaedb133e9cc8936db3e4d9ec85626497414 has stopped defining
> ___PAIRMUTABLEP, but that macro is still used in gsc/_asm.c and
> lib/_std.c that are included in libgambit.so, causing the failure.
> 
> The modified pkgs/development/compilers/gambit/default.nix is as below:
> 
> { stdenv, fetchurl, fetchgit, openssl }:
> 
> stdenv.mkDerivation rec {
>  name    = "gambit-${version}";
>  version = "4.8.8-dev";
>  devver  = "4_8_8_dev";
> 
> #  src = fetchurl {
> #    url    = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.8/source/gambit-v${devver}-devel.tgz";
> #    sha256 = "0j3ka76cfb007rlcc3nv5p1s6vh31cwp87hwwabawf16vs1jb7bl";
> #  };
>  src = fetchgit {
>    url = "https://github.com/feeley/gambit.git";
>    rev = "2c34b6328ce508cd0277c7dfddbab3f698b785c5";
>    sha256 = "1is5f5b4k18rr3k3nzhb7wny9h68kj509miizsqxblrdmvzkf1ic";
>  };
> 
>  configureFlags = [
>    "--enable-single-host"
>    "--enable-shared"
>    "--enable-absolute-shared-libs"
>    "--enable-c-opt=-O6" "--enable-gcc-opts" "--enable-inline-jumps"
>    "--enable-thread-system=posix" "--enable-dynamic-tls"
>    "--enable-openssl"
>  ];
> 
>  buildInputs = [ openssl ];
> 
>  meta = {
>    description = "Optimizing Scheme to C compiler";
>    homepage    = "http://gambitscheme.org";
>    license     = stdenv.lib.licenses.lgpl2;
>    platforms   = stdenv.lib.platforms.linux;
>    maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin ];
>  };
> }
> 
> —♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
> Gauss, when asked how soon he expected to reach certain mathematical
> conclusions, replied that he had reached them long ago, all he was worrying
> about was how to reach them! [Karl F. Gauss (1777-1855), German mathematician]
> _______________________________________________
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca
> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list




More information about the Gambit-list mailing list