GHCi could not load .dll lib (C++ lib) on Windows - c++

I've installed a C++ lib successfully via vcpgk, named: lmdb:x64-windows
I also installed lmdb binding package for Haskell by Cabal install
And when trying to test the lmdb package:
module Persistence where
import Database.LMDB.Raw
GHCi compiled and loaded it:
[1 of 1] Compiling Persistence ( Persistence.hs, interpreted )
Ok, modules loaded: Persistence.
But it throws error when I try to call any functions in lmdb Raw lib:
*Persistence> lmdb_version
ghc.exe: addDLL: lmdb.dll (Win32 error 126): The specified module could not
be found.
ghc.exe: Could not load `lmdb.dll'. Reason: addDLL: could not load DLL
ghc.exe: C:\Users\thanhdo\AppData\Roaming\cabal\x86_64-windows-ghc-
8.0.2\lmdb-0.2.5-1uQhV16mebP51rtMgitOcY\HSlmdb-0.2.5-
1uQhV16mebP51rtMgitOcY.o: unknown symbol `mdb_dbi_close'
ghc.exe: unable to load package `lmdb-0.2.5'
I was searching around and was trying several approaches but still can't resolve this error. I'm using Windows 7 64bit, Haskell platform 8.0.2. Thanks in advance.

As per discussion in comment section, I was trying to tell GHCi the location of lmdb's dll. It works after I modify %path% env.
In my case, the path was: vcpkg\installed\x64-windows\bin

Related

No module named 'numpy.core._multiarray_umath'

I am trying to use matploitlib_cpp on Windows 11 with Numpy 1.24.2 and Python 3.11, but I keep running in to the following error.
Original error was: No module named 'numpy.core._multiarray_umath'
I know this has been posted at a million different places on the internet and I have tried following all the guides that says reinstalling numpy and whatever, it does not work for me. What I can see in my path ..\Python3.11\Lib\site-packages\numpy\core is that I have a file named _multiarray_umath.cp311-win_amd64.pyd but no file named _multiarray_umath. I also tried to use a virtual environement from Anaconda but I am not sure how to build matploitlib_cpp against such virtual enviornment.
I got it working by using the release binaries instead of debug binaries.

error while loading shared libraries: libgvc.so.6 (deploy django app on heroku)

I have a problem with a heroku deployment because I have an application with multiple buildpacks that use python, r, scikitlearn and grahpviz buildpacks. The application deployed corretly, but when I try to see trees that are made by graphviz I have this problem:
"Program terminated with status: 127. stderr follows: /app/.heroku-buildpack-graphviz/usr/bin/dot: error while loading shared libraries: libgvc.so.6: cannot open shared object file: No such file or directory"
I know that all graphviz dependeces are installed correctly but in this directory "/app/.heroku-buildpack-graphviz/usr/lib" I tried to move it but does not work. Also I use heroku-16 because I read that graphviz buildpack not work in heroku-18.
Could anybody help me?

how to compile Ignite application on CMake?

I did compile Ignite Application successfully.
but The Binary didn't work.
/tmp/tmp.Nw0IPD6ru3/cmake-build-debug-local-container/planet_engine: error while loading shared libraries: libjvm.so: cannot open shared object file: No such file or directory
how can I make to it work?
Also, I compiled C++ Examples successfully. such as ignite-compute-example.
and, I execute that but I got an error message.
An error occurred: JVM library is not found (did you set JAVA_HOME environment variable?)
and I using a nightly release version 2.8.0.20190213 because I couldn't build to version 2.7 in my environment.
I posted environment values down.
IGNITE_HOME=
TERM=xterm-256color
SHELL=/bin/bash
LIBRARY_PATH=/root/jre1.8.0_201/lib/amd64/server:/root/jre1.8.0_201/lib/amd64/
LC_NUMERIC=ko_KR.UTF-8
SSH_TTY=/dev/pts/0
JRE_HOME=/root/jre1.8.0_201
USER=root
LS_COLORS=rs=0:d...
LD_LIBRARY_PATH=/root/jre1.8.0_201/lib/amd64/server:/root/jre1.8.0_201/lib/amd64/
CLASS_PATH=/root/jdk-11.0.2/lib:
LC_TELEPHONE=ko_KR.UTF-8
MAIL=/var/mail/root
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/jdk-11.0.2/bin
LC_IDENTIFICATION=ko_KR.UTF-8
JAVA_HOME=/root/jdk-11.0.2
LANG=en_US.UTF-8
LC_MEASUREMENT=ko_KR.UTF-8
JDK_HOME=/root/jdk-11.0.2/lib
SHLVL=1
HOME=/root
LOGNAME=root
LESSOPEN=| /usr/bin/lesspipe %s
LESSCLOSE=/usr/bin/lesspipe %s %s
LC_TIME=ko_KR.UTF-8
LC_NAME=ko_KR.UTF-8
_=/usr/bin/env
Thank you for reading. :)
I got it.
I am working on a docker container environment.
and therefore I am using remote build and debug with ssh and gdb.
finally, I found out why it couldn't find libjvm.so and why couldn't read environment values such as JAVA_HOME.
because it is working in gdb for now.
I confirmed that it is working when without gdb.
I will find a solution.
and, if I have been found, I will update the answer.
[Solved]
I share how I make solved that.
I was using an Oracle JDK-11 through source install.
but Ignite C++ client need something different with latest released jdk versions.
Ignite need a directory structure like this
JAVA_HOME/ (as JDK install directory)
- jre/
- lib/
- lib/
...
I solved by apt install openjdk-8-jdk.
openjdk-8-jdk have structure for what Ignite need.
i added JAVA_HOME, IGNITE_HOME, at /etc/environment.
It works finally.
but I got another problem. HAHA
I am so sad.
This also GDB problem..

Caffe2 installed correct but can't load glog library

I pip installed caffe2 via a "Prebuilt Caffe2 Python Wheel" without an error. But running the first example I get the following error message which seems not be able to find/load "/usr/local/opt/glog/lib/libglog.0.dylib".
If I import caffe2.python it does not give me an error.
The glog is missing in usr/local/opt.
Is this a Mac GPU problem ? I know that CUDA is a problem/does not run on Mac or is there anything else I missed/I have to do. ?
Thanks for any help.
WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode.
WARNING:root:Debug message: No module named caffe2_pybind11_state_gpu
CRITICAL:root:Cannot load caffe2.python. Error: dlopen(/usr/local/lib/python2.7/site-packages/caffe2/python/caffe2_pybind11_state.so, 10): Library not loaded: /usr/local/opt/glog/lib/libglog.0.dylib
Referenced from: /usr/local/lib/python2.7/site-packages/caffe2/python/caffe2_pybind11_state.so
Reason: image not found

Getting this error *** OSError: cannot load library C:\WINDOWS\libzsfc.dll: error 0xc1

I am trying to load a .dll file using python cffi library, but whiele I am trying to load it I am getting following error:-
*** OSError: cannot load library C:\WINDOWS\libzsfc.dll: error 0xc1
I am using this
from cffi import FFI
ffi = FFI()
lib = ffi.dlopen("libzsfc.dll")
but this giving me error, I tried a lot to resolve this, but it remains same, please let me know if anyone faced same issue.
I think you have to first register the dll in windows then load will work fine.
To register the same use command regsvr32 <complete dll path>
Use Regsvr32.exe from the %SystemRoot%\Syswow64 folder. For example, type the following commands to register the DLL: cd \windows\syswow64 regsvr32 c:\filename.dll
Old question, but I just had the same issue. Fixed:
Super easy - reinstall tessaract. Head over to https://github.com/UB-Mannheim/tesseract/wiki. Get their installer. It'll have you uninstall the old version. Worked immediately for me.