Giter Site home page Giter Site logo

Comments (15)

viric avatar viric commented on May 12, 2024

Does this problem happen only when building nix using nix?

I'm trying to build nix master on cygwin (not using nix), and I fail even to install DBD::SQLite. Somehow it wants to call 'gcc-4' instead of 'gcc'.

from nix.

viric avatar viric commented on May 12, 2024

I just had to add gcc 4.x into cygwin, and install DBD::SQLite. Then I built the nix 1.0 tarball, with CC=gcc-4 CXX=g++-4, and then nix runs fine.

I haven't tried without setting gcc/g++ to 4.x for nix.
Now I'm trying to build nixpkgs' nix with that nix, having changed the native gcc-wrapper to point to gcc-4 and g++-4.

from nix.

viric avatar viric commented on May 12, 2024

OTH, if nix uses shared libraries, trying to run nix inside nix (maybe in the make check stage) can fail hard, if nix shared libraries of different versions don't have different names.

Windows can't load multiple DLLs with the same name - systemwide constraint (unless using winsxs). If nix shared libraries have the same name regardless of the version, the nix under 'make check' would be dynamically linked with the nix DLLs doing the build, because they were loaded first there.

from nix.

viric avatar viric commented on May 12, 2024

After building nix with nix and gcc-4, having disabled the doInstallCheck, I get this:

Can't exec "/nix/store/zh79050vfkrjax8kklydr559ydh3rwbg-nix-1.0/bin/nix-instantiate": Bad address at /nix/store/zh79050vfkrjax8kklydr559ydh3rwbg-nix-1.0/bin/nix-build line 166.

from nix.

viric avatar viric commented on May 12, 2024

I tried rebaseall with a list of all exe and dlls in the nix store (-T list), and that did not help. I had to make the dll writeable, for it to success. As for the exe, it said the exe were not 'rebaseable'; maybe here is the trouble.

from nix.

viric avatar viric commented on May 12, 2024

Finally I removed the perl DBD lines in configure.ac. I rebuilt all, installed (I disabled the manual generation the hard way, which also failed), and all went fine.
Now, nix-build, nix-env and nix-store work if called with "NIX_SUBSTITUTERS=".

So if the DBD stuff could be made optional (like the default substituters), it would make all easier by now.

from nix.

domenkozar avatar domenkozar commented on May 12, 2024

From #nixos:

3:31:28         niksnut | ah yes, the real issue is cygwin's requirement that all DLLs have a unique load address, or something like that                                                                                    │ mattw        
13:31:38         niksnut | which is basically unsupportable in a purely functional model                                                                                                                                      │ maxipin_     
13:31:56         niksnut | cygwin has a tool called "rebaseall" that rewrites all DLLs in the system to meet this requirement   

from nix.

 avatar commented on May 12, 2024

nix builds on cygwin-nt 6.1 2.2.0 (0.289/5/3) x86_64
i roughly followed https://nixos.org/wiki/Nix_on_Windows which gives an idea but most of the dependencies i had to install manually via cygwin gui
after building nix, i can install hello, for example
many packages don't work, but that is a problem with nixpkgs, not nix

from nix.

chaoflow avatar chaoflow commented on May 12, 2024

This issue is outdated and should be closed.

@tohl thx for reporting

from nix.

chaoflow avatar chaoflow commented on May 12, 2024

For completeness: we describe a cygport file to install nix on cygwin: http://ternaris.com/lab/nix-on-windows.html#package-build-and-install-nix

from nix.

 avatar commented on May 12, 2024

actually the version that builds under cygwin is nix-1.8

the latest nix from unstable (nix-1.10) doesn't build because of a compilation error
undefined ENOENT in nix-collect-garbage.cc
adding #include <errno.h> might fix this issue

from nix.

ryantrinkle avatar ryantrinkle commented on May 12, 2024

My company, Obsidian Systems would be interested in helping to support development of a Windows distribution of Nix. If anyone is interested in working on this or helping support it, please send me an email at [email protected].

from nix.

vcunat avatar vcunat commented on May 12, 2024

@ryantrinkle: this particular issue will preferably be addressed by #341, IMHO.

from nix.

domenkozar avatar domenkozar commented on May 12, 2024

@ryantrinkle "Windows distribution of Nix" meaning natively without cygwin?

from nix.

domenkozar avatar domenkozar commented on May 12, 2024

As stated by @chaoflow this is outdated and we're very close to being perl free.

from nix.

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.