On 08/11/13 16:52, Gene Heskett wrote:
> On Friday 08 November 2013 11:12:59 Russell Brown did opine:
>
>> Quoth Gene Heskett.....
>>
>>>> However in camunits/0.0.37 tree there is a convert_crop.c that looks
>>>> like a likely candidate.  Is this the util you are referring to?
>>> PS, a make bails instantly in that camunits/0.0.37 subdir, seems that
>>> are include dependencies not supplied by 10.04.4 or in the tarball.
>>>
>>> First one is FreeImage.h, and apt can't find the package that supplies
>>> that.
>> apt-get install libcv-dev camunits libfreeimage-dev
>>
>> allows it to compile (not sure if libcv-dev is actually needed)
>>
>> But quite what you do with convert_crop.so once it's copied to
>> /usr/lib/camunits I don't know.
> Remove the camunits as it couldn't find it while sitting in the
> camunits/0.0.37 directory tree, the rest then installed, then typed make,
> and it did.  As did the make install.
>
> Thanks, now to figure out how to use it. :)
>
> However, the make was not very clean:
>
> =====make trace======
>
> gene@shop:~/linuxcnc/camunits/0.0.37$ make clean;make
> rm -f *.so *.o
> gcc -std=c99 -Wall -g -ggdb3 -fPIC -I/usr/include/glib-2.0 -
> I/usr/lib/glib-2.0/include   -I/usr/include/opencv     -c -o crosshair.o
> crosshair.c
> gcc -shared -o crosshair.so crosshair.o
> gcc -std=c99 -Wall -g -ggdb3 -fPIC -I/usr/include/glib-2.0 -
> I/usr/lib/glib-2.0/include   -I/usr/include/opencv     -c -o convert_flip.o
> convert_flip.c
> gcc -shared -o convert_flip.so convert_flip.o
> gcc -std=c99 -Wall -g -ggdb3 -fPIC -I/usr/include/glib-2.0 -
> I/usr/lib/glib-2.0/include   -I/usr/include/opencv     -c -o filter_pip.o
> filter_pip.c
> gcc -shared -o filter_pip.so filter_pip.o
> gcc -std=c99 -Wall -g -ggdb3 -fPIC -I/usr/include/glib-2.0 -
> I/usr/lib/glib-2.0/include   -I/usr/include/opencv     -c -o
> manual_marker.o manual_marker.c
> gcc -shared -o manual_marker.so manual_marker.o
> gcc -std=c99 -Wall -g -ggdb3 -fPIC -I/usr/include/glib-2.0 -
> I/usr/lib/glib-2.0/include   -I/usr/include/opencv     -c -o input_image.o
> input_image.c
> gcc -shared -o input_image.so input_image.o -lfreeimage
> gcc -std=c99 -Wall -g -ggdb3 -fPIC -I/usr/include/glib-2.0 -
> I/usr/lib/glib-2.0/include   -I/usr/include/opencv     -c -o detect_hough.o
> detect_hough.c
> gcc -shared -o detect_hough.so detect_hough.o -lcv
> gcc -std=c99 -Wall -g -ggdb3 -fPIC -I/usr/include/glib-2.0 -
> I/usr/lib/glib-2.0/include   -I/usr/include/opencv     -c -o
> convert_canny.o convert_canny.c
> gcc -shared -o convert_canny.so convert_canny.o -lcv
> gcc -std=c99 -Wall -g -ggdb3 -fPIC -I/usr/include/glib-2.0 -
> I/usr/lib/glib-2.0/include   -I/usr/include/opencv     -c -o convert_hsv.o
> convert_hsv.c
> gcc -shared -o convert_hsv.so convert_hsv.o -lcv
> gcc -std=c99 -Wall -g -ggdb3 -fPIC -I/usr/include/glib-2.0 -
> I/usr/lib/glib-2.0/include   -I/usr/include/opencv     -c -o filter_hsv.o
> filter_hsv.c
> filter_hsv.c: In function ‘on_input_frame_ready’:
> filter_hsv.c:123: warning: pointer targets in assignment differ in
> signedness
> filter_hsv.c:124: warning: pointer targets in assignment differ in
> signedness
> filter_hsv.c: In function ‘glColorHue’:
> filter_hsv.c:182: warning: control reaches end of non-void function
> filter_hsv.c: At top level:
> filter_hsv.c:27: warning: ‘_gl_draw_gl_init’ declared ‘static’ but never
> defined
> filter_hsv.c:29: warning: ‘_gl_draw_gl_shutdown’ declared ‘static’ but
> never defined
> filter_hsv.c:34: warning: ‘_try_set_control’ declared ‘static’ but never
> defined
> gcc -shared -o filter_hsv.so filter_hsv.o -lcv
> gcc -std=c99 -Wall -g -ggdb3 -fPIC -I/usr/include/glib-2.0 -
> I/usr/lib/glib-2.0/include   -I/usr/include/opencv     -c -o
> circle_detect.o circle_detect.c
> gcc -shared -o circle_detect.so circle_detect.o -lcv
> gcc -std=c99 -Wall -g -ggdb3 -fPIC -I/usr/include/glib-2.0 -
> I/usr/lib/glib-2.0/include   -I/usr/include/opencv     -c -o filter_roi.o
> filter_roi.c
> gcc -shared -o filter_roi.so filter_roi.o -lcv
> gcc -std=c99 -Wall -g -ggdb3 -fPIC -I/usr/include/glib-2.0 -
> I/usr/lib/glib-2.0/include   -I/usr/include/opencv     -c -o
> detect_features.o detect_features.c
> gcc -shared -o detect_features.so detect_features.o -lcv
> gcc -std=c99 -Wall -g -ggdb3 -fPIC -I/usr/include/glib-2.0 -
> I/usr/lib/glib-2.0/include   -I/usr/include/opencv     -c -o
> convert_select.o convert_select.c
> convert_select.c:23: warning: ‘_gl_draw_gl_init’ declared ‘static’ but
> never defined
> convert_select.c:24: warning: ‘_gl_draw_gl’ declared ‘static’ but never
> defined
> convert_select.c:25: warning: ‘_gl_draw_gl_shutdown’ declared ‘static’ but
> never defined
> convert_select.c:30: warning: ‘_try_set_control’ declared ‘static’ but
> never defined
> gcc -shared -o convert_select.so convert_select.o
> gcc -std=c99 -Wall -g -ggdb3 -fPIC -I/usr/include/glib-2.0 -
> I/usr/lib/glib-2.0/include   -I/usr/include/opencv     -c -o
> detect_ellipse.o detect_ellipse.c
> detect_ellipse.c: In function ‘detect_ellipse_plugin_init’:
> detect_ellipse.c:75: warning: unused variable ‘super’
> detect_ellipse.c: In function ‘_stream_init’:
> detect_ellipse.c:85: warning: unused variable ‘self’
> detect_ellipse.c: In function ‘_stream_shutdown’:
> detect_ellipse.c:92: warning: unused variable ‘self’
> detect_ellipse.c: In function ‘on_input_frame_ready’:
> detect_ellipse.c:189: warning: passing argument 1 of
> ‘cam_framebuffer_metadata_set’ discards qualifiers from pointer target type
> /usr/include/camunits/framebuffer.h:139: note: expected ‘struct
> CamFrameBuffer *’ but argument is of type ‘const struct CamFrameBuffer *’
> detect_ellipse.c:189: warning: passing argument 3 of
> ‘cam_framebuffer_metadata_set’ from incompatible pointer type
> /usr/include/camunits/framebuffer.h:139: note: expected ‘const uint8_t *’
> but argument is of type ‘int *’
> detect_ellipse.c:190: warning: passing argument 1 of
> ‘cam_framebuffer_metadata_set’ discards qualifiers from pointer target type
> /usr/include/camunits/framebuffer.h:139: note: expected ‘struct
> CamFrameBuffer *’ but argument is of type ‘const struct CamFrameBuffer *’
> detect_ellipse.c:190: warning: passing argument 3 of
> ‘cam_framebuffer_metadata_set’ from incompatible pointer type
> /usr/include/camunits/framebuffer.h:139: note: expected ‘const uint8_t *’
> but argument is of type ‘int *’
> detect_ellipse.c:191: warning: passing argument 1 of
> ‘cam_framebuffer_metadata_set’ discards qualifiers from pointer target type
> /usr/include/camunits/framebuffer.h:139: note: expected ‘struct
> CamFrameBuffer *’ but argument is of type ‘const struct CamFrameBuffer *’
> detect_ellipse.c:191: warning: passing argument 3 of
> ‘cam_framebuffer_metadata_set’ from incompatible pointer type
> /usr/include/camunits/framebuffer.h:139: note: expected ‘const uint8_t *’
> but argument is of type ‘int *’
> gcc -shared -o detect_ellipse.so detect_ellipse.o
> gcc -std=c99 -Wall -g -ggdb3 -fPIC -I/usr/include/glib-2.0 -
> I/usr/lib/glib-2.0/include   -I/usr/include/opencv     -c -o control_hsv.o
> control_hsv.c
> control_hsv.c: In function ‘validate’:
> control_hsv.c:189: warning: implicit declaration of function ‘abs’
> control_hsv.c: In function ‘_gl_draw_gl’:
> control_hsv.c:336: warning: unused variable ‘ystep’
> gcc -shared -o control_hsv.so control_hsv.o
> gcc -std=c99 -Wall -g -ggdb3 -fPIC -I/usr/include/glib-2.0 -
> I/usr/lib/glib-2.0/include   -I/usr/include/opencv     -c -o
> detect_marker.o detect_marker.c
> detect_marker.c: In function ‘_stream_init’:
> detect_marker.c:104: warning: unused variable ‘self’
> detect_marker.c: In function ‘_stream_shutdown’:
> detect_marker.c:111: warning: unused variable ‘self’
> detect_marker.c: In function ‘draw_rect’:
> detect_marker.c:134: warning: type of ‘x’ defaults to ‘int’
> detect_marker.c:134: warning: type of ‘y’ defaults to ‘int’
> detect_marker.c:134: warning: type of ‘r’ defaults to ‘int’
> detect_marker.c: In function ‘on_input_frame_ready’:
> detect_marker.c:318: warning: unused variable ‘yr’
> detect_marker.c:317: warning: unused variable ‘xr’
> detect_marker.c:376: warning: passing argument 1 of
> ‘cam_framebuffer_metadata_set’ discards qualifiers from pointer target type
> /usr/include/camunits/framebuffer.h:139: note: expected ‘struct
> CamFrameBuffer *’ but argument is of type ‘const struct CamFrameBuffer *’
> detect_marker.c:376: warning: passing argument 3 of
> ‘cam_framebuffer_metadata_set’ from incompatible pointer type
> /usr/include/camunits/framebuffer.h:139: note: expected ‘const uint8_t *’
> but argument is of type ‘int *’
> detect_marker.c:377: warning: passing argument 1 of
> ‘cam_framebuffer_metadata_set’ discards qualifiers from pointer target type
> /usr/include/camunits/framebuffer.h:139: note: expected ‘struct
> CamFrameBuffer *’ but argument is of type ‘const struct CamFrameBuffer *’
> detect_marker.c:377: warning: passing argument 3 of
> ‘cam_framebuffer_metadata_set’ from incompatible pointer type
> /usr/include/camunits/framebuffer.h:139: note: expected ‘const uint8_t *’
> but argument is of type ‘int *’
> detect_marker.c:378: warning: passing argument 1 of
> ‘cam_framebuffer_metadata_set’ discards qualifiers from pointer target type
> /usr/include/camunits/framebuffer.h:139: note: expected ‘struct
> CamFrameBuffer *’ but argument is of type ‘const struct CamFrameBuffer *’
> detect_marker.c:378: warning: passing argument 3 of
> ‘cam_framebuffer_metadata_set’ from incompatible pointer type
> /usr/include/camunits/framebuffer.h:139: note: expected ‘const uint8_t *’
> but argument is of type ‘int *’
> detect_marker.c: At top level:
> detect_marker.c:167: warning: ‘_lookup’ defined but not used
> gcc -shared -o detect_marker.so detect_marker.o
> gcc -std=c99 -Wall -g -ggdb3 -fPIC -I/usr/include/glib-2.0 -
> I/usr/lib/glib-2.0/include   -I/usr/include/opencv     -c -o convert_crop.o
> convert_crop.c
> gcc -shared -o convert_crop.so convert_crop.o
> gene@shop:~/linuxcnc/camunits/0.0.37$
>
> ========end make trace========
>
> And it did NOT install convert_crop.so when I did the make install.
> And since its been a decade since I actually carved new C code, I'm not
> sure I am up to cleaning up this mess.  convert_crop.c did not throw any
> errors, but I can sure see why it can go out to lala-land & freeze.  So I
> think I'll print this and take it from the top with grep.
>
> Cheers, Gene
Gene,
make sure your git branch is master and not Upstream or something similar
builds fine here with no warnings or errors




------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to