Hi,
I compiled latest pix_opencv from my github fork, but I have linking problems.
I am on macos 10.14.2, mojave
Using lipo -info
, all of pd, Gem.pd_darwin, pix_opencv.pd_darwin and
libopencv_*.dylib show as: "Non-fat file ... architecture: x86_64"
This is the error on the console:
GEM: Graphics Environment for Multimedia GEM: ver: 0.94.git v0.94_pre1 ... error: /Users/federicocamarahalac/Documents/pix_opencv/pix_opencv.pd_darwin: dlopen(/Users/federicocamarahalac/Documents/pix_opencv/pix_opencv.pd_darwin, 10): Symbol not found: _cvCalcGlobalOrientation Referenced from: /Users/federicocamarahalac/Documents/pix_opencv/pix_opencv.pd_darwin Expected in: flat namespace in /Users/federicocamarahalac/Documents/pix_opencv/pix_opencv.pd_darwin not reloading 'image' plugins (already 5 loaded) pix_opencv_contours error: ... couldn't create
Any pointers would be appreciated.
thanks,
fede
hey frederico,
you might be using a more modern major version of opencv than is referenced from the code of pix_opencv. calling functions this way apparently has been deprecated in opencv 3.
if you have opencv2 installed somewhere (as you seem to have the headers because your build did succeed) you can force the use of the other version library with setting LD_LIBRARY_PATH=/path/to/opencv2 in the shell from which you start pd.
hope that helps,
ub
On 28.02.19 21:30, Federico Camara Halac wrote:
Hi,
I compiled latest pix_opencv from my github fork, but I have linking problems.
I am on macos 10.14.2, mojave
Using
lipo -info
, all of pd, Gem.pd_darwin, pix_opencv.pd_darwin and libopencv_*.dylib show as: "Non-fat file ... architecture: x86_64"This is the error on the console:
GEM: Graphics Environment for Multimedia GEM: ver: 0.94.git v0.94_pre1 ... error: /Users/federicocamarahalac/Documents/pix_opencv/pix_opencv.pd_darwin: dlopen(/Users/federicocamarahalac/Documents/pix_opencv/pix_opencv.pd_darwin, 10): Symbol not found: _cvCalcGlobalOrientation Referenced from: /Users/federicocamarahalac/Documents/pix_opencv/pix_opencv.pd_darwin Expected in: flat namespace in /Users/federicocamarahalac/Documents/pix_opencv/pix_opencv.pd_darwin not reloading 'image' plugins (already 5 loaded) pix_opencv_contours error: ... couldn't create
Any pointers would be appreciated.
thanks,
fede
-- http://fdch.github.io http://fdch.github.io/tv
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
i just saw your fork does have adaptions for opencv3, but it might still be a deprecation issue. i can't build it with opencv 3.2.0, because it includes the legacy module and probably the C api. but maybe it's just the motion module has been relocated. see the second link
http://answers.opencv.org/question/42622/opencv-30-deprecated-opencv_legacy-...
http://answers.opencv.org/question/190863/motion-detection-undefined-symbols...
cheers,
ub
On 28.02.19 22:15, ub wrote:
hey frederico,
you might be using a more modern major version of opencv than is referenced from the code of pix_opencv. calling functions this way apparently has been deprecated in opencv 3.
if you have opencv2 installed somewhere (as you seem to have the headers because your build did succeed) you can force the use of the other version library with setting LD_LIBRARY_PATH=/path/to/opencv2 in the shell from which you start pd.
hope that helps,
ub
On 28.02.19 21:30, Federico Camara Halac wrote:
Hi,
I compiled latest pix_opencv from my github fork, but I have linking problems.
I am on macos 10.14.2, mojave
Using
lipo -info
, all of pd, Gem.pd_darwin, pix_opencv.pd_darwin and libopencv_*.dylib show as: "Non-fat file ... architecture: x86_64"This is the error on the console:
GEM: Graphics Environment for Multimedia GEM: ver: 0.94.git v0.94_pre1 ... error: /Users/federicocamarahalac/Documents/pix_opencv/pix_opencv.pd_darwin: dlopen(/Users/federicocamarahalac/Documents/pix_opencv/pix_opencv.pd_darwin, 10): Symbol not found: _cvCalcGlobalOrientation Referenced from: /Users/federicocamarahalac/Documents/pix_opencv/pix_opencv.pd_darwin Expected in: flat namespace in /Users/federicocamarahalac/Documents/pix_opencv/pix_opencv.pd_darwin not reloading 'image' plugins (already 5 loaded) pix_opencv_contours error: ... couldn't create
Any pointers would be appreciated.
thanks,
fede
-- http://fdch.github.io http://fdch.github.io/tv
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On 2/28/19 9:30 PM, Federico Camara Halac wrote:
10): Symbol not found: _cvCalcGlobalOrientation Referenced from:
so you are underlinking, that is, not linking against a required OpenCV library. apart from the obvious reason (forgotten to link against the proper libs), there are other causes for this, like using a mismatched header/library combination.
gfmrdsa IOhannes
Thanks!
To follow up, I *think* I am linking all I can, this is from console.log: ... LIBS='-lopencv_video -lopencv_calib3d -lopencv_objdetect -lopencv_imgproc ' ... OPENCV_LIBS='-L/usr/local/lib -lopencv_dnn -lopencv_ml -lopencv_objdetect -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_imgproc -lopencv_flann -lopencv_core' ...
So, if i'm not underlinking, is there a way for me to see if its actually a header/library mismatch? There are no complains when it's compiling.
On Thu, Feb 28, 2019 at 11:14 PM IOhannes m zmölnig zmoelnig@iem.at wrote:
On 2/28/19 9:30 PM, Federico Camara Halac wrote:
10): Symbol not found: _cvCalcGlobalOrientation Referenced from:
so you are underlinking, that is, not linking against a required OpenCV library. apart from the obvious reason (forgotten to link against the proper libs), there are other causes for this, like using a mismatched header/library combination.
gfmrdsa IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
I removed yet another object from src/Makefile.am (the one calling ' _cvCalcGlobalOrientation') but now, I get "no suitable image found", and "mach-o, but wrong architecture"
/Users/federicocamarahalac/Documents/Pd/externals/Gem/../pix_opencv/pix_opencv_hough_circles.pd_darwin: dlopen(/Users/federicocamarahalac/Documents/Pd/externals/Gem/../pix_opencv/pix_opencv_hough_circles.pd_darwin, 10): no suitable image found. Did find: /Users/federicocamarahalac/Documents/Pd/externals/Gem/../pix_opencv/pix_opencv_hough_circles.pd_darwin: mach-o, but wrong architecture /Users/federicocamarahalac/Documents/Pd/externals/pix_opencv/pix_opencv_hough_circles.pd_darwin: mach-o, but wrong architecture
On Thu, Feb 28, 2019 at 11:50 PM Federico Camara Halac camarafede@gmail.com wrote:
Thanks!
To follow up, I *think* I am linking all I can, this is from console.log: ... LIBS='-lopencv_video -lopencv_calib3d -lopencv_objdetect -lopencv_imgproc ' ... OPENCV_LIBS='-L/usr/local/lib -lopencv_dnn -lopencv_ml -lopencv_objdetect -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_imgproc -lopencv_flann -lopencv_core' ...
So, if i'm not underlinking, is there a way for me to see if its actually a header/library mismatch? There are no complains when it's compiling.
On Thu, Feb 28, 2019 at 11:14 PM IOhannes m zmölnig zmoelnig@iem.at wrote:
On 2/28/19 9:30 PM, Federico Camara Halac wrote:
10): Symbol not found: _cvCalcGlobalOrientation Referenced from:
so you are underlinking, that is, not linking against a required OpenCV library. apart from the obvious reason (forgotten to link against the proper libs), there are other causes for this, like using a mismatched header/library combination.
gfmrdsa IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
ok. i think you can discard my last email. It turns out i was loading the old 32bit i had. my bad.
but
i did some more digging and the reason pd does not load the externals is that they dont exist. somehow the only object built is pix_opencv.pd_darwin, which just fires a console welcome message. The rest of the pix_opencv_*.pd_darwin objects are not created. Only their *.o are there and they *can* be used to make their respective ps_darwins (tried with one and worked, loaded and all :)
First, I dont know why this last step of the linking is just not happening. How can I make sure this is not something missing from the generated Makefile?
Second, I dont fully understand these makefiles. Can this all be done easier with pd-lib-builder? I am tempted to try and do something like that.
thanks for your help!!
f
On Mar 1, 2019, at 12:48 AM, Federico Camara Halac camarafede@gmail.com wrote:
I removed yet another object from src/Makefile.am (the one calling '_cvCalcGlobalOrientation') but now, I get "no suitable image found", and "mach-o, but wrong architecture"
/Users/federicocamarahalac/Documents/Pd/externals/Gem/../pix_opencv/pix_opencv_hough_circles.pd_darwin: dlopen(/Users/federicocamarahalac/Documents/Pd/externals/Gem/../pix_opencv/pix_opencv_hough_circles.pd_darwin, 10): no suitable image found. Did find: /Users/federicocamarahalac/Documents/Pd/externals/Gem/../pix_opencv/pix_opencv_hough_circles.pd_darwin: mach-o, but wrong architecture /Users/federicocamarahalac/Documents/Pd/externals/pix_opencv/pix_opencv_hough_circles.pd_darwin: mach-o, but wrong architecture
On Thu, Feb 28, 2019 at 11:50 PM Federico Camara Halac camarafede@gmail.com wrote: Thanks!
To follow up, I *think* I am linking all I can, this is from console.log: ... LIBS='-lopencv_video -lopencv_calib3d -lopencv_objdetect -lopencv_imgproc ' ... OPENCV_LIBS='-L/usr/local/lib -lopencv_dnn -lopencv_ml -lopencv_objdetect -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_imgproc -lopencv_flann -lopencv_core' ...
So, if i'm not underlinking, is there a way for me to see if its actually a header/library mismatch? There are no complains when it's compiling.
On Thu, Feb 28, 2019 at 11:14 PM IOhannes m zmölnig zmoelnig@iem.at wrote: On 2/28/19 9:30 PM, Federico Camara Halac wrote:
10): Symbol not found: _cvCalcGlobalOrientation Referenced from:
so you are underlinking, that is, not linking against a required OpenCV library. apart from the obvious reason (forgotten to link against the proper libs), there are other causes for this, like using a mismatched header/library combination.
gfmrdsa IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On 3/1/19 2:00 AM, Fede Camara Halac wrote:
ok. i think you can discard my last email. It turns out i was loading the old 32bit i had. my bad.
but
i did some more digging and the reason pd does not load the externals is that they dont exist.
so? your original error was when loading pix_opencv.pd_darwin. most likely, pix_opencv is single binary with multiple objects (or put otherwise: ther isn't a pix_rgba.pd_darwin either)
somehow the only object built is pix_opencv.pd_darwin, which just fires a console welcome message. The rest of the pix_opencv_*.pd_darwin objects are not created. Only their *.o are there and they *can* be used to make their respective ps_darwins (tried with one and worked, loaded and all :)
First, I dont know why this last step of the linking is just not happening. How can I make sure this is not something missing from the generated Makefile?
Second, I dont fully understand these makefiles. Can this all be done easier with pd-lib-builder? I am tempted to try and do something like that.
i don't know the pix_opencv makefile, but pd-lib-builder is not really targetted at complex build systems with lots of dependencies.
fgmadsr IOhannes
I see, so pd-lib-builder is not an option.
It is an automake system, but I can't tell if it builds (or if it is meant to build) to a single binary or not. It does look like Gem's, and the compilation aftermath looks very similar, too.
The reason why I think it's not a single binary is that the old release I have (i think from deken) contains one binary per source.
Is there a way to check if pix_opencv is a single binary build? e.g, How/Where is single binary achieved in Gem?
On Mar 1, 2019, at 8:39 AM, IOhannes m zmölnig zmoelnig@iem.at wrote:
On 3/1/19 2:00 AM, Fede Camara Halac wrote: ok. i think you can discard my last email. It turns out i was loading the old 32bit i had. my bad.
but
i did some more digging and the reason pd does not load the externals is that they dont exist.
so? your original error was when loading pix_opencv.pd_darwin. most likely, pix_opencv is single binary with multiple objects (or put otherwise: ther isn't a pix_rgba.pd_darwin either)
somehow the only object built is pix_opencv.pd_darwin, which just fires a console welcome message. The rest of the pix_opencv_*.pd_darwin objects are not created. Only their *.o are there and they *can* be used to make their respective ps_darwins (tried with one and worked, loaded and all :)
First, I dont know why this last step of the linking is just not happening. How can I make sure this is not something missing from the generated Makefile?
Second, I dont fully understand these makefiles. Can this all be done easier with pd-lib-builder? I am tempted to try and do something like that.
i don't know the pix_opencv makefile, but pd-lib-builder is not really targetted at complex build systems with lots of dependencies.
fgmadsr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Ok, just to halt this thread, I have a fix for the current pix_opencv build situation with this script that I added https://github.com/avilleret/pix_opencv/blob/6fdbba2bbffe28153fb9adf24ce0b879294ab9cf/mac/make_darwins.sh to my pr https://github.com/avilleret/pix_opencv/pull/11
Afaic, pix_opencv actually tries to link as a single binary, but for some reason, it just dont. I went ahead and made it so every object lives in its own little bundle.
Thanks for your help!! Hope somebody finds this useful
f
On Fri, Mar 1, 2019 at 1:20 PM Fede Camara Halac camarafede@gmail.com wrote:
I see, so pd-lib-builder is not an option.
It is an automake system, but I can't tell if it builds (or if it is meant to build) to a single binary or not. It does look like Gem's, and the compilation aftermath looks very similar, too.
The reason why I think it's not a single binary is that the old release I have (i think from deken) contains one binary per source.
Is there a way to check if pix_opencv is a single binary build? e.g, How/Where is single binary achieved in Gem?
On Mar 1, 2019, at 8:39 AM, IOhannes m zmölnig zmoelnig@iem.at wrote:
On 3/1/19 2:00 AM, Fede Camara Halac wrote: ok. i think you can discard my last email. It turns out i was loading
the old 32bit i had. my bad.
but
i did some more digging and the reason pd does not load the externals
is that they dont exist.
so? your original error was when loading pix_opencv.pd_darwin. most likely, pix_opencv is single binary with multiple objects (or put otherwise: ther isn't a pix_rgba.pd_darwin either)
somehow the only object built is pix_opencv.pd_darwin, which just fires
a console welcome message. The rest of the pix_opencv_*.pd_darwin objects are not created. Only their *.o are there and they *can* be used to make their respective ps_darwins (tried with one and worked, loaded and all :)
First, I dont know why this last step of the linking is just not
happening. How can I make sure this is not something missing from the generated Makefile?
Second, I dont fully understand these makefiles. Can this all be done
easier with pd-lib-builder? I am tempted to try and do something like that.
i don't know the pix_opencv makefile, but pd-lib-builder is not really targetted at complex build systems with lots of dependencies.
fgmadsr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management ->