Finding which version of FreeBSD a port is compiled on

You can try using ldd. Unpack the tgz and use it on the executables. Then have a look at the libc version.
 
Have someone else do it for you? It's not like this is difficult ;) Though libc will only give you the major version of FreeBSD, not the minor version. You can also compare the size of the .tbz against the package repositories on ftp.freebsd.org.
 
Try running [cmd=""]file[/cmd] on executables from the package, like:
Code:
# tar xf irssi-devel.tbz bin/irssi
# file bin/irssi
bin/irssi: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD),
dynamically linked (uses shared libs), for FreeBSD 8.0 (800107), stripped
 
DutchDaemon said:
Have someone else do it for you? It's not like this is difficult ;) Though libc will only give you the major version of FreeBSD, not the minor version.

Which normally shouldn't matter because of the ABI stability in a major branch.
 
Sure, but the question of the OP does mention a minor version specifically, and you can't get that using this method. The file method will probably surrender that information.
 
crsd said:
Code:
# file bin/irssi
bin/irssi: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD),
dynamically linked (uses shared libs), for FreeBSD 8.0 (800107), stripped

Can someone explain what each of the things between comas mean?
 
"man 1 file" gives a pretty good explanation.

but in short:
ELF 32-bit LSB executable, it's a 32 bit ELF binary
Intel 80386, it's compiled for i386
version 1 (FreeBSD), elf version 1 on freebsd
dynamically linked (uses shared libs), the file is dynamically linked!
for FreeBSD 8.0 (800107), compiled for freebsd 8.0
stripped, debugging symbols have been stripped out of the file.
 
The important bits are the 32-bit, Intel 80386, and for FreeBSD 8.0. Those three (actually really only the first and last are important) bits tell you it's a 32-bit FreeBSD 8.0 binary.
 
Except that in this case it does stand for Least Significant Byte first machine architecture, for comparison here is the same output for a FreeBSD 9.0 PowerPC binary of net/mtr-nox11:

Code:
# file mtr
mtr: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (FreeBSD), dynamically linked
 (uses shared libs), for FreeBSD 9.0 (900044), stripped

There you see "MSB executable", Most Significant Byte first machine architecture.

And for completeness I'd like to point out that FreeBSD is not Linux ;)
 
Back
Top