Sponsored Content
Full Discussion: Which OS Binary was build
Homework and Emergencies Emergency UNIX and Linux Support Which OS Binary was build Post 302413857 by gaurav1086 on Saturday 17th of April 2010 05:28:11 PM
Old 04-17-2010
Hello,

you can check the dependancy libraries which can distinguish the binaries

Code:
ldd binary_file

If their versions match that of the current version of the libs.

apparently you can check out the external libs they are using another way too.
Code:
 nm -o binary_file | grep '\bU\b'

The binary file alone cannot give you the information about which version of gcc was used to build it.

If there is a difference b/w the kernel version they are using then you can check the binaries that are made for 2.4 or 2.6 . I suppose redhat-6.2 uses 2.4 while rhel uses 2.6.18.

example :

Code:
 file a.out
a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped

So it lists 2.6 on mine

So in order to distinguish you can rename all lthe binaries depending on the kernel version to later distinguish them

Code:
#!/bin/bash

for fil in $DIR/*;do if file $fil | grep -q '2.6' ;then echo "2.6-${fil}";else echo "2.4-${fil}";fi;done

Apparently you can rename the files with the kernel version to find out which OS it was built.

Hope this helps,

Regards,
gaurav.

Last edited by gaurav1086; 04-18-2010 at 02:34 AM.. Reason: correct variable names
 

10 More Discussions You Might Find Interesting

1. Solaris

compiled binary file gives "cannot execute binary file"

Hi, I have two Solaris machines. 1. SunOS X 5.8 Generic_108528-29 sun4u sparc SUNW,Sun-Blade-1500 2. SunOS Y 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-60 I am trying to buiild a project on both these machines. The Binary output file compiled on machine 2 runs on both the machines. Where... (0 Replies)
Discussion started by: scgupta
0 Replies

2. Solaris

build error

dears i working in solaris and when i type make for report it gives me the error kindly can you help me what is the reason -bash-3.00$ make BPSEXT130 make: Warning: File `BPSEXT130.rc' has modification time 12 s in the future make BPSEXT130.c make: Entering directory... (3 Replies)
Discussion started by: murad.jaber
3 Replies

3. UNIX for Advanced & Expert Users

Problem during build

Hi, When i'm compiling my C files, I'm getting an error saying that the file name i've defined is undeclared. Could someone tell me how to solve this error. I've defined the file name as #define _FILE_CODE_ _XYZ_C_ The error is "_XYZ_C undeclared". Thanks in advance (1 Reply)
Discussion started by: laxmi
1 Replies

4. AIX

Vio Build

I am planning carving out dual VIO servers on a P750 based and would like to know how to allocate internal disks to the VIOS. This has 4 internal disks and I would to assign 2 disks to each VIO. This is what I was thinking of assigning . Any advise? vio1 U5802.001.9K8H757-P1-C1 PCI-E x8... (17 Replies)
Discussion started by: mk8570
17 Replies

5. Solaris

Build the apache binary centrally.

Hi, Generally we will run to install, configure apache 2.x on Solaris machine, but dont want to follow these on the remaining machines. I want to build the apache binary centrally, so that i can untar the tar file on remaining machines. Please suggest on how to prepare this file and when i... (12 Replies)
Discussion started by: prash358
12 Replies

6. UNIX for Dummies Questions & Answers

Adding SDK Build on Kernel Source Build

Hi, So I downloaded this kernel source and was able to build it successfully. But I want to add this SDK source code inside, can anyone help me how to do this? Note that the SDK source can be built by itself. I added the SDK in the main Makefile: init-y := init/ #added SDK... (0 Replies)
Discussion started by: h0ujun
0 Replies

7. Shell Programming and Scripting

Convert binary file to csv and then back to the binary format

Hello *nix specialists, Im working for a non profit organisation in Germany to transport DSL over WLAN to people in areas without no DSL. We are using Linksys WRT 54 router with DD-WRT firmware There are at the moment over 180 router running but we have to change some settings next time. So my... (7 Replies)
Discussion started by: digidax
7 Replies

8. Shell Programming and Scripting

Build.xml invocation by Build Script

Hi I have a build.xml file and I can run it on Windows via cmd. Now I want to write a script to invoke the same. Is there a way to do this? (1 Reply)
Discussion started by: ankur328
1 Replies

9. Shell Programming and Scripting

Build using scons

I have a tree structure as follows: /vik/build/sc/botoh.sc /vik/lib/endian.f /vik/utils/botoh.f Then I run the build script as cd vik/build/sc scons -f botoh.sc The above shows that the SConstruct botoh.sc is down a few levels, and it may be easiest to have the main... (6 Replies)
Discussion started by: kristinu
6 Replies

10. Windows & DOS: Issues & Discussions

(VS 2008) New build config looking files from other folder build config

Hi Team, My new build configuration always looking for the files from the build where i copied from. please help me to resolve this. I am using Visual studio 2008.It has Qt 4.8. plugins,qml,C++ development I created new debug_new build configuration with additional preprocessor from the... (1 Reply)
Discussion started by: SA_Palani
1 Replies
yum-builddep(1) 														   yum-builddep(1)

NAME
yum-builddep - install missing dependencies for building an RPM package SYNOPSIS
yum-builddep package DESCRIPTION
yum-builddep is a program which installs the RPMs needed to build the specified package. The source RPM for the specified package must be available in a Yum repository (which will be automatically enabled, if it is disabled) or it can be a local source RPM file. EXAMPLES
Download and install all the RPMs needed to build the kernel RPM: yum-builddep kernel FILES
As yum-builddep uses YUM libraries for retrieving all the information, it relies on YUM configuration for its default values like which repositories to use. Consult YUM documentation for details: /etc/yum.conf /etc/yum/repos.d/ /var/cache/yum/ SEE ALSO
yum.conf (5) http://yum.baseurl.org/ AUTHORS
See the Authors file included with this program. BUGS
There are of course no bugs, but should you find any, you should first consult the FAQ section on http://yum.baseurl.org/wiki/Faq and if unsuccessful in finding a resolution contact the mailing list: yum-devel@lists.baseurl.org. To file a bug use http://bugzilla.redhat.com for Fedora/RHEL/Centos related bugs and http://yum.baseurl.org/report for all other bugs. Panu Matilainen 17 July 2005 yum-builddep(1)
All times are GMT -4. The time now is 04:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy