-
Notifications
You must be signed in to change notification settings - Fork 26
Libs are not properly detected #3
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
Comments
Sorry for the trouble - it will be easy to fix. You are the first one who asks about the installation for LInux and I never had a chance to test it, so its a good opportunity to fix this. The "quick fix" is to go into Can you tell me what you get when you type the following in the Julia REPL? (so,si,pr) = readandwrite(`pkg-config --libs opencv`)
output = readall(so)
close(so)
path = match(Regex("/usr/local/lib/"), output)
path != nothing ? println("Found a local OpenCV installation in $(path.match).") : nothing If you get |
Here is the result of what you asked :
I then tried your quickfix, added directly the path to Do I need to recompile opencv with RTLD_GLOBAL (I have no idea what this is) ? Thank you for your help :) ~Nico |
I will fix it when I get home. Sorry for the trouble. |
It's cool, no worries ;) |
I am working on this now. The issue here is that your Linux system is not detecting the location of the OpenCV shared libraries after searching in line 36 of path = match(Regex("/usr/local/lib/"), output) This can be easily fixed by changing the Regex term to I can see from your screenshot that your .so libraries are listed differently in Linux compared to OSX ( dlopen("/usr/local/lib/libopencv_calib3d.dylib") |
Sorry, I should correct this (it should be .so), what happens when you type. e.g., dlopen("/usr/local/lib/libopencv_calib3d.so") |
This works fine. |
So you got something like |
Yeah, for some reason I can't copy/paste term output today… But this is what I get :) |
Before I commit changes and push to GitHub, can you check that your OpenCV header files are in /usr/local/include/ |
Yes, it looks so : |
I hope this will be fixed with the changes I have made - I will submit it in the next 30 min. However, one more thing to keep in mind is that if you need to include more advanced modules from |
For example, currently if you want to use the
|
I've git cloned again, but it still fails to load the libs :/ (same error as before). Regards, |
I know the source of the problem. Its because the Thanks for the link to docker - looks very cool. |
OK. Now I see exactly why you are having problems installing this on Linux and why you might have other problems than we did not anticipate . . . The first thing to note is that your screenshot of the opencv libs directory does not fully match the listing of the corresponding libs in the output of the Julia REPL:
For example, the I already fixed the code to make sure that it detects all your currently compiled libraries (according to your REPL output), but I am wondering whether you have successfully compiled all the necessary libs for OpenCV. It seems to me that e.g., you don I just committed the changes to master. |
There were no errors during compilation of OpenCV as far as I know. It is true that the output of pkg-config doesn't match my libs in /usr/local/lib, which is weird.... |
I think the best compromise is not to throw an error (but inform) when it does not find the lib in another Linux or Windows (line 76 of Please try the latest commit. |
I want to try it, but it'll have to wait until monday as I can't access my work computer now :/ |
Hello Max, |
OK. Julia crashing because of OpenCV.jl is rather odd. . . |
Hello Max. If I change the lines 60 and 61 and remove the Please have a look at this screenshot showing what is happening : https://i.imgur.com/PXxMkRA.png To fix the loading of qt5, I changed line 21 of deps/Qt_support.jl and removed the 5, as on my machine, qt5 is just called qt.
Now the Qt5 libs are loaded. But there is this error about compiling with -fPIC or -fPIE, but that is qt related :) As you can see, in GNU/Linux, libs can be in /usr/lib or /usr/local/lib. So I suggest your code looks at this two places. Also, qt5 can be called qt. It looks like it works now (I can use opencv functions), will see if the qt5 error is relevant. \o/ |
Great! It looks like there are some important differences in how Linux and OSX handle the paths to the libs. But the good news is that it is easy to fix. I will make the changes to the code based on your findings and wrapped them inside Regarding Qt paths, I am not surprised. The original code from |
@maxruby Since my opencv is installed in the same location as lines 60 and 61 are set. I changed line 59 to following
So I commented the line 130
Can you please guide me here? |
It looks like there are changes in |
Do you think you will get a chance to update both Julia and Cxx soon? |
I will work on this tonight. I will let you know once I have checked the
|
That is great! Thank you. On Tue, Sep 22, 2015 at 7:37 AM, Maximiliano Suster <
Ishrat Badami GermanyTel: +49 241 80 20775 e-mail: [email protected] URL: http://www.vision.rwth-aachen.de/people/ishrat-badami |
Putting aside the issues of loading the opencv libs specifically in julia> cvPoint(10,10)
Cxx.CppValue{Cxx.CxxQualType{Cxx.CppTemplate{Cxx.CppBaseType{symbol("cv::Point_")},Tuple{Int32}},(false,false,false)},8}((0x0a,0x00,0x00,0x00,0x0a,0x00,0x00,0x00))
julia> cvRect(5,5,300,300)
Cxx.CppValue{Cxx.CxxQualType{Cxx.CppTemplate{Cxx.CppBaseType{symbol("cv::Rect_")},Tuple{Int32}},(false,false,false)},16}((0x05,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x2c,0x01,0x00,0x00,0x2c,0x01,0x00,0x00)) I am not sure why you are seeing this error, but I suspect it has to do with the implementation of |
Thank you for your feedback. One last question. Which version of OpenCV are you using? |
I compiled the latest master from the |
@ibadami. Glad to hear it is working for you! We will need to have a more universal way to handle the Headers and libs. At this point, I dont have too much time for maintaing or extending opencv.jl. |
I understand. I am currently working actively with Julia and hence OpenCV.jl (Thanks to you!). If you wish I can keep writing the wrappers of all those functions/modules that are not yet available in OpenCV.jl, whenever I need to use them. Once I am done with one complete module, I can send you the pull request. |
Sounds good. |
…amic library loading errors | enhanced config to specify the libdir, headerdir and list of available shared libs in OpenCV_libs.jl | refactored methods and logic prior to loading the libs in OpenCV.jl | updated comments regarding known BUGS with Qt_support from Cxx.jl
Hello,
First I would like to thank you and congratulate you on your work :)
I've installed julia 0.4-dev, compiled and installed successfully OpenCV 3.0-BETA, as instructed.
But when I do
using OpenCV
, it doesn't find the libs.The libs are in /usr/local/lib (see screenshot : https://i.imgur.com/pIiWMWe.png).
How can I fix this ? I'd be OK to add the path manually (how do I do that btw?), but as it seems to be the default path, maybe there is a problem somewhere…
I'm running Archlinux.
Tell me if you need more infos :)
Regards,
~Nico
The text was updated successfully, but these errors were encountered: