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

Cannot install old-time on win10. #8348

Closed
LastsForever opened this issue Aug 9, 2022 · 8 comments
Closed

Cannot install old-time on win10. #8348

LastsForever opened this issue Aug 9, 2022 · 8 comments

Comments

@LastsForever
Copy link

Describe the bug
Cannot install old-time on win10.
E6033A45F178DEEDABC91A86C6A7A2E5

@ffaf1
Copy link
Collaborator

ffaf1 commented Aug 9, 2022

#2422, #3903, #657 match "exit code 127". Are those of any help?

@ffaf1
Copy link
Collaborator

ffaf1 commented Aug 9, 2022

@LastsForever can you try again with higher verbosity (-v2 and/or -v3)? exit code 127 is linked with many things.

@LastsForever
Copy link
Author

LastsForever commented Aug 9, 2022

@LastsForever can you try again with higher verbosity (-v2 and/or -v3)? exit code 127 is linked with many things.

I read the information of -v3 and found the log file of installing old-time package.
In the end, the problem is
Working directory: "dist\\build"

"C:\cygwin64\bin\sh.exe" "/C/Users/ADMINI~1/AppData/Local/Temp/cabal-install.-13848/dist-newstyle/tmp/src-13848/old-time-1.1.0.3/configure" "--with-compiler=ghc" "--prefix=C:\cabal\store\ghc-8.10.7\old-time-1.1.0.3-b61a4a1209f2c02995904a85475c035b0284e3d4" "--bindir=C:\cabal\store\ghc-8.10.7\old-time-1.1.0.3-b61a4a1209f2c02995904a85475c035b0284e3d4\bin" "--libdir=C:\cabal\store\ghc-8.10.7\old-time-1.1.0.3-b61a4a1209f2c02995904a85475c035b0284e3d4\lib" "--libexecdir=C:\cabal\store\ghc-8.10.7\old-time-1.1.0.3-b61a4a1209f2c02995904a85475c035b0284e3d4\libexec" "--datadir=C:\cabal\store\ghc-8.10.7\old-time-1.1.0.3-b61a4a1209f2c02995904a85475c035b0284e3d4\share" "--sysconfdir=C:\cabal\store\ghc-8.10.7\old-time-1.1.0.3-b61a4a1209f2c02995904a85475c035b0284e3d4\etc" "CC=C:\ghcup\ghc\810~1.7\lib\../mingw/bin\gcc.exe"

/usr/bin/sh: /C/Users/ADMINI~1/AppData/Local/Temp/cabal-install.-13848/dist-newstyle/tmp/src-13848/old-time-1.1.0.3/configure: No such file or directory

C:\cygwin64\bin\sh.exe returned ExitFailure 127

So do you know how to solve this problem?

@Mikolaj
Copy link
Member

Mikolaj commented Aug 9, 2022

I don't know what the problem is, but cabal install old-time won't do anything useful. This command only installs executables. What for do you try to install that (ancient) library?

@jneira
Copy link
Member

jneira commented Aug 9, 2022

Don't have a computer to test it but I noted you are using cygwin64 and nowadays msys64 is being used to make available a posix env for packages needing a configure step
Otoh those that step usually works better if you invoke cabal within a bash shell instead windows cmd

@LastsForever
Copy link
Author

I don't know what the problem is, but cabal install old-time won't do anything useful. This command only installs executables. What for do you try to install that (ancient) library?

Because some packages rely on this one. I have told the author and asked the author to modify the dependent library. So this issue is no longer needed. Thanks a lot.

@Mikolaj
Copy link
Member

Mikolaj commented Aug 10, 2022

I don't know what the problem is, but cabal install old-time won't do anything useful. This command only installs executables. What for do you try to install that (ancient) library?

Because some packages rely on this one. I have told the author and asked the author to modify the dependent library. So this issue is no longer needed. Thanks a lot.

@LastsForever, I mean, you don't need to install library dependencies manually. Cabal does this for you automatically, when you install the main program you are after. Anyway, good luck in whatever you do.

@jneira
Copy link
Member

jneira commented Aug 10, 2022

Anyways i am not able to reproduce the error with a standard haskell toolchain installed with ghcup:

PS C:\Users\atrey> cabal --version
cabal-install version 3.7
compiled using version 3.7.0.0 of the Cabal library
PS C:\Users\atrey> ghc --numeric-version
8.10.7
PS C:\Users\atrey> cabal install old-time
Resolving dependencies...
Build profile: -w ghc-8.10.7 -O1
In order, the following will be built (use -v for more details):
 - old-locale-1.0.0.7 (lib) (requires build)
 - old-time-1.1.0.3 (lib:old-time) (requires build)
Configuring library for old-locale-1.0.0.7..
Preprocessing library for old-locale-1.0.0.7..
Building library for old-locale-1.0.0.7..
[1 of 1] Compiling System.Locale    ( System\Locale.hs, dist\build\System\Locale.o )
Installing library in D:\cabal\store\ghc-8.10.7\incoming\new-1968\cabal\store\ghc-8.10.7\old-locale-1.0.0.7-7c88e86b1acaf8ab91e87f1c7410027fe1ce3c5a\lib
Configuring old-time-1.1.0.3...
configure: WARNING: unrecognized options: --with-compiler
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 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
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for ftime... yes
checking for localtime_r... no
checking for gettimeofday... yes
checking for struct tm.tm_zone... no
checking for tzname... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/time.h... (cached) yes
checking whether altzone is declared... no
config.status: creating include/HsTimeConfig.h
Preprocessing library for old-time-1.1.0.3..
[1 of 1] Compiling System.Time      ( dist\build\System\Time.hs, dist\build\System\Time.o )
Installing library in D:\cabal\store\ghc-8.10.7\incoming\new-1968\cabal\store\ghc-8.10.7\old-time-1.1.0.3-2c64b74e6afb34dbb45e5423a39d197775b2b3c0\lib
Warning:
@ WARNING: Installation might not be completed as desired! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The command "cabal install [TARGETS]" doesn't expose libraries.
* You might have wanted to add them as dependencies to your package. In this
case add "old-time" to the build-depends field(s) of your package's .cabal
file.
* You might have wanted to add them to a GHC environment. In this case use
"cabal install --lib old-time". The "--lib" flag is provisional: see
https://github.com/haskell/cabal/issues/6481 for more information.

It ends with the expected warning about trying to install a package withut an executable

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

No branches or pull requests

4 participants