Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix library dependency checking for Intel targets #6

Merged
merged 1 commit into from Mar 20, 2015

Conversation

kjokinie
Copy link
Contributor

V2: Added comment about grepping the libraries after objdump

The sb2 targets for i486/i586 perform really funny library path
translations when the binaries are run inside sb2. Hence the old
way to detect library dependencies by running them with
LD_TRACE_LOADED_OBJECTS=1 flag does not work anymore correctly.

Fixed by getting direct dependencies of the executables via objdump
and then using ldd to collect dependencies of the direct dependencies.
This way the executable does not need to be run to find the dependencies.

Signed-off-by: Kalle Jokiniemi kalle.jokiniemi@jolla.com

#Get full dependencies of the direct dependencies
for lib in $DIRECT_LIBS; do
TEMPDEPS=$($LD_LINUX $lib \
| sed -ne "s/.*[\t ]\(\/.*\) (.*/\1/gp")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit more readable to use sed -ne "s|.*[\t ]\(/.*\) (.*|\1|gp", one backslash less :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me most sed and awk lines are completely incomprehensible no matter how you write it :P

Was the replacement of "/" with pipe "|" intentional?

…s to JB#25193

The sb2 targets for i486/i586 perform really funny library path
translations when the binaries are run inside sb2. Hence the old
way to detect library dependencies by running them with
LD_TRACE_LOADED_OBJECTS=1 flag does not work anymore correctly.

Fixed by getting direct dependencies of the executables via objdump
and then using ldd to collect dependencies of the direct dependencies.
This way the executable does not need to be run to find the dependencies.

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@jolla.com>
kjokinie pushed a commit that referenced this pull request Mar 20, 2015
Fix library dependency checking for Intel targets
@kjokinie kjokinie merged commit 6f792db into nemomobile:master Mar 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants