Sunday, December 15, 2013

Raspberrypi-vc Packaging (Final Release)

Changing the package 'raspberrypi-vc' to build from source is very complicated (for me). As I reach the deadline, here's what I tried to accomplish and the challenges I faced:

1.) I always look the original spec file from agreene and I would say, at first I did not understand most of what was there. Because of that, I did not know how to start my project (I thought it was a simple 'kind-of-a-lab' project but it isn't) which is a problem. I did talk with Chris and told me to start off from scratch and so I did but then I got stuck.

2.) As I build the package from a skeleton spec with everything almost empty, I looked everywhere for a make file or anything with a script (python mostly) just to be able to build it but there was none. I looked at almost all of the packages in the project and everything includes a make file or something to put in the %build section and it makes it really easier. As for mine, I found none for raspberrypi-vc package except when I looked inside the hello_pi directory(I found the rebuild.sh, a python script). It shed some light but I faced another challenge.

3.)  I edited the spec file to include the rebuild.sh and I got errors that says some files where missing. I addressed the issue by editing the makefile through the specfile and adding the specific directory on where to find it (I put this in %build section sed -i -e '1iSDKSTAGE=/home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp\' Makefile.include). The file could not be found issue is fixed but again another issue came up.

4.)  The next issue that came up, and probably the one thing holding me is:
/usr/bin/ld: skipping incompatible /home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/lib//libGLESv2.so when searching for -lGLESv2
/usr/bin/ld: cannot find -lGLESv2
/usr/bin/ld: skipping incompatible /home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/lib//libEGL.so when searching for -lEGL
/usr/bin/ld: cannot find -lEGL
/usr/bin/ld: skipping incompatible /home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/lib//libopenmaxil.so when searching for -lopenmaxil
/usr/bin/ld: cannot find -lopenmaxil
/usr/bin/ld: skipping incompatible /home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/lib//libbcm_host.so when searching for -lbcm_host
/usr/bin/ld: cannot find -lbcm_host
/usr/bin/ld: skipping incompatible /home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/lib//libvcos.so when searching for -lvcos
/usr/bin/ld: cannot find -lvcos
/usr/bin/ld: skipping incompatible /home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/lib//libvchiq_arm.so when searching for -lvchiq_arm
/usr/bin/ld: cannot find -lvchiq_arm
collect2: error: ld returned 1 exit status
make: *** [hello_teapot.bin] Error 1
rm models.o video.o triangle.o
make: Leaving directory `/home/jfgiagonia/rpmbuild/BUILD/raspberrypi-firmware-4c14569/hardfp/opt/vc/src/hello_pi/hello_teapot'
error: Bad exit status from /var/tmp/rpm-tmp.zjVMmP (%build)

This goes on to every file that the make file compiles.

5.) Building from source on the Pi is very slow that's why most of my building was done on a PC. Maybe my sd card was not fast enough but that being said, I tried it on Pi and still, it does not build properly.

Thoughts:
Overall I would still say that building packages is very interesting. It gives you quite a skill to look for errors and find solutions. It is like a job of a QA Analyst so that the software does not or have less bugs. Also, talking to other people in the community for help is one thing you can develop on this project. I could have talked to more people and I might have found solutions to this but I got caught up with other projects and practicals (my fault anyway). The project has taught me to prioritize and plan things carefully in order to not be caught by the deadlines. It is a very important skill not only in school but also on other places like work. As I end, everything what I have done in this course is worth it. From the communications lab (and every lab) until the project. Chris is a very good teacher and I would recommend IT students to get him as your instructor in any subject he is teaching.

Files:
Source RPM
Spec File
(I copied the header information from the original spec file)

Links:
My Project
Github Source Files

No comments:

Post a Comment