I noticed there was a small change to the raspicam source code on github so I thought I would recompile it and make another extension just for the practice. There are precompiled binaries there too which I tried the first time around but the first one I tried wouldn't run (raspistill) - it gave me a "file not found" message which I didn't really investigate at the time, just moved straight to compiling from source.
So now I'm a little confused. I've got three raspistill binaries on my pi, the first is loaded from the extension I originally made several weeks ago and was compiled from source available at the time. The next is in the build directory I used to compile from the updated source a couple of days ago. The last is an already compiled binary I downloaded from the raspberry pi section on github.
All three are slightly different sizes, 111.8k, 108.4k, and 113.8k.
They all say when executed:
raspistill Camera App v1.3.8
The precompiled binary has a different interpreter file (ld-linux.so.3) which didn't exist on my system so I symlinked to the ld-linux-armhf.so.3 file used by the other binaries in order to get rid of the "file not found" message when trying to execute it (which I suspect was the problem I had originally several weeks ago).
- Why are the file sizes different? Slightly different source? Different compiler options? Both?
- Why are they all v1.3.8 when I know for at least two of them that the source had changed between compilations?
- Which would be better to use in the tcz, the one I compiled from source or the precompiled one? I'd need to put a symlink for /lib/ld-linux.so.3 ---> /lib/ld-linux-armhf.so.3 in the extension to get it to work.
I know it's probably not a huge deal, just trying to learn something along the way and understand best practices...
//edit - also the "into the core" book mentions to strip debugging symbols to make the binary smaller - is that applicable to arm also and if so is it done at compile time or after the fact?
tc@box:~$ file /tmp/tcloop/raspicam/usr/local/bin/raspistill
/tmp/tcloop/raspicam/usr/local/bin/raspistill: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, not stripped
tc@box:~$ file /mnt/mmcblk0p2/userland/opt/vc/bin/raspistill
/mnt/mmcblk0p2/userland/opt/vc/bin/raspistill: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, not stripped
tc@box:~$ file /home/tc/raspistill
/home/tc/raspistill: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.1.9, not stripped