External Email - Use Caution Hello Alex, Thanks for the additional command output. If a machine does not have certain locale files installed, then I’m not sure what can be done apart from our having a (Debian) linux installer that might update them. Basically I think this is similar to a system library issue where we cannot guarantee that when using the freesurfer tar archive, all the system dependencies are going to be satisfied. If you have root privileges, then with the dpkg utility you can install the tools to generate locale files (and there should be no need to manually edit/add locale files). I do see postings from Debian linux users indicating they’ve had to update the system locales in order to run some software. I will look further into it. - R.
On Oct 13, 2020, at 05:27, Alex Craven <alex.cra...@uib.no> wrote: External Email - Use Caution Hi,Thanks for your response. Yes: the errors appear for the individual commands specified, for example:alex@fmri-proc1:~$ mri_ca_label --help error: No such file or directoryerror: Could not set localesysname Linuxhostname fmri-proc1machine x86_64setenv SUBJECTS_DIR /data/working/freesurfer7/subjectscd /home/alexmri_ca_label --help error: No such file or directoryerror: Could not set localeerror: No such file or directoryerror: Could not set locale Help[... normal help output follows]alex@fmri-proc1:~$ mri_ca_normalize --helperror: No such file or directoryerror: Could not set localeerror: No such file or directoryerror: Could not set localeerror: No such file or directoryerror: Could not set locale Help[... normal help output follows]Our standard set of locales (note, no en_US variant):alex@fmri-proc1:~$ locale -aCC.UTF-8de_DE.utf8en_AU.utf8nb_NO.utf8nn_NO.utf8pl_PL.utf8POSIXAdding en_US.UTF-8, the errors go away:alex@fmri-proc1:~$ sudo /bin/bash -c 'echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; locale-gen'alex@fmri-proc1:~$ mri_ca_normalize --help Help[...normal help output...]I'll re-iterate that the commands run to completion either way, so the problem is likely more aesthetic than anything else.recon-all loops over a set of allinfocmds towards the start of the process; adding a line of debug info to the loop around line 703 yields the following (which is where my previous list of affected commands was derived); ARC prefix in the output denotes my additions. Note that some individual commands present the error multiple times; there's no obvious difference in library dependencies (reported by ldd) between these cases, so I believe this fault probably arises internally and not from any external dependency.alex@fmri-proc1:~$ env SUBJECTS_DIR=/working/alex/fs_test /opt/freesurfer7/bin/recon-ac -i /data/current/xxxx/002_struct_T1.nii -subjid xxxx -allSubject Stamp: freesurfer-linux-centos7_x86_64-7.1.1-20200723-8b40551Current Stamp: freesurfer-linux-centos7_x86_64-7.1.1-20200723-8b40551INFO: SUBJECTS_DIR is /working/alex/fs_testActual FREESURFER_HOME /opt/freesurfer7Linux fmri-proc1 4.9.110-arc #1 SMP Tue Aug 14 17:45:49 CEST 2018 x86_64 GNU/LinuxARC: 'lta_convert'ARC: 'mri_and'ARC: 'mri_annotation2label'ARC: 'mri_aparc2aseg'ARC: 'mri_surf2volseg'ARC: 'mri_binarize'ARC: 'mri_ca_label'error: No such file or directoryerror: Could not set localeARC: 'mri_ca_normalize'error: No such file or directoryerror: Could not set localeARC: 'mri_ca_register'error: No such file or directoryerror: Could not set localeerror: No such file or directoryerror: Could not set localeerror: No such file or directoryerror: Could not set localeARC: 'mri_cc'ARC: 'mri_compute_overlap'ARC: 'mri_compute_seg_overlap'ARC: 'mri_concat'ARC: 'mri_concatenate_lta'ARC: 'mri_convert'error: No such file or directoryerror: Could not set localeerror: No such file or directoryerror: Could not set localeerror: No such file or directoryerror: Could not set localeARC: 'mri_diff'ARC: 'mri_edit_wm_with_aseg'ARC: 'mri_em_register'error: No such file or directoryerror: Could not set localeARC: 'mri_fill'ARC: 'mri_fuse_segmentations'ARC: 'mri_fwhm'ARC: 'mri_gcut'ARC: 'mri_info'ARC: 'mri_label2label'ARC: 'mri_label2vol'ARC: 'mri_log_likelihood'ARC: 'mri_mask'ARC: 'mri_matrix_multiply'ARC: 'mri_normalize'ARC: 'mri_normalize_tp2'ARC: 'mri_or'ARC: 'mri_relabel_hypointensities'ARC: 'mri_relabel_nonwm_hypos'ARC: 'mri_remove_neck'error: No such file or directoryerror: Could not set localeerror: No such file or directoryerror: Could not set localeARC: 'mri_robust_register'ARC: 'mri_robust_template'ARC: 'mris_anatomical_stats'ARC: 'mris_ca_label'ARC: 'mris_calc'error: No such file or directoryerror: Could not set localeerror: No such file or directoryerror: Could not set localeARC: 'mris_convert'ARC: 'mris_curvature'ARC: 'mris_curvature_stats'ARC: 'mris_diff'ARC: 'mris_divide_parcellation'ARC: 'mri_segment'ARC: 'mri_segstats'ARC: 'mris_euler_number'ARC: 'mris_fix_topology'ARC: 'mris_topo_fixer'ARC: 'mris_jacobian'ARC: 'mris_label2annot'ARC: 'mris_left_right_register'ARC: 'mris_place_surface'ARC: 'mrisp_paint'ARC: 'mris_register'ARC: 'mris_smooth'ARC: 'mris_sphere'ARC: 'mris_surface_stats'ARC: 'mri_stats2seg'ARC: 'mris_thickness'ARC: 'mris_thickness_diff'ARC: 'mris_topo_fixer'ARC: 'mri_surf2surf'ARC: 'mri_surf2vol'ARC: 'mri_surfcluster'ARC: 'mris_volmask'ARC: 'mri_tessellate'ARC: 'mri_vol2surf'ARC: 'mri_vol2vol'ARC: 'mri_voldiff'ARC: 'mri_watershed'ARC: 'tkregister2_cmdl'Best regards,Alex.On 12/10/20 22:59, fsbuild wrote:Hello Alex,After you have set FREESURFER_HOME and source’d the shell setup script, please try running the binaries you suspect directly from the command line, e.g., with —help option, and see if you get the same error, e.g.$ mri_ca_label —help<help output deleted>$ mri_ca_normalize —help<help output deleted>It would also be interesting to know what locales have been setup/installed on your machine from the output of the locale command, which might display something like,$ locale -aCC.utf8en_AUen_AU.utf8en_BWen_BW.utf8en_CAen_CA.utf8en_DKen_DK.utf8en_GBen_GB.iso885915en_GB.utf8… many other countries …POSIX- R.On Oct 12, 2020, at 06:58, Alex Craven <alex.cra...@uib.no> wrote: External Email - Use Caution Greetings,Several binaries in the Freesurfer 7.1.1 release appear to ignore (or misinterpret) system-wide locale settings. This causes a large number of errors to be reported throughout the recon process, particularly on startup. The commands appear to complete successfully despite the reported errors.The errors are displayed as:error: No such file or directoryerror: Could not set locale...repeated dozens of times.A probably not exhaustive list of affected components:mri_ca_labelmri_ca_normalizemri_ca_registermri_convertmri_em_registermri_remove_neckmris_calcstrace output for one such command suggests that it's attempting to load the en_US locale, on a system where that is locale is not configured, and where system-wide settings indicate the something else should be used (eg: LANG=en_AU.UTF-8)openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3fstat(3, {st_mode=S_IFREG|0644, st_size=8896640, ...}) = 0mmap(NULL, 8896640, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f727c65d000close(3) = 0openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3fstat(3, {st_mode=S_IFREG|0644, st_size=2995, ...}) = 0read(3, "# Locale name alias data base.\n#"...., 4096) = 2995read(3, "", 4096) = 0close(3) = 0openat(AT_FDCWD, "/usr/lib/locale/en_US/LC_NUMERIC", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)openat(AT_FDCWD, "/usr/lib/locale/en/LC_NUMERIC", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_NUMERIC", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)openat(AT_FDCWD, "/usr/lib/locale/en.utf8/LC_NUMERIC", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)write(2, "error: ", 7error: ) = 7write(2, "No such file or directory", 25No such file or directory) = 25write(2, "\n", 1) = 1write(2, "error: ", 7error: ) = 7write(2, "Could not set locale\0", 21Could not set locale^@) = 21write(2, "\n", 1) = 1System info:Debian 9.1.0 base system, using freesurfer-linux-centos7_x86_64-7.1.1Linux fmri-proc1 4.9.110-arc #1 SMP Tue Aug 14 17:45:49 CEST 2018 x86_64 GNU/LinuxWorkaround:Generating the en_US.UTF-8 locale, by adding/uncommenting the line "en_US.UTF-8 UTF-8" in /etc/locale.gen and re-running locale-gen effectively hides this problem.Best regards,Alex._______________________________________________Freesurfer mailing listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer_______________________________________________Freesurfer mailing listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer