Strange errors building the data-default package - windows

I'm getting a number of strange error messages while trying to cabal install data-default. The same basic phenomenon happens for that package even in a fresh sandbox. I can install other packages with no problem.
The error messages are of the following form, but occur for each of the 4 data-default-instances- packages:
[1 of 1] Compiling Data.Default.Instances.OldLocale ( Data\Default\Instances\OldLocale.hs, dist\dist-sandbox-6a114df1\build\Data\Default\Instances\OldLocale.o )
C:\Program Files (x86)\MinGHC-7.10.1\ghc-7.10.1\mingw\bin\ar.exe: dist/dist-sandbox-6a114df1\build\libHSdata-default-instances-old-locale-0.0.1-6jcjjaR25tK4x3nJhHHjFM.a-8696\libHSdata-default-instances-old-locale-0.0.1-6jcjjaR25tK4x3nJhHHjFM.a: No such file or directory
Any idea what's going on?
Output from ghc-pkg check
C:\Users\Doug\Documents\GitHub\bird-brain [estimator]> ghc-pkg check
WARNING: cache is out of date: C:/Program Files (x86)/MinGHC-7.10.1/ghc-7.10.1\lib\package.conf.d\pa
ckage.cache
ghc will see an old view of this package db. Use 'ghc-pkg recache' to fix.
Warning: haddock-interfaces: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\QuickCh
eck-2.8\html\QuickCheck.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\QuickCheck-2.
8\html doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\tf-rand
om-0.5\html\tf-random.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\tf-random-0.5
\html doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\random-
1.1\html\random.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\random-1.1\ht
ml doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\primiti
ve-0.5.4.0\html\primitive.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\primitive-0.5
.4.0\html doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\mtl-2.2
.1\html\mtl.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\Users\Doug\AppData\Roaming\cabal\doc\i386-windows-ghc-7.10.1\mtl-2.2.1\htm
l doesn't exist or isn't a directory

Using the strategy at https://github.com/haskell/cabal/issues/2502 it is possible to fix this problem, which ultimately has to do with the Windows limit on overall path length.
Using stack is another solution, probably one to try first, because it internally uses a folder that is likely to be close enough to the root for the path to work.

Related

Unable to load libraries

I recently updated R and Rstudio and since then have not been able to load any libraries, including ggplot2, tidyverse.
Just for clarity, let me share the messages I get when I install tidyverse and try to load the library:
install.packages("tidyverse")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
**https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/Computer User 1/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/tidyverse_1.3.2.zip'
Content type 'application/zip' length 428970 bytes (418 KB)
downloaded 418 KB
package ‘tidyverse’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Computer User 1\AppData\Local\Temp\RtmpQZdI11\downloaded_packages**
**> library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in inDL(x, as.logical(local), as.logical(now), ...):
unable to load shared object 'C:/Program Files/R/R-4.2.2/library/stats/libs/x64/stats.dll':
LoadLibrary failure: The specified module could not be found.
**
Also, to be clear, I did install the latest version of Rtools.
Now I tried reading through several messages on google regarding the same error but failed to understand the solution. The main thing I do not understand is why the packages are installed here: C:\Users\Computer User 1\AppData\Local\Temp\RtmpQZdI11\downloaded_packages, and then are loaded from here: C:/Program Files/R/R-4.2.2/library/stats/libs/x64/stats.dll.
I have tried specifying the library path but have not been successful at solving the problem. I don't know why R is unable to load the libraries. Also, on running .libpaths(), I get two libraries:
[1] "C:/Users/Computer User 1/AppData/Local/R/win-library/4.2"
[2] "C:/Program Files/R/R-4.2.2/library"
And when I try to install tidyverse here: C:/Program Files/R/R-4.2.2/library, I get this error: the folder is unwritable.
I don't know how to solve this issue. Please help.

During Openssl build: How to fix "fatal error: apps/app_rand.d: no such file or directory, compilation terminated"

I am attempting to update openssl to 1.1.1 on centos 7 in order to start building OpenLDAP.
After pulling the openssl installation package and unzipping it in /usr/local/src/ I ran ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib. This command successfully configured openssl.
I then ran the make command to build openssl and got the following error:
cc1: fatal error: apps/app_rand.d: no such file or directory
compilation terminated
make(1): *** (apps/app.rand.o) Error 1
make(1): Leaving directory '/usr/local/src/openssl-1.1.1d'
make: *** (all) Error 2
The apps directory was created and does exist, but the app_rand.d file is not present inside of the apps directory.
I have downloaded all dependencies (i believe)
I am decent in linux, I have my rhcsa, but am not familiar with manually building software libraries like openssl. I have tried to do some research online but have not come up with any solutions. Any advice would be very much appreciated!

Are these usr/bin warnings in msys a problem?

Following the suggestion of #liberforce, I am running Mingw-w64 64bit shell.
I got less warnings than with msys2 shell.
Here are the warnings I got.
warning: could not get file information for clang32/
warning: could not get file information for clang32/bin/
warning: could not get file information for clang32/etc/
warning: could not get file information for clang32/etc/config.site
warning: could not get file information for clang32/include/
warning: could not get file information for clang32/lib/
warning: could not get file information for clang32/share/
warning: could not get file information for clang64/
warning: could not get file information for clang64/bin/
warning: could not get file information for clang64/etc/
warning: could not get file information for clang64/etc/config.site
warning: could not get file information for clang64/include/
warning: could not get file information for clang64/lib/
warning: could not get file information for clang64/share/
warning: could not get file information for opt/
warning given when extracting /usr/bin/cygpath.exe (Can't create '/usr/bin/cygpath.exe')
warning given when extracting /usr/bin/cygwin-console-helper.exe (Can't create '/usr/bin/cygwin-console-helper.exe')
warning given when extracting /usr/bin/locale.exe (Can't create '/usr/bin/locale.exe')
warning given when extracting /usr/bin/tzset.exe (Can't create '/usr/bin/tzset.exe')
warning: terminate MSYS2 without returning to shell and check for updates again
warning: for example close your terminal window instead of calling exit
Normally when I follow the last instruction, when I run the shell again, it just opens the terminal window, quickly shows an error, I can't read quick enough, and quickly closes.
So, I reinstall, and don't use pacman -Syu, to update, but install each module with pacman -S.
However, at this point, I want to know, will the above warnings prove problematic going forward?

Unable to load dynamic library php_zmq.dll - The specified module could not be found

I have XAMPP with PHP Version
PHP 7.1.13 (cli) (built: Jan 3 2018 20:16:04) ( ZTS MSVC14 (Visual C++ 2015) x86 ).
I want to install the ZeroMQ extension, which
I downloaded from here http://pecl.php.net/package/zmq/1.1.3/windows specifically 7.1 Thread Safe (TS) x86
moved the php_zmq.dll to the file C:\xampp\php\ext, and
wrote extension=php_zmq.dll into the file C:\xampp\php\php.ini,
wrote C:\xampp\php\ext in to Windows PATH,
but I still getting this error :
PHP Warning: PHP Startup: Unable to load dynamic library
'C:\xampp\php\ext\php_zmq.dll' - The specified module could not be
found. in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library
'C:\xampp\php\ext\php_zmq.dll' - The specified module could not be
found. in Unknown on line 0
What could be the problem?
I did the same as others suggested, but it still did not work. Then I noticed that there is one more .DLL file in the ZMQ ZIP file: libsodium.dll. When I copied this to the C:\xampp\php directory, it worked.
To summarize: files libsodium.dll and libzmq.dll must be copied to C:\xampp\php directory.
I have found out the solution - the libzmq.dll file must be copied / moved to a directory, where the php.exe file is.
So in my case to C:\xampp\php

install x11 in mac 10.10.1

I am trying to run a program in this system.
There is a makefile in the package. And I also need X11 to run it, so I have installed xQuarts,and add all the (potentially) useful path to the PATH.
when I type "$PATH" in the terminal,
it shows:
-bash:
/Library/Frameworks/Python.framework/Versions/3.4/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin: No such file or directory
I used "make all" in my source code package, it result in the following error:
./Xlibext.c:2:10: fatal error: 'X11/Xlib.h' file not found
#include "X11/Xlib.h"
^
1 error generated.
I have reviewed some other posts, but I couldn't find a solution yet. Can anyone help?

Resources