Page 1 of 1

openvg library on Ubuntu-MATE

Posted: Mon Jan 04, 2016 4:51 am
by roycejp
Hi,

I had ajstarks' openvg library successfully working in Raspbian (Jessie).

Later I wanted to try out Ubuntu-MATE, so I installed that on a fresh SDcard.

I followed the same procedure to install the openvg library and got a bunch of errors & warnings :

Code: Select all

[email protected]:~$ git clone git://github.com/ajstarks/openvg
Cloning into 'openvg'...
remote: Counting objects: 961, done.
remote: Total 961 (delta 0), reused 0 (delta 0), pack-reused 961
Receiving objects: 100% (961/961), 5.94 MiB | 564.00 KiB/s, done.
Resolving deltas: 100% (525/525), done.
Checking connectivity... done.
[email protected]:~$ cd openvg
[email protected]:~/openvg$ make
g++ -I/usr/include/freetype2 fontutil/font2openvg.cpp -o font2openvg -lfreetype
./font2openvg /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf DejaVuSans.inc DejaVuSans
224 glyphs written
./font2openvg /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf DejaVuSansMono.inc DejaVuSansMono
224 glyphs written
./font2openvg /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf DejaVuSerif.inc DejaVuSerif
224 glyphs written
gcc -O2 -Wall -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -fPIC -c oglinit.c
In file included from /opt/vc/include/interface/vcos/vcos.h:185:0,
                 from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
                 from /opt/vc/include/EGL/eglplatform.h:110,
                 from /opt/vc/include/EGL/egl.h:36,
                 from oglinit.c:1:
/opt/vc/include/interface/vcos/vcos_timer.h:112:6: warning: inline function ‘vcos_timer_delete’ declared but never defined
 void vcos_timer_delete(VCOS_TIMER_T *timer);
      ^
/opt/vc/include/interface/vcos/vcos_timer.h:109:6: warning: inline function ‘vcos_timer_reset’ declared but never defined
 void vcos_timer_reset(VCOS_TIMER_T *timer, VCOS_UNSIGNED delay);
      ^
/opt/vc/include/interface/vcos/vcos_timer.h:102:6: warning: inline function ‘vcos_timer_cancel’ declared but never defined
..... and so on ...

What's going on, and how to get this library working on Ubuntu-MATE ?

Thank you!

Re: openvg library on Ubuntu-MATE

Posted: Mon Jan 04, 2016 4:48 pm
by Paeryn
You've only listed warnings, not any errors.

Those warnings are the compiler telling you that those functions were declared as extern inline but without any actual function definition. extern inline means inline the code if possible, otherwise generate a function call but do not output a callable function, this allows having one callable function defined in only one file (otherwise multiple files would all generate the same function which isn't allowed). There are comments in the include files that give an explanation of why it was done this way.

I assume you're using gcc 5 (or above), that defaults to C99 in which you're not meant to declare an inline function without defining it, whereas previously you were allowed to. Whatever other errors you have may stem from this or other changes in C99. Try editing the Makefile to add -std=gnu89 to the gcc lines e.g. (do it for all gcc lines)

Code: Select all

libshapes.o:    libshapes.c shapes.h paintcache.h fontinfo.h fonts
        gcc -std=gnu89 -O2 -Wall $(INCLUDEFLAGS) -c libshapes.c

Re: openvg library on Ubuntu-MATE

Posted: Mon Jan 04, 2016 6:15 pm
by roycejp
Hi,
Thanks for the helpful reply, now the library compiled without errors or warnings.

But when I tried to build the demo programs in the openvg/client/ folder, there were a bunch of errors.

I modified the Makefile there too with the -std=gnu89 directive, but the errors remained :

Code: Select all

[email protected]:~$ cd openvg/client
[email protected]:~/openvg/client$ make
gcc -std=gnu89 -Wall -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -I.. -L/opt/vc/lib -lGLESv2 -lEGL -lbcm_host -lpthread  -ljpeg -o shapedemo shapedemo.c ../libshapes.o ../oglinit.o
../libshapes.o: In function `loadfont':
libshapes.c:(.text+0x152): undefined reference to `vgCreatePath'
libshapes.c:(.text+0x16a): undefined reference to `vgAppendPathData'
../libshapes.o: In function `unloadfont':
libshapes.c:(.text+0x1da): undefined reference to `vgDestroyPath'
../libshapes.o: In function `createImageFromJpeg':
libshapes.c:(.text+0x216): undefined reference to `jpeg_std_error'
libshapes.c:(.text+0x228): undefined reference to `jpeg_CreateDecompress'
libshapes.c:(.text+0x230): undefined reference to `jpeg_stdio_src'
libshapes.c:(.text+0x238): undefined reference to `jpeg_read_header'
libshapes.c:(.text+0x23e): undefined reference to `jpeg_start_decompress'
libshapes.c:(.text+0x27e): undefined reference to `jpeg_read_scanlines'
libshapes.c:(.text+0x2f4): undefined reference to `vgCreateImage'
libshapes.c:(.text+0x30c): undefined reference to `vgImageSubData'
libshapes.c:(.text+0x312): undefined reference to `jpeg_destroy_decompress'
../libshapes.o: In function `makeimage':
libshapes.c:(.text+0x37e): undefined reference to `vgCreateImage'
libshapes.c:(.text+0x392): undefined reference to `vgImageSubData'
libshapes.c:(.text+0x3b0): undefined reference to `vgSetPixels'
../libshapes.o: In function `Image':
libshapes.c:(.text+0x3fa): undefined reference to `vgSetPixels'
../libshapes.o: In function `dumpscreen':
libshapes.c:(.text+0x436): undefined reference to `vgReadPixels'
../libshapes.o: In function `init':
libshapes.c:(.text+0x484): undefined reference to `bcm_host_init'
../libshapes.o: In function `finish':
libshapes.c:(.text+0x620): undefined reference to `glClear'
libshapes.c:(.text+0x628): undefined reference to `eglSwapBuffers'
libshapes.c:(.text+0x634): undefined reference to `eglMakeCurrent'
libshapes.c:(.text+0x63c): undefined reference to `eglDestroySurface'
libshapes.c:(.text+0x644): undefined reference to `eglDestroyContext'
../libshapes.o: In function `setfill':
libshapes.c:(.text+0x67c): undefined reference to `vgCreatePaint'
libshapes.c:(.text+0x68a): undefined reference to `vgSetParameteri'
libshapes.c:(.text+0x698): undefined reference to `vgSetParameterfv'
libshapes.c:(.text+0x6a0): undefined reference to `vgSetPaint'
../libshapes.o: In function `setstroke':
libshapes.c:(.text+0x6b4): undefined reference to `vgCreatePaint'
libshapes.c:(.text+0x6c2): undefined reference to `vgSetParameteri'
libshapes.c:(.text+0x6d0): undefined reference to `vgSetParameterfv'
libshapes.c:(.text+0x6d8): undefined reference to `vgSetPaint'
../libshapes.o: In function `StrokeWidth':
libshapes.c:(.text+0x6ee): undefined reference to `vgSetf'
libshapes.c:(.text+0x6fa): undefined reference to `vgSeti'
../libshapes.o: In function `setstop':
libshapes.c:(.text+0x824): undefined reference to `vgSetParameteri'
libshapes.c:(.text+0x830): undefined reference to `vgSetParameteri'
libshapes.c:(.text+0x840): undefined reference to `vgSetParameterfv'
../libshapes.o: In function `FillLinearGradient':
libshapes.c:(.text+0x874): undefined reference to `vgCreatePaint'
libshapes.c:(.text+0x882): undefined reference to `vgSetParameteri'
libshapes.c:(.text+0x890): undefined reference to `vgSetParameterfv'
libshapes.c:(.text+0x8a0): undefined reference to `vgDestroyPaint'
../libshapes.o: In function `FillRadialGradient':
libshapes.c:(.text+0x8e4): undefined reference to `vgCreatePaint'
libshapes.c:(.text+0x8f2): undefined reference to `vgSetParameteri'
libshapes.c:(.text+0x900): undefined reference to `vgSetParameterfv'
libshapes.c:(.text+0x910): undefined reference to `vgDestroyPaint'
../libshapes.o: In function `ClipRect':
libshapes.c:(.text+0x94e): undefined reference to `vgSeti'
libshapes.c:(.text+0x966): undefined reference to `vgSetiv'
../libshapes.o: In function `Text':
libshapes.c:(.text+0xa40): undefined reference to `vgGetMatrix'
libshapes.c:(.text+0xa7a): undefined reference to `vgLoadMatrix'
libshapes.c:(.text+0xa80): undefined reference to `vgMultMatrix'
libshapes.c:(.text+0xa8e): undefined reference to `vgDrawPath'
libshapes.c:(.text+0xab8): undefined reference to `vgLoadMatrix'
../libshapes.o: In function `newpath':
libshapes.c:(.text+0xc96): undefined reference to `vgCreatePath'
../libshapes.o: In function `makecurve':
libshapes.c:(.text+0xcb6): undefined reference to `vgAppendPathData'
libshapes.c:(.text+0xcbe): undefined reference to `vgDrawPath'
../libshapes.o: In function `poly':
libshapes.c:(.text+0xddc): undefined reference to `vguPolygon'
libshapes.c:(.text+0xde4): undefined reference to `vgDrawPath'
libshapes.c:(.text+0xdea): undefined reference to `vgDestroyPath'
../libshapes.o: In function `Rect':
libshapes.c:(.text+0xe30): undefined reference to `vguRect'
libshapes.c:(.text+0xe38): undefined reference to `vgDrawPath'
../libshapes.o: In function `Line':
libshapes.c:(.text+0xe78): undefined reference to `vguLine'
libshapes.c:(.text+0xe80): undefined reference to `vgDrawPath'
../libshapes.o: In function `Roundrect':
libshapes.c:(.text+0xed0): undefined reference to `vguRoundRect'
libshapes.c:(.text+0xed8): undefined reference to `vgDrawPath'
../libshapes.o: In function `Ellipse':
libshapes.c:(.text+0xf18): undefined reference to `vguEllipse'
libshapes.c:(.text+0xf20): undefined reference to `vgDrawPath'
../libshapes.o: In function `Arc':
libshapes.c:(.text+0xf7c): undefined reference to `vguArc'
libshapes.c:(.text+0xf84): undefined reference to `vgDrawPath'
../libshapes.o: In function `Start':
libshapes.c:(.text+0xfd0): undefined reference to `vgSetfv'
libshapes.c:(.text+0xfdc): undefined reference to `vgClear'
libshapes.c:(.text+0x1000): undefined reference to `vgLoadIdentity'
../libshapes.o: In function `End':
libshapes.c:(.text+0x102a): undefined reference to `vgGetError'
libshapes.c:(.text+0x1038): undefined reference to `eglSwapBuffers'
libshapes.c:(.text+0x103c): undefined reference to `eglGetError'
../libshapes.o: In function `SaveEnd':
libshapes.c:(.text+0x109c): undefined reference to `vgGetError'
libshapes.c:(.text+0x10d2): undefined reference to `eglSwapBuffers'
libshapes.c:(.text+0x10d6): undefined reference to `eglGetError'
../libshapes.o: In function `makeimage':
libshapes.c:(.text+0x3c0): undefined reference to `vgDestroyImage'
../libshapes.o: In function `Image':
libshapes.c:(.text+0x40a): undefined reference to `vgDestroyImage'
../libshapes.o: In function `finish':
libshapes.c:(.text+0x64e): undefined reference to `eglTerminate'
../libshapes.o: In function `Translate':
libshapes.c:(.text+0x668): undefined reference to `vgTranslate'
../libshapes.o: In function `Rotate':
libshapes.c:(.text+0x66c): undefined reference to `vgRotate'
../libshapes.o: In function `Shear':
libshapes.c:(.text+0x670): undefined reference to `vgShear'
../libshapes.o: In function `Scale':
libshapes.c:(.text+0x674): undefined reference to `vgScale'
../libshapes.o: In function `setfill':
libshapes.c:(.text+0x6aa): undefined reference to `vgDestroyPaint'
../libshapes.o: In function `setstroke':
libshapes.c:(.text+0x6e2): undefined reference to `vgDestroyPaint'
../libshapes.o: In function `StrokeWidth':
libshapes.c:(.text+0x70a): undefined reference to `vgSeti'
../libshapes.o: In function `setstop':
libshapes.c:(.text+0x84c): undefined reference to `vgSetPaint'
../libshapes.o: In function `ClipEnd':
libshapes.c:(.text+0x98a): undefined reference to `vgSeti'
../libshapes.o: In function `makecurve':
libshapes.c:(.text+0xcc8): undefined reference to `vgDestroyPath'
../libshapes.o: In function `Rect':
libshapes.c:(.text+0xe46): undefined reference to `vgDestroyPath'
../libshapes.o: In function `Line':
libshapes.c:(.text+0xe8e): undefined reference to `vgDestroyPath'
../libshapes.o: In function `Roundrect':
libshapes.c:(.text+0xee6): undefined reference to `vgDestroyPath'
../libshapes.o: In function `Ellipse':
libshapes.c:(.text+0xf2e): undefined reference to `vgDestroyPath'
../libshapes.o:libshapes.c:(.text+0xf92): more undefined references to `vgDestroyPath' follow
../oglinit.o: In function `oglinit':
oglinit.c:(.text+0x16): undefined reference to `eglGetDisplay'
oglinit.c:(.text+0x26): undefined reference to `eglInitialize'
oglinit.c:(.text+0x38): undefined reference to `eglBindAPI'
oglinit.c:(.text+0x4c): undefined reference to `eglChooseConfig'
oglinit.c:(.text+0x5e): undefined reference to `eglCreateContext'
oglinit.c:(.text+0x70): undefined reference to `graphics_get_display_size'
oglinit.c:(.text+0x96): undefined reference to `vc_dispmanx_display_open'
oglinit.c:(.text+0x9e): undefined reference to `vc_dispmanx_update_start'
oglinit.c:(.text+0xbc): undefined reference to `vc_dispmanx_element_add'
oglinit.c:(.text+0xca): undefined reference to `vc_dispmanx_update_submit_sync'
oglinit.c:(.text+0xd6): undefined reference to `eglCreateWindowSurface'
oglinit.c:(.text+0xec): undefined reference to `eglSurfaceAttrib'
oglinit.c:(.text+0xfc): undefined reference to `eglMakeCurrent'
oglinit.c:(.text+0x10a): undefined reference to `glViewport'
oglinit.c:(.text+0x112): undefined reference to `glMatrixMode'
oglinit.c:(.text+0x116): undefined reference to `glLoadIdentity'
oglinit.c:(.text+0x142): undefined reference to `glFrustumf'
collect2: error: ld returned 1 exit status
Makefile:7: recipe for target 'shapedemo' failed
make: *** [shapedemo] Error 1
I'd be grateful for any help here too! Thanks :-)

Re: openvg library on Ubuntu-MATE

Posted: Mon Jan 04, 2016 6:56 pm
by Paeryn
The only thing I can think of is it might be that the linker is being strict. The Makefile lists the libraries before the object files which is the wrong way around. Files that provide functions should appear after files that use those functions. So the correct compile line for shapedemo should be

Code: Select all

shapedemo:	shapedemo.c ../libshapes.o ../oglinit.o
	gcc -Wall $(INCLUDEFLAGS) -o shapedemo shapedemo.c ../libshapes.o ../oglinit.o $(LIBFLAGS)
On mine (gcc 4.6 and 4.8) it doesn't seem to mind and lets me re-order them any way.

Re: openvg library on Ubuntu-MATE

Posted: Mon Jan 04, 2016 7:22 pm
by roycejp
Yes, that was it. Many Thanks!

Probably for the same reason, I also could not build the official demo programs as described here. I kept getting similar errors:
https://www.raspberrypi.org/learning/de ... worksheet/

I suppose this will be updated soon, in keeping with the updated C standard.
However right now, it works fine in Raspbian jessie since it currently uses gcc 4.9.

Thanks again. :-)

Re: openvg library on Ubuntu-MATE

Posted: Mon Jan 04, 2016 7:42 pm
by Paeryn
roycejp wrote:Yes, that was it. Many Thanks!

Probably for the same reason, I also could not build the official demo programs as described here. I kept getting similar errors:
https://www.raspberrypi.org/learning/de ... worksheet/

I suppose this will be updated soon, in keeping with the updated C standard.
However right now, it works fine in Raspbian jessie since it currently uses gcc 4.9.

Thanks again. :-)
The Makefile in /opt/vc/src/hello_pi correctly lists libraries after objects, what it doesn't do is force gnu89 mode when compiling, which is understandable since that is the default for gcc 4.

Re: openvg library on Ubuntu-MATE

Posted: Wed Jan 06, 2016 11:38 pm
by ajstarks
Thanks for the report, I just pushed a fix.
It would be helpful in the future to report things like this as a bug on github.

Re: openvg library on Ubuntu-MATE

Posted: Thu Jan 07, 2016 12:01 am
by Paeryn
ajstarks wrote:Thanks for the report, I just pushed a fix.
It would be helpful in the future to report things like this as a bug on github.
Sorry, I meant to report it :oops: I'm reporting another little error right now (nothing noticeable as it "works" in the case where you do it due to a side-effect).

Re: openvg library on Ubuntu-MATE

Posted: Thu Jan 07, 2016 1:31 am
by ajstarks
thanks, fixed.

Re: openvg library on Ubuntu-MATE

Posted: Mon Jan 18, 2016 7:35 am
by roycejp
ajstarks wrote:thanks, fixed.
Hi, its not totally fixed. I get these errors (gcc 5.2.1):

Code: Select all

[email protected]:~$ git clone git://github.com/ajstarks/openvg
Cloning into 'openvg'...
remote: Counting objects: 1000, done.
remote: Total 1000 (delta 0), reused 0 (delta 0), pack-reused 1000
Receiving objects: 100% (1000/1000), 6.14 MiB | 548.00 KiB/s, done.
Resolving deltas: 100% (547/547), done.
Checking connectivity... done.
[email protected]:~$ cd openvg
[email protected]:~/openvg$ make
g++ -I/usr/include/freetype2 fontutil/font2openvg.cpp -o font2openvg -lfreetype
./font2openvg /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf DejaVuSans.inc DejaVuSans
468 glyphs written
./font2openvg /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf DejaVuSansMono.inc DejaVuSansMono
468 glyphs written
./font2openvg /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf DejaVuSerif.inc DejaVuSerif
468 glyphs written
gcc -O2 -Wall -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -fPIC -c oglinit.c
In file included from /opt/vc/include/interface/vcos/vcos.h:185:0,
                 from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
                 from /opt/vc/include/EGL/eglplatform.h:110,
                 from /opt/vc/include/EGL/egl.h:36,
                 from oglinit.c:1:
/opt/vc/include/interface/vcos/vcos_timer.h:112:6: warning: inline function ‘vcos_timer_delete’ declared but never defined
 void vcos_timer_delete(VCOS_TIMER_T *timer);
      ^
/opt/vc/include/interface/vcos/vcos_timer.h:109:6: warning: inline function ‘vcos_timer_reset’ declared but never defined
 void vcos_timer_reset(VCOS_TIMER_T *timer, VCOS_UNSIGNED delay);
      ^
/opt/vc/include/interface/vcos/vcos_timer.h:102:6: warning: inline function ‘vcos_timer_cancel’ declared but never defined
 void vcos_timer_cancel(VCOS_TIMER_T *timer);
      ^
/opt/vc/include/interface/vcos/vcos_timer.h:95:6: warning: inline function ‘vcos_timer_set’ declared but never defined
 void vcos_timer_set(VCOS_TIMER_T *timer, VCOS_UNSIGNED delay);
      ^
/opt/vc/include/interface/vcos/vcos_timer.h:80:15: warning: inline function ‘vcos_timer_create’ declared but never defined
 VCOS_STATUS_T vcos_timer_create(VCOS_TIMER_T *timer,
               ^
In file included from /opt/vc/include/interface/vcos/vcos.h:127:0,
                 from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
                 from /opt/vc/include/EGL/eglplatform.h:110,
                 from /opt/vc/include/EGL/egl.h:36,
                 from oglinit.c:1:
/opt/vc/include/interface/vcos/vcos_thread.h:269:6: warning: inline function ‘vcos_thread_resume’ declared but never defined
 void vcos_thread_resume(VCOS_THREAD_T *thread);
      ^
/opt/vc/include/interface/vcos/vcos_thread.h:262:5: warning: inline function ‘vcos_thread_running’ declared but never defined
 int vcos_thread_running(VCOS_THREAD_T *thread);
     ^
/opt/vc/include/interface/vcos/vcos_thread.h:251:15: warning: inline function ‘vcos_change_preemption’ declared but never defined
 VCOS_UNSIGNED vcos_change_preemption(VCOS_UNSIGNED pe);
               ^
/opt/vc/include/interface/vcos/vcos_thread.h:234:6: warning: inline function ‘vcos_thread_relinquish’ declared but never defined
 void vcos_thread_relinquish(void);
      ^
/opt/vc/include/interface/vcos/vcos_thread.h:186:15: warning: inline function ‘vcos_thread_get_affinity’ declared but never defined
 VCOS_UNSIGNED vcos_thread_get_affinity(VCOS_THREAD_T *thread);
               ^
gcc -O2 -Wall -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -fPIC -c libshapes.c
In file included from /opt/vc/include/interface/vcos/vcos.h:185:0,
                 from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
                 from /opt/vc/include/EGL/eglplatform.h:110,
                 from /opt/vc/include/EGL/egl.h:36,
                 from libshapes.c:15:
/opt/vc/include/interface/vcos/vcos_timer.h:112:6: warning: inline function ‘vcos_timer_delete’ declared but never defined
 void vcos_timer_delete(VCOS_TIMER_T *timer);
      ^
/opt/vc/include/interface/vcos/vcos_timer.h:109:6: warning: inline function ‘vcos_timer_reset’ declared but never defined
 void vcos_timer_reset(VCOS_TIMER_T *timer, VCOS_UNSIGNED delay);
      ^
/opt/vc/include/interface/vcos/vcos_timer.h:102:6: warning: inline function ‘vcos_timer_cancel’ declared but never defined
 void vcos_timer_cancel(VCOS_TIMER_T *timer);
      ^
/opt/vc/include/interface/vcos/vcos_timer.h:95:6: warning: inline function ‘vcos_timer_set’ declared but never defined
 void vcos_timer_set(VCOS_TIMER_T *timer, VCOS_UNSIGNED delay);
      ^
/opt/vc/include/interface/vcos/vcos_timer.h:80:15: warning: inline function ‘vcos_timer_create’ declared but never defined
 VCOS_STATUS_T vcos_timer_create(VCOS_TIMER_T *timer,
               ^
In file included from /opt/vc/include/interface/vcos/vcos.h:127:0,
                 from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
                 from /opt/vc/include/EGL/eglplatform.h:110,
                 from /opt/vc/include/EGL/egl.h:36,
                 from libshapes.c:15:
/opt/vc/include/interface/vcos/vcos_thread.h:269:6: warning: inline function ‘vcos_thread_resume’ declared but never defined
 void vcos_thread_resume(VCOS_THREAD_T *thread);
      ^
/opt/vc/include/interface/vcos/vcos_thread.h:262:5: warning: inline function ‘vcos_thread_running’ declared but never defined
 int vcos_thread_running(VCOS_THREAD_T *thread);
     ^
/opt/vc/include/interface/vcos/vcos_thread.h:251:15: warning: inline function ‘vcos_change_preemption’ declared but never defined
 VCOS_UNSIGNED vcos_change_preemption(VCOS_UNSIGNED pe);
               ^
/opt/vc/include/interface/vcos/vcos_thread.h:234:6: warning: inline function ‘vcos_thread_relinquish’ declared but never defined
 void vcos_thread_relinquish(void);
      ^
/opt/vc/include/interface/vcos/vcos_thread.h:186:15: warning: inline function ‘vcos_thread_get_affinity’ declared but never defined
 VCOS_UNSIGNED vcos_thread_get_affinity(VCOS_THREAD_T *thread);
               ^
gcc -L/opt/vc/lib -lGLESv2 -lEGL -ljpeg -shared -o libshapes.so oglinit.o libshapes.o
[email protected]:~/openvg$ 
The following changes to the Makefile got rid of these errors (thanks to @Paeryn):

Forcing -std=gnu89 in all lines with gcc
Moving the $(LIBFLAGS) to the end of the line in the library: option.

But then, while trying to build the demos in the ~/openvg/client/ folder, I get errors:

Code: Select all

[email protected]:~$ cd openvg/client
[email protected]:~/openvg/client$ make
gcc -Wall -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -I.. -L/opt/vc/lib -lGLESv2 -lEGL -lbcm_host -lpthread  -ljpeg -o shapedemo shapedemo.c ../libshapes.o ../oglinit.o
../libshapes.o: In function `loadfont':
libshapes.c:(.text+0x152): undefined reference to `vgCreatePath'
libshapes.c:(.text+0x16a): undefined reference to `vgAppendPathData'
../libshapes.o: In function `unloadfont':
libshapes.c:(.text+0x1de): undefined reference to `vgDestroyPath'
../libshapes.o: In function `createImageFromJpeg':
libshapes.c:(.text+0x21a): undefined reference to `jpeg_std_error'
libshapes.c:(.text+0x22c): undefined reference to `jpeg_CreateDecompress'
libshapes.c:(.text+0x234): undefined reference to `jpeg_stdio_src'
libshapes.c:(.text+0x23c): undefined reference to `jpeg_read_header'
libshapes.c:(.text+0x242): undefined reference to `jpeg_start_decompress'
libshapes.c:(.text+0x282): undefined reference to `jpeg_read_scanlines'
libshapes.c:(.text+0x2f8): undefined reference to `vgCreateImage'
libshapes.c:(.text+0x310): undefined reference to `vgImageSubData'
libshapes.c:(.text+0x316): undefined reference to `jpeg_destroy_decompress'
../libshapes.o: In function `makeimage':
libshapes.c:(.text+0x382): undefined reference to `vgCreateImage'
libshapes.c:(.text+0x396): undefined reference to `vgImageSubData'
libshapes.c:(.text+0x3b4): undefined reference to `vgSetPixels'
../libshapes.o: In function `Image':
libshapes.c:(.text+0x3fe): undefined reference to `vgSetPixels'
../libshapes.o: In function `dumpscreen':
libshapes.c:(.text+0x43a): undefined reference to `vgReadPixels'
../libshapes.o: In function `init':
libshapes.c:(.text+0x498): undefined reference to `bcm_host_init'
../libshapes.o: In function `finish':
libshapes.c:(.text+0x698): undefined reference to `eglSwapBuffers'
libshapes.c:(.text+0x6a4): undefined reference to `eglMakeCurrent'
libshapes.c:(.text+0x6ac): undefined reference to `eglDestroySurface'
libshapes.c:(.text+0x6b4): undefined reference to `eglDestroyContext'
../libshapes.o: In function `setfill':
libshapes.c:(.text+0x6ec): undefined reference to `vgCreatePaint'
libshapes.c:(.text+0x6fa): undefined reference to `vgSetParameteri'
libshapes.c:(.text+0x708): undefined reference to `vgSetParameterfv'
libshapes.c:(.text+0x710): undefined reference to `vgSetPaint'
../libshapes.o: In function `setstroke':
libshapes.c:(.text+0x724): undefined reference to `vgCreatePaint'
libshapes.c:(.text+0x732): undefined reference to `vgSetParameteri'
libshapes.c:(.text+0x740): undefined reference to `vgSetParameterfv'
libshapes.c:(.text+0x748): undefined reference to `vgSetPaint'
../libshapes.o: In function `StrokeWidth':
libshapes.c:(.text+0x75e): undefined reference to `vgSetf'
libshapes.c:(.text+0x76a): undefined reference to `vgSeti'
../libshapes.o: In function `setstop':
libshapes.c:(.text+0x894): undefined reference to `vgSetParameteri'
libshapes.c:(.text+0x8a0): undefined reference to `vgSetParameteri'
libshapes.c:(.text+0x8b0): undefined reference to `vgSetParameterfv'
../libshapes.o: In function `FillLinearGradient':
libshapes.c:(.text+0x8e4): undefined reference to `vgCreatePaint'
libshapes.c:(.text+0x8f2): undefined reference to `vgSetParameteri'
libshapes.c:(.text+0x900): undefined reference to `vgSetParameterfv'
libshapes.c:(.text+0x910): undefined reference to `vgDestroyPaint'
../libshapes.o: In function `FillRadialGradient':
libshapes.c:(.text+0x954): undefined reference to `vgCreatePaint'
libshapes.c:(.text+0x962): undefined reference to `vgSetParameteri'
libshapes.c:(.text+0x970): undefined reference to `vgSetParameterfv'
libshapes.c:(.text+0x980): undefined reference to `vgDestroyPaint'
../libshapes.o: In function `ClipRect':
libshapes.c:(.text+0x9be): undefined reference to `vgSeti'
libshapes.c:(.text+0x9d6): undefined reference to `vgSetiv'
../libshapes.o: In function `Text':
libshapes.c:(.text+0xab0): undefined reference to `vgGetMatrix'
libshapes.c:(.text+0xaea): undefined reference to `vgLoadMatrix'
libshapes.c:(.text+0xaf0): undefined reference to `vgMultMatrix'
libshapes.c:(.text+0xafe): undefined reference to `vgDrawPath'
libshapes.c:(.text+0xb28): undefined reference to `vgLoadMatrix'
../libshapes.o: In function `newpath':
libshapes.c:(.text+0xd68): undefined reference to `vgCreatePath'
../libshapes.o: In function `makecurve':
libshapes.c:(.text+0xd8c): undefined reference to `vgAppendPathData'
libshapes.c:(.text+0xd94): undefined reference to `vgDrawPath'
../libshapes.o: In function `poly':
libshapes.c:(.text+0xebc): undefined reference to `vguPolygon'
libshapes.c:(.text+0xec4): undefined reference to `vgDrawPath'
libshapes.c:(.text+0xeca): undefined reference to `vgDestroyPath'
../libshapes.o: In function `Rect':
libshapes.c:(.text+0xf10): undefined reference to `vguRect'
libshapes.c:(.text+0xf18): undefined reference to `vgDrawPath'
../libshapes.o: In function `Line':
libshapes.c:(.text+0xf58): undefined reference to `vguLine'
libshapes.c:(.text+0xf60): undefined reference to `vgDrawPath'
../libshapes.o: In function `Roundrect':
libshapes.c:(.text+0xfb0): undefined reference to `vguRoundRect'
libshapes.c:(.text+0xfb8): undefined reference to `vgDrawPath'
../libshapes.o: In function `Ellipse':
libshapes.c:(.text+0xff8): undefined reference to `vguEllipse'
libshapes.c:(.text+0x1000): undefined reference to `vgDrawPath'
../libshapes.o: In function `Arc':
libshapes.c:(.text+0x105c): undefined reference to `vguArc'
libshapes.c:(.text+0x1064): undefined reference to `vgDrawPath'
../libshapes.o: In function `Start':
libshapes.c:(.text+0x10b0): undefined reference to `vgSetfv'
libshapes.c:(.text+0x10bc): undefined reference to `vgClear'
libshapes.c:(.text+0x10e0): undefined reference to `vgLoadIdentity'
../libshapes.o: In function `End':
libshapes.c:(.text+0x110a): undefined reference to `vgGetError'
libshapes.c:(.text+0x1118): undefined reference to `eglSwapBuffers'
libshapes.c:(.text+0x111c): undefined reference to `eglGetError'
../libshapes.o: In function `SaveEnd':
libshapes.c:(.text+0x117c): undefined reference to `vgGetError'
libshapes.c:(.text+0x11b2): undefined reference to `eglSwapBuffers'
libshapes.c:(.text+0x11b6): undefined reference to `eglGetError'
../libshapes.o: In function `Background':
libshapes.c:(.text+0x1258): undefined reference to `vgSetfv'
libshapes.c:(.text+0x1268): undefined reference to `vgClear'
../libshapes.o: In function `BackgroundRGB':
libshapes.c:(.text+0x12a8): undefined reference to `vgSetfv'
libshapes.c:(.text+0x12b8): undefined reference to `vgClear'
../libshapes.o: In function `RectOutline':
libshapes.c:(.text+0x1404): undefined reference to `vguRect'
libshapes.c:(.text+0x140c): undefined reference to `vgDrawPath'
../libshapes.o: In function `RoundrectOutline':
libshapes.c:(.text+0x145c): undefined reference to `vguRoundRect'
libshapes.c:(.text+0x1464): undefined reference to `vgDrawPath'
../libshapes.o: In function `EllipseOutline':
libshapes.c:(.text+0x14a4): undefined reference to `vguEllipse'
libshapes.c:(.text+0x14ac): undefined reference to `vgDrawPath'
../libshapes.o: In function `ArcOutline':
libshapes.c:(.text+0x1508): undefined reference to `vguArc'
libshapes.c:(.text+0x1510): undefined reference to `vgDrawPath'
../libshapes.o: In function `makeimage':
libshapes.c:(.text+0x3c4): undefined reference to `vgDestroyImage'
../libshapes.o: In function `Image':
libshapes.c:(.text+0x40e): undefined reference to `vgDestroyImage'
../libshapes.o: In function `finish':
libshapes.c:(.text+0x6be): undefined reference to `eglTerminate'
../libshapes.o: In function `Translate':
libshapes.c:(.text+0x6d8): undefined reference to `vgTranslate'
../libshapes.o: In function `Rotate':
libshapes.c:(.text+0x6dc): undefined reference to `vgRotate'
../libshapes.o: In function `Shear':
libshapes.c:(.text+0x6e0): undefined reference to `vgShear'
../libshapes.o: In function `Scale':
libshapes.c:(.text+0x6e4): undefined reference to `vgScale'
../libshapes.o: In function `setfill':
libshapes.c:(.text+0x71a): undefined reference to `vgDestroyPaint'
../libshapes.o: In function `setstroke':
libshapes.c:(.text+0x752): undefined reference to `vgDestroyPaint'
../libshapes.o: In function `StrokeWidth':
libshapes.c:(.text+0x77a): undefined reference to `vgSeti'
../libshapes.o: In function `setstop':
libshapes.c:(.text+0x8bc): undefined reference to `vgSetPaint'
../libshapes.o: In function `ClipEnd':
libshapes.c:(.text+0x9fa): undefined reference to `vgSeti'
../libshapes.o: In function `makecurve':
libshapes.c:(.text+0xd9e): undefined reference to `vgDestroyPath'
../libshapes.o: In function `Rect':
libshapes.c:(.text+0xf26): undefined reference to `vgDestroyPath'
../libshapes.o: In function `Line':
libshapes.c:(.text+0xf6e): undefined reference to `vgDestroyPath'
../libshapes.o: In function `Roundrect':
libshapes.c:(.text+0xfc6): undefined reference to `vgDestroyPath'
../libshapes.o: In function `Ellipse':
libshapes.c:(.text+0x100e): undefined reference to `vgDestroyPath'
../libshapes.o:libshapes.c:(.text+0x1072): more undefined references to `vgDestroyPath' follow
../libshapes.o: In function `WindowClear':
libshapes.c:(.text+0x12e4): undefined reference to `vgClear'
../libshapes.o: In function `AreaClear':
libshapes.c:(.text+0x12ec): undefined reference to `vgClear'
../libshapes.o: In function `RectOutline':
libshapes.c:(.text+0x141a): undefined reference to `vgDestroyPath'
../libshapes.o: In function `RoundrectOutline':
libshapes.c:(.text+0x1472): undefined reference to `vgDestroyPath'
../libshapes.o: In function `EllipseOutline':
libshapes.c:(.text+0x14ba): undefined reference to `vgDestroyPath'
../libshapes.o: In function `ArcOutline':
libshapes.c:(.text+0x151e): undefined reference to `vgDestroyPath'
../oglinit.o: In function `setWindowParams':
oglinit.c:(.text+0x72): undefined reference to `vc_dispmanx_rect_set'
../oglinit.o: In function `oglinit':
oglinit.c:(.text+0x11e): undefined reference to `eglGetDisplay'
oglinit.c:(.text+0x12e): undefined reference to `eglInitialize'
oglinit.c:(.text+0x13e): undefined reference to `eglBindAPI'
oglinit.c:(.text+0x152): undefined reference to `eglChooseConfig'
oglinit.c:(.text+0x162): undefined reference to `eglCreateContext'
oglinit.c:(.text+0x172): undefined reference to `graphics_get_display_size'
oglinit.c:(.text+0x1a8): undefined reference to `vc_dispmanx_display_open'
oglinit.c:(.text+0x1b4): undefined reference to `vc_dispmanx_update_start'
oglinit.c:(.text+0x1d0): undefined reference to `vc_dispmanx_element_add'
oglinit.c:(.text+0x1e4): undefined reference to `vc_dispmanx_update_submit_sync'
oglinit.c:(.text+0x1f0): undefined reference to `eglCreateWindowSurface'
oglinit.c:(.text+0x206): undefined reference to `eglSurfaceAttrib'
oglinit.c:(.text+0x216): undefined reference to `eglMakeCurrent'
../oglinit.o: In function `dispmanMoveWindow':
oglinit.c:(.text+0x354): undefined reference to `vc_dispmanx_update_start'
oglinit.c:(.text+0x36c): undefined reference to `vc_dispmanx_element_change_attributes'
oglinit.c:(.text+0x372): undefined reference to `vc_dispmanx_update_submit_sync'
../oglinit.o: In function `dispmanChangeWindowOpacity':
oglinit.c:(.text+0x3a2): undefined reference to `vc_dispmanx_update_start'
oglinit.c:(.text+0x3ba): undefined reference to `vc_dispmanx_element_change_attributes'
../oglinit.o: In function `setWindowParams':
oglinit.c:(.text+0x88): undefined reference to `vc_dispmanx_rect_set'
../oglinit.o: In function `dispmanChangeWindowOpacity':
oglinit.c:(.text+0x3c6): undefined reference to `vc_dispmanx_update_submit_sync'
collect2: error: ld returned 1 exit status
Makefile:7: recipe for target 'shapedemo' failed
make: *** [shapedemo] Error 1
[email protected]:~/openvg/client$ 
So I made the same 2 modifications to the makefile (moved $(LIBFLAGS) to the end at the shapedemo: option - rest were ok), and still got these errors (though many disappeared):

Code: Select all

[email protected]:~$ cd openvg/client
[email protected]:~/openvg/client$ make
gcc -std=gnu89 -Wall -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -I..  -o shapedemo shapedemo.c ../libshapes.o ../oglinit.o -L/opt/vc/lib -lGLESv2 -lEGL -lbcm_host -lpthread  -ljpeg
/opt/vc/lib/libEGL.so: undefined reference to `glxx_buffer_info_set'
/opt/vc/lib/libEGL.so: undefined reference to `glBufferSubData'
/opt/vc/lib/libEGL.so: undefined reference to `glxx_client_GetFramebufferAttachmentParameteriv'
/opt/vc/lib/libEGL.so: undefined reference to `glxx_client_state_free'
/opt/vc/lib/libEGL.so: undefined reference to `glxx_client_DeleteRenderbuffers'
/opt/vc/lib/libEGL.so: undefined reference to `glxx_set_error'
/opt/vc/lib/libEGL.so: undefined reference to `glxx_client_GenFramebuffers'
/opt/vc/lib/libEGL.so: undefined reference to `glxx_set_error_api'
/opt/vc/lib/libEGL.so: undefined reference to `glxx_client_BindRenderbuffer'
/opt/vc/lib/libEGL.so: undefined reference to `glxx_client_FramebufferTexture2D'
/opt/vc/lib/libEGL.so: undefined reference to `glxx_client_GenRenderbuffers'
/opt/vc/lib/libEGL.so: undefined reference to `glxx_client_DeleteFramebuffers'
/opt/vc/lib/libEGL.so: undefined reference to `glxx_client_GetRenderbufferParameteriv'
/opt/vc/lib/libEGL.so: undefined reference to `glxx_client_RenderbufferStorage'
/opt/vc/lib/libEGL.so: undefined reference to `glxx_client_IsFramebuffer'
/opt/vc/lib/libEGL.so: undefined reference to `glintAttribPointer'
/opt/vc/lib/libEGL.so: undefined reference to `glxx_client_GenerateMipmap'
/opt/vc/lib/libEGL.so: undefined reference to `glPointSizePointerOES'
/opt/vc/lib/libEGL.so: undefined reference to `gl20_client_state_init'
/opt/vc/lib/libEGL.so: undefined reference to `gl11_client_state_init'
/opt/vc/lib/libEGL.so: undefined reference to `glxx_client_FramebufferRenderbuffer'
/opt/vc/lib/libEGL.so: undefined reference to `glxx_client_IsRenderbuffer'
/opt/vc/lib/libEGL.so: undefined reference to `glxx_buffer_info_get'
/opt/vc/lib/libEGL.so: undefined reference to `glxx_client_BindFramebuffer'
/opt/vc/lib/libEGL.so: undefined reference to `glxx_client_CheckFramebufferStatus'
/opt/vc/lib/libEGL.so: undefined reference to `glDiscardFramebufferEXT'
collect2: error: ld returned 1 exit status
Makefile:7: recipe for target 'shapedemo' failed
make: *** [shapedemo] Error 1
[email protected]:~/openvg/client$ 
So I'm at a loss at what to do next.

In the earlier version (before the latest update) make ran without errors (after the 2 changes as above) and I could compile and run the demos.

Thank You.
--
Best Regards,

-- Royce Pereira

Re: openvg library on Ubuntu-MATE

Posted: Tue Jan 19, 2016 12:16 pm
by ajstarks
odd. I just re-tested, and it worked fine.

Re: openvg library on Ubuntu-MATE

Posted: Tue Jan 19, 2016 12:55 pm
by roycejp
ajstarks wrote:odd. I just re-tested, and it worked fine.
Hi,

Please try it with Ubuntu Mate 15.10 / gcc 5.2

Thank you.

Re: openvg library on Ubuntu-MATE

Posted: Tue Jan 19, 2016 6:01 pm
by Paeryn
It looks like EGL references functions from GLESv2 so you need to swap the order of those.
Change the

Code: Select all

-lGLESv2 -lEGL 
to

Code: Select all

-lEGL -lGLESv2

Re: openvg library on Ubuntu-MATE

Posted: Wed Jan 20, 2016 2:04 am
by ajstarks
fixed (I hope for good).

Re: openvg library on Ubuntu-MATE

Posted: Wed Jan 20, 2016 5:10 am
by roycejp
Yes, Paeryn's suggestion worked, Thanks again.

What is the 'chars.c' file in the openvg/client folder? Is it one of the demos?

If we build and try to run it, it seems to have a bug :

Code: Select all

[email protected]:~/openvg/client$ ./chars
Segmentation fault (core dumped)
[email protected]:~/openvg/client$ 
Also It seems it has code which tries to stuff values > 255 into a char ( buf[400] ). Why ?
(That section of code is devoid of comments).

Thank you.

Re: openvg library on Ubuntu-MATE

Posted: Wed Jan 20, 2016 7:46 am
by roycejp
Hi,
I have another issue now.
I'm trying to display a .jpg image on the screen.
https://goo.gl/photos/84cioWj8hJv4uYAUA
Rightclick->Properties confirms that its a JPEG image.
But when I run my program, I get:

Code: Select all

[email protected]:~/openvg/kbd-touch$ ./kbd-touch
Not a JPEG file: starts with 0x89 0x50
[email protected]:~/openvg/kbd-touch$ 
What's wrong here ?
Thank you!

Edit: f it helps, I created the svg in Inkscape 0.91, then exported (within Inkscape) as .png and then converted to .jpg using imagemagick.

Re: openvg library on Ubuntu-MATE

Posted: Wed Jan 20, 2016 1:37 pm
by Paeryn
roycejp wrote:Hi,
I have another issue now.
I'm trying to display a .jpg image on the screen.
https://goo.gl/photos/84cioWj8hJv4uYAUA
Rightclick->Properties confirms that its a JPEG image.
But when I run my program, I get:

Code: Select all

[email protected]:~/openvg/kbd-touch$ ./kbd-touch
Not a JPEG file: starts with 0x89 0x50
[email protected]:~/openvg/kbd-touch$ 
What's wrong here ?
Thank you!

Edit: f it helps, I created the svg in Inkscape 0.91, then exported (within Inkscape) as .png and then converted to .jpg using imagemagick.
That error message comes from libjpeg and says that the first two bytes read are as given "0x89 0x50" rather than the required "0xFF 0xD8". All libshapes does is open the file and pass the file handle to libjpeg. Actually, thinking about it, 0x89 0x50 is the first two bytes of a png header so it looks like you're passing the wrong file.

Re: openvg library on Ubuntu-MATE

Posted: Thu Jan 21, 2016 2:49 am
by ajstarks
roycejp wrote:Yes, Paeryn's suggestion worked, Thanks again.

What is the 'chars.c' file in the openvg/client folder? Is it one of the demos?

If we build and try to run it, it seems to have a bug :

Code: Select all

[email protected]:~/openvg/client$ ./chars
Segmentation fault (core dumped)
[email protected]:~/openvg/client$ 
Also It seems it has code which tries to stuff values > 255 into a char ( buf[400] ). Why ?
(That section of code is devoid of comments).

Thank you.

chars was an experiment included my mistake. Sorry.

Re: openvg library on Ubuntu-MATE

Posted: Thu Sep 28, 2017 9:38 am
by hellman
hi new on the board ..

i am trying to compile the shapedemo and getting exactly the same errors .. have don all the fixes thath is mentioned in here but no succses..

Make File

Code: Select all


INCLUDEFLAGS=-I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -I..
LIBFLAGS=-L/opt/vc/lib -lEGL -lGLESv2 -lbcm_host -lpthread  -ljpeg -lutil

all: shapedemo hellovg mouse-hellovg particles screensize clip

shapedemo:      shapedemo.c ../libshapes.o ../oglinit.o
        gcc -std=gnu89 -Wall $(INCLUDEFLAGS) -o shapedemo shapedemo.c ../libshapes.o ../oglinit.o $(LIBFLAGS)

test:   shapedemo
        ./shapedemo demo 5

hellovg:        hellovg.c ../libshapes.o ../oglinit.o
        gcc -std=gnu89 -Wall $(INCLUDEFLAGS) -o  hellovg hellovg.c ../libshapes.o ../oglinit.o $(LIBFLAGS)

mouse-hellovg:  mouse-hellovg.c ../libshapes.o ../oglinit.o
        gcc -std=gnu89 -Wall $(INCLUDEFLAGS) -o  mouse-hellovg mouse-hellovg.c ../libshapes.o ../oglinit.o $(LIBFLAGS)

particles:      particles.c ../libshapes.o ../oglinit.o
        gcc -std=gnu89 -Wall $(INCLUDEFLAGS) -o  particles particles.c ../libshapes.o ../oglinit.o $(LIBFLAGS)

screensize:     screensize.c ../libshapes.o ../oglinit.o
        gcc -std=gnu89 -Wall $(INCLUDEFLAGS) -o  screensize screensize.c ../libshapes.o ../oglinit.o $(LIBFLAGS)

clip:   clip.c ../libshapes.o ../oglinit.o
        gcc -std=gnu89 -Wall $(INCLUDEFLAGS) -o  clip clip.c ../libshapes.o ../oglinit.o $(LIBFLAGS)

indent:
        indent -linux -c 60 -brf -l 132 shapedemo.c hellovg.c mouse-hellovg.c particles.c screensize.c



Error

Code: Select all

[email protected]:~/openvg/client $ make test
gcc -std=gnu89 -Wall -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -I.. -o shapedemo shapedemo.c ../libshapes.o ../oglinit.o -L/opt/vc/lib -lEGL -lGLESv2 -lbcm_host -lpthread  -ljpeg -lutil
../libshapes.o: In function `loadfont':
libshapes.c:(.text+0x1c0): undefined reference to `vgCreatePath'
libshapes.c:(.text+0x1e4): undefined reference to `vgAppendPathData'
../libshapes.o: In function `unloadfont':
libshapes.c:(.text+0x27c): undefined reference to `vgDestroyPath'
../libshapes.o: In function `createImageFromJpeg':
libshapes.c:(.text+0x3e8): undefined reference to `vgCreateImage'
libshapes.c:(.text+0x410): undefined reference to `vgImageSubData'
../libshapes.o: In function `makeimage':
libshapes.c:(.text+0x490): undefined reference to `vgCreateImage'
libshapes.c:(.text+0x4b8): undefined reference to `vgImageSubData'
libshapes.c:(.text+0x4d8): undefined reference to `vgSetPixels'
libshapes.c:(.text+0x4ec): undefined reference to `vgDestroyImage'
../libshapes.o: In function `Image':
libshapes.c:(.text+0x538): undefined reference to `vgSetPixels'
libshapes.c:(.text+0x54c): undefined reference to `vgDestroyImage'
../libshapes.o: In function `dumpscreen':
libshapes.c:(.text+0x58c): undefined reference to `vgReadPixels'
../libshapes.o: In function `Translate':
libshapes.c:(.text+0x904): undefined reference to `vgTranslate'
../libshapes.o: In function `Rotate':
libshapes.c:(.text+0x908): undefined reference to `vgRotate'
../libshapes.o: In function `Shear':
libshapes.c:(.text+0x90c): undefined reference to `vgShear'
../libshapes.o: In function `Scale':
libshapes.c:(.text+0x910): undefined reference to `vgScale'
../libshapes.o: In function `setfill':
libshapes.c:(.text+0x91c): undefined reference to `vgCreatePaint'
libshapes.c:(.text+0x92c): undefined reference to `vgSetParameteri'
libshapes.c:(.text+0x940): undefined reference to `vgSetParameterfv'
libshapes.c:(.text+0x94c): undefined reference to `vgSetPaint'
libshapes.c:(.text+0x958): undefined reference to `vgDestroyPaint'
../libshapes.o: In function `setstroke':
libshapes.c:(.text+0x968): undefined reference to `vgCreatePaint'
libshapes.c:(.text+0x978): undefined reference to `vgSetParameteri'
libshapes.c:(.text+0x98c): undefined reference to `vgSetParameterfv'
libshapes.c:(.text+0x998): undefined reference to `vgSetPaint'
libshapes.c:(.text+0x9a4): undefined reference to `vgDestroyPaint'
../libshapes.o: In function `StrokeWidth':
libshapes.c:(.text+0x9b4): undefined reference to `vgSetf'
libshapes.c:(.text+0x9c0): undefined reference to `vgSeti'
libshapes.c:(.text+0x9d0): undefined reference to `vgSeti'
../libshapes.o: In function `setstop':
libshapes.c:(.text+0xad0): undefined reference to `vgSetParameteri'
libshapes.c:(.text+0xae0): undefined reference to `vgSetParameteri'
libshapes.c:(.text+0xaf4): undefined reference to `vgSetParameterfv'
libshapes.c:(.text+0xb04): undefined reference to `vgSetPaint'
../libshapes.o: In function `FillLinearGradient':
libshapes.c:(.text+0xb38): undefined reference to `vgCreatePaint'
libshapes.c:(.text+0xb48): undefined reference to `vgSetParameteri'
libshapes.c:(.text+0xb5c): undefined reference to `vgSetParameterfv'
libshapes.c:(.text+0xb74): undefined reference to `vgDestroyPaint'
../libshapes.o: In function `FillRadialGradient':
libshapes.c:(.text+0xbac): undefined reference to `vgCreatePaint'
libshapes.c:(.text+0xbbc): undefined reference to `vgSetParameteri'
libshapes.c:(.text+0xbd0): undefined reference to `vgSetParameterfv'
libshapes.c:(.text+0xbe8): undefined reference to `vgDestroyPaint'
../libshapes.o: In function `ClipRect':
libshapes.c:(.text+0xc1c): undefined reference to `vgSeti'
libshapes.c:(.text+0xc3c): undefined reference to `vgSetiv'
../libshapes.o: In function `ClipEnd':
libshapes.c:(.text+0xc58): undefined reference to `vgSeti'
../libshapes.o: In function `Text':
libshapes.c:(.text+0xd54): undefined reference to `vgGetMatrix'
libshapes.c:(.text+0xdc0): undefined reference to `vgLoadMatrix'
libshapes.c:(.text+0xdc8): undefined reference to `vgMultMatrix'
libshapes.c:(.text+0xdd8): undefined reference to `vgDrawPath'
libshapes.c:(.text+0xdf8): undefined reference to `vgLoadMatrix'
../libshapes.o: In function `newpath':
libshapes.c:(.text+0x10a4): undefined reference to `vgCreatePath'
../libshapes.o: In function `makecurve':
libshapes.c:(.text+0x10dc): undefined reference to `vgAppendPathData'
libshapes.c:(.text+0x10e8): undefined reference to `vgDrawPath'
libshapes.c:(.text+0x10f4): undefined reference to `vgDestroyPath'
../libshapes.o: In function `poly':
libshapes.c:(.text+0x1224): undefined reference to `vguPolygon'
libshapes.c:(.text+0x1230): undefined reference to `vgDrawPath'
libshapes.c:(.text+0x1238): undefined reference to `vgDestroyPath'
../libshapes.o: In function `Rect':
libshapes.c:(.text+0x1284): undefined reference to `vguRect'
libshapes.c:(.text+0x1290): undefined reference to `vgDrawPath'
libshapes.c:(.text+0x12a0): undefined reference to `vgDestroyPath'
../libshapes.o: In function `Line':
libshapes.c:(.text+0x12d4): undefined reference to `vguLine'
libshapes.c:(.text+0x12e0): undefined reference to `vgDrawPath'
libshapes.c:(.text+0x12f0): undefined reference to `vgDestroyPath'
../libshapes.o: In function `Roundrect':
libshapes.c:(.text+0x1334): undefined reference to `vguRoundRect'
libshapes.c:(.text+0x1340): undefined reference to `vgDrawPath'
libshapes.c:(.text+0x1350): undefined reference to `vgDestroyPath'
../libshapes.o: In function `Ellipse':
libshapes.c:(.text+0x1384): undefined reference to `vguEllipse'
libshapes.c:(.text+0x1390): undefined reference to `vgDrawPath'
libshapes.c:(.text+0x13a0): undefined reference to `vgDestroyPath'
../libshapes.o: In function `Arc':
libshapes.c:(.text+0x13f0): undefined reference to `vguArc'
libshapes.c:(.text+0x13fc): undefined reference to `vgDrawPath'
libshapes.c:(.text+0x140c): undefined reference to `vgDestroyPath'
../libshapes.o: In function `Start':
libshapes.c:(.text+0x1448): undefined reference to `vgSetfv'
libshapes.c:(.text+0x145c): undefined reference to `vgClear'
libshapes.c:(.text+0x1484): undefined reference to `vgLoadIdentity'
../libshapes.o: In function `End':
libshapes.c:(.text+0x14a4): undefined reference to `vgGetError'
../libshapes.o: In function `SaveEnd':
libshapes.c:(.text+0x154c): undefined reference to `vgGetError'
../libshapes.o: In function `Background':
libshapes.c:(.text+0x1688): undefined reference to `vgSetfv'
libshapes.c:(.text+0x16a4): undefined reference to `vgClear'
../libshapes.o: In function `BackgroundRGB':
libshapes.c:(.text+0x16d4): undefined reference to `vgSetfv'
libshapes.c:(.text+0x16f0): undefined reference to `vgClear'
../libshapes.o: In function `WindowClear':
libshapes.c:(.text+0x171c): undefined reference to `vgClear'
../libshapes.o: In function `AreaClear':
libshapes.c:(.text+0x1724): undefined reference to `vgClear'
../libshapes.o: In function `RectOutline':
libshapes.c:(.text+0x1834): undefined reference to `vguRect'
libshapes.c:(.text+0x1840): undefined reference to `vgDrawPath'
libshapes.c:(.text+0x1850): undefined reference to `vgDestroyPath'
../libshapes.o: In function `RoundrectOutline':
libshapes.c:(.text+0x1894): undefined reference to `vguRoundRect'
libshapes.c:(.text+0x18a0): undefined reference to `vgDrawPath'
libshapes.c:(.text+0x18b0): undefined reference to `vgDestroyPath'
../libshapes.o: In function `EllipseOutline':
libshapes.c:(.text+0x18e4): undefined reference to `vguEllipse'
libshapes.c:(.text+0x18f0): undefined reference to `vgDrawPath'
libshapes.c:(.text+0x1900): undefined reference to `vgDestroyPath'
../libshapes.o: In function `ArcOutline':
libshapes.c:(.text+0x1950): undefined reference to `vguArc'
libshapes.c:(.text+0x195c): undefined reference to `vgDrawPath'
libshapes.c:(.text+0x196c): undefined reference to `vgDestroyPath'
collect2: error: ld returned 1 exit status
Makefile:7: receptet för målet ”shapedemo” misslyckades
make: *** [shapedemo] Fel 1
[email protected]:~/openvg/client $ 

Re: openvg library on Ubuntu-MATE

Posted: Mon Oct 02, 2017 7:42 am
by hellman
found the problem ..

i needed to use the libbrcmXX livrary to make it work.