September 22, 2016: installation of Kubuntu 16.04.1 LTS and then of Xubuntu 17.04 on HP ZBook (eight 2.94GHz Intel i7 Processors, 31.7GB RAM)
Attempt to install along a Windows 10 fresh installation
The computer has a SSD drive of 256 Gb and a HDD drive of 1 Gb. Here is the situation in the Kubuntu 16.04 installer after the Windows installation (kubuntu-16.04.1-desktop-amd64.iso):
The HHD is recognized as /dev/sdb, but strangely several partitions are detected on the SSD drive /dev/sda, with some of unknown type. In the openSUSE most recent installer (openSUSE-Tumbleweed-DVD-x86_64-Snapshot20160917-Media.iso) the detection is slightly different: Linux BtrFS and XFS partitions are detected, very probably in a faulty manner:
So the situation is compromised: which partition to resize to make space for the installation of the Linux system on /dev/sda? A possible solution is given
here: shrink the Windows 10 partition to make space for Ubuntu. However, as shown on the two following pictures, only 26 Gb can be freed by Windows. Consequently I have decided to get rid of Windows, and use Linux only on my computer. A Windows 7 will be used in a virtual machine (read further). I have installed Kubuntu 16.04.1 (this is a LTS: long term support — this is what I need, I don’t want to install a fresh linux every 6 months anymore), with the idea of using KDE. The installation has been successful, but a problem has appeared in KDE to manage the extra screen using the USB/display port converter (read further), forcing me to switch to Xfce that handles it better (for some unknown reason).
In Xubuntu 17.04, the following popup appeared after partition choice. Note that there is no other operating system on this computer. The solution was to click on "Go Back" and, if I remember correctly, to disable UEFI installation. If the problem occurs again in the future, additional information maybe will be found
here.
Transfering files from the old to the new computer
To transfer files from the old to the new computer, I have set a NFS share on the new computer, following the guide given
here:
$ apt install nfs-kernel-server
$ mkdir -p /export/tmp
$ chmod -R 777 /export/
$ ifconfig
enp0s25 Link encap:Ethernet HWaddr fc:3f:db:b2:00:15
inet addr:10.20.20.28 Bcast:10.20.255.255 Mask:255.255.0.0
inet6 addr: fe80::f8ac:16f3:a388:d7b7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20026 errors:0 dropped:0 overruns:0 frame:0
TX packets:5468 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10620337 (10.6 MB) TX bytes:512524 (512.5 KB)
Interrupt:20 Memory:ce800000-ce820000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:351 errors:0 dropped:0 overruns:0 frame:0
TX packets:351 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:37456 (37.4 KB) TX bytes:37456 (37.4 KB)
wlp61s0 Link encap:Ethernet HWaddr 58:91:cf:64:d6:5b
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
$ cat /etc/exports
/export/tmp *(rw,nohide,insecure,no_subtree_check,async)
According to my work colleague Cédric Marques:
-
“rw”: for the others.
-
“nohide”: for the mount point to be visible from the network.
-
“insecure”: ?
-
“no_subtree_check”: for performance.
-
“async”: for performance.
Then:
$ service nfs-kernel-server restart
$ exportfs
/export/tmp <world>
On the old machine (NFS client), I have done:
$ mkdir /home/SHARE_FOR_TRANSFER
$ sudo mount -t nfs 10.20.20.28:/export/tmp /home/SHARE_FOR_TRANSFER
An idea would be to put symbolic links to directories to copy in /home/SHARE_FOR_TRANSFER (on the old machine) and access these files from the new machine. But it is not possible (cf
here). Instead of symbolic links, my second idea was to use the "bind" feature appeared in Linux 2.4.0: the possibility to remount part of the file hierarchy somewhere else (see "man mount"):
$ mkdir /home/SHARE_FOR_TRANSFER/usr_local
$ mount --bind /usr/local usr_local
It works on the old machine, but the directories are seen as empty on the new machine. So, according to C. Marques the best method is to copy the relevant directories of the old machine on the new machine, using “cp” on the old machine (for instance, copy of /usr/local in /home/SHARE_FOR_TRANSFER); as the server is on the new machine, of course the directories are physically copied on the new machine. Thus the server has to be kept on the new machine.
To have more space for the copy on the new machine, I have been compelled to change the export directory (put it in my home directory mse6s3, i.e. on the home partition, rather than in /export/tmp, i.e. on the / partition). This is done easily:
$ mkdir /home/mse6s3/export
$ cat /etc/exports
/home/mse6s3/export *(rw,nohide,insecure,no_subtree_check,async)
$ sudo service nfs-kernel-server restart
$ sudo exportfs
/home/mse6s3/export <world>
Virtual machine and related stuff
My first idea was to use VMware as before; but I had to fall back to VirtualBox to be able to use my PKI smart card, as explained below.
VMware
First installation of VMware-Player-12.5.0-4352439.x86_64.bundle:
$ sudo ./VMware-Player-12.5.0-4352439.x86_64.bundle
But it is mandatory to enter a license or a valid email address. To uninstall:
$ sudo vmware-installer -u vmware-player
Instead of that, installation of VMware-Player-6.0.0-1295980.x86_64.bundle:
$ sudo ./VMware-Player-6.0.0-1295980.x86_64.bundle
But at start:
So I fall back to version 12.5, and indicate an invalid email address. It runs correctly and is able to run my previous virtual machine.
Card reader
Support in Linux Ubuntu 16.04
$ wajig install pcscd pcsc-tools
$ pcsc_scan
PC/SC device scanner
V 1.4.25 (c) 2001-2011, Ludovic Rousseau <ludovic.rousseau@free.fr>
Compiled with PC/SC lite version: 1.8.14
Using reader plug’n play mechanism
Scanning present readers...
0: Alcor Micro AU9540 00 00
Mon Nov 7 16:39:03 2016
Reader 0: Alcor Micro AU9540 00 00
Card state: Card removed,
Mon Nov 7 16:39:31 2016
Reader 0: Alcor Micro AU9540 00 00
Card state: Card inserted,
ATR: 3B F2 18 00 02 C1 0A 31 FE 58 C8 0B 77
ATR: 3B F2 18 00 02 C1 0A 31 FE 58 C8 0B 77
+ TS = 3B --> Direct Convention
+ T0 = F2, Y(1): 1111, K: 2 (historical bytes)
TA(1) = 18 --> Fi=372, Di=12, 31 cycles/ETU
129032 bits/s at 4 MHz, fMax for Fi = 5 MHz => 161290 bits/s
TB(1) = 00 --> VPP is not electrically connected
TC(1) = 02 --> Extra guard time: 2
TD(1) = C1 --> Y(i+1) = 1100, Protocol T = 1
-----
TC(2) = 0A --> Work waiting time: 960 x 10 x (Fi/F)
TD(2) = 31 --> Y(i+1) = 0011, Protocol T = 1
-----
TA(3) = FE --> IFSC: 254
TB(3) = 58 --> Block Waiting Integer: 5 - Character Waiting Integer: 8
+ Historical bytes: C8 0B
Category indicator byte: C8 (proprietary format)
+ TCK = 77 (correct checksum)
Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B F2 18 00 02 C1 0A 31 FE 58 C8 0B 77
CardOS V4.2C (SLE66CX360PE dual interface)
^C
$
So the internal card reader “Alcor Micro AU9540” is correctly recognized on Linux, though some problems may remain (cf
here).
Support in VMWare Workstation 12 Player
See
here: this should work with VMware. Everything works fine in Windows 7 with “CardOS API V5.3 (Build 08)”: the card is recognized when inserted, when trying for instance “intranet.siemens.com/4success” in Internet Explorer 11, a PIN is asked and correctly presented to the card (when entering the wrong PIN, a suitable message is displayed). But just after having entered the correct PIN, the following error is obtained in Internet Explorer: “This page can’t be displayed”. Google Chrome gives a more explicit error message: “This site can’t provide a secure connection. pki.entitlement.siemens.com sent an invalid response. Try running Windows Network Diagnostics. ERR_SSL_PROTOCOL_ERROR”. When looking in logs with “Computer -> Manage -> Event Viewer -> Windows Logs -> Application”, we find:
Smart Card Reader ’VMware Virtual USB CCID 0’ rejected IOCTL TRANSMIT: Incorrect function
So there is something malfunctioning. No more success with an external smart card reader “SCM Microsystems Inc. SCR 3310 [CCID Interface]” (though also correctly recognized on the Linux host). Cedric Marques advises to use the VMWare virtual machine (.vmdk file) in VirtualBox.
Support in VirtualBox 5.1.6
The first try is to use the VirtualBox version 5.0.24 shipped with Ubuntu 16.04, and following the procedure given by Cédric Marques on the
wiki. For some reason (immaterial to the present purpose), I have rapidly switched to the last version, namely 5.1.8. Problem: an error is obtained when trying to run the .vmdk file (though it worked correctly in version 5.0.24):
RTR3InitEx failed with rc=-1912
Running ’/sbin/vboxconfig’ with sudo privileges did not help. So I have reverted to version 5.1.6 of VirtualBox, and it worked again. First, to have access to internet and the network, it was necessary to choose “Bridged Adapter” in “Settings -> Network -> Adapter 1 -> Attached to”, and set the main network interface of the Linux host (the first one given by ifconfig, “enp0s25” in my case).
Now, concerning the USB support in VirtualBox (necessary to be able to test both card readers mentioned above), it was mandatory:
-
to add the current Linux user to the vboxusers group, otherwise no USB device is available in “Settings -> USB -> USB Device Filters”.
-
to set “USB 2.0” for the USB controller in “Settings -> USB” (“USB 3.0” did not work). Note on May 31, 2017 (VirtualBox 5.1.22 of Ubuntu 17.04): it works when choosing USB 1.1.
-
close VirtualBox, and install or reinstall the extension pack from the VirtualBox website: here or directly here.
Once all of this done, we have made several tries: the internal card reader alone added in the USB Device Filters, only the external one, or both ones. We have not found any configuration working with the internal reader, whereas we have achieved to make the external reader work, most of the time by connecting the USB port with the smart card already entered in the reader. Once the smart card is detected by “CardOS API”, the address “intranet.siemens.com/4success” mentioned above works correctly in Internet Explorer: no more error “This page can’t be displayed”.
Using shared folders in VirtualBox
They can be added in “Settings -> Shared Folders”. The added folders are available in “Network -> VBOXSVR”. It is possible to read and write in these shared folders, but when trying to execute AMESim.bat, the following error is obtained in the Windows shell:
UNC paths are not supported. Defaulting to Windows directory.
CMD does not support UNC paths as current directories.
Microsoft Windows uses the following types of paths: local file system (LFS), such as C:\File. uniform naming convention (UNC), such as \\Server\Volume\File or / <internet resource name>[\Directory name] (at least in Windows 7 and later)
The problem is that the path of the shared folders begins with “\\”: for instanced “\\VBOXSVR\windows_share”. The solution is to “map network drive” (accessible button when clicking on “Computer” in the Windows Explorer) to some letter, e.g. X:. When running AMESim.bat from this volume, it works correctly.
So, no need to install a Samba server manually on the Linux host.
Exchange server (mail, calendar)
On my previous work machine, I did not have access to the Exchange server; I used only IMAP facilities of the server (fortunately still available) with Kontact. This time I have tried and achieved to configure Thudnerbird to have full access to the Exchange server (except for the address book).
Mail
I have used DAVMAIL and Thunderbird in combination, following the indications given
here. Before installing davmail, I had to do:
$ wajig install libswt-gtk-3-java.
The following address has been used for the mail:
https://dekomcasa001.net.plm.eds.com/exchange
But at some time it has been necessary to use (thanks Eric!):
https://usslmcasa001.net.plm.eds.com/owa
or
https://dekomcasa001.net.plm.eds.com/owa
or
https://mail.industrysoftware.automation.siemens.com/owa
But all these solutions do not work anymore at some time: slow, mail headers eaten (sender not known), attached files disappear.
Finally:
https://dekomcli002.net.plm.eds.com/owa (does not work)
https://dekomcli004.net.plm.eds.com/owa (works)
Other possible solution in the future if Exchange does not work anymore: IMAP (see old kmail configuration).
Thunderbird
“Account Settings -> Drafts and Templates -> Keep message drafts in -> Other” and then I chose a local folder (to avoid saving not finished messages on the network, for two reasons (i) no one must be able to read it as it is not finished (ii) in case of network failure, it is not possible to save the message as a draft!
Also, I have installed two add-ons for Thunderbird:
-
LastColour addon. The keyboard shortcut does not seem to work, I use the contextual menu.
-
HTML color names in the color picker widget: here
The following extensions
herehere did not help to create a shortcut or a contextual menu entry to strike out (“strikethrough”) the selected text (“menu wizard” extension also did not help).
Calendar
To gain access to the network Exchange calendar, I have followed the indications given
here and
here. I have used the following address:
https://dekomcasa001.net.plm.eds.com/ews/exchange.asmx
At Thunderbird update, I got a problem: my calendar was lost, with the following configuration:
Thunderbird 52.2.1
Exchange EWS provider 3.9.0
Lightning 5.4
The solution was to install version 3.9.0y of EWS provider, found
here.
Address book
I did not manage to get the network address book. Not so much a problem for me.
Meeting rooms
To see meeting room calendars and place reservation in them, I have followed a procedure inspired from
this:
-
select your exchange calendar already (configured as described above) in the calendar pane, and right-click on the pane: “Clone settings to New Calendar”.
-
replace your “Primary email address” by the address of the meeting room (e.g. mtgroom.plm@toto.com, obtained in Outlook by right-clicking on a room name and choosing “Open Contact Card“). The “Save” button disappears.
-
click on “Check server and mailbox”; the “Save” button should reappear. Click on it.
-
edit the name and color of the calendar in the calendar pane with a right click and choose “Properties”.
Note that I had some problems in my Windows virtual machine in Outlook 2010; this is summarized in the following quotation:
Un petit point par rapport au calendrier:
* sous la machine virtuelle Windows, même après un reboot, je ne vois que le meeting de David de 18h à 19h. Si cela n’a pas changé, tu as la même chose sur ta machine. Donc gros problème, car par exemple David Lagrange, Guillaume Bron, ou mon Thunderbird Linux voient toutes les réunions de la journée sans problème.
* Les réservations que je fais sous mon Outlook (machine virtuelle Windows) avec clic droit -> new appointment (sur le calendrier de la salle) ne sont vues que sous cet Outlook. Elles n’apparaissent pas chez Guillaume Bron ou sur mon Thunderbird Linux. Une deuxième façon de faire dans Outlook est un double clic: le dialogue n’est pas le même (il faut faire "send"); si je fais ça la réservation n’apparaît pas sur le calendrier de la salle, mais sur le calendrier personnel (bien que j’ai fait le double clic sur le calendrier de la salle, et que le mail a été envoyé à la salle!).
* En revanche, si je fais des réservations sous Thunderbird (un seul moyen de faire, pas deux comme dans Outlook), elles sont vues chez Guillaume Bron.
* David Lagrange a déjà eu des problèmes de réservation sous Outlook a priori non vues par les autres. Pour éviter le problème maintenant il créée une réunion en invitant les gens et en réservant la salle en même temps (il ne m’a pas donné le détail), et il n’a plus de soucis. La réunion "Atkinson" correspond effectivement à une autre réunion, pas à la sienne (pas d’histoire de décalage horaire comme je l’avais initialement supposé).
The problems came from Outlook 2010. Installing a newer version, they are solved.
Timesheet software
Not to be confused with “time tracking”. My need is the following one:
here (no answer, I have not found any Thunderbird extension). There are tools, but too complicated for what I intend to do:
Finally I have used the following solution:
-
creation of a new calendar called “TIMESHEET” in Thunderbird.
-
addition of a “all day event” being “private” with “daily” repetition “until forever”, no reminder, and no description.
Then, clicking on any instance of the event, we get a popup to choose between “edit just this occurrence” and “edit all occurrences”. Choose the first possibility. Once saved, the popup will not appear again for this special day, it becomes detached from other occurrences. This is exactly what I want.
Two HP E242 screens connected with display ports (one on the dock station, one on the computer)
I do NOT use the NVidia drivers. I use a USB-display port converter in 16.04, I have followed these two links:
herehere. It works but yet eats considerable CPU!
October 18: screen configuration broken at reboot in XFCE. Segfault when starting xfce4-display-settings (Floating point exception). KDE applications (Konsole, Kate) no more able to start. Restart and enter plasma: Konsole and Kate start; change the screen configuration in System Settings. Restart in XFCE: xfce4-display-settings now starts correctly; but incapable of setting the right configuration. Solution: reboot after having disconnected the extra USB/displayLink monitor: then it is possible to have a correct configuration. Trying to reconnect the extra monitor and set it up: again no success and segfault: I disconnect it, and restart: it works again without the need to enter KDE and change display.
Another effect after having plugged the second monitor: the double click on title bars no more shade (roll up) windows.
I suspect some kind of nasty interaction between KDE and Xfce. It would be needed to reinstall a Xubuntu version from scratch.
In Xfce 17.04, I have removed transparency on windows when moving them, otherwise I got computer freeze forcing me to reboot in the hard way. But I have NOT disabled compositing, since then the zoom feature ALT+mousewheel does not work.
Update on December 4, 2017: I have tried with Xubuntu 17.10, which has kernel 4.13 that should work better with display port (cf
here): the second display port monitor is not recognized as in previous versions. The DisplayLink USB/Display port adapter does not work as in 17.04 (contrary to 16.04). I have the problem described
here. I have tried the solution given
here: after a reboot, the monitor connected to the DisplayLink USB adapter is recognized and works correctly, but the other one connected directly with a display port cable does not work anymore! Simplifying the file
/etc/X11/xorg.conf.d/20-intel.conf to
Section "Device"
Identifier "Intel Graphics"
Driver "Intel"
EndSection
did not help (this file refers to the driver installed by the package "xserver-xorg-video-intel"). Information
here may help, but I have fallen back to the VGA cable solution for the second monitor.
Hard drive
$ sudo smartctl -a /dev/sdb|grep -i load_cy
76 :193 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 3300
$ sudo hdparm -B 255 /dev/sdb
After that the problem is solved. To make the setting permanent, the first idea is to uncomment the line “apm = 255” in /etc/hdparm.conf; but it does not work after a reboot. For this to work at startup, I have added the previous line in /etc/rc.local (other solutions using systemd are proposed at
here, but I have not tested).
So as for that to work also after “suspend to ram”, I have put the previous line at the end of file /lib/systemd/system-sleep/hdparm.
Update in Ubuntu 17.04: no more /etc/rc.local script, and it is not executed at startup if created. I have first tried to follow the method given at
here, i.e. creating a file /etc/systemd/system/hdplccs.service containing
[Unit]
Description=hdparm_load_cycle_count_save
[Service]
Type=oneshot
ExecStart=/sbin/hdparm -B255 /dev/sdb
TimeoutSec=0
StandardInput=tty
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
The script has no need to be executable, but it has to be enabled (see
here and
here):
$ systemctl is-enabled hdplccs.service
disabled
$ systemctl enable hdplccs.service
Created symlink /etc/systemd/system/multi-user.target.wants/hdplccs.service → /etc/systemd/system/hdplccs.service.
$ systemctl is-enabled hdplccs.service
enabled
After a reboot the APM level is correct:
$ hdparm -B /dev/sdb
/dev/sdb:
APM_level = off
According to
this, setting hdparm may be done sooner in the boot process, using a udev rule instead of a systemd unit. I have not tried.
Run muon with sudo privileges
"gksu muon", or "gksudo muon" or “kdesudo muon” set as “Command” in the Launcher. By the way, I have just realized that Muon supports at least some subset of regular expressions: e.g. the search “xfce4.*plugin” works correctly.
\SpecialChar LyX
To restore the key bindings do:
$ cp OLD_MACHINE_REMAININGS_AFTER_TRANSFER/jscordi/.lyx/bind/user.bind .lyx/bind/
and for the editor colors:
$ cp OLD_MACHINE_REMAININGS_AFTER_TRANSFER/jscordi/.lyx/preferences .lyx/
Font problem
In the “Settings -> Appearance” dialog, when clicking on “oxygen-gtk”, all fonts on the screen are changed to a fuzzy font; and at short or mid-term several display problems appear here and there. Maybe this choice would not appear when working in a “pure” XFCE installation (e.g. if installing Xubuntu, instead of what I have done, i.e. installing Kubuntu and then gnome and other desktop managers).
Strange characters in vim when run in Konsole
UTF-8 has to be selected in Konsole: Settings -> Edit Current Profile -> Advanced Encoding -> Unicode -> UTF-8.
NFS mounts
At first it was not possible to read and write files on the NFS mounts. A very large group id appeared for them:
$ cd /media/amedev
$ ll
total 48K
drwxr-xr-x 12 root root 4.0K 2016-10-18 08:28 .
drwxr-xr-x 8 root root 4.0K 2016-10-03 17:17 ..
drwxrwsr-x 14 nobody 4294967294 4.0K 2016-10-04 11:42 doc
drwxrwxr-x 10 root 4294967294 4.0K 2013-03-05 09:51 hotline
drwxrwxr-x 37 root 4294967294 4.0K 2016-03-17 09:57 projects
drwxrwxr-x 6 root 4294967294 4.0K 2009-08-24 09:49 proposals
drwxrwxr-x 8 root 4294967294 4.0K 2007-07-30 09:57 requests
drwxrwsr-x 5 root 4294967294 4.0K 2012-07-12 09:19 system
drwxrwxr-x 14 root 4294967294 4.0K 2016-10-18 11:16 test
drwxrwxr-x 35 nobody 4294967294 4.0K 2016-10-20 10:38 tools
drwxrwsr-x 14 root 4294967294 4.0K 2016-07-07 13:43 training
drwxr-sr-x 210 root 4294967294 4.0K 2016-10-19 15:28 users
lrwxrwxrwx 1 root root 18 2016-10-17 12:45 amedev2 -> /amedev2_nobackup/
lrwxrwxrwx 1 root root 12 2016-10-17 12:45 amedistrib -> /amedistrib/
lrwxrwxrwx 1 root root 6 2016-10-18 08:28 appli -> /appli
$
At first I tried to change my uid/gid in /etc/passwd et /etc/group so as to be the same as the ones on the NFS server machines. It allowed me to read and write files on the NFS shares. But to avoid having a very large group id as above, it was necessary to add “nfsvers=3” in the NFS mount options, for instance:
roa-dev.lmsintl.com:/data1/amedev /media/amedev nfs dev,noauto,exec,nfsvers=3 0 0
CIFS mounts
To mount the serveur_etudes share indicated in /etc/fstab:
//lyop-fs02.lmsintl.com/serveur_etudes /media/etudes cifs noexec,noauto,user,credentials=/home/mse6s3/.credentials 0 0
the domain PLM has now to be specified explicitly in the ~/.credentials file:
$ cat .credentials
username=mse6s3
password=foobar
domain=PLM
Network shares
I have still problems when disconnecting the computer from the network. See:
kworker process appear and takes much CPU. They are not related to KDE, but to the kernel.
$ pgrep kworker|wc -l
37
It is not possible to kill them. I have not been able to solve this problem.
Restore Firefox bookmarks
Fonts
I have changed the default font in Konsole from “Oxygen Mono” to “Ubuntu Mono”.
Various
-
spectacle gives strange results, but ksnapshot is still available. In 17.04 ksnapshot has disappeared.
-
in 16.04, I deactivated Baloo as usual.
-
a Python error “ERROR:root:code for hash md5 was not found” is obtained in a Python script. This is because “import hashlib” works in the Linux installation python but not in the Amesim python:\begin_inset Separator latexpar\end_inset
$ python_amesim -c “import hashlib”
[... errors ...]
$ python_amesim --version
Python 2.7.6
$ python -c "import hashlib"
$ python --version
Python 2.7.12
But (cf ’man ld-linux’ for the use of LD_DEBUG):
$ LD_DEBUG=all python -c "print ’coucou’" 2>&1 | sed -n "s/.*\(lib[^ ]*\.so\).*/\1/p"|sort|uniq
lib64/ld-linux-x86-64.so
libc.so
libdl.so
libm.so
libpthread.so
libutil.so
libz.so
$
$ LD_DEBUG=all python -c "import hashlib;a = hashlib.new(’SHA1’);a.digest()" 2>&1 | sed -n "s/.*\(lib[^ ]*\.so\).*/\1/p"|sort|uniq
lib64/ld-linux-x86-64.so
libcrypto.so
libc.so
libdl.so
libm.so
libpthread.so
libutil.so
lib.x86_64-linux-gnu.so
libz.so
$
whereas with the Amesim Python:
$ LD_DEBUG=all python_amesim -c "import hashlib;a = hashlib.new(’SHA1’);a.digest()" 2>&1 | sed -n "s/.*\(lib[^ ]*\.so\).*/\1/p"|sort|uniq
y
lib64/ld-linux-x86-64.so
libcrypto.so
libc.so
libdl.so
lib-dynload/_collections.so
lib-dynload/cStringIO.so
lib-dynload/_heapq.so
lib-dynload/itertools.so
lib-dynload/operator.so
lib-dynload/time.so
libgssapi_krb5.so
lib/ld-linux.so
libm.so
libpthread.so
libpython2.7.so
lib.so
libssl.so
libtinfo.so
libutil.so
$
We have the two cryptographic libraries libcrypto.so and libssl.so. They seems to be found in $AME/sys/python/lnx/lib/libcrypto.so.6 (LD_LIBRARY_PATH is completed by python.sh). We have:
$ ldd /home/local/mse6s3/non_src/AMESIMs/v1500_release/Amesim/sys/python/lnx/lib/libcrypto.so.6
linux-gate.so.1 => (0xf77b9000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7639000)
libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xf761e000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7467000)
/lib/ld-linux.so.2 (0x565d4000)
But:
$ ldd /home/local/mse6s3/non_src/AMESIMs/v1500_release/Amesim/sys/python/lnx/lib/libssl.so.6
linux-gate.so.1 => (0xf779b000)
libgssapi_krb5.so.2 => not found
libkrb5.so.3 => not found
libcom_err.so.2 => not found
libk5crypto.so.3 => not found
libresolv.so.2 => /lib/i386-linux-gnu/libresolv.so.2 (0xf76fd000)
libcrypto.so.6 => not found
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf76f7000)
libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xf76dc000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7526000)
/lib/ld-linux.so.2 (0x5663d000)
Some libraries are missing. The problem is solved after:
$ wajig install libgssapi-krb5-2:i386
[...]
Other necessary installation for Amesim is:
$ wajig install libxrender1:i386 libglu1-mesa:i386
Update in Xubuntu 17.04: the libpng12.so library is not found.
/home/mse6s3/local/src/svn/amesim_libraries_source_code/VALVE_BUILDER/code/VIRTUAL_AMESIM/lnx_x64/AMESim: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
It also resulted in errors when installing other packages:
$ wajig install cndrvcups-ufr2-uk
[sudo] password for jscordi:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
cndrvcups-ufr2-uk : Depends: libpng12-0 (>= 1.2.13-4) but it is not installable
E: Unable to correct problems, you have held broken packages.
$ wajig install libpng12-0
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libpng12-0 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package ’libpng12-0’ has no installation candidate
Unfortunately libpng12 has disappeared in Ubuntu 16.10:
here. It is advised to install it manually from
here:
$ dpkg -i libpng12-0_1.2.54-1ubuntu1_amd64.deb
After that Amesim 16.0 (dev version) starts (64 bits executable), and no more error on package installation. A license problem remains:
The solution is to change the start of /etc/hosts from
127.0.0.1 localhost
127.0.1.1 rama.universe rama
to
$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 pl1frrnn0017nb.universe pl1frrnn0017nb
Since
$ head /home/mse6s3/local/non_src/AMESIMs/licensing/LMS.lic
# LMS International c 1999-2016
HOST pl1frrnn0017nb fc3fdbb20015
ISV lms
To run a 32-bits simulation, it has also been necessary to install libpng1.2 in 32 bits version:
here.
To start Amesim 15.0, installations were necessary, as it is a 32 bits executable: libglu1-mesa:i386, libxrender1:i386.
Location of dynamic and static libraries, access to development files
$ wajig list-installed |\grep libflac
libflac++6v5:amd64
libflac8:amd64
$ wajig list-files libflac8
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/libflac8
/usr/share/doc/libflac8/copyright
/usr/share/doc/libflac8/changelog.Debian.gz
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
/usr/lib/x86_64-linux-gnu/libFLAC.so.8
$ wajig list-all |\grep "libflac.*dev"
libflac-dev Free Lossless Audio Codec - C development library
libflac++-dev Free Lossless Audio Codec - C++ development library
libflac-ocaml-dev OCaml interface to the flac library — developpement files
$ wajig describe libflac8
Package Description
========================-===================================================
libflac8 Free Lossless Audio Codec - runtime C library
$ wajig list-files libflac-dev
/.
/usr
/usr/share
/usr/share/aclocal
/usr/share/aclocal/libFLAC.m4
/usr/share/doc
/usr/share/doc/libflac-dev
/usr/share/doc/libflac-dev/copyright
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libFLAC.a
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/flac.pc
/usr/include
/usr/include/FLAC
/usr/include/FLAC/metadata.h
/usr/include/FLAC/all.h
/usr/include/FLAC/stream_encoder.h
/usr/include/FLAC/format.h
/usr/include/FLAC/export.h
/usr/include/FLAC/stream_decoder.h
/usr/include/FLAC/assert.h
/usr/include/FLAC/callback.h
/usr/include/FLAC/ordinals.h
/usr/share/doc/libflac-dev/changelog.Debian.gz
/usr/lib/x86_64-linux-gnu/libFLAC.so
In these development files we have headers but also a static .a library (i.e. a collection of .o object files for static link edition), not source code. To get source code see
here.