Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fails to cross-compile for windows on nix-os #24517

Open
tigercoding56 opened this issue Dec 6, 2024 · 1 comment
Open

fails to cross-compile for windows on nix-os #24517

tigercoding56 opened this issue Dec 6, 2024 · 1 comment

Comments

@tigercoding56
Copy link

Description

when i try to cross compile my project for windows it fails with a error message that i am to stupid to understand
image
the source code is available at https://gitlab.com/celleron56/NIMHCO but i doubt that matters it is either a bug (if someone can reproduce) or i am bad at nixOS

Nim Version

Nim Compiler Version 2.0.4 [Linux: amd64]
Compiled at 2024-03-28
Copyright (c) 2006-2023 by Andreas Rumpf

active boot switches: -d:release

Current Output

❯ nim c -d:mingw  --cpu:amd64  --os:Windows -o:game.exe "/home/celleron56/dev/nim/NIMHCO/src/NIMHCO.nim"
Hint: used config file '/nix/store/wv664jn7qgvmfrkqp5fg03fs296vz40r-x86_64-unknown-linux-gnu-nim-wrapper-2.0.4/etc/nim/nim.cfg' [Conf]
Hint: used config file '/nix/store/wv664jn7qgvmfrkqp5fg03fs296vz40r-x86_64-unknown-linux-gnu-nim-wrapper-2.0.4/etc/nim/config.nims' [Conf]
............................................................................................................
/nix/store/b8nbxmznr5h4g892jfz5aj5pxcyx9css-nim-unwrapped-2.0.4/nim/lib/pure/times.nim(996, 25) Error: undeclared identifier: 'FILETIME'
candidates (edit distance, scope distance); see '--spellSuggest': 
 (3, 2): 'DateTime'
 (3, 4): 'FileMode'
This might be caused by a recursive module dependency:
/nix/store/b8nbxmznr5h4g892jfz5aj5pxcyx9css-nim-unwrapped-2.0.4/nim/lib/windows/winlean.nim imports /nix/store/b8nbxmznr5h4g892jfz5aj5pxcyx9css-nim-unwrapped-2.0.4/nim/lib/pure/dynlib.nim
/nix/store/b8nbxmznr5h4g892jfz5aj5pxcyx9css-nim-unwrapped-2.0.4/nim/lib/pure/dynlib.nim imports /nix/store/b8nbxmznr5h4g892jfz5aj5pxcyx9css-nim-unwrapped-2.0.4/nim/lib/pure/os.nim
/nix/store/b8nbxmznr5h4g892jfz5aj5pxcyx9css-nim-unwrapped-2.0.4/nim/lib/pure/os.nim imports /nix/store/b8nbxmznr5h4g892jfz5aj5pxcyx9css-nim-unwrapped-2.0.4/nim/lib/std/private/ospaths2.nim

Expected Output

No response

Known Workarounds

none

Additional Information

No response

@daylinmorgan
Copy link
Contributor

daylinmorgan commented Dec 17, 2024

The cyclic dependency was due to nixos patches and was fixed in NixOS/nixpkgs#325792.

You will need to update the nixpkgs channel/flake you are pulling from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants