Dual ISO with Mac El-Capitan

Started by EFwebb, November 30, 2015, 09:51:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

EFwebb

I have read some previous posts on this topic, but it all seemed like a foreign language to me and I am wondering if anyone can help me.  I had dual ISO processing set up on my computer and then made the mistake of updating to El-Capitan and my batch mode dual iso convertor no longer works.  Whenever I try to drag a folder over the cr2hdr icon I get the message sj: draw: comment not found sh: exiftool: command not found sh draw: command not found Error: draw is not a valid PGM.  it seems to me that the program no longer recognizes the directories where the executables are stored.  So I modified my .bash_profile to show that path length and it still does not recognize where the executable is.  I would have tried to do the same thing with exiftool, but to be honest I used the installer to install that and I am not sure what directory it is in.  Has anybody else been able to solve this problem, and if so can you give me some instructions on how to fix this?

Danne

One way of dealing with El Capitan is to disable SIP (System integrity protection)

Do this at own risk!

1. Restart the computer, while booting hold down Command-R to boot into recovery mode.
2. Once booted, navigate to the "Utilities > Terminal" in the top menu bar.
3. Enter csrutil disable in the terminal window and hit the return key.
4. Restart the machine and System Integrity Protection will now be disabled.
5. To enable SIP again go back into recovery mode and this time type csrutil enable in the terminal.

Before reenabling SIP (Step 5) You want to place cr2hdr in usr/bin folder. You can go to this folder like this.
1 - Press cmd + shift + g
2 - in the "go to the folder" window write /usr/bin and hit enter
3 - move cr2hdr, dcraw and exiftool to /usr/bin folder
You might wanna do a package install of exiftool to get the lib folder installed. Google exiftool mac and you should be good to go.

now you can reenable SIP (Step 5)

dfort

The El Capitan upgrade puts programs that were installed in /usr/bin and /bin into a quarantine directory. You can move cr2hdr, dcraw, exiftool (and the lib directory that goes with exiftool) to /usr/local/bin and it should work.

Macintosh HD > Library > SystemMigration > History > Migration-UUID > QuarantineRoot

http://www.macissues.com/2015/10/06/how-to-see-software-disabled-by-os-x-10-11-el-capitan/

Danne

That is /usr/local/bin is really there :D. Otherwise you,re in for the SIP treat.

EFwebb

So I migrated everything from the QuarantineRoot directory to usr/local/bin and it still fails with the same warning.  Do I need to set some path lengths in my .bash_profile or is something else causing the problem?

EFwebb

It seems to me that the code is working fine but does not know which directory to look for the exif and dcraw executables in.  If this is correct shouldn't I just recreate the exact directory it was in before instead of placing it in usr/local/bin?

Danne

If you have exiftool and it,s lib folder and dcraw and cr2hdr in usr/local/bin it should work. ANy of these files you missed?

dfort

Open the terminal and type "which dcraw exiftool" and it should give you the paths. If it returns nothing, type "echo $PATH" and report back.

EFwebb

I have visually checked by opening the usr/local/bin directory chain and seeing the executables and manually verified by doing a "which" command in terminal.  Both exiftool and draw are in the directory usr/local/bin.  The lib directory required for exiftool is also in the usr/local/bin directory.  The error message

Input file : B01_4486.CR2
sh: dcraw: command not found sh: exiftool: command not found sh: dcraw: command not found Error: dcraw output is not a valid PGM file Logfile    : B01_4486.txt

THE END

still shows up when I try to drop a .CR2 file in the executable icon.

EFwebb

I think the executable is hard wired to look in the directory "usr/bin" and is not looking in "usr/local/bin", although I could be wrong.

DeafEyeJedi

@EFwebb-

Have you tried installing @Danne's latest cr2hdr-r (after you finished the SIP part) and let it install the required binaries in there for you automatically?

5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

dfort

Did you try "echo $PATH" to make sure /usr/local/bin is in your path? Have you tried launching dcraw and/or exiftool from the terminal? (They will give a short help message if you don't supply any arguments)

So you are running cr2hdr by dragging and dropping on the icon? I didn't know you could do that on the Mac version. Try putting cr2hdr in /usr/local/bin and in the terminal type "cr2hdr" then drag and drop your file (dual iso cr2 or dng) into the terminal window. It will put in the path to your file in the terminal so you save on some typing. Then hit return and it should work.

EFwebb

There is one step missing in the SIP process.  Once I hold down command-R, the computer does not automatically boot into safe mode.  Instead I am given the choice of restore from time machine backup, reinstall OS X, Get help online or Disk Utility.  Which of these should I select?

EFwebb

Never mind, I see how to access the utility menu now.  To answer the other question, yes, my path variable does include /usr/local/bin and the executables in /usr/local/bin work just fine.  However, disabling the SIP and moving the executables and lib directory to /usr/bin and then re-enabling the SIP fixed the problem and I am now able to convert dual iso .cr2 files to .dng files.  Thank you for your assistance, I greatly appreciate it!

dfort

@EFwebb Could you please explain your workflow in a bit more detail?

The reason I'm curious is because I tried dragging and dropping a dual_iso dng on the cr2hdr icon and nothing happens. If I double click on the cr2hdr icon it will open the terminal, give a quick help and close the terminal session. The only way I know how to run cr2hdr on the Mac is from the terminal. In addition, I've got dcraw and exiftool installed in /usr/local/bin and everything is working fine, no need to work around the El Capitan System Integrity Protection system.

Of course if cr2hdr is being launched by another program then maybe cr2hdr cannot find dcraw and exiftool unless they are installed in /usr/bin.

Danne

@EFwebb. How are you using cr2hdr? Either you find what is missing or I think you could change the exportpath.

dfort

Quote from: Danne on December 02, 2015, 07:12:00 PM
MLPP works as stand alone. You showed me the path fix yourself :). Same as in  kichetofs lightroom plugin?

Yes, I worded it improperly--edited my last post.

I'm trying to figure out what EFwebb is doing because cr2hdr is working fine for me with dcraw and exiftool in /usr/local/bin. Maybe he made a "droplet" script or whatever you call it so that it launches cr2hdr via drag and drop? It seems that with El Capitan command line programs use the system path but "regular" programs don't.

kichetof

Could you run ls -l /usr/local/bin and see if you have r-x or rwx, if you don't have x, do that:

Maybe a permission error, try to make bin executable:

chmod +x /usr/local/bin/dcraw

Do the same for exiftool

dfort

EFwebb reported that the same binary worked in /usr/bin but not in /usr/local/bin so it doesn't seem to be a permissions issue.

I'm not sure that it is a good idea to have users disable SIP. The only exception might be to create the /usr/local directory.

nickmford

I've been following this thread and done quite a bit of testing, but I haven't reached a solution disabling SIP and making sure I have cr2hdr, dcraw and exiftool (with its /lib) in the usr/local/bin and usr/bin

The earlier errors are gone, but I'm now left with the following

Input file      : /Users/nicholasmarshall/Desktop/M09-1558_C0000/M09-1558_C0000_00176.dng
dyld: Library not loaded: /usr/local/opt/jasper/lib/libjasper.1.dylib
  Referenced from: /usr/local/bin/dcraw
  Reason: image not found
Camera          : Canon EOS 5D Mark III
Camera model    : Canon EOS 5D Mark III
dcraw could not open this file

I've searched for any reference of this error and couldn't find a solution in the threads.  Anyone have any ideas?

DeafEyeJedi

5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

dmilligan

Quote from: nickmford on January 10, 2016, 07:58:55 AM
dyld: Library not loaded: /usr/local/opt/jasper/lib/libjasper.1.dylib
  Referenced from: /usr/local/bin/dcraw
This means that dcraw can't load a dependency, which means it's not installed properly. I would recommend reinstalling it. If you're using a good package manager like homebrew (and you should be), then this would be as simple as:

brew install dcraw


homebrew already knows how to deal with el-capitan and SIP properly

nickmford

@ dmilligan: Thank You. Worked like a charm after reinstalled dcraw.

bench

After some googling, I found a way to fix this issue without disabling SIP. 8)
https://forums.adobe.com/thread/1969031?start=0&tstart=0

  • Go to plugin folder -> right click cr2hdr plugin-> show package content
  • Use a text editor to open MLProcess.lua
  • Search for "LrTasks.execute", you will find 3 matching results
  • On the line before the first result(around line 437), insert
cmd = 'export PATH="'..LrPathUtils.child(_PLUGIN.path, 'bin"')..':${PATH} && '..cmd

  • On the lines before the second(around line 485) and third result(around line 506), insert
command = 'export PATH="'..LrPathUtils.child(_PLUGIN.path, 'bin"')..':${PATH} && '..command

The problem is Lightroom only looks for applications in /usr/bin for its plugins. These changes add the other system paths as well as the plugin folder to the search list.
Dcraw and exiftool were actually came with the plugin in, so the lightroom plugin may actually runs without installing dcraw and exiftool separately. Otherwise just use homebrew to install them.
I won't recommend disabling SIP just for this plugin. SIP protects your computer 8)

Danne

export path change has already been implemented to the lightroom plugin. Same goes for MLP. Old versions floating around it seems.