Steps to recreate issue:
1) Download latest source (openocd-0.8.0).
2) ./configure – works fine.
3) ./make – gets stucked in "Making all in usb_blaster". The last command is:
libtool: link: rm -fr .libs/libocdjtagdrivers.lax
this command seem to fail because of a permission error (it don't have permission to remove files in .libs)
Please paste more output here, so we can see what exactly fails and how. Probably you can also try to call the relevant commands by hand, strace them etc. We had people testing build with OS X 10.9.2 and they never reported anything like this, your setup must be somehow special, I guess.
Here is some more details... Make fails in src/jtag/drivers:
COMMAND:
cd src/jtag/drivers
./make
OUTPUT:
Making all in usb_blaster
make[1]: Nothing to be done for `all'.
/bin/sh ../../../libtool --tag=CC --mode=link gcc -std=gnu99 -g -O2 -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -o libocdjtagdrivers.la libocdjtagdrivers_la-driver.lo libocdjtagdrivers_la-libusb1_common.lo libocdjtagdrivers_la-usb_common.lo libocdjtagdrivers_la-ftdi.lo libocdjtagdrivers_la-mpsse.lo libocdjtagdrivers_la-usbprog.lo libocdjtagdrivers_la-jlink.lo libocdjtagdrivers_la-rlink.lo libocdjtagdrivers_la-rlink_speed_table.lo libocdjtagdrivers_la-ulink.lo versaloon/usbtoxxx/libocdjtagdrivers_la-usbtogpio.lo versaloon/usbtoxxx/libocdjtagdrivers_la-usbtojtagraw.lo versaloon/usbtoxxx/libocdjtagdrivers_la-usbtoswd.lo versaloon/usbtoxxx/libocdjtagdrivers_la-usbtopwr.lo versaloon/usbtoxxx/libocdjtagdrivers_la-usbtoxxx.lo versaloon/libocdjtagdrivers_la-versaloon.lo libocdjtagdrivers_la-vsllink.lo libocdjtagdrivers_la-arm-jtag-ew.lo libocdjtagdrivers_la-stlink_usb.lo libocdjtagdrivers_la-ti_icdi_usb.lo libocdjtagdrivers_la-osbdm.lo libocdjtagdrivers_la-opendous.lo ../../../src/jtag/drivers/usb_blaster/libocdusbblaster.la
libtool: link: rm -fr .libs/libocdjtagdrivers.lax
...and here the process is stucked.
That amke me believe that "rm -fr .libs/libocdjtagdrivers.lax" is failing. Here are the permissions for .libs :
COMMAND:
ls -la .libs
OUTPUT:
drwxr-xr-x 3 Us staff 102 8 Maj 11:59 .
drwxr-xr-x 94 Us staff 3196 8 Maj 11:45 ..
drwxr-xr-x 3 Us staff 102 8 Maj 11:59 libocdjtagdrivers.lax
Please let me know if there are any other commands I can run to nail down the issue.
Last edit: n321203 2014-05-08
On Thu, May 08, 2014 at 11:02:52AM +0000, n321203 wrote:
Perforce, my arse!
As if download ads and "installers" were not enough... Sigh, SF.net
turned into such a pathetic place now :/
--
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav@gmail.com
So I do not see any error here, I wonder if "rm -rf" might "just hang", heh. You can try something like "strace rm -fr .libs/libocdjtagdrivers.lax" there. Or see process list with, figure out the pid of the process that hangs there, attach with gdb (-p <pid>), take a look at backtrace. Another possibility is to ask your fellow OS X users, I'm unfamiliar with this OS, so can give only generic *nix hints here.
Strace doesn't seem to be available on OS X, but I ran dtruss instead. Here is the output:
Strace doesn't seem to be available on OS X, but I ran dtruss instead. Here is the output:
$ ls -la .libs
total 0
drwxr-xr-x 3 Us staff 102 8 Maj 12:21 .
drwxr-xr-x 94 Us staff 3196 8 Maj 11:45 ..
drwxr-xr-x 3 Us staff 102 8 Maj 12:21 libocdjtagdrivers.lax
Home:drivers Us$ sudo dtruss "rm -fr .libs/libocdjtagdrivers.lax"
SYSCALL(args) = return
thread_selfid(0x0, 0x1DC0, 0x7FFF6D23E550) = 553497 0
csops(0x0, 0x0, 0x7FFF592D7214) = 0 0
issetugid(0x0, 0x0, 0x0) = 0 0
shared_region_check_np(0x7FFF592D5148, 0x106928000, 0x4) = 0 0
stat64("/usr/lib/dtrace/libdtrace_dyld.dylib\0", 0x7FFF592D62F8, 0x7FFF592D7230) = 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, "\317\372\355\376\a\0", 0x1000, 0x1000) = 4096 0
fcntl(0x3, 0x3D, 0x7FFF592D4660) = 0 0
mmap(0x106932000, 0x2000, 0x5, 0x12, 0x3, 0x1000) = 0x106932000 0
mmap(0x106934000, 0x1000, 0x3, 0x12, 0x3, 0x3000) = 0x106934000 0
mmap(0x106935000, 0x2050, 0x1, 0x12, 0x3, 0x4000) = 0x106935000 0
close(0x3) = 0 0
stat64("/usr/lib/libSystem.B.dylib\0", 0x7FFF592D6118, 0x7FFF592D6FB0) = 0 0
stat64("/usr/lib/system/libcache.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libcommonCrypto.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libcompiler_rt.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libcopyfile.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libcorecrypto.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libdispatch.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libdyld.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libkeymgr.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/liblaunch.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libmacho.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libquarantine.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libremovefile.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libsystem_asl.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libsystem_blocks.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libsystem_c.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libsystem_configuration.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libsystem_dnssd.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libsystem_info.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libsystem_kernel.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libsystem_m.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libsystem_malloc.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libsystem_network.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libsystem_notify.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libsystem_platform.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libsystem_pthread.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libsystem_sandbox.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libsystem_stats.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libunc.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libunwind.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/system/libxpc.dylib\0", 0x7FFF592D5D78, 0x7FFF592D6C10) = 0 0
stat64("/usr/lib/libobjc.A.dylib\0", 0x7FFF592D4FB8, 0x7FFF592D5E50) = 0 0
stat64("/usr/lib/libauto.dylib\0", 0x7FFF592D4FB8, 0x7FFF592D5E50) = 0 0
stat64("/usr/lib/libc++abi.dylib\0", 0x7FFF592D4A68, 0x7FFF592D5900) = 0 0
stat64("/usr/lib/libc++.1.dylib\0", 0x7FFF592D4A68, 0x7FFF592D5900) = 0 0
stat64("/usr/lib/libDiagnosticMessagesClient.dylib\0", 0x7FFF592D4948, 0x7FFF592D57E0) = 0 0
getpid(0x7FFF592D7008, 0x10692D004, 0xEA60) = 90224 0
open("/dev/dtracehelper\0", 0x2, 0x7FFF592D7100) = 3 0
sysctl(0x7FFF592D6AA8, 0x2, 0x7FFF592D6AB8) = 0 0
thread_selfid(0x7FFF76F83310, 0x7FFF76F83258, 0x10101) = 553497 0
bsdthread_register(0x7FFF91A29FBC, 0x7FFF91A29FAC, 0x2000) = 0 0
mprotect(0x10692E000, 0x88, 0x1) = 0 0
mprotect(0x106938000, 0x1000, 0x0) = 0 0
mprotect(0x10694E000, 0x1000, 0x0) = 0 0
mprotect(0x10694F000, 0x1000, 0x0) = 0 0
mprotect(0x106965000, 0x1000, 0x0) = 0 0
mprotect(0x106930000, 0x1000, 0x1) = 0 0
mprotect(0x10692E000, 0x88, 0x3) = 0 0
mprotect(0x10692E000, 0x88, 0x1) = 0 0
issetugid(0x7FFF75F3F480, 0x7FFFFFE00034, 0x7FFFFFE00036) = 0 0
getpid(0x1, 0x106931000, 0x49656E69) = 90224 0mac_syscall(0x7FFF8F801E3F, 0x2, 0x7FFF592D6928) = 0 0
stat64("/AppleInternal\0", 0x7FFF592D69A8, 0x0) = -1 Err#2
audit_session_self(0x7FFF592D6860, 0x7FFF592D6698, 0x4) = 4099 0
geteuid(0x7FFF592D6860, 0x7FFF592D6698, 0x0) = 0 0
getegid(0x7FFF592D6860, 0x7FFF592D6698, 0x0) = 0 0
getaudit_addr(0x7FFF592D6938, 0x30, 0x0) = 0 0
csops(0x16070, 0x7, 0x7FFF592D6520) = 0 0
geteuid(0x7FFF592D7C23, 0x2F, 0x0) = 0 0
ioctl(0x0, 0x4004667A, 0x7FFF592D7AB4) = 0 0
lstat64(".libs/libocdjtagdrivers.lax\0", 0x7FCFD9403B58, 0x0) = 0 0
open_nocancel(".\0", 0x0, 0x0) = 3 0
fchdir(0x3, 0x0, 0x9) = 0 0
open_nocancel(".libs/libocdjtagdrivers.lax\0", 0x1100004, 0x1) = 4 0
__sysctl(0x7FFF592D7078, 0x2, 0x7FFF766E6180) = 0 0
fstatfs64(0x4, 0x7FFF592D70C8, 0x0) = 0 0
fchdir(0x4, 0x10000000100, 0x3) = 0 0
getdirentries64(0x4, 0x7FCFD9801800, 0x1000) = 96 0
lstat64("libocdusbblaster.a\0", 0x7FCFD9403D90, 0x0) = 0 0
getdirentries64(0x4, 0x7FCFD9801800, 0x1000) = 0 0
close_nocancel(0x4) = 0 0
open_nocancel("libocdusbblaster.a\0", 0x1100004, 0x1) = 4 0
fstatfs64(0x4, 0x7FFF592D70C8, 0x0) = 0 0
fchdir(0x4, 0x10000000100, 0x3) = 0 0
getdirentries64(0x4, 0x7FCFD9801800, 0x1000) = 48 0
getdirentries64(0x4, 0x7FCFD9801800, 0x1000) = 0 0
close_nocancel(0x4) = 0 0
chdir("..\0", 0xD9400007, 0x0) = 0 0
rmdir(0x7FCFD9403D78, 0x0, 0x0) = 0 0
fchdir(0x3, 0x0, 0x6) = 0 0
rmdir(0x7FCFD9801200, 0x0, 0xF83E0) = 0 0
fchdir(0x3, 0x1000, 0x7F6800) = 0 0
close_nocancel(0x3) = 0 0
ioctl(0x3, 0x80086804, 0x7FFF592D7088) = 0 0
close(0x3) = 0 0
Home:drivers Us$
Some more info:
I setup lldb to listen for the rm command:
lldb --wait-for -n rm
Attaching to process with:
process attach -n "rm" -w
And then ran the libtool command:
/bin/sh ../../../libtool --tag=CC --mode=link gcc -std=gnu99 -g -O2 -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -o libocdjtagdrivers.la libocdjtagdrivers_la-driver.lo libocdjtagdrivers_la-libusb1_common.lo libocdjtagdrivers_la-usb_common.lo libocdjtagdrivers_la-ftdi.lo libocdjtagdrivers_la-mpsse.lo libocdjtagdrivers_la-usbprog.lo libocdjtagdrivers_la-jlink.lo libocdjtagdrivers_la-rlink.lo libocdjtagdrivers_la-rlink_speed_table.lo libocdjtagdrivers_la-ulink.lo versaloon/usbtoxxx/libocdjtagdrivers_la-usbtogpio.lo versaloon/usbtoxxx/libocdjtagdrivers_la-usbtojtagraw.lo versaloon/usbtoxxx/libocdjtagdrivers_la-usbtoswd.lo versaloon/usbtoxxx/libocdjtagdrivers_la-usbtopwr.lo versaloon/usbtoxxx/libocdjtagdrivers_la-usbtoxxx.lo versaloon/libocdjtagdrivers_la-versaloon.lo libocdjtagdrivers_la-vsllink.lo libocdjtagdrivers_la-arm-jtag-ew.lo libocdjtagdrivers_la-stlink_usb.lo libocdjtagdrivers_la-ti_icdi_usb.lo libocdjtagdrivers_la-osbdm.lo libocdjtagdrivers_la-opendous.lo ../../../src/jtag/drivers/usb_blaster/libocdusbblaster.la
lldb responds with:
error: attach failed: process did not stop (no such process or permission problem?)
(lldb)
I am out of my comfort zone here, as you might have recognized...
error: attach failed: process did not stop (no such process or permission problem?)
Sorry to be spamming, but I found this interesting:
When I remove my sudo privileges ("sudo -k" makes them timeout at once) I get two more lines in the output from the failing libtool command:
libtool: link: rm -fr .libs/libocdjtagdrivers.lax
rm: .libs/libocdjtagdrivers.lax/libocdusbblaster.a: Permission denied
rm: .libs/libocdjtagdrivers.lax: Directory not empty
The full output is:
/bin/sh ../../../libtool --tag=CC --mode=link gcc -std=gnu99 -g -O2 -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -o libocdjtagdrivers.la libocdjtagdrivers_la-driver.lo libocdjtagdrivers_la-libusb1_common.lo libocdjtagdrivers_la-usb_common.lo libocdjtagdrivers_la-ftdi.lo libocdjtagdrivers_la-mpsse.lo libocdjtagdrivers_la-usbprog.lo libocdjtagdrivers_la-jlink.lo libocdjtagdrivers_la-rlink.lo libocdjtagdrivers_la-rlink_speed_table.lo libocdjtagdrivers_la-ulink.lo versaloon/usbtoxxx/libocdjtagdrivers_la-usbtogpio.lo versaloon/usbtoxxx/libocdjtagdrivers_la-usbtojtagraw.lo versaloon/usbtoxxx/libocdjtagdrivers_la-usbtoswd.lo versaloon/usbtoxxx/libocdjtagdrivers_la-usbtopwr.lo versaloon/usbtoxxx/libocdjtagdrivers_la-usbtoxxx.lo versaloon/libocdjtagdrivers_la-versaloon.lo libocdjtagdrivers_la-vsllink.lo libocdjtagdrivers_la-arm-jtag-ew.lo libocdjtagdrivers_la-stlink_usb.lo libocdjtagdrivers_la-ti_icdi_usb.lo libocdjtagdrivers_la-osbdm.lo libocdjtagdrivers_la-opendous.lo ../../../src/jtag/drivers/usb_blaster/libocdusbblaster.la
libtool: link: rm -fr .libs/libocdjtagdrivers.lax
rm: .libs/libocdjtagdrivers.lax/libocdusbblaster.a: Permission denied
rm: .libs/libocdjtagdrivers.lax: Directory not empty
It seems like a permission issue.
Last edit: n321203 2014-05-08
That would suggest somewhere during the build earlier you're using sudo, right? I recommend removing the build directory completely, and then retry configure and make without using sudo anywhere.
Yes, tried using sudo after first fail... I removed the directory, unzipped the source code again and ran "./configure; make; make install" but it gets stucked at the same point...
On Thu, May 08, 2014 at 12:00:17PM +0000, n321203 wrote:
I guess I can try to help if you let me login remotely, here's my key:
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvhYaBFPaYnHTYWrJCkMUTjNgYLsBAAVPSc+9D73VNv0HV4izmWOjSMamQWKVwW/s7ST3KVo3vXrV5zpbb+CTn6FK1YZSN7xj9se+jF6B71FC1x5pumEKE3v1jOdbJrcWTSc32bdHB5XBw3ni3YWhdFcDMD1zSnKbStfslcQqSiX3hY7N+Gzwa56wzpE/JjEpkI4hS3j7sWDy0klrIqJ+VXUJbrj8iFBtzos3r1Su+3xCL2Xo6KHyzoITf2B3MUeLfIJhPZA0LzRnWmCgbXBydCxUYsHTTF4yQvEq4FWcawjIbvmaJmgQ7ILBytnKEVDUzF5H/cHMNLBYQ41WSYVDrw== pavel@laptop
--
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav@gmail.com
Solved it - it wasn't related to the rm command.
I ran the libtool command with --debug option (Doh!), which showed that the process stopped at the command "lipo -info" which tries to figure out what architectures to build for.
This conversation is related to a similar issue: Lipo is not working in combinations of OS X 10.9.2 and XCode:
http://stackoverflow.com/questions/19814946/xcode-4-mavericks-creating-universal-binary-for-osx-hangs
So I replaced /usr/bin/lipo, now it works fine.
Last edit: n321203 2014-05-08
Thank you for the report and the resolution. I've sent http://openocd.zylin.com/2128 to improve OS X instructions.