En aquest pas, la feina es comprovar la instal·lació de ParaVision i resoldre els problemes que impedeixin que s'executi el programa, entre altres:
Aquests són els usuaris i grups relacionats amb el ParaVision a l'ordinador antic que s'hauran de crear al nou ordinador,
[root@sermn112 PV5.1]# cat /etc/passwd root:x:0:0:root:/root:/bin/bash ... mri:x:500:500:SeRMN Users:/home/mri:/bin/bash nmrsu:x:501:501:Bruker Topspin/ParaVision Superuser:/home/nmrsu:/bin/bash flexlm:x:502:502:FLEXlm Licence Manager:/nonexistent:/bin/sh [root@sermn112 PV5.1]# cat /etc/shadow ... mri:<password>:13998:0:99999:7::: nmrsu:<password>:14407:0:99999:7::: flexlm:!!:13998:0:99999:7::: [root@sermn112 PV5.1]# cat /etc/group ... mri:x:500: nmrsu:x:501:nmrsu,mri flexlm:x:502:flexlm
Un cop creats, el resultat és:
root@cie-50-189:/etc# tail -2 /etc/passwd nmrsu:x:1003:1003:Bruker TopSpin/ParaVision Superuser:/home/nmrsu:/bin/bash flexlm:x:1004:1004:FLEXlm Licence Manager:/nonexistent:/bin/sh root@cie-50-189:/etc# tail -2 /etc/group nmrsu:x:1003:sermnmri flexlm:x:1004: root@cie-50-189:/etc# tail -2 shadow nmrsu:<password>:17381:0:99999:7::: flexlm:!!:17381:0:99999:7:::
La transferència de les carpetes i fitxers amb els permisos i propietaris que hi havia a l'antic ordinador, ha fet que es mantinguin els UID/GID originals dels fitxers i que ara sigui necessari corregir-los, per exemple, amb la comanda,
# cd /opt/PV5.1 # find . -type d -uid 501 -exec chown nmrsu:nmrsu {} \;
Cal afegir les següents línies al final del fitxer /etc/services per definir els serveis locals de Bruker,
# Local services bfs 2201/udp # BRUKER: bootfileserver bruker_ls 1700/tcp # FLEXlm licensing for Bruker bbmri_ls 1700/tcp # FLEXlm licensing for Bruker
Comprovar si cal mantenir aquesta configuració
A l'antiga instal·lació hi ha la següent línia al fitxer /etc/sysctl.conf per configurar la memòria compartida que no aplico per ara.
# kernel.shmmax: Set shared memory size to total memory size (for BRUKER TOPSPIN, ParaVision). kernel.shmmax = 1052028928
Executo la comanda installpv
per comprovar/corregir/completar la instal·lació del ParaVision,
root@cie-50-189:/opt/PV5.1/prog/bin# ./installpv /opt/PV5.1 nmrsu Environment variable XWINNMRHOME defaults to /opt/PV5.1 --------------------------------------------------------------------------- installpv for ParaVision running under LINUX 4.6.0-0.bpo.1-amd64 Current installation script version : $Id: installpv,v 1.305.2.54 2010/04/21 12:40:09 cwe Exp $ --------------------------------------------------------------------------- your selections are: ParaVision installation path : /opt/PV5.1 The NMR Superuser will be : nmrsu ++++ INFO (Fri Aug 4 10:39:48 2017) ++++ Validating NMR Superuser ... ++++ INFO (Fri Aug 4 10:39:48 2017) ++++ NMR Administration Password for special privileges Nothing to do ++++ INFO (Fri Aug 4 10:39:48 2017) ++++ Full TopSpin version found, continuing with normal installation procedure .. ++++ INFO (Fri Aug 4 10:39:48 2017) ++++ Call cf/expinstall after first start ++++ INFO (Fri Aug 4 10:39:48 2017) ++++ Creating/removing some directories ... ++++ INFO (Fri Aug 4 10:39:48 2017) ++++ Make symbolic links for Inventor ... ++++ INFO (Fri Aug 4 10:39:48 2017) ++++ Create dump file for java shared classes ... ++++ INFO (Fri Aug 4 10:39:49 2017) ++++ Make symbolic links for System Libs in /opt/PV5.1/prog/pvshlib ... ++++ INFO (Fri Aug 4 10:39:49 2017) ++++ Make symbolic links for System Libs in /opt/PV5.1/prog/shlib ... ++++ INFO (Fri Aug 4 10:39:49 2017) ++++ Check OpenGL support... !!!!!!! WARNING (Fri Aug 4 10:39:49 2017) !!!!!!! No suitable OpenGL driver found; installing MESA, if not present... ++++ INFO (Fri Aug 4 10:39:49 2017) ++++ Running post-installation scripts ... ++++ INFO (Fri Aug 4 10:39:49 2017) ++++ Adjusting Makefiles in exported parameter sources ... ++++ INFO (Fri Aug 4 10:39:49 2017) ++++ installpv detected an already existing ParaVision Configuration, OK ++++ INFO (Fri Aug 4 10:39:49 2017) ++++ Install default datastation configuration ... ++++ INFO (Fri Aug 4 10:39:50 2017) ++++ Setting up CORBA Name Service for default distribution ... ++++ INFO (Fri Aug 4 10:39:50 2017) ++++ CORBA Name Service is not running at the moment ... ++++ INFO (Fri Aug 4 10:39:50 2017) ++++ Configuring CORBA Name Service ... ++++ INFO (Fri Aug 4 10:39:50 2017) ++++ Starting new CORBA Name Service ... nohup: ignoring input and redirecting stderr to stdout ++++ INFO (Fri Aug 4 10:39:55 2017) ++++ Answer is : Starting CORBA name service: -e done ++++ INFO (Fri Aug 4 10:39:55 2017) ++++ nmrsu 12550 1 6 10:39 ? 00:00:00 /opt/PV5.1/jre1.6.0_13/bin/orbd -J-server -J-Xmx16m -J-Dcom.sun.CORBA.transport.ORBUseNIOSelectToWait=false -ORBInitialPort 12345 -defaultdb /var/log/CORBA root 12573 12438 0 10:39 pts/3 00:00:00 sh -c ps -efw | grep orbd root 12575 12573 0 10:39 pts/3 00:00:00 grep orbd ++++ INFO (Fri Aug 4 10:39:55 2017) ++++ Checking/setting overcommit policy for processes ... ++++ INFO (Fri Aug 4 10:39:55 2017) ++++ Updating permissions of ParaVision/TopSpin ... .................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. ++++ INFO (Fri Aug 4 10:39:57 2017) ++++ Creating checksum file for installation ... find: `/tftpboot': No such file or directory ++++ INFO (Fri Aug 4 10:40:34 2017) ++++ /opt/PV5.1/prog/service/chkpv.pl: ( $Id: chkpv.pl,v 1.10.2.1 2009/10/20 12:28:31 roe Exp $) freezing PV file tree /opt/PV5.1 of version 5.1 ... ================================================ Results for snapshot of version /opt/PV5.1 ================================================ Checksum file /opt/PV5.1/prog/service/configuration.md5 from Fri Aug 4 10:40:34 2017 ++++ INFO (Fri Aug 4 10:40:34 2017) ++++ ParaVision post-installation (SETUP) succeeded
Executo la comanda installnmr
per comprovar/corregir/completar la instal·lació del TopSpin,
root@cie-50-189:/opt/PV5.1# ./prog/bin/installnmr -h Usage: installnmr [-option ...] <Installation Path> <NMR-superuser> -encrypted <string> -help -noadmincheck -secure -useinstalled -verbose+ Hit <Enter> to continue ... root@cie-50-189:/opt/PV5.1# ./prog/bin/installnmr -useinstalled *---------------------------------* TOPSPIN 2.0PV processing package *---------------------------------* Update permissions of ALL TOPSPIN FILES... installation of TOPSPIN version processing package continue with acquisition *----------------------------------* TOPSPIN ts_2_0 acquisition package *----------------------------------* ... installing helevtransfer ... - A copy of the original crontab file for user nmrsu is stored in /opt/PV5.1/cronfile.nmrsu.orig ... installation of helevtransfer finished. File /opt/PV5.1/conf/instr/curinst exists! 'cf' already done for Datastation installation of TOPSPIN acquisition VS ts_2_0 finished exit: 0
Per algun motiu, no aconsegueixo que el programa installnmr accepti cap de les contrasenyes que fem servir habitualment com a NMR Administration Password, de forma que la reinicio segons es detalla a la TopSpin 1.3 Installation Guide Linux. Primer esborro el fitxer que conté el la contrasenya actual,
root@cie-50-189:/etc/init.d# cd /opt/PV5.1/ root@cie-50-189:/opt/PV5.1# rm /opt/PV5.1/conf/nmradminpassword
i després en creo una de nova,
root@cie-50-189:/opt/PV5.1# ./prog/bin/installnmr /opt/PV5.1 nmrsu *---------------------------------* TOPSPIN 2.0PV processing package *---------------------------------* New password: Retype new password: Update permissions of ALL TOPSPIN FILES... installation of TOPSPIN version processing package continue with acquisition *----------------------------------* TOPSPIN ts_2_0 acquisition package *----------------------------------* ... installing helevtransfer ... - A copy of the original crontab file for user nmrsu is stored in /opt/PV5.1/cronfile.nmrsu.orig ... installation of helevtransfer finished. File /opt/PV5.1/conf/instr/curinst exists! 'cf' already done for Datastation installation of TOPSPIN acquisition VS ts_2_0 finished exit: 0
Faig servir el programa /~paravision/prog/service/chkpv.pl per comprovar la integritat de la instal·lació,
root@cie-50-189:/opt/PV5.1# ./prog/service/chkpv.pl --verify /opt/PV5.1/ ./prog/service/chkpv.pl: ( $Id: chkpv.pl,v 1.10.2.1 2009/10/20 12:28:31 roe Exp $) Test started at Fri Aug 4 11:51:48 2017 for PV version 5.1 verifying /opt/PV5.1/ with file /opt/PV5.1//prog/service/configuration.md5, please wait ... ================================================ Integrity check results for /opt/PV5.1/ ================================================ Test finished at Fri Aug 4 11:51:51 2017 Checksum file from Fri Aug 4 10:40:34 2017 NUMBER OF FILES MODIFIED OR REMOVED: 46 00001 : /opt/PV5.1/prog/service/integrity.log : MODIFIED last modification at Fri Aug 4 11:51:51 2017 00002 : /opt/PV5.1/prog/service/configuration.md5 : MODIFIED last modification at Fri Aug 4 10:40:34 2017 00003 : /opt/PV5.1/prog/au/bin/DemoGetv : REMOVED after Thu Jan 1 01:00:00 1970 00004 : /opt/PV5.1/prog/au/bin/PVMepiAdjust : REMOVED after Thu Jan 1 01:00:00 1970 00005 : /opt/PV5.1/prog/au/bin/SvFidStab : REMOVED after Thu Jan 1 01:00:00 1970 00006 : /opt/PV5.1/prog/au/bin/SvRxDcTest : REMOVED after Thu Jan 1 01:00:00 1970 00007 : /opt/PV5.1/prog/au/bin/SvRxadDcTest : REMOVED after Thu Jan 1 01:00:00 1970 00008 : /opt/PV5.1/prog/au/bin/csi_filterAU : REMOVED after Thu Jan 1 01:00:00 1970 00009 : /opt/PV5.1/prog/au/bin/Combine_Spec : REMOVED after Thu Jan 1 01:00:00 1970 00010 : /opt/PV5.1/prog/au/bin/pvplot : REMOVED after Thu Jan 1 01:00:00 1970 00011 : /opt/PV5.1/prog/au/bin/gen_lut : REMOVED after Thu Jan 1 01:00:00 1970 00012 : /opt/PV5.1/prog/au/bin/au_spiraltraj : REMOVED after Thu Jan 1 01:00:00 1970 00013 : /opt/PV5.1/prog/au/bin/spi_au : REMOVED after Thu Jan 1 01:00:00 1970 00014 : /opt/PV5.1/prog/au/bin/csi_copy.au : REMOVED after Thu Jan 1 01:00:00 1970 00015 : /opt/PV5.1/prog/au/bin/SvRxAllTest : REMOVED after Thu Jan 1 01:00:00 1970 00016 : /opt/PV5.1/prog/au/bin/SvB0OffsetAu : REMOVED after Thu Jan 1 01:00:00 1970 00017 : /opt/PV5.1/prog/au/bin/au_polar : REMOVED after Thu Jan 1 01:00:00 1970 00018 : /opt/PV5.1/prog/au/bin/csi_cr.au : REMOVED after Thu Jan 1 01:00:00 1970 00019 : /opt/PV5.1/prog/au/bin/NoOperation : REMOVED after Thu Jan 1 01:00:00 1970 00020 : /opt/PV5.1/prog/au/bin/pfObserveGrad : REMOVED after Thu Jan 1 01:00:00 1970 00021 : /opt/PV5.1/prog/au/bin/CsiSplit3d : REMOVED after Thu Jan 1 01:00:00 1970 00022 : /opt/PV5.1/prog/au/bin/navig_pf : REMOVED after Thu Jan 1 01:00:00 1970 00023 : /opt/PV5.1/prog/au/bin/NmrMonitorExport : REMOVED after Thu Jan 1 01:00:00 1970 00024 : /opt/PV5.1/prog/au/bin/SvRxadDcAdj : REMOVED after Thu Jan 1 01:00:00 1970 00025 : /opt/PV5.1/prog/au/bin/SvRxDcAdj : REMOVED after Thu Jan 1 01:00:00 1970 00026 : /opt/PV5.1/prog/au/bin/CsiExtract1dSpc : REMOVED after Thu Jan 1 01:00:00 1970 00027 : /opt/PV5.1/prog/au/bin/NAV_pressAU : REMOVED after Thu Jan 1 01:00:00 1970 00028 : /opt/PV5.1/prog/au/bin/CalcLinewidth : REMOVED after Thu Jan 1 01:00:00 1970 00029 : /opt/PV5.1/prog/au/bin/IntraGateAu : REMOVED after Thu Jan 1 01:00:00 1970 00030 : /opt/PV5.1/prog/au/bin/DemoFio : REMOVED after Thu Jan 1 01:00:00 1970 00031 : /opt/PV5.1/prog/au/bin/csi_autopk.au : REMOVED after Thu Jan 1 01:00:00 1970 00032 : /opt/PV5.1/prog/au/bin/SvWobble : REMOVED after Thu Jan 1 01:00:00 1970 00033 : /opt/PV5.1/prog/au/bin/OverlayGrid : REMOVED after Thu Jan 1 01:00:00 1970 00034 : /opt/PV5.1/prog/au/bin/CsiExtract1dSer : REMOVED after Thu Jan 1 01:00:00 1970 00035 : /opt/PV5.1/prog/au/bin/FastmapAu : REMOVED after Thu Jan 1 01:00:00 1970 00036 : /opt/PV5.1/prog/au/bin/CsiSplitMSlices : REMOVED after Thu Jan 1 01:00:00 1970 00037 : /opt/PV5.1/prog/au/bin/au_epitraj : REMOVED after Thu Jan 1 01:00:00 1970 00038 : /opt/PV5.1/prog/au/bin/csi_trans.au : REMOVED after Thu Jan 1 01:00:00 1970 00039 : /opt/PV5.1/prog/au/bin/au_spiralregrid : REMOVED after Thu Jan 1 01:00:00 1970 00040 : /opt/PV5.1/prog/au/bin/SvCurProbe_au : REMOVED after Thu Jan 1 01:00:00 1970 00041 : /opt/PV5.1/prog/au/bin/spiralAU : REMOVED after Thu Jan 1 01:00:00 1970 00042 : /opt/PV5.1/prog/au/bin/NmrMonitorAu : REMOVED after Thu Jan 1 01:00:00 1970 00043 : /opt/PV5.1/prog/au/bin/csi_save.au : REMOVED after Thu Jan 1 01:00:00 1970 00044 : /opt/PV5.1/prog/au/bin/SvRxAllAdj : REMOVED after Thu Jan 1 01:00:00 1970 00045 : /opt/PV5.1/prog/au/bin/remove_zipper : REMOVED after Thu Jan 1 01:00:00 1970 00046 : /opt/PV5.1/cronfile.nmrsu.orig : MODIFIED last modification at Fri Aug 4 10:49:17 2017
Caldrà comprovar els fitxers que no s'han trobat o que s'han modificat
Els primers intents d'executar el ParaVision no han funcionat, de vegades amb missatges d'error que apuntaven a una instal·lació incompleta del ParaVision i/o del TopSpin, i que suggerien córrer de nou els scripts d'instal·lació installpv
i/o installnmr
. Però per més que els he executat amb diferents opcions, el resultat ha estat sempre el mateix,
root@cie-50-189:/opt/PV5.1# /opt/PV5.1/pv ParaVision Home Directory points to /opt/PV5.1 TopSpin Home Directory points to Hit <ENTER> to continue ... Not equal, installpv possibly not yet done! ParaVision cannot be started. Press the return key to continue:
Finalment, quan he provat d'executar directament el script /opt/PV5.1/prog/bin/topspin, he obtingut un missatge d'error informatiu,
root@cie-50-189:/opt/PV5.1# ./topspin ./topspin: 115: ./topspin: source: not found ./topspin: Error: Cannot find script './prog/bin/funclib.sh' Your TopSpin installation is probably corrupted. You have to run 'installnmr'. Hit <ENTER> to continue ...
on el missatge “./topspin: 115: ./topspin: source: not found” m'ha dut a comprovar quin shell s'estava emprant,
root@cie-50-189:/opt/PV5.1# ls -l /bin/sh lrwxrwxrwx 1 root root 4 Nov 8 2014 /bin/sh -> dash
i a trobar que la comanda source
no està disponible al shell dash,
i que la solució es substituir la comanda source <filename>
per la seva equivalent a dash, el punt: . <filename>
Un cop resolt el problema amb la comanda source
, torno a provar d'engegar el ParaVision, i aquest cop em dona un error diferent:
sermnadmin@sermn115:/opt/PV5.1$ ./pv id: sermnadm: no such user ***** ERROR (Fri Aug 4 15:52:57 2017) ***** The user sermnadm does not belong to the primary group of the NMR Superuser nmrsu. This will lead to potential permission problems. Please add the primary group of nmrsu to the group list of user sermnadm.
Afegeixo sermnadmin al grup nmrsu, però el programa continua escurçant sermnadmin en sermnadm i com que no troba que pertanyi al grup nmrsu, el problema persisteix.
Amb l'ajut de la comanda strace -f -e execve /opt/PV5.1/pv
trobo que l'error s'origina al fitxer ~paravision/prog/bin/startpv, més concretament a la Bruker Medical ParaVision Perl library. Després d'examinar el fitxer ~paravision/perl/lib/perl5/Bruker/Medical/PvUtil.pm trobo que la causa del problema està la funció GetUser()
, on es fa servir la funció POSIX::cuserid()
, la qual deu tornar el nom d'usuari truncat a 8 caràcters. Per resoldre el problema substitueixo la funció cuserid()
per la resposta més recomanada a la pregunta How can I get name of the user executing my Perl script?
#-------------------------------------------------------------------------- # function: GetUser # returns the user name of the user who started the script # parameters: none # returns local user name #-------------------------------------------------------------------------- sub GetUser { if (GetOperatingSystem() eq 'Windows_NT') { eval 'use Win32'; return Win32::LoginName; } else { # 20180805 - MCE - POSIX::cuserid() REPLACED # POSIX::cuserid() replaced because it seems to truncate the username to # eight characters causing ParaVision to abort at start-up whenever the # username is longer than 8 chars. I apply the recommended answer from # https://stackoverflow.com/questions/1378221/how-can-i-get-name-of-the-user-executing-my-perl$ # ## return POSIX::cuserid(); my $username = $ENV{LOGNAME} || $ENV{USER} || getpwuid($<); return $username; } }
Amb això aconsegueixo que finalment s'executi el programa.
Al següent intent d'executar ParaVision dóna un error perquè no troba unes biblioteques relacionades amb el CORBA,
nmrsu@sermn115:/opt/PV5.1$ ldd /opt/PV5.1/prog/bin/pvcmd linux-gate.so.1 (0xf77c9000) libomniORB4.so.0 => not found libomniDynamic4.so.0 => not found libomnithread.so.3 => not found libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xf778c000) libpcre.so.0 => not found libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xf7787000) librt.so.1 => /lib/i386-linux-gnu/i686/cmov/librt.so.1 (0xf777e000) libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf768b000) libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xf7645000) libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf7628000) libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xf747b000) /lib/ld-linux.so.2 (0x565f5000)
Instal·lo els paquets que contenen les biblioteques que manquen:
i creo un enllaça símbolic pel cas de la biblioteca libomniDynamic4.so.0 que ja està instal·lada,
root@sermn115:/opt/PV5.1/prog/bin# apt-get install libomniorb4-1:i386 Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: libgconf2-4 Use 'apt-get autoremove' to remove it. The following extra packages will be installed: libomnithread3c2:i386 The following NEW packages will be installed: libomniorb4-1:i386 libomnithread3c2:i386 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/1,495 kB of archives. After this operation, 4,566 kB of additional disk space will be used. Do you want to continue? [Y/n] y Selecting previously unselected package libomnithread3c2. (Reading database ... 160073 files and directories currently installed.) Preparing to unpack .../libomnithread3c2_4.1.6-2_i386.deb ... Unpacking libomnithread3c2 (4.1.6-2) ... Selecting previously unselected package libomniorb4-1. Preparing to unpack .../libomniorb4-1_4.1.6-2_i386.deb ... Unpacking libomniorb4-1 (4.1.6-2) ... Setting up libomnithread3c2 (4.1.6-2) ... Setting up libomniorb4-1 (4.1.6-2) ... Processing triggers for libc-bin (2.19-18+deb8u10) ... root@sermn115:/opt/PV5.1/prog/bin# ln -s /usr/lib/libomniORB4.so.1.6 /usr/lib/libomniORB4.so.0 root@sermn115:/opt/PV5.1/prog/bin# ls -l /usr/lib/libomniORB4* lrwxrwxrwx 1 root root 27 Aug 4 16:42 /usr/lib/libomniORB4.so.0 -> /usr/lib/libomniORB4.so.1.6 lrwxrwxrwx 1 root root 18 Mar 6 2012 /usr/lib/libomniORB4.so.1 -> libomniORB4.so.1.6 -rw-r--r-- 1 root root 1609476 Mar 6 2012 /usr/lib/libomniORB4.so.1.6 root@sermn115:/opt/PV5.1/prog/bin# ln -s /usr/lib/libomniDynamic4.so.1.6 /usr/lib/libomniDynamic4.so.0 root@sermn115:/opt/PV5.1/prog/bin# ls -l /usr/lib/libomniDynamic4.so* lrwxrwxrwx 1 root root 31 Aug 4 16:43 /usr/lib/libomniDynamic4.so.0 -> /usr/lib/libomniDynamic4.so.1.6 lrwxrwxrwx 1 root root 22 Mar 6 2012 /usr/lib/libomniDynamic4.so.1 -> libomniDynamic4.so.1.6 -rw-r--r-- 1 root root 2372640 Mar 6 2012 /usr/lib/libomniDynamic4.so.1.6 root@sermn115:/home/sermnadmin# ln -s /lib/i386-linux-gnu/libpcre.so.3.13.1 /lib/i386-linux-gnu/libpcre.so.0 root@sermn115:/home/sermnadmin# ls -l /lib/i386-linux-gnu/libpcre.so*lrwxrwxrwx 1 root root 37 Aug 4 16:59 /lib/i386-linux-gnu/libpcre.so.0 -> /lib/i386-linux-gnu/libpcre.so.3.13.1 lrwxrwxrwx 1 root root 17 Mar 26 2016 /lib/i386-linux-gnu/libpcre.so.3 -> libpcre.so.3.13.1 -rw-r--r-- 1 root root 464180 Mar 26 2016 /lib/i386-linux-gnu/libpcre.so.3.13.1 nmrsu@sermn115:/opt/PV5.1$ ldd ./prog/bin/pvcmd linux-gate.so.1 (0xf773a000) libomniORB4.so.0 => /usr/lib/libomniORB4.so.0 (0xf758e000) libomniDynamic4.so.0 => /usr/lib/libomniDynamic4.so.0 (0xf734a000) libomnithread.so.3 => /usr/lib/libomnithread.so.3 (0xf7343000) libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xf7327000) libpcre.so.0 => /lib/i386-linux-gnu/libpcre.so.0 (0xf72b4000) libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xf72af000) librt.so.1 => /lib/i386-linux-gnu/i686/cmov/librt.so.1 (0xf72a6000) libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf71b3000) libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xf716d000) libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf7150000) libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xf6fa3000) /lib/ld-linux.so.2 (0x56646000)
Ara que s'han instal·lat les biblioteques que necessita el programa, faig un nou intent d'executar el ParaVision, però dóna un nou error,
sermnadmin@sermn115:/opt/PV5.1$ ./pv /opt/PV5.1/prog/bin/scripts/../topspin: 1: /opt/PV5.1/prog/bin/scripts/../topspin: /opt/PV5.1/pathScript: not found /opt/PV5.1/prog/bin/scripts/../topspin: 1: /opt/PV5.1/prog/bin/scripts/../topspin: /opt/PV5.1/pathScript: not found /opt/PV5.1/prog/bin/pvcmd: symbol lookup error: /opt/PV5.1/prog/bin/pvcmd: undefined symbol: _ZN4omni11omniORB_4_0E ***** ERROR (Sun Aug 6 17:17:18 2017) ***** Cannot access the CORBA Name Service though it is running. You may restart the CORBA Name Service by entering the command (as user root) /etc/init.d/corbaNameService.default restart
Comprovo amb ldd -d
(-d, –data-relocs process data relocations) quin és el problema,
sermnadmin@sermn115:/opt/PV5.1/prog/bin$ ldd -d ./pvcmd linux-gate.so.1 (0xf770b000) libomniORB4.so.0 => /usr/lib/libomniORB4.so.0 (0xf755f000) ... /lib/ld-linux.so.2 (0x565a9000) undefined symbol: _ZN4omni11omniORB_4_0E (./pvcmd) undefined symbol: _ZTIN14PortableServer19RefCountServantBaseE (./pvcmd)
i veig que hi ha dos símbols a l'executable pvcmd
que no es troben en cap de les biblioteques dinàmiques enllaçades. Examino les biblioteques, i trobo que el símbol està disponible a libomniORB4.so.0
,
$ readelf --symbols /usr/lib/libomniORB4.so.0 | grep ZN4omni11omniORB 5428: 001879c8 4 OBJECT GLOBAL DEFAULT 26 _ZN4omni11omniORB_4_1E
però amb un número de versió superior: 4_1E en comptes de 4_0E. Com que un canvi de versió vol dir que es perd la compatibilitat cap enrere, hauré de localitzar la versió de la biblioteca amb el símbol correcte, i instal·lar-la.
Em descarrego els paquets libomniORB4* de les versions anteriors fins trobar el que conté la biblioteca libomniORB4.so.0
: libomniorb4c2_4.0.6-2.1_i386.deb de la versió Debian 4.0 (Etch) de setembre de 2007.
Per instal·lar aquest paquet i les seves dependències, segueixo les instruccions i recomanacions que trobo als enllaços:
Començo per crear un fitxer amb la configuració per accedir al dipòsit de paquets de Debian Archive,
root@sermn115:/etc/apt/sources.list.d# cat 6-etch.list # DEBIAN ETCH FROM DEBIAN ARCHIVE deb http://archive.debian.org/debian/ etch contrib main non-free
i tot seguit executo la comanda apt-get update
per afegir els paquets de la versió Etch a la llista de paquets disponibles, finalment instal·lo el paquet de la versió antiga,
root@sermn115:/etc/apt/sources.list.d# apt-get -t etch install libomniORB4:i386 Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'libomniorb4c2:i386' instead of 'libomniorb4:i386' The following extra packages will be installed: libssl0.9.8:i386 The following NEW packages will be installed: libomniorb4c2:i386 libssl0.9.8:i386 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 3,864 kB of archives. After this operation, 10.2 MB of additional disk space will be used. Do you want to continue? [Y/n] n Abort. root@sermn115:/etc/apt/sources.list.d# apt-get -t etch install libomniORB4:i386 Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'libomniorb4c2:i386' instead of 'libomniorb4:i386' The following extra packages will be installed: libssl0.9.8:i386 The following NEW packages will be installed: libomniorb4c2:i386 libssl0.9.8:i386 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 3,864 kB of archives. After this operation, 10.2 MB of additional disk space will be used. Do you want to continue? [Y/n] WARNING: The following packages cannot be authenticated! libssl0.9.8:i386 libomniorb4c2:i386 Install these packages without verification? [y/N] y Get:1 http://archive.debian.org/debian/ etch/main libssl0.9.8 i386 0.9.8c-4etch9 [2,722 kB] Get:2 http://archive.debian.org/debian/ etch/main libomniorb4c2 i386 4.0.6-2.1 [1,142 kB] Fetched 3,864 kB in 1s (2,825 kB/s) Preconfiguring packages ... Selecting previously unselected package libssl0.9.8. (Reading database ... 160171 files and directories currently installed.) Preparing to unpack .../libssl0.9.8_0.9.8c-4etch9_i386.deb ... Unpacking libssl0.9.8 (0.9.8c-4etch9) ... Selecting previously unselected package libomniorb4c2. Preparing to unpack .../libomniorb4c2_4.0.6-2.1_i386.deb ... Unpacking libomniorb4c2 (4.0.6-2.1) ... Setting up libssl0.9.8 (0.9.8c-4etch9) ... Setting up libomniorb4c2 (4.0.6-2.1) ... Processing triggers for libc-bin (2.19-18+deb8u10) ...
Comprovo que efectivament s'hagi instal·lat la biblioteca que necessita el programa pvcmd
,
root@sermn115:/usr/lib# ls -l libomniORB* lrwxrwxrwx 1 root root 18 Aug 28 2006 libomniORB4.so.0 -> libomniORB4.so.0.6 -rw-r--r-- 1 root root 1436828 Aug 28 2006 libomniORB4.so.0.6
i que contingui la versió correcta 4_0E del símbol ZN4omni11omniORB
,
# readelf --symbols /usr/lib/libomniORB4.so.0 | grep ZN4omni11omniORB 3581: 0015e90c 4 OBJECT GLOBAL DEFAULT 23 _ZN4omni11omniORB_4_0E
Ara que s'ha resolt aquesta dependència del programa pvcmd
, provo a executar el ParaVision, però quan comprova les dependències dels programes de TopSpin/ParaVision, encara troba a faltar unes quantes biblioteques (veure apartat SUMMARY OF UNSATISFIED LIBRARIES) i alguns programes (veure apartat SUMMARY OF UNSATISFIED SOFTWARE),
sermnadmin@sermn115:/opt/PV5.1$ ./pv /opt/PV5.1/prog/bin/scripts/../topspin: 1: /opt/PV5.1/prog/bin/scripts/../topspin: /opt/PV5.1/pathScript: not found /opt/PV5.1/prog/bin/scripts/../topspin: 1: /opt/PV5.1/prog/bin/scripts/../topspin: /opt/PV5.1/pathScript: not found Checking dependencies (only once), please be patient ... : GetOpenLibraryDependencies() : Checking in /opt/PV5.1/prog/mod ... /opt/PV5.1/topspin: 1: /opt/PV5.1/topspin: /opt/PV5.1/pathScript: not found ... /opt/PV5.1/topspin: 1: /opt/PV5.1/topspin: /opt/PV5.1/pathScript: not found GetOpenLibraryDependencies() : Checking in /opt/PV5.1/prog/bin ... /opt/PV5.1/topspin: 1: /opt/PV5.1/topspin: /opt/PV5.1/pathScript: not found ... /opt/PV5.1/topspin: 1: /opt/PV5.1/topspin: /opt/PV5.1/pathScript: not found GetOpenPackageDependencies() : Searching for program convert ... Searching for file pattern /usr/include/*/pcre.h ... Searching for program latex ... ParaVision cannot be started due to the following unsatisfied dependencies : SUMMARY OF UNSATISFIED LIBRARIES : Module /opt/PV5.1/prog/mod/dirdata says : missing libPath.so => not found Module /opt/PV5.1/prog/mod/shimTool says : missing libXt.so.6 => not found Module /opt/PV5.1/prog/bin/checkOpenGLVersions says : missing libGL.so.1 => not found ... Module /opt/PV5.1/prog/mod/edtg says : missing libPath.so => not found SUMMARY OF UNSATISFIED SOFTWARE : Missing PATTERN:/usr/include/*/pcre.h. Please install package pcre-devel. Missing PROG:latex. Please install package tetex/latex. ++++ INFO (Sun Aug 6 19:18:31 2017) ++++ You may skip this test by starting ParaVision with './pv -n'
El primer error és /opt/PV5.1/pathScript: not found i comprovo que es deu a que l'enllaç existent s'ha creat en minúscules (pathscript). Corregeixo el nom (pathScript) i quan torno a executar ParaVision ja només es queixa de les llibreries que no formen part de ParaVision i que no es troben ni a ~paravision/prog/shlib ni a ~paravision/prog/pvshlib.
Per resoldre el problema amb els programes no trobats instal·lo els paquets
Les biblioteques següents no hi són al sistema i cal instal·lar la seva versió de 32-bits:
# apt-get install -t jessie-backports libxt6:i386
# apt-get install -t jessie-backports libxpm4:i386
# apt-get install -t jessie-backports libxmu6:i386
# apt-get install -t jessie-backports libxp6:i386
Un cop instal·lats els programes i biblioteques que reclamava ParaVision, provo a executar el programa, i aquest cop ja no dóna cap error, però diu que la primera vegada que s'executa el programa cal fer-ho com a NMR Superuser,
sermnadmin@sermn115:/opt/PV5.1$ ./pv Available disk memory for ParaVision is 40Gbytes. The partition load is 59% Network Consistency Check : seems to be OK, ParaVision can be started ***** ERROR (Mon Aug 7 14:24:31 2017) ***** The first start of ParaVision includes the spectrometer configuration which has not yet been accomplished. It must be performed as NMR Superuser. Please restart ParaVision with NMR Superuser rights (either re-login as user <Nmr Superuser> or execute the shell command 'su <Nmr Superuser>')
Així doncs, surto de la sessió de sermnadmin i obro una sessió com a nmrsu.
Alguns dels init-scripts de Bruker per gestionar automàticament alguns serveis necessaris pel ParaVision/TopSpin i/o el servidor de llicències no s'ajusten als estàndards actuals, i fan que el sistema mostri missatges d'avís i d'error, per exemple, quan s'instal·la i configura un paquet de software nou (cups en aquest cas),
root@sermn115:/home/sermnadmin# apt-get install -t jessie-backports cups Reading package lists... Done ... Get:1 http://ftp.caliu.cat/debian/ jessie/main libcupsfilters1 amd64 1.0.61-5+deb8u3 [106 kB] Fetched 106 kB in 0s (347 kB/s) Preconfiguring packages ... ... Setting up cups-daemon (2.2.1-8~bpo8+1) ... insserv: warning: script 'K00corbaNameService' missing LSB tags and overrides insserv: warning: script 'bruker_lmgr' missing LSB tags and overrides insserv: warning: script 'corbaNameService.default' missing LSB tags and overrides insserv: There is a loop at service rc.local if started insserv: There is a loop between service corbaNameService and mountnfs if started insserv: loop involving service mountnfs at depth 10 insserv: loop involving service nfs-common at depth 9 ... insserv: Starting corbaNameService.default depends on rc.local and therefore on system facility `$all' which can not be true! ... insserv: Max recursions depth 99 reached insserv: loop involving service saned at depth 2 insserv: There is a loop between service corbaNameService and mountall-bootclean if started insserv: There is a loop between service corbaNameService and keyboard-setup if started insserv: loop involving service keyboard-setup at depth 3 insserv: loop involving service mountkernfs at depth 1 insserv: loop involving service corbaNameService at depth 1 insserv: There is a loop between service rc.local and mountdevsubfs if started insserv: loop involving service mountdevsubfs at depth 1 insserv: exiting now without changing boot order! update-rc.d: error: insserv rejected the script header dpkg: error processing package cups-daemon (--configure): subprocess installed post-installation script returned error exit status 1 ... dpkg: dependency problems prevent configuration of cups-core-drivers: cups-core-drivers depends on cups-daemon (>= 2.2.1-8~bpo8+1); however: Package cups-daemon is not configured yet. ... Errors were encountered while processing: cups-daemon cups-core-drivers cups printer-driver-gutenprint E: Sub-process /usr/bin/dpkg returned an error code (1)
En aquests enllaços s'explica la causa de l'error i cóm resoldre'l,
Després d'afegir i configurar el bloc d'informació (LSB comment) als init-scripts bruker_lmgr i corbaNameService.default, provo a configurar els paquets pendents i aquest cop es configuren i només surt un missatge d'avís,
root@sermn115:/etc/init.d# dpkg --configure --pending Setting up cups-daemon (2.2.1-8~bpo8+1) ... insserv: Script bruker_lmgr is broken: incomplete LSB comment. insserv: missing `Required-Start:' entry: please add even if empty. insserv: missing `Required-Stop:' entry: please add even if empty. insserv: missing `Default-Start:' entry: please add even if empty. insserv: missing `Default-Stop:' entry: please add even if empty. insserv: Default-Start undefined, assuming empty start runlevel(s) for script `bruker_lmgr' insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `bruker_lmgr' Setting up cups-core-drivers (2.2.1-8~bpo8+1) ... Setting up cups (2.2.1-8~bpo8+1) ... Updating PPD files for cups ... Updating PPD files for cups-filters ... Updating PPD files for gutenprint ... Setting up printer-driver-gutenprint (5.2.10-3) ...
Edito els init-scripts per afegir els LSB comment que manquen i evitar que donin cap missatge d'avís.
Aquest és el patch generat amb la comanda diff -Naur <original_file> <modified_file>
per actualitzar l'init-script bruker_lmgr:
--- /home/sermnadmin/Documents/20170807-Original-Bruker-init-scripts/bruker_lmgr 2012-03-30 13:10:09.000000000 +0200 +++ bruker_lmgr 2017-08-08 12:58:46.341286448 +0200 @@ -21,6 +21,17 @@ # description: BRUKER FLEXlm license server. # +### BEGIN INIT INFO +# Provides: bruker_lmgr +# Required-Start: +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start/Stop the Flexible License Manager ( Flexlm ) +# Description: Start/Stop the Flexible License Manager ( Flexlm ) +### END INIT INFO + + # lmgrd_alive returns 0 if lmgrd is alive otherwise anything else lmgrd_alive() {
Aquest és el patch generat amb la comanda diff -Naur <original_file> <modified_file>
per actualitzar l'init-script corbaNameService.default:
--- /home/sermnadmin/Documents/20170807-Original-Bruker-init-scripts/corbaNameService.default 2017-08-04 12:41:11.000000000 +0200 +++ corbaNameService.default 2017-08-08 12:51:40.609300041 +0200 @@ -4,7 +4,18 @@ # # $Id: corbaNameService.default,v 1.9.2.7 2010/01/18 17:52:02 mgoe Exp $ # - + +### BEGIN INIT INFO +# Provides: corbaNameService +# Required-Start: +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start/stop CORBA name service +# Description: Start/stop CORBA name service +### END INIT INFO + + XWINNMRHOME=/opt/PV5.1 NMR_SU=nmrsu INITIAL_PORT=12345
Quan executo ParaVision surt un missatge d'error que fa referència al fitxer /opt/PV5.1/prog/pvmacros/PvStartup,
sermnmri@sermn115:/opt/PV5.1$ ./pv Available disk memory for ParaVision is 40Gbytes. The partition load is 59% ... /opt/PV5.1/prog/pvmacros/PvStartup: 115: [: 1002: unexpected operator
Comprovo que es tracta d'un problema de sintaxi (emprar “==” en comptes de “=”) i el corregeixo,
--- ./PvStartup.BKUP-20170809 2017-08-09 10:19:53.179024468 +0200 +++ ./PvStartup 2017-08-09 10:20:21.710655615 +0200 @@ -112,7 +112,7 @@ id=`cat $XWINNMRHOME/conf/nmrsuperuser` nmrsu=`id -u $id` -if [ `id -u` == $nmrsu ] +if [ `id -u` = $nmrsu ] then touch $XWINNMRHOME/.hasStarted fi
i el següent cop que executo ParaVision ja no apareix el missatge d'error.