benvium/libimobiledevice-macosx

ideviceXX executables have dynamic library in wrong place and reference to /home/benoit to satisfy dependency

cwjolly opened this issue · 0 comments

I extracted zip file in my download directory , I updated my PATH and DYLD_LIBRARY_PATH as per the README.md file. When I truss the executable it looks for $DYLD_LIBRARY_PATH/../lib . I moved all dynamic libraries into $DYLD_LIBRARY_PATH/lib ( they were in $DYLD_LIBRARY_PATH) and then moved up a directory ( $DYLD_LIBRARY_PATH/..) and made a soft link to $DYLD_LIBRARY_PATH/lib named lib. The dynamic libraries were then found but then the program called because it was looking for "/home/benoit/workspace/imobiledevice/libplist/build/src/libplist.1.dylib" see truss output below.

rocket$ env | grep PATH
DYLD_LIBRARY_PATH=/Users/carl/downloads/libimobiledevice-macosx-master
PATH=/Users/carl/bin:/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/apache-maven-3.2.5/bin:/Applications/TkDiff.app/Contents/MacOS:/Users/carl/downloads/libimobiledevice-macosx-master

rocket$ uname -a
Darwin rocket.local 14.1.0 Darwin Kernel Version 14.1.0: Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64
pocket-rocket:downloads carl

sudo dtruss idevicescreenshot
SYSCALL(args) = return
thread_selfid(0x0, 0x0, 0x0) = 13404466 0
csops(0x0, 0x0, 0xBFFFF314) = 0 0
issetugid(0x0, 0x0, 0xBFFFF314) = 0 0
shared_region_check_np(0xBFFFD2A0, 0x0, 0xBFFFF314) = 0 0
stat64("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0xBFFFE4D8, 0xBFFFF314) = 0 0
open("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x0, 0x0) = 3 0
pread(0x3, "\312\376\272\276\0", 0x1000, 0x0) = 4096 0
pread(0x3, "\316\372\355\376\a\0", 0x1000, 0x6000) = 4096 0
fcntl(0x3, 0x3D, 0xFFFFFFFFBFFFC960) = 0 0
mmap(0x6000, 0x2000, 0x1, 0x12, 0x3, 0x6000) = 0x6000 0
mmap(0x8000, 0x1000, 0x3, 0x12, 0x3, 0x8000) = 0x8000 0
mmap(0x9000, 0x1FA0, 0x1, 0x12, 0x3, 0x9000) = 0x9000 0
close(0x3) = 0 0
stat64("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0xBFFFEDF0, 0x1) = 0 0
stat64("/\0", 0xBFFFC610, 0x1) = 0 0
getattrlist("/Users\0", 0x8FEF9E60, 0xBFFFDEF8) = 0 0
getattrlist("/Users/carl\0", 0x8FEF9E60, 0xBFFFDEF8) = 0 0
getattrlist("/Users/carl/downloads\0", 0x8FEF9E60, 0xBFFFDEF8) = 0 0
getattrlist("/Users/carl/Downloads/libimobiledevice-macosx-master\0", 0x8FEF9E60, 0xBFFFDEF8) = 0 0
getattrlist("/Users/carl/Downloads/libimobiledevice-macosx-master/idevicescreenshot\0", 0x8FEF9E60, 0xBFFFDEF8) = 0 0
stat64("/Users/carl/downloads/libimobiledevice-macosx-master/../lib/libimobiledevice.3.dylib\0", 0xBFFFE268, 0xBFFFDEF8) = 0 0
open("/Users/carl/downloads/libimobiledevice-macosx-master/../lib/libimobiledevice.3.dylib\0", 0x0, 0x0) = 3 0
pread(0x3, "\316\372\355\376\a\0", 0x1000, 0x0) = 4096 0
mmap(0xB000, 0xF000, 0x5, 0x12, 0x3, 0x0) = 0xB000 0
mmap(0x1A000, 0x1000, 0x3, 0x12, 0x3, 0xF000) = 0x1A000 0
mmap(0x1B000, 0x1000, 0x7, 0x12, 0x3, 0x10000) = 0x1B000 0
mmap(0x1C000, 0x3A48, 0x1, 0x12, 0x3, 0x11000) = 0x1C000 0
fcntl(0x3, 0x32, 0xFFFFFFFFBFFFC768) = 0 0
fcntl(0x3, 0x2C, 0xFFFFFFFFBFFFC710) = 0 0
fcntl(0x3, 0x2C, 0xFFFFFFFFBFFFC710) = 0 0
close(0x3) = 0 0
getattrlist("/Users\0", 0x8FEF9E60, 0xBFFFDF08) = 0 0
getattrlist("/Users/carl\0", 0x8FEF9E60, 0xBFFFDF08) = 0 0
getattrlist("/Users/carl/downloads\0", 0x8FEF9E60, 0xBFFFDF08) = 0 0
getattrlist("/Users/carl/Downloads/libimobiledevice-macosx-master\0", 0x8FEF9E60, 0xBFFFDF08) = 0 0
getattrlist("/Users/carl/Downloads/libimobiledevice-macosx-master/idevicescreenshot\0", 0x8FEF9E60, 0xBFFFDF08) = 0 0
stat64("/Users/carl/downloads/libimobiledevice-macosx-master/../lib/libplist.1.dylib\0", 0xBFFFE278, 0xBFFFDF08) = 0 0
open("/Users/carl/downloads/libimobiledevice-macosx-master/../lib/libplist.1.dylib\0", 0x0, 0x0) = 3 0
pread(0x3, "\316\372\355\376\a\0", 0x1000, 0x0) = 4096 0
mmap(0x20000, 0xE000, 0x5, 0x12, 0x3, 0x0) = 0x20000 0
mmap(0x2E000, 0x1000, 0x3, 0x12, 0x3, 0xE000) = 0x2E000 0
mmap(0x2F000, 0x1000, 0x7, 0x12, 0x3, 0xF000) = 0x2F000 0
mmap(0x30000, 0x1894, 0x1, 0x12, 0x3, 0x10000) = 0x30000 0
fcntl(0x3, 0x32, 0xFFFFFFFFBFFFC888) = 0 0
fcntl(0x3, 0x2C, 0xFFFFFFFFBFFFC830) = 0 0
fcntl(0x3, 0x2C, 0xFFFFFFFFBFFFC830) = 0 0
close(0x3) = 0 0
getattrlist("/Users\0", 0x8FEF9E60, 0xBFFFDF08) = 0 0
getattrlist("/Users/carl\0", 0x8FEF9E60, 0xBFFFDF08) = 0 0
getattrlist("/Users/carl/downloads\0", 0x8FEF9E60, 0xBFFFDF08) = 0 0
getattrlist("/Users/carl/Downloads/libimobiledevice-macosx-master\0", 0x8FEF9E60, 0xBFFFDF08) = 0 0
getattrlist("/Users/carl/Downloads/libimobiledevice-macosx-master/idevicescreenshot\0", 0x8FEF9E60, 0xBFFFDF08) = 0 0
stat64("/Users/carl/downloads/libimobiledevice-macosx-master/../lib/libusbmuxd.2.dylib\0", 0xBFFFE278, 0xBFFFDF08) = 0 0
open("/Users/carl/downloads/libimobiledevice-macosx-master/../lib/libusbmuxd.2.dylib\0", 0x0, 0x0) = 3 0
pread(0x3, "\316\372\355\376\a\0", 0x1000, 0x0) = 4096 0
mmap(0x32000, 0x9000, 0x5, 0x12, 0x3, 0x0) = 0x32000 0
mmap(0x3B000, 0x1000, 0x3, 0x12, 0x3, 0x9000) = 0x3B000 0
mmap(0x3C000, 0x1000, 0x7, 0x12, 0x3, 0xA000) = 0x3C000 0
mmap(0x3D000, 0xC24, 0x1, 0x12, 0x3, 0xB000) = 0x3D000 0
fcntl(0x3, 0x32, 0xFFFFFFFFBFFFC848) = 0 0
fcntl(0x3, 0x2C, 0xFFFFFFFFBFFFC7F0) = 0 0
fcntl(0x3, 0x2C, 0xFFFFFFFFBFFFC7F0) = 0 0
close(0x3) = 0 0
stat64("/usr/lib/libSystem.B.dylib\0", 0xBFFFE2E8, 0xFFFFFFFFBFFFC7F0) = 0 0
stat64("/usr/lib/libssl.0.9.7.dylib\0", 0xBFFFE2E8, 0xFFFFFFFFBFFFC7F0) = 0 0
stat64("/usr/lib/libcrypto.0.9.7.dylib\0", 0xBFFFE2E8, 0xFFFFFFFFBFFFC7F0) = 0 0
stat64("/usr/lib/libgcc_s.1.dylib\0", 0xBFFFE2E8, 0xFFFFFFFFBFFFC7F0) = 0 0
dyld: Library not loaded: /home/benoit/workspace/imobiledevice/libplist/build/src/libplist.1.dylib
Referenced from: /Users/carl/Downloads/libimobiledevice-macosx-master/lib/libimobiledevice.3.dylib
Reason: image not found
stat64("/home/benoit/workspace/imobiledevice/libplist/build/src/libplist.1.dylib\0", 0xBFFFE1D8, 0xFFFFFFFFBFFFC7F0) = -1 Err#2
stat64("/Users/carl/lib/libplist.1.dylib\0", 0xBFFFE9B8, 0xFFFFFFFFBFFFC7F0) = -1 Err#2
stat64("/usr/local/lib/libplist.1.dylib\0", 0xBFFFE9B8, 0xFFFFFFFFBFFFC7F0) = -1 Err#2
stat64("/usr/lib/libplist.1.dylib\0", 0xBFFFE9C8, 0xFFFFFFFFBFFFC7F0) = -1 Err#2
munmap(0x0, 0x1000) = 0 0
munmap(0x2000, 0x1000) = 0 0
munmap(0x3000, 0x1000) = 0 0
munmap(0x4000, 0x1000) = 0 0
munmap(0x1000, 0x1000) = 0 0
munmap(0x8000, 0x1000) = 0 0
munmap(0x9000, 0x2000) = 0 0
munmap(0x6000, 0x2000) = 0 0
munmap(0x1A000, 0x1000) = 0 0
munmap(0x1B000, 0x1000) = 0 0
munmap(0x1C000, 0x4000) = 0 0
munmap(0xB000, 0xF000) = 0 0
munmap(0x2E000, 0x1000) = 0 0
munmap(0x2F000, 0x1000) = 0 0
munmap(0x30000, 0x2000) = 0 0
munmap(0x20000, 0xE000) = 0 0
munmap(0x3B000, 0x1000) = 0 0
munmap(0x3C000, 0x1000) = 0 0
munmap(0x3D000, 0x1000) = 0 0
munmap(0x32000, 0x9000) = 0 0
fstat64(0x2, 0xBFFFF188, 0xFFFFFFFFBFFFC7F0) = 0 0
write(0x2, "dyld: Library not loaded: /home/\0", 0x20) = 32 0
write(0x2, "benoit/workspace/imobiledevice/l\0", 0x20) = 32 0
write(0x2, "ibplist/build/src/libplist.1.dyl\0", 0x20) = 32 0
write(0x2, "ib\n Referenced from: /Users/car\0", 0x20) = 32 0
write(0x2, "l/Downloads/libimobiledevice-mac\0", 0x20) = 32 0
write(0x2, "osx-master/lib/libimobiledevice.\0", 0x20) = 32 0
write(0x2, "3.dylib\n Reason: image not foun\0", 0x20) = 32 0
write(0x2, "d\n\0", 0x2) = 2 0