Giter Site home page Giter Site logo

network-3.1.1.1 and ghcjs about reflex-platform HOT 2 CLOSED

dktr0 avatar dktr0 commented on June 17, 2024
network-3.1.1.1 and ghcjs

from reflex-platform.

Comments (2)

dktr0 avatar dktr0 commented on June 17, 2024

Update: the patch above refers to a file that no longer exists in recent-ish versions of the network module. When I try to get past this by using direct derivations for any recent (or even not so recent) versions of network (ie. avoiding the patch in reflex-platform), I get errors like this (pretty much the same with all version of network I've tried):

/nix/store/9ywr69qi622lrmx5nn88gk8jpmihy0dz-bash-4.4-p23/bin/sh //build/network-3.1.1.1/configure '--with-compiler=ghcjs' '--prefix=/nix/store/n68ly360qsnhfmvjkybvivzv7725k76y-network-3.1.1.1' '--libdir=$prefix/lib/$compiler' '--host=js-unknown-ghcjs' 'CC=/nix/store/ryy81g8zv6c8fh0j10m6fdynrgrn239k-gcc-wrapper-9.3.0/bin/cc'
configure: WARNING: unrecognized options: --with-compiler
checking build system type... x86_64-pc-linux-gnu
checking host system type... Invalid configuration `js-unknown-ghcjs': machine `js-unknown' not recognized
configure: error: /nix/store/9ywr69qi622lrmx5nn88gk8jpmihy0dz-bash-4.4-p23/bin/bash //build/network-3.1.1.1/config.sub js-unknown-ghcjs failed
error: builder for '/nix/store/1b1m7x7pm5l1vblnjbkcfyxvc2rm4cak-network-3.1.1.1.drv' failed with exit code 1;
       last 10 log lines:
       > Using strip version 2.31 found on system at:
       > /nix/store/vfqlryhvm8063hs7ax9k2vb8wmch5v0v-binutils-2.31.1/bin/strip
       > Using tar found on system at:
       > /nix/store/k6ssslsxmvndgm056k7x4s75390sjfkz-gnutar-1.32/bin/tar
       > No uhc found
       > /nix/store/9ywr69qi622lrmx5nn88gk8jpmihy0dz-bash-4.4-p23/bin/sh //build/network-3.1.1.1/configure '--with-compiler=ghcjs' '--prefix=/nix/store/n68ly360qsnhfmvjkybvivzv7725k76y-network-3.1.1.1' '--libdir=$prefix/lib/$compiler' '--host=js-unknown-ghcjs' 'CC=/nix/store/ryy81g8zv6c8fh0j10m6fdynrgrn239k-gcc-wrapper-9.3.0/bin/cc'
       > configure: WARNING: unrecognized options: --with-compiler
       > checking build system type... x86_64-pc-linux-gnu
       > checking host system type... Invalid configuration `js-unknown-ghcjs': machine `js-unknown' not recognized
       > configure: error: /nix/store/9ywr69qi622lrmx5nn88gk8jpmihy0dz-bash-4.4-p23/bin/bash //build/network-3.1.1.1/config.sub js-unknown-ghcjs failed
       For full logs, run 'nix log /nix/store/1b1m7x7pm5l1vblnjbkcfyxvc2rm4cak-network-3.1.1.1.drv'.
error: 1 dependencies of derivation '/nix/store/30yxm5j21bl5sn1jpwqxjdndaf92j9rn-ghcjs-8.6.0.1-with-packages.drv' failed to build

from reflex-platform.

achea avatar achea commented on June 17, 2024

Had the same issue and figured it out!

config.sub determines if a host is valid, and upstream only added support in v3.1.2.6 in this commit: haskell/network@cb5362e

The pesky thing is that nix automatically upgrades the autotool files in the preConfigurePhase, so the fix gets overwritten. Patching doesn't help because the patchPhase happens before the configurePhase. Thankfully, there is a bool that governs this behaviour:

    network = (self.callHackageDirect {
      pkg = "network";
      ver = "3.1.2.7";
      sha256 = "sha256-5yueRra6dky5TSU87SUITVxxQ5aFplTL39zGyeTJwpw=";
    } {}).overrideAttrs (prevAttrs: {
      dontUpdateAutotoolsGnuConfigScripts = true;
      nativeBuildInputs = (prevAttrs.nativeBuildInputs or []) ++ [pkgs.autoreconfHook];
      });

While we're here, I enabled autoreconf like instructed in the readme, but this may not be necessary.

This also obsoletes the previous hack introduced in #525

from reflex-platform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.