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

Error Installing CMTK #4

Closed
tpisano opened this issue Apr 13, 2015 · 33 comments
Closed

Error Installing CMTK #4

tpisano opened this issue Apr 13, 2015 · 33 comments
Labels

Comments

@tpisano
Copy link

tpisano commented Apr 13, 2015

Hi,
I am quite a novice when it comes to scripting, so this could be a simple fix. However, after following the instructions (twice) on the README, I get the same errors from the FIJI log on the "Install CMTK" Step. See log below.
Thanks!
'''
/Applications/Fiji.app/bin/cmtk
Downloading CMTK-3.2.3-MacOSX-10.6-x86_64.tar.gz from url http://www.nitrc.org/frs/download.php/7365/CMTK-3.2.3-MacOSX-10.6-x86_64.tar.gz/?i_agree=1&download_now=1 to /Applications/Fiji.app/bin/cmtk
Downloading http://www.nitrc.org/frs/download.php/7365/CMTK-3.2.3-MacOSX-10.6-x86_64.tar.gz/?i_agree=1&download_now=1 to /var/folders/_m/5v483npn77j5_dwflsbylfk80000gp/T/tmppvyhQxCMTK-3.2.3-MacOSX-10.6-x86_64.tar.gz
Download size should be 60027277
Downloaded file has size 60027277
Extracting tar file
Installing binaries to /Applications/Fiji.app/bin/cmtk
Traceback (most recent call last):
File "/Applications/Fiji.app/plugins/CMTK_Registration/Install_CMTK.py", line 76, in
cmtkgui.download_and_untar_url(download_url,cmtkgui.install_dir(),untar_binaries,download_file)
File "pyclasspath/cmtkgui$py.class", line 317, in download_and_untar_url
File "/Applications/Fiji.app/plugins/CMTK_Registration/Install_CMTK.py", line 50, in untar_binaries
shutil.move(frompath,target_dir)
File "/Applications/Fiji.app/jars/jython-shaded-2.5.3.jar/Lib/shutil.py", line 205, in move
File "/Applications/Fiji.app/jars/jython-shaded-2.5.3.jar/Lib/shutil.py", line 97, in copy2
File "/Applications/Fiji.app/jars/jython-shaded-2.5.3.jar/Lib/shutil.py", line 74, in copystat
OSError: [Errno 20000] Unknown error: 20000: u'/Applications/Fiji.app/bin/cmtk/cmtk'

'''

@jefferis jefferis added the bug label Apr 14, 2015
@jefferis
Copy link
Owner

Hi @tpisano,

Thanks for your bug report. It seems that the problem comes from a bug in jython that is present in the rather out of date jython 2.5.3 distributed with Fiji

http://bugs.jython.org/issue1885

There are a few options

  1. Updating Fiji's jython (for example by adding the IMCF Uni Basel update site, see http://fiji.sc/List_of_update_sites for details)
  2. Using the registration gui without actually installing CMTK from Fiji
    1. Installing CMTK manually by going to https://www.nitrc.org/projects/cmtk/ (you may find the CMTK-3.2.2-MacOSX-10.6-x86_64.dmg file easy to install and CMTK 3.2.3 almost certainly doesn't have any relevant changes for you).
    2. editing the scripts that are generated as described below
  3. I figure out some other workaround.

Sorry for the inconvenience!

Best,

Greg.

Editing generated scripts

#!/bin/sh
# 2012-08-29_11.06.04
cd "/GD/projects/PN2/warpbench"
"/Applications/Fiji.app/bin/cmtk/munger" -b "/Applications/Fiji.app/bin/cmtk" -a -w -r 010203  -X 26 -C 8 -G 80 -R 4 -A '--accuracy 0.4' -W '--accuracy 0.4'  -T 4 -s "images/TKC1RLH_raw01.nrrd" images
#!/bin/sh
# 2012-08-29_11.06.04
cd "/GD/projects/PN2/warpbench"
# make sure default cmtk install location on macosx is in path
PATH="/opt/local/bin/:$PATH"
munger -a -w -r 010203  -X 26 -C 8 -G 80 -R 4 -A '--accuracy 0.4' -W '--accuracy 0.4'  -T 4 -s "images/TKC1RLH_raw01.nrrd" images

@jefferis
Copy link
Owner

PS Just to add that I have tested option 1. above (enabling the IMCF Uni Basel update site) and I recommend it as the easiest solution for the time being. Full details of how to do this here: http://fiji.sc/How_to_follow_a_3rd_party_update_site. Best wishes, Greg.

@jefferis
Copy link
Owner

for reference Jython 2.5.3 is current production version even if it appears to contain "many bugs which have been fixed in 2.5.4rc1"

@jefferis
Copy link
Owner

Hi @tpisano,

I have now commited a fix for this issue (in commit 97986f2). I would be grateful if you could try updating the CMTK gui code (either from within Fiji or reinstalling as per the README) and see if it works for you. Note that this does not require either of the workarounds described above (i.e. it works with the stock jython distributed with Fiji).

Thanks,

Greg Jefferis.

@tpisano
Copy link
Author

tpisano commented Apr 19, 2015

Hi Greg,
Sorry for the delay had a few things going on in lab. I have updated the
GUI and it works on a mac as of now. I will confirm on a PC shortly. Thanks
for the rapid response, I really appreciate it---the GUI is really nice for
folks like me who aren't as tech savy!
Best,
Tom

On Thu, Apr 16, 2015 at 11:20 AM, Gregory Jefferis <notifications@github.com

wrote:

Hi @tpisano https://github.com/tpisano,

I have now commited a fix for this issue (in commit 97986f2
97986f2).
I would be grateful if you could try updating the CMTK gui code (either
from within Fiji or reinstalling as per the README) and see if it works for
you. Thanks,

Greg Jefferis.


Reply to this email directly or view it on GitHub
#4 (comment)
.

Tom Pisano
tpisano@princeton.edu
MD/PhD Candidate
Rutgers-Robert Wood Johnson Medical School-Princeton University
MD/PhD Program

@jefferis
Copy link
Owner

Hi @tpisano,

Sorry for the delay had a few things going on in lab. I have updated the
GUI and it works on a mac as of now. I will confirm on a PC shortly. Thanks
for the rapid response, I really appreciate it---the GUI is really nice for
folks like me who aren't as tech savy!

Glad to hear that worked for you. If you look on the front page, you'll see there is now a new update mechanism, which should in theory simplify installation/updates. If you have the chance I would be grateful for feedback/testing.

@tpisano
Copy link
Author

tpisano commented May 6, 2015

Hi @jefferis,
I haven't had a chance to troubleshoot yet, but this is the error I get
when following your instructions and installing on a PC. I will let you
know if I figure this out.

Traceback (most recent call last):
File
"C:\Users\tpisano\Fiji\Fiji.app\plugins\CMTK_Registration\Install_CMTK.py",
line 77, in

cmtkgui.download_and_untar_url(download_url,cmtkgui.install_dir(),untar_binaries,download_file)
File "pyclasspath/cmtkgui$py.class", line 370, in
download_and_untar_url
File
"C:\Users\tpisano\Fiji\Fiji.app\jars\jython-shaded-2.7-b1.jar\Lib\tempfile.py",
line 415, in close
OSError: unlink(): an unknown error
occurredc:\users\tpisano\appdata\local\temp\tmpr91hsfCMTK-3.2.3-CYGWIN-x86_64.tar.gz

On Mon, Apr 20, 2015 at 7:55 PM, Gregory Jefferis notifications@github.com
wrote:

Hi @tpisano https://github.com/tpisano,

Sorry for the delay had a few things going on in lab. I have updated the
GUI and it works on a mac as of now. I will confirm on a PC shortly. Thanks
for the rapid response, I really appreciate it---the GUI is really nice for
folks like me who aren't as tech savy!

Glad to hear that worked for you. If you look on the front page, you'll
see there is now a new update mechanism, which should in theory simplify
installation/updates. If you have the chance I would be grateful for
feedback/testing.


Reply to this email directly or view it on GitHub
#4 (comment)
.

Tom Pisano
tpisano@princeton.edu
MD/PhD Candidate
Rutgers-Robert Wood Johnson Medical School-Princeton University
MD/PhD Program

@jefferis
Copy link
Owner

jefferis commented May 6, 2015

Hi Tristan,

I have no experience on Windows, although if you have a cygwin environment it should definitely be possible to get it to work.

On 6 May 2015, at 15:22, tpisano notifications@github.com wrote:

OSError: unlink(): an unknown error
occurredc:\users\tpisano\appdata\local\temp\tmpr91hsfCMTK-3.2.3-CYGWIN-x86_64.tar.gz

Thanks for any debugging you can do. Looks like there is a problem removing the temporary file (which should only happen at the end of the install process). Do you think the files have actually been installed? is the temp file still there?

Gregory Jefferis, PhD
Division of Neurobiology
MRC Laboratory of Molecular Biology
Francis Crick Avenue
Cambridge Biomedical Campus
Cambridge, CB2 OQH, UK

http://www2.mrc-lmb.cam.ac.uk/group-leaders/h-to-m/g-jefferis
http://jefferislab.org
http://flybrain.stanford.edu

jefferis added a commit that referenced this issue May 19, 2015
* this is misbehaving on Windows (see #12 and also discussion in #4)
* for the time being easiest just to keep going if we fail to delete temp file
@danustc
Copy link

danustc commented Oct 17, 2016

Hi @jefferis ,

I tried to install CMTK on my FIJI following the instruction on: https://github.com/jefferis/fiji-cmtk-gui.
However, when I check the folder Fiji.app/bin/cmtk, there was nothing. I updated/restarted my FIJI and tried different versions of CMTK but the installation still fails. Could you suggest some way to fix it? Thanks!

@jakob-tu
Copy link

Hi Gregory,

I have installed CMTK in Fiji and run it on an iMac 15,1 with OS 10.11.6.

I then get a file named "munger_2016-10-25_14.50.29.command".

When I open this file I get the following message in "Terminal":

dhcp229:~ Jakob$ /Volumes/RAID\ 24\ GB/CMTK/commands/munger_2016-10-25_14.50.29.command ; exit;
Can't locate IO/Compress/Gzip.pm in @inc (@inc contains: /opt/local/lib/perl5/5.8.9/darwin-2level /opt/local/lib/perl5/5.8.9 /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level /opt/local/lib/perl5/site_perl/5.8.9 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl/5.8.9/darwin-2level /opt/local/lib/perl5/vendor_perl/5.8.9 /opt/local/lib/perl5/vendor_perl .) at /Applications/Fiji.app/bin/cmtk/munger line 47.
BEGIN failed--compilation aborted at /Applications/Fiji.app/bin/cmtk/munger line 47.
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Prozess beendet]

Appararently, there appears to be a problem with "Can't locate IO/Compress/Gzip.pm in @inc".

What should I do? Can you help?

Thanks a lot!

Jakob

@jefferis
Copy link
Owner

It seems a perl module is missing on your system. This is the module

http://search.cpan.org/~pmqs/IO-Compress-2.069/lib/IO/Compress/Gzip.pm

I think you need to run the cpan command line tool (see e.g. http://www.livejournal.com/doc/server/lj.install.perl_setup.modules.html)

install IO::Compress

More generally I think it might be that there is a more modern alternative to that module which would be installed on macosx 10.11

@jakob-tu
Copy link

Thank you so much for your prompt response Gregory!

I will try to install the missing module.

Cheers,
Jakob

@jakob-tu
Copy link

jakob-tu commented Oct 25, 2016

Followed the installation process as described on http://www.livejournal.com/doc/server/lj.install.perl_setup.modules.html using cpan.


cpan[3]> reload cpan
(CPAN.......................................v2.14)(CPAN::Author..........v5.5002)(CPAN::CacheMgr.........v5.5002)(CPAN::Complete......v5.5001)(CPAN::Debug.v5.5001)(CPAN::DeferredCode.v5.50)(CPAN::Distribution....................................................................................v2.12)(CPAN::Distroprefs..................................................v6.0001)(CPAN::Distrostatus......v5.5)(CPAN::Exception::RecursiveDependency..v5.5)(CPAN::Exception::yaml_not_installed..v5.5)(CPAN::FirstTime.............................v5.5309)(CPAN::FTP..................v5.5007)(CPAN::FTP::netrc.....v1.01)(CPAN::HandleConfig.....................v5.5007)(CPAN::Index...........v2.12)(CPAN::InfoObj..........v5.5)(CPAN::LWP::UserAgent....v1.9601)(CPAN::Module......................................v5.5002)(CPAN::Prompt..v5.5)(CPAN::Queue.............v5.5002)(CPAN::Shell.................................................................v5.5006)(CPAN::Tarzip...........v5.5011)(CPAN::Version........v5.5001)
445 subroutines redefined

cpan shell -- CPAN exploration and modules installation (v2.14)
Enter 'h' for help.

cpan[4]> install IO::Compress
Warning: Cannot install IO::Compress, don't know what it is.

Try the command

i /IO::Compress/

to find objects with matching identifiers.

cpan[5]> install Compress::Zlib
Compress::Zlib is up to date (2.069).

cpan[6]>

Unfortunately, however, "install IO::Compress " failed (see above).

And still same error when running "munger_2016-10-25_13.53.39.command"


Last login: Tue Oct 25 17:13:37 on ttys000
You have mail.
dhcp229:~ Jakob$ /Volumes/RAID\ 24\ GB/CMTK/commands/munger_2016-10-25_13.53.39.command ; exit;
Can't locate IO/Compress/Gzip.pm in @inc (@inc contains: /opt/local/lib/perl5/5.8.9/darwin-2level /opt/local/lib/perl5/5.8.9 /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level /opt/local/lib/perl5/site_perl/5.8.9 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl/5.8.9/darwin-2level /opt/local/lib/perl5/vendor_perl/5.8.9 /opt/local/lib/perl5/vendor_perl .) at /Applications/Fiji.app/bin/cmtk/munger line 47.
BEGIN failed--compilation aborted at /Applications/Fiji.app/bin/cmtk/munger line 47.
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Prozess beendet]

Not sure, how to proceed?

Cheers,
Jakob

@jakob-tu
Copy link

jakob-tu commented Oct 25, 2016

Sorry, overlooked this, used i /IO::Compress/


cpan[6]> i /IO::Compress/
Bundle Bundle::IO::Compress::Bzip2 (PMQS/Bundle-IO-Compress-Bzip2-2.069.tar.gz)
Module < Bio::Gonzales::Util::IO::Compressed (JWB/Bio-Gonzales-0.062.tar.gz)
Module < CAD::Drawing::IO::Compressed (EWILHELM/CAD-Drawing-0.26.tar.gz)
Module = IO::Compress::Adapter::Bzip2 (PMQS/IO-Compress-2.069.tar.gz)
Module = IO::Compress::Adapter::Deflate (PMQS/IO-Compress-2.069.tar.gz)
Module = IO::Compress::Adapter::Identity (PMQS/IO-Compress-2.069.tar.gz)
Module < IO::Compress::Adapter::LZO (PMQS/IO-Compress-Lzop-2.069.tar.gz)
Module < IO::Compress::Adapter::Lzf (PMQS/IO-Compress-Lzf-2.069.tar.gz)
Module < IO::Compress::Adapter::Lzma (PMQS/IO-Compress-Lzma-2.069.tar.gz)
Module < IO::Compress::Adapter::Xz (PMQS/IO-Compress-Lzma-2.069.tar.gz)
Module = IO::Compress::Base (PMQS/IO-Compress-2.069.tar.gz)
Module = IO::Compress::Base::Common (PMQS/IO-Compress-2.069.tar.gz)
Module < IO::Compress::Brotli (MGV/IO-Compress-Brotli-0.002001.tar.gz)
Module = IO::Compress::Bzip2 (PMQS/IO-Compress-2.069.tar.gz)
Module = IO::Compress::Deflate (PMQS/IO-Compress-2.069.tar.gz)
Module = IO::Compress::Gzip (PMQS/IO-Compress-2.069.tar.gz)
Module = IO::Compress::Gzip::Constants (PMQS/IO-Compress-2.069.tar.gz)
Module < IO::Compress::Lzf (PMQS/IO-Compress-Lzf-2.069.tar.gz)
Module < IO::Compress::Lzma (PMQS/IO-Compress-Lzma-2.069.tar.gz)
Module < IO::Compress::Lzop (PMQS/IO-Compress-Lzop-2.069.tar.gz)
Module < IO::Compress::Lzop::Constants (PMQS/IO-Compress-Lzop-2.069.tar.gz)
Module = IO::Compress::RawDeflate (PMQS/IO-Compress-2.069.tar.gz)
Module < IO::Compress::Xz (PMQS/IO-Compress-Lzma-2.069.tar.gz)
Module = IO::Compress::Zip (PMQS/IO-Compress-2.069.tar.gz)
Module = IO::Compress::Zip::Constants (PMQS/IO-Compress-2.069.tar.gz)
Module = IO::Compress::Zlib::Constants (PMQS/IO-Compress-2.069.tar.gz)
Module = IO::Compress::Zlib::Extra (PMQS/IO-Compress-2.069.tar.gz)

27 items found

Still, does not work

@jefferis
Copy link
Owner

I think

install PMQS/IO-Compress-2.069.tar.gz

should be what is required but I had trouble getting it to behave on my system.

@jakob-tu
Copy link

cpan[35]> install IO::Compress::Gzip
IO::Compress::Gzip is up to date (2.069).

cpan[36]> whereis gzip
Refusing to autoload 'whereis' 'gzip' in recursion

@jakob-tu
Copy link

cpan[37]> install PMQS/IO-Compress-2.069.tar.gz
Checksum for /var/root/.cpan/sources/authors/id/P/PM/PMQS/IO-Compress-2.069.tar.gz ok
Configuring P/PM/PMQS/IO-Compress-2.069.tar.gz with Makefile.PL
Up/Downgrade not needed.
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for IO::Compress
Writing MYMETA.yml and MYMETA.json
PMQS/IO-Compress-2.069.tar.gz
/usr/bin/perl Makefile.PL -- OK
Running make for P/PM/PMQS/IO-Compress-2.069.tar.gz
cp lib/IO/Compress/FAQ.pod blib/lib/IO/Compress/FAQ.pod
cp lib/IO/Uncompress/Unzip.pm blib/lib/IO/Uncompress/Unzip.pm
cp lib/IO/Uncompress/Adapter/Identity.pm blib/lib/IO/Uncompress/Adapter/Identity.pm
cp lib/IO/Uncompress/Base.pm blib/lib/IO/Uncompress/Base.pm
cp lib/IO/Compress/Base.pm blib/lib/IO/Compress/Base.pm
cp lib/File/GlobMapper.pm blib/lib/File/GlobMapper.pm
cp lib/IO/Uncompress/Adapter/Inflate.pm blib/lib/IO/Uncompress/Adapter/Inflate.pm
cp lib/IO/Compress/Zlib/Extra.pm blib/lib/IO/Compress/Zlib/Extra.pm
cp lib/IO/Compress/Zip/Constants.pm blib/lib/IO/Compress/Zip/Constants.pm
cp lib/IO/Compress/Gzip/Constants.pm blib/lib/IO/Compress/Gzip/Constants.pm
cp lib/IO/Compress/Adapter/Deflate.pm blib/lib/IO/Compress/Adapter/Deflate.pm
cp lib/IO/Uncompress/AnyInflate.pm blib/lib/IO/Uncompress/AnyInflate.pm
cp lib/Compress/Zlib.pm blib/lib/Compress/Zlib.pm
cp lib/IO/Compress/Adapter/Identity.pm blib/lib/IO/Compress/Adapter/Identity.pm
cp lib/IO/Compress/Gzip.pm blib/lib/IO/Compress/Gzip.pm
cp lib/IO/Compress/Zlib/Constants.pm blib/lib/IO/Compress/Zlib/Constants.pm
cp lib/IO/Compress/Deflate.pm blib/lib/IO/Compress/Deflate.pm
cp lib/IO/Uncompress/Gunzip.pm blib/lib/IO/Uncompress/Gunzip.pm
cp lib/IO/Uncompress/Bunzip2.pm blib/lib/IO/Uncompress/Bunzip2.pm
cp lib/IO/Uncompress/Adapter/Bunzip2.pm blib/lib/IO/Uncompress/Adapter/Bunzip2.pm
cp lib/IO/Compress/Zip.pm blib/lib/IO/Compress/Zip.pm
cp lib/IO/Compress/Bzip2.pm blib/lib/IO/Compress/Bzip2.pm
cp lib/IO/Compress/RawDeflate.pm blib/lib/IO/Compress/RawDeflate.pm
cp lib/IO/Uncompress/RawInflate.pm blib/lib/IO/Uncompress/RawInflate.pm
cp lib/IO/Compress/Base/Common.pm blib/lib/IO/Compress/Base/Common.pm
cp lib/IO/Uncompress/Inflate.pm blib/lib/IO/Uncompress/Inflate.pm
cp lib/IO/Uncompress/AnyUncompress.pm blib/lib/IO/Uncompress/AnyUncompress.pm
cp lib/IO/Compress/Adapter/Bzip2.pm blib/lib/IO/Compress/Adapter/Bzip2.pm
cp bin/zipdetails blib/script/zipdetails
"/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/zipdetails
Manifying 1 pod document
Manifying 17 pod documents
PMQS/IO-Compress-2.069.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/.t
t/000prereq.t ................... ok
t/001bzip2.t .................... ok
t/001zlib-generic-deflate.t ..... ok
t/001zlib-generic-gzip.t ........ ok
t/001zlib-generic-rawdeflate.t .. ok
t/001zlib-generic-zip.t ......... ok
t/002any-deflate.t .............. ok
t/002any-gzip.t ................. ok
t/002any-rawdeflate.t ........... ok
t/002any-transparent.t .......... ok
t/002any-zip.t .................. ok
t/004gziphdr.t .................. ok
t/005defhdr.t ................... ok
t/006zip.t ...................... ok
t/010examples-bzip2.t ........... ok
t/010examples-zlib.t ............ ok
t/01misc.t ...................... ok
t/020isize.t .................... skipped: Lengthy Tests Disabled
t/050interop-gzip.t ............. ok
t/100generic-bzip2.t ............ ok
t/100generic-deflate.t .......... ok
t/100generic-gzip.t ............. ok
t/100generic-rawdeflate.t ....... ok
t/100generic-zip.t .............. ok
t/101truncate-bzip2.t ........... skipped: Lengthy Tests Disabled
t/101truncate-deflate.t ......... skipped: Lengthy Tests Disabled
t/101truncate-gzip.t ............ skipped: Lengthy Tests Disabled
t/101truncate-rawdeflate.t ...... skipped: Lengthy Tests Disabled
t/101truncate-zip.t ............. skipped: Lengthy Tests Disabled
t/102tied-bzip2.t ............... ok
t/102tied-deflate.t ............. ok
t/102tied-gzip.t ................ ok
t/102tied-rawdeflate.t .......... ok
t/102tied-zip.t ................. ok
t/103newtied-bzip2.t ............ ok
t/103newtied-deflate.t .......... ok
t/103newtied-gzip.t ............. ok
t/103newtied-rawdeflate.t ....... ok
t/103newtied-zip.t .............. ok
t/104destroy-bzip2.t ............ ok
t/104destroy-deflate.t .......... ok
t/104destroy-gzip.t ............. ok
t/104destroy-rawdeflate.t ....... ok
t/104destroy-zip.t .............. ok
t/105oneshot-bzip2.t ............ ok
t/105oneshot-deflate.t .......... ok
t/105oneshot-gzip-only.t ........ ok
t/105oneshot-gzip.t ............. ok
t/105oneshot-rawdeflate.t ....... ok
t/105oneshot-zip-bzip2-only.t ... ok
t/105oneshot-zip-only.t ......... ok
t/105oneshot-zip-store-only.t ... skipped: Lengthy Tests Disabled
t/105oneshot-zip.t .............. ok
t/106prime-bzip2.t .............. skipped: Lengthy Tests Disabled
t/106prime-deflate.t ............ skipped: Lengthy Tests Disabled
t/106prime-gzip.t ............... skipped: Lengthy Tests Disabled
t/106prime-rawdeflate.t ......... skipped: Lengthy Tests Disabled
t/106prime-zip.t ................ skipped: Lengthy Tests Disabled
t/107multi-bzip2.t .............. ok
t/107multi-deflate.t ............ ok
t/107multi-gzip.t ............... ok
t/107multi-rawdeflate.t ......... ok
t/107multi-zip.t ................ ok
t/108anyunc-bzip2.t ............. ok
t/108anyunc-deflate.t ........... ok
t/108anyunc-gzip.t .............. ok
t/108anyunc-rawdeflate.t ........ ok
t/108anyunc-transparent.t ....... ok
t/108anyunc-zip.t ............... ok
t/109merge-deflate.t ............ ok
t/109merge-gzip.t ............... ok
t/109merge-rawdeflate.t ......... ok
t/109merge-zip.t ................ skipped: not implemented yet
t/110encode-bzip2.t ............. ok
t/110encode-deflate.t ........... ok
t/110encode-gzip.t .............. ok
t/110encode-rawdeflate.t ........ ok
t/110encode-zip.t ............... ok
t/111const-deflate.t ............ ok
t/999pod.t ...................... ok
t/cz-01version.t ................ ok
t/cz-03zlib-v1.t ................ ok
t/cz-05examples.t ............... ok
t/cz-06gzsetp.t ................. ok
t/cz-08encoding.t ............... ok
t/cz-14gzopen.t ................. ok
t/globmapper.t .................. ok
All tests successful.
Files=87, Tests=25681, 30 wallclock secs ( 1.47 usr 0.22 sys + 8.84 cusr 1.45 csys = 11.98 CPU)
Result: PASS
PMQS/IO-Compress-2.069.tar.gz
/usr/bin/make test -- OK
Running make install
Manifying 1 pod document
Manifying 17 pod documents
Appending installation info to /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level/perllocal.pod
PMQS/IO-Compress-2.069.tar.gz
sudo /usr/bin/make install -- OK

@jefferis
Copy link
Owner

OK. So now will munger run?!

@jakob-tu
Copy link

No. Have no idea why not?

@jakob-tu
Copy link

Always the same

Can't locate IO/Compress/Gzip.pm in @inc (@inc contains: /opt/local/lib/perl5/5.8.9/darwin-2level /opt/local/lib/perl5/5.8.9 /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level /opt/local/lib/perl5/site_perl/5.8.9 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl/5.8.9/darwin-2level /opt/local/lib/perl5/vendor_perl/5.8.9 /opt/local/lib/perl5/vendor_perl .) at /Applications/Fiji.app/bin/cmtk/munger line 47.

BEGIN failed--compilation aborted at /Applications/Fiji.app/bin/cmtk/munger line 47.

@jakob-tu
Copy link

Also several times re-run:

Be aware that after freshly installing make / gcc, your perl installation will not necessarily detect it. This means module installation will still fail during the 'make' stage. You may need to invoke the CPAN shell and run the setup routine again, to point to the location of make:

perl -MCPAN -e shell CPAN

cpan> o conf make /usr/bin/make

cpan> o conf commit

@jakob-tu
Copy link

cpan[38]> whereis gzip
Refusing to autoload 'whereis' 'gzip' in recursion

cpan[39]> exit
Lockfile removed.
dhcp229:~ root# perl -MCPAN -e shell CPAN

cpan shell -- CPAN exploration and modules installation (v2.14)
Enter 'h' for help.

cpan[1]> o conf make /usr/bin/make
make [/usr/bin/make]
Please use 'o conf commit' to make the config permanent!

cpan[2]> o conf commit
commit: wrote '/var/root/.cpan/CPAN/MyConfig.pm'

cpan[3]>

@jefferis
Copy link
Owner

  1. Did you start a clean terminal session? Can you send me the error message now?
  2. I wonder if you have multiple perl versions installed and for some reason one of them is being used from the shell and the other is being used from the munger script. When you run munger it is talking about /opt/local/lib/perl5/5.8.9 but when you are installing stuff in CPAN it is using /usr/bin/perl which must be the system perl. Reading a bit more I think this compress module should be installed by default in a normal perl install. Have you ever installed perl using macports into /opt/local/?
  3. If this idea is correct you can try either
    1. run cpan shell using the the /opt/local perl and install the module for that version of perl
    2. Edit /Applications/Fiji.app/bin/cmtk/munger and change the first line to read #!/usr/bin/perl rather than #!/usr/bin/env perl

@jakob-tu
Copy link

jakob-tu commented Oct 25, 2016

1. Closed Terminal. Double clicked on "munger_2016-10-25_15.12.28.command". Terminal opens in the split of a second with the following

Last login: Tue Oct 25 18:00:41 on ttys000
You have mail.
dhcp229:~ Jakob$ /Volumes/RAID\ 24\ GB/CMTK/commands/munger_2016-10-25_15.12.28.command ; exit;
Can't locate IO/Compress/Gzip.pm in @inc (@inc contains: /opt/local/lib/perl5/5.8.9/darwin-2level /opt/local/lib/perl5/5.8.9 /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level /opt/local/lib/perl5/site_perl/5.8.9 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl/5.8.9/darwin-2level /opt/local/lib/perl5/vendor_perl/5.8.9 /opt/local/lib/perl5/vendor_perl .) at /Applications/Fiji.app/bin/cmtk/munger line 47.
BEGIN failed--compilation aborted at /Applications/Fiji.app/bin/cmtk/munger line 47.
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Prozess beendet]

  1. It is possible that there are several Perl versions running on the system - today, I also installed "ActivePerl-5.24.0.2400-darwin-13.4.0-300561.dmg". I am not sure, however, whether I installed a previous version of Perl (but I don't think so; I do not have any experience with programming etc.) Concerning your question "Have you ever installed perl using macports into /opt/local/?" - I don't think so, and I am not sure if I would be able to do so?
  2. I will try your suggestions (currently also got my kids in the lab, and it is not so easy to focus)

PS: Also downloaded and installed "IO-Compress-2.069.tar.gz" - dont't know if this causes problems

@jefferis
Copy link
Owner

!
Maybe try suggestion ii first.

@jakob-tu
Copy link

You have mail.
/Applications/Fiji.app/bin/cmtk/munger ; exit;
dhcp229:~ Jakob$ /Applications/Fiji.app/bin/cmtk/munger ; exit;
Usage: /Applications/Fiji.app/bin/cmtk/munger [OPTIONS] <PICFILE/DIR> [<PICFILE2/DIR2> ...]
Version: 1.20

A wrapper script for CMTK registration software. For more on CMTK see:
  http://www.nitrc.org/projects/cmtk/

-h print this help
-v verbose (provide extra feed back at runtime)
-t test run (no commands are actually run)
-g debug: prints every command run by myexec and the return value
-p make a scriPt from commands that would be run 
   (nb cannot produce commands that depend on earlier commands)
-u statUs - display number of images, registrations etc
-z turn gzip off (on by default)
-k lock message ie contents of lock file (defaults to hostname:process id)
-m maximum time to keep starting registrations (in hours, default 8760=1y)
   nb this will not stop any running registrations
-x [never|only|any]:[truncate|delete] Clear input images when done.
   default is never, eg only:truncate, any:delete
   only => only the job that runs reformat can clear input
   any  => any job can delete; in fact a job started with any will not
           reformat at all. This is useful because you can run a cleanup
           job if it becomes clear that you are running short of space.
   truncate => leave a 0 length file with same mtime as original image

-a run affine transform
-w run warp transform
-c [01|02|..] channels for registration (default 01 or "")
-r [01|02|..] run reformat on these channels
-l [p|a|0..9|f] run reformat on these levels
   (default f=final warp, p=principal axis, a=affine, 0..9=warp intermediates)
-f [01|02|..] channel of the images used for registration - default is 01

[nb use -f to specify the channel of the images that were previously used to
 generate a registration if you now want to reformat a different channel using
 that registration information]

-i register brain to itself if possible (default is to skip)
-0 Don't output intermediate warp registration levels

-s [file|fileStem] Reference brain (average e-2 by default)
-b [path] bin directory
-d [stem] registration subdirectory (default ./Registration)
   [nb if this begins in a dot then the value will be appended to both
   reformatted and Registration directories]
-F Read path to input files, one per line, from <PICFILE1> ...
   NB path should be absolute or relative to registration directory e.g.
     images/imagea-01.nrrd
     images/imageb-01.nrrd

-e File ending of input images (pic, nrrd, nhdr)
-o File ending of output images (bin, nrrd, nhdr) - defaults to nrrd

-H use Amira's Generalised Hough Transform to initialise affine registration when available
   (nb the registration folder should be called Registration/affine/XXX_ght.list)
-P find initial affine transform using image principal axes
-L find initial affine transform using landmarks
-I inverse consistent warp weight (--ic-weight) default 0, try 1e-5
-E [energy] energy of warp transform (default e-1)
-X [exploration] (default 16)
-M [metric] (Supported values: nmi, mi, cr, msd, ncc, default is nmi)
   See warp --help for details
-C [coarsest] (default 4)
-G [grid-spacing] (default 40)
-R [refine] (default 3)
-J [0 to 1] jacobian-weight volume constraining param (default 0)
-T [threads] (default auto)

-A [option] additional options for affine transformation
-W [option] additional options for warp transformation
-1 use this brain for reformatx target

Munge a BioRad PIC or nrrd file or (recursively) parse a directory of PIC/nrrd
files by running CMTK affine and warp registrations and reformatting images
as required. Final argument must be the images directory or a single image.
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Prozess beendet]

@jakob-tu
Copy link

/Volumes/RAID\ 24\ GB/CMTK/commands/munger_2016-10-25_15.12.28.command ; exit;
dhcp229:~ Jakob$ /Volumes/RAID\ 24\ GB/CMTK/commands/munger_2016-10-25_15.12.28.command ; exit;
hostname = dhcp229.molekular.nat.tu-bs.de; short hostname = dhcp229.molekular.nat.tu-bs.de
JOB ID =
Root directory is /Volumes/RAID 24 GB/CMTK
Changing to root directory: /Volumes/RAID 24 GB/CMTK
Setting image root to: images

Ran 0 initial affine registrations of which 0 failed
Ran 0 affine registrations of which 0 failed
Ran 0 warp registrations
Reformatted 0 images
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Prozess beendet]

@jakob-tu
Copy link

Changed "#!/usr/bin/env perl" in munger (in Fiji) in "#!/usr/bin/perl" like you suggested

@jefferis
Copy link
Owner

So, I'm pretty sure my final diagnosis is correct – you have one or more conflicting perl installations. You should be fine to run like this for the time being. Best, Greg.

@jakob-tu
Copy link

Great diagnosis, Greg!!!

Alright, so just changing the first line in the "munger" to another directory is sufficient for me to run it. I guess this is easier than to get rid of one of the two Perl versions, right?

@jefferis
Copy link
Owner

If you need to do some other perl stuff then you may need to figure out what's up with these different perls. But to run munger/cmtk you should be good to go as is.

@jakob-tu
Copy link

You have mail.
/Volumes/RAID\ 24\ GB/CMTK/images/commands/munger_2016-10-25_13.48.22.command ; exit;
dhcp229:~ Jakob$ /Volumes/RAID\ 24\ GB/CMTK/images/commands/munger_2016-10-25_13.48.22.command ; exit;
hostname = dhcp229.molekular.nat.tu-bs.de; short hostname = dhcp229.molekular.nat.tu-bs.de
JOB ID =
Root directory is /Volumes/RAID 24 GB/CMTK/images
Changing to root directory: /Volumes/RAID 24 GB/CMTK
Setting image root to: /Volumes/RAID 24 GB/CMTK/images
MYEXEC: CMD = mkdir -p Registration/affine/Volumes/RAID 24 GB/CMTK/images/Ref20131120pt14pl2_test_01_9dof.list exited with value 0
Aff:test_01 INFO: number of threads set to 8 according to environment variable CMTK_NUM_THREADS
WARNING: image does not have valid orientation meta information; cannot reorient.
WARNING: image does not have valid orientation meta information; cannot reorient.
Entering resolution level 1 out of 4...
Entering resolution level 1 out of 4...
Entering resolution level 2 out of 4...
Entering resolution level 2 out of 4...
Entering resolution level 3 out of 4...
Entering resolution level 3 out of 4...
Entering resolution level 4 out of 4...
Entering resolution level 4 out of 4...

@jakob-tu
Copy link

Apparently, running now ..

Thank you so much for your help, Greg, and regards to Cambridge (may be I have installed that other conflicting Perl version back there, I am not sure). Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants