User avatar
ajstarks
Posts: 129
Joined: Fri Jun 22, 2012 2:14 am

OpenVG build errors

Thu Jun 19, 2014 5:22 am

my OpenVG library (https://github.com/ajstarks/openvg) no longer builds properly after a recent rpi-update:

Linux ajspi 3.12.22+ #691 PREEMPT Wed Jun 18 18:29:58 BST 2014 armv6l GNU/Linux

I get undefined symbols when building clients:

cd .. ; make libshapes.o
make[1]: Entering directory '/home/pi/gowork/src/github.com/ajstarks/openvg'
gcc -O2 -Wall -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -c libshapes.c
make[1]: Leaving directory '/home/pi/gowork/src/github.com/ajstarks/openvg'
cd .. ; make oglinit.o
make[1]: Entering directory '/home/pi/gowork/src/github.com/ajstarks/openvg'
make[1]: 'oglinit.o' is up to date.
make[1]: Leaving directory '/home/pi/gowork/src/github.com/ajstarks/openvg'
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 -ljpeg -o shapedemo shapedemo.c ../libshapes.o ../oglinit.o
/usr/bin/ld: /opt/vc/lib/libEGL.so: undefined reference to symbol 'vc_dispmanx_element_add'
//opt/vc/lib/libbcm_host.so: error adding symbols: DSO missing from command line
collect2: ld returned 1 exit status
Makefile:13: recipe for target 'shapedemo' failed
make: *** [shapedemo] Error 1


I also noticed the error when building Go clients:

WORK=/tmp/go-build823431980
github.com/ajstarks/openvg
mkdir -p $WORK/github.com/ajstarks/openvg/_obj/
mkdir -p $WORK/github.com/ajstarks/
cd /home/pi/gowork/src/github.com/ajstarks/openvg
CGO_LDFLAGS="-g" "-O2" "-L/opt/vc/lib" "-lGLESv2" "-ljpeg" /home/pi/go/pkg/tool/linux_arm/cgo -objdir $WORK/github.com/ajstarks/openvg/_obj/ -- -I $WORK/github.com/ajstarks/openvg/_obj/ -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads openvg.go
/home/pi/go/pkg/tool/linux_arm/5c -F -V -w -trimpath $WORK -I $WORK/github.com/ajstarks/openvg/_obj/ -I /home/pi/go/pkg/linux_arm -o $WORK/github.com/ajstarks/openvg/_obj/_cgo_defun.5 -D GOOS_linux -D GOARCH_arm $WORK/github.com/ajstarks/openvg/_obj/_cgo_defun.c
gcc -I . -fPIC -marm -pthread -fmessage-length=0 -print-libgcc-file-name
gcc -I . -fPIC -marm -pthread -fmessage-length=0 -I $WORK/github.com/ajstarks/openvg/_obj/ -g -O2 -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -o $WORK/github.com/ajstarks/openvg/_obj/_cgo_main.o -c $WORK/github.com/ajstarks/openvg/_obj/_cgo_main.c
gcc -I . -fPIC -marm -pthread -fmessage-length=0 -I $WORK/github.com/ajstarks/openvg/_obj/ -g -O2 -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -o $WORK/github.com/ajstarks/openvg/_obj/_cgo_export.o -c $WORK/github.com/ajstarks/openvg/_obj/_cgo_export.c
gcc -I . -fPIC -marm -pthread -fmessage-length=0 -I $WORK/github.com/ajstarks/openvg/_obj/ -g -O2 -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -o $WORK/github.com/ajstarks/openvg/_obj/openvg.cgo2.o -c $WORK/github.com/ajstarks/openvg/_obj/openvg.cgo2.c
gcc -I . -fPIC -marm -pthread -fmessage-length=0 -I $WORK/github.com/ajstarks/openvg/_obj/ -g -O2 -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -o $WORK/github.com/ajstarks/openvg/_obj/libshapes.o -c ./libshapes.c
gcc -I . -fPIC -marm -pthread -fmessage-length=0 -I $WORK/github.com/ajstarks/openvg/_obj/ -g -O2 -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -o $WORK/github.com/ajstarks/openvg/_obj/oglinit.o -c ./oglinit.c
gcc -I . -fPIC -marm -pthread -fmessage-length=0 -o $WORK/github.com/ajstarks/openvg/_obj/_cgo_.o $WORK/github.com/ajstarks/openvg/_obj/_cgo_main.o $WORK/github.com/ajstarks/openvg/_obj/_cgo_export.o $WORK/github.com/ajstarks/openvg/_obj/openvg.cgo2.o $WORK/github.com/ajstarks/openvg/_obj/libshapes.o $WORK/github.com/ajstarks/openvg/_obj/oglinit.o -g -O2 -L/opt/vc/lib -lGLESv2 -ljpeg -pie
# github.com/ajstarks/openvg
/usr/bin/ld: $WORK/github.com/ajstarks/openvg/_obj/libshapes.o: undefined reference to symbol 'eglTerminate'
//opt/vc/lib/libEGL.so: error adding symbols: DSO missing from command line
collect2: ld returned 1 exit status


What has recently changed?

User avatar
ajstarks
Posts: 129
Joined: Fri Jun 22, 2012 2:14 am

Re: OpenVG build errors

Tue Jun 24, 2014 2:45 pm

fixed by updating linking paths

dhoyos
Posts: 2
Joined: Mon Jul 08, 2013 3:58 pm

Re: OpenVG build errors

Sun Feb 22, 2015 2:52 am

hi, i'm having the same problem. is there any way i can fix it?

User avatar
ajstarks
Posts: 129
Joined: Fri Jun 22, 2012 2:14 am

Re: OpenVG build errors

Mon Mar 02, 2015 6:50 pm

dhoyos wrote:hi, i'm having the same problem. is there any way i can fix it?
try pulling down the latest from github. The fixes should be there.

Return to “OpenVG”