Repository navigation
Closed
Description
- but cabal-install-3.4.0.0 is able to build it
- logs:
Configuring network-3.1.2.2...
configure: WARNING: unrecognized options: --with-compiler
checking build system type... x86_64-pc-msys
checking host system type... x86_64-pc-msys
checking for gcc... D:\ghcup\ghc\8.10.7\lib\../mingw/bin\gcc.exe
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether D:\ghcup\ghc\8.10.7\lib\../mingw/bin\gcc.exe accepts -g... yes
checking for D:\ghcup\ghc\8.10.7\lib\../mingw/bin\gcc.exe option to accept ISO C89... none needed
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... D:\ghcup\ghc\8.10.7\lib\../mingw/bin\gcc.exe -E
checking for grep that handles long lines and -e... configure: error: no acceptable grep could be found in /d/ghcup/bin:/c/Users/atrey/AppData/Roaming/cabal/bin:/usr/bin:/mingw64/bin:/d/cabal/store/ghc-8.10.7/hsc2hs-0.68.7-640ce3a674b3ce528257d431f5e15fc40c5ab1a7/bin:/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/WINDOWS/System32/OpenSSH:/d/dev/app/git/cmd:/c/Users/atrey/AppData/Local/Microsoft/WindowsApps:/d/bin:/d/dev/ws/haskell/stack:/d/dev/app/emacs-26.2-x86_64/bin:/d/dev/app/Git/bin:/d/dev/app/curl_7_53_1_openssl_nghttp2_x64/bin:/d/dev/app/diffutils-2.8.7-1-bin/bin:/d/dev/app/grep-2.5.4-bin/bin:/d/dev/app/chocolatey/bin:/d/dev/app/vscode/bin:/d/Program Files/Java/jdk1.8.0_231/bin:/d/Program Files/7-Zip:/d/dev/app/node-v12.14.1-win-x64:/d/dev/ws/node.js:/d/dev/app/apache-maven-3.3.9/bin:/d/Program Files/PostgreSQL/11/bin:/d/bin/hls:/d/dev/app/python39/Scripts:/d/dev/app/python39:/d/ghcup/bin:/d/bin/cabal;/usr/xpg4/bin
cabal-3.6.0.0.exe: Failed to build network-3.1.2.2 (which is required by
exe:cabal from cabal-install-3.7.0.0). The failure occurred during the
configure step.
with cabal-3.4.0.0
Configuring network-3.1.2.2...
configure: WARNING: unrecognized options: --with-compiler
checking build system type... x86_64-pc-msys
checking host system type... x86_64-pc-msys
checking for gcc... D:\ghcup\ghc\8.10.7\lib\../mingw/bin\gcc.exe
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether D:\ghcup\ghc\8.10.7\lib\../mingw/bin\gcc.exe accepts -g... yes
checking for D:\ghcup\ghc\8.10.7\lib\../mingw/bin\gcc.exe option to accept ISO C89... none needed
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... D:\ghcup\ghc\8.10.7\lib\../mingw/bin\gcc.exe -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
....
Could it be related with #7510 (which i tested myself 🤦)?
Activity
phadej commentedon Sep 14, 2021
are very much
:separated indeed.Mikolaj commentedon Sep 14, 2021
Is this solved, then? If not, how exactly do I reproduce? I don't see any direct instruction for that.
Edit: never mind, I'm on Linux and this is probably Windows.
[-]cabal-install-3.6 fails to install network-3.1.2.2[/-][+]cabal-install-3.6 fails to install network-3.1.2.2 in windows[/+]jneira commentedon Sep 14, 2021
I tested it in a misys2 bash console and same error with
cabal --store-dir /d/cabal/store2 install network --libMikolaj commentedon Sep 14, 2021
@jneira: you are probably using master branch? How about 3.6? Any idea where are the
:separators @phadej mentions coming from? Any idea why it worked previously, when people tested the PR?jneira commentedon Sep 14, 2021
I think I am using 3.6 official release but I will confirm
the problem maybe is the unique
;in the list and no:? not surenot yet☺️ but maybe it is not related, will try again the pr commit to discard
Mikolaj commentedon Sep 14, 2021
I've seen
cabal-install-3.7.0.0in your log above, hence asking.Huh, I'm not sure any more.
[Edited: removed all the rest of my musings, because they didn't make sense. Read #7494 instead.]
[Edit2: after reading #7494, I agree there should be no colons, but only semicolons in PATH. So cabal is giving wrong PATH to configure or the following not always holds: "When cabal is called the msys2-runtime converts the environment block to contain windows paths since Cabal is a Windows program and expect a Windows style environmental block."]
[Edit3: perhaps it depends on whether cabal is called from Windows console or msys/cygwin terminal or whether the cabal binary is more or less native Windows binary (if that's possible)?]
jneira commentedon Sep 14, 2021
3.7 is shown cause I was trying to build a recent commit of cabal but using an older version of cabal itself
Mikolaj commentedon Sep 14, 2021
Oh, right, my bad.
Mikolaj commentedon Sep 14, 2021
@Mistuke: does the log tell you anything? What can be going wrong?
phadej commentedon Sep 14, 2021
My guess is that we don't overwrite
PATHprovided by bash console itself.And if you test in PowerShell the problem doesn't arise. Can @jneira try to build in PowerShell?
jneira commentedon Sep 14, 2021
I am afraid the log from the description was from a powershell session 😕
I tested it in a msys bash and same result
jneira commentedon Sep 14, 2021
Ok, i am afraid there had been some confusion that I could have avoided posting the full logs with versions of tooling:
with
-v3we can see the configure invocation:37 remaining items
madjestic commentedon Oct 24, 2023
Hey guys,
I've tried ghc 9.4.7 and cabal 3.10.1.0, the error message is the same.
Mikolaj commentedon Oct 24, 2023
Thanks for the experiment. Does compiling C programs that use
./configurework? Actually, does runningshwork?madjestic commentedon Oct 24, 2023
I will explain how I am doing that: I've got ghcup installed as recommended on the website, ugraded and updated. I start the Powershell, navigate to the haskell project (a clean test project with network added into the project's cabal as the only dependency besides base), run
cabal buildand get this error.I am not aware of how I am supposed to use
shon./configureunder windows. Running these commands in Powershell just gives errors. Where can I read about the necessary steps involvingshandconfigure, @Mikolaj ?Regards,
Vlad
Mikolaj commentedon Oct 24, 2023
@madjestic: actually, I'm quite clueless regarding Windows --- I was just following your error message. I'm also trying to understand how broken your toolchain is and what may be responsible for that.
@hasufell: is
ghcupso plug-and-play on Windows, e.g., does it install msys2 so that the user can runshin powershell or install a C library from source [edit: with./configure] (is there a good smoke test library to use in that role?)?madjestic commentedon Oct 24, 2023
I can only humbly suggest that my toolchain is probably as vanilla as most windows 11 users will experience. I kept it very simple and nearly everything is a default, I was not trying being clever or customize my environment beyond adding SDL2 dll to the path and cabal/config.
Mikolaj commentedon Oct 24, 2023
That's what I'm worried about. :D
Bodigrim commentedon Oct 24, 2023
My experience is that building
networkon Windows requires MinGW / MSYS terminal. Usually Git Bash works well. It's a pity if this is not documented clearly, but probably more an issue fornetworkthan forCabal.hasufell commentedon Oct 25, 2023
Yes, we:
extra-prog-pathThat means you don't need an msys2 shell, because cabal knows about those directories.
If the cabal config doesn't include this, it will fail.
Mikolaj commentedon Oct 30, 2023
@madjestic: can you reconcile these bits of info? Are msys2 paths in your cabal config?
madjestic commentedon Oct 30, 2023
I will take a look and let you know asap, thanks!
madjestic commentedon Nov 22, 2023
Hey guys,
I think that I do have msys2 paths in the cabal config. Here's my cabal/config.
Am I missing something there?
gbaz commentedon Nov 23, 2023
those paths look correct. perhaps you can download and build network individually, running cabal at a high verbosity, so that we could see the error logs, which may be more informative?
jasagredo commentedon Dec 15, 2023
I think this is a manifestation of this other issue I created #9519gbaz commentedon Jan 19, 2024
Not so sure. If it was the exec handling and git handling, not sure how that might have affected build?
jasagredo commentedon Jan 19, 2024
Indeed. My comment was before I started investigating deeply the fix for my ticket. This is NOT related to #9519.