You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Nix on Cygwin doesn't work because DBD::SQLite doesn't work #19
$ perl -e 'use DBD::SQLite;'
Can't load '/nix/store/nxy9c2s5443al8g601fjlg62idbzqh0w-perl-DBD-SQLite-1.35/lib/perl5/site_perl/5.10/i686-cygwin/auto/DBD/SQLite/SQLite.dll' for module DBD::SQLite: No such process at /usr/lib/perl5/5.10/i686-cygwin/DynaLoader.pm line 200.
at -e line 1
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
The "No such process" error may be related to the base address of the DLL, but changing it using the "--image-base=..." linker flag didn't help. Running "rebaseall" didn't help either (but then it doesn't look in the Nix store so that's not surprising).
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.
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.
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.
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.
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.
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
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].
Activity
viric commentedon May 27, 2012
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'.
viric commentedon May 27, 2012
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.
viric commentedon May 27, 2012
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.
viric commentedon May 27, 2012
After building nix with nix and gcc-4, having disabled the doInstallCheck, I get this:
viric commentedon May 27, 2012
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.
viric commentedon Mar 28, 2013
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.
domenkozar commentedon Jan 21, 2014
From #nixos:
chaoflow commentedon Sep 8, 2015
This issue is outdated and should be closed.
@TOHL thx for reporting
chaoflow commentedon Sep 8, 2015
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
ryantrinkle commentedon Jan 9, 2016
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].
vcunat commentedon Jan 10, 2016
@ryantrinkle: this particular issue will preferably be addressed by #341, IMHO.
domenkozar commentedon Jul 21, 2016
@ryantrinkle "Windows distribution of Nix" meaning natively without cygwin?
domenkozar commentedon Aug 10, 2016
As stated by @chaoflow this is outdated and we're very close to being perl free.
Merge pull request #19 from tsion/x-command
Merge pull request #19 from obsidiansystems/ipfs-add-body-to-network-…
Merge pull request NixOS#19 from DeterminateSystems/determinate-nix-p…
doc(eval-trace): follow-up NixOS#19 — adversarial pass CORRECTS the p…
doc(eval-trace): RFC §0.5 — correct prototype framing per NixOS#19 (p…
test+doc(eval-trace): follow-up NixOS#21 — M MEASURED ≈1, verify gate…