Wednesday, December 4, 2013

Raspberrypi-vc Packaging 0.1 (3nd entry)

Building the raspberrypi-vc from source was harder than I thought. The spec file I got from the source RPM was setup in a very complicated way ( for me ) but I understood it in a way. I found a makefile in the hello_pi folder and tried to work it from there and see if it would build it from source.

These lines were added to the %build section:

cd hardfp/opt/vc/src/hello_pi/
make -C libs/ilclient
make -C libs/vgfont
./rebuild.sh


OUTPUT:

[jfgiagonia@f17 SPECS]$ rpmbuild -ba raspberrypi-vc.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.td65cK
+ umask 022
+ cd /home/jfgiagonia/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/jfgiagonia/rpmbuild/BUILD
+ rm -rf raspberrypi-firmware-4c14569
+ /usr/bin/gzip -dc /home/jfgiagonia/rpmbuild/SOURCES/4c1456944b5f6cc9e5141077ed4e158398811fc1
+ /usr/bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd raspberrypi-firmware-4c14569
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.Qx5RP8
+ umask 022
+ cd /home/jfgiagonia/rpmbuild/BUILD
+ cd raspberrypi-firmware-4c14569
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd hardfp/opt/vc/src/hello_pi/
+ make -C libs/ilclient
make: Entering directory `/home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/src/hello_pi/libs/ilclient'
cc -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -g -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I./ -I../libs/ilclient -I../libs/vgfont -g -c ilclient.c -o ilclient.o -Wno-deprecated-declarations
ilclient.c:50:33: fatal error: interface/vcos/vcos.h: No such file or directory
compilation terminated.
make: *** [ilclient.o] Error 1
make: Leaving directory `/home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/src/hello_pi/libs/ilclient'
error: Bad exit status from /var/tmp/rpm-tmp.Qx5RP8 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.Qx5RP8 (%build)

Good news was at least there was make file that would actually run. The error 'interface/vcos/vcos.h: No such file or directory was because the ilcient.c file needed it to proceed with make. The problem is this file can only be gotten from raspberrypi/userland on github and it is itself, another source code different from what i am working on. I will be working to see if there is a way on my next entry.

PS. This is a very difficult packaging process from the normal packages I tried before. Tinkering with the make files and scripts are not my best assets but I will try the best I can to accomplish a build from source package.

No comments:

Post a Comment