maxruby / OpenCV.jl

The OpenCV (C++) interface for Julia
Other
105 stars 28 forks source link

RTLD_GLOBAL not defined #6

Closed arnaudmgh closed 7 years ago

arnaudmgh commented 9 years ago
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "help()" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.4.0-dev+4998 (2015-05-26 02:12 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 116238c (1 day old master)
|__/                   |  x86_64-apple-darwin13.4.0

julia> using OpenCV
libopencv_core.3.0.0 is not found in pkg-config
libopencv_highgui.3.0.0 is not found in pkg-config
libopencv_imgproc.3.0.0 is not found in pkg-config
libopencv_video.3.0.0 is not found in pkg-config
libopencv_videoio.3.0.0 is not found in pkg-config
libopencv_calib3d.3.0.0 is not found in pkg-config
libopencv_features2d.3.0.0 is not found in pkg-config
libopencv_flann.3.0.0 is not found in pkg-config
libopencv_imgcodecs.3.0.0 is not found in pkg-config
libopencv_ml.3.0.0 is not found in pkg-config
libopencv_objdetect.3.0.0 is not found in pkg-config
libopencv_photo.3.0.0 is not found in pkg-config
libopencv_shape.3.0.0 is not found in pkg-config
libopencv_stitching.3.0.0 is not found in pkg-config
libopencv_superres.3.0.0 is not found in pkg-config
libopencv_videostab.3.0.0 is not found in pkg-config
libopencv_viz.3.0.0 is not found in pkg-config
Warning: redefining constant cvlibdir
Warning: redefining constant cvheaderdir
ERROR: LoadError: UndefVarError: RTLD_GLOBAL not defined
while loading /Users/arnaud/.julia/v0.4/OpenCV/src/OpenCV.jl, in expression starting on line 71
arnaudmgh commented 9 years ago

I may add that I am NOT using the master branch of the Cxx package, I switched to the bug branch as advised by Keno. Also, I did not compile openCV, I was hoping to use the shared library shipping with openCV.jl.

maxruby commented 9 years ago

I will have a look soon at this since I could get past the RTLD_GLOBAL (I was travelling).

andrewadare commented 9 years ago

I went through the julia/Cxx/OpenCV/OpenCV.jl build+install sequence today and am seeing a similar problem:

julia> using OpenCV
libopencv_viz.3.0.0 is not found in pkg-config
ERROR: LoadError: UndefVarError: RTLD_GLOBAL not defined
while loading /Users/adare/.julia/v0.4/OpenCV/src/OpenCV.jl, in expression starting on line 71

The libopencv_viz issue may be completely unrelated (but I'm not sure, so I won't open a separate issue). I'm noticing just now that the viz module was listed as "Unavailable" when I ran CMake for my OpenCV installation. Maybe viz depends on VTK, and it doesn't look like I have that installed. If OpenCV.jl will not load without libopencv_viz, would it be worth mentioning these prerequisites in the installation directions?

maxruby commented 9 years ago

That is correct, viz requires VTK flag switched on. See e.g., this link. Regarding, the dependencies for loading OpenCV.jl, this is unfortunately affected by changes made in Julia base or Cxx. I am not sure we can have full protection from these changes. I am hoping that once v0.4 is released, it will be easier to maintain OpenCV.jl as a stable package. But I agree we could have more clearly stated all the requirements for OpenCV.jl and if you want to add these yourself, I welcome suggestions in a PR. Thank you.

andrewadare commented 9 years ago

Thanks for the info. I'd be happy to write a PR once I sort it out. In the meantime, I'll cope with the warning that libopencv_viz is not being loaded and get back to the topic of this issue: if I qualify a few names with Libdl, I get past this error. Specifically,

Now I'm having Qt problems, so on to that....

andrewadare commented 9 years ago

Just an update: after installing Qt 5.4 and changing the hard-coded paths in Qt_support.jl to that version, OpenCV.jl seems to work. I can run all the tests, goat video and all. When I first load OpenCV, I do see this:

Warning: requiring "OpenCV" did not define a corresponding module.

But I'm not sure what to make of it, since my preliminary trials seem to indicate things are working.

maxruby commented 9 years ago

Great. That message is related to Cxx.jl not being packaged as a module.