×

INDI Library v1.9.1 Released (26 Jun 2021)

Bi-monthly INDI Library v1.9.1 is released bringing a few new drivers and improvements to existing drivers.

Nightly build issue for libasi?

  • Posts: 1936
  • Thank you received: 414
Hi,

I am trying to debug issues I have with our ASI2600MC camera and I ran into a curious situation concerning the ASI driver provided by the libasi package. I am on a Raspberry Pi 4 running Ubuntu Mate 20.04 64 bit:
$> uname -a
Linux mulder 5.4.0-1028-raspi #31-Ubuntu SMP PREEMPT Wed Jan 20 11:30:45 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

As you can see I am looking at the package built last night:
$> dpkg -l libasi
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version                         Architecture Description
+++-==============-===============================-============-======================================================
ii  libasi         1.12~202102230338~ubuntu20.04.1 arm64        Library for ASI Cameras, Filter Wheel, Focuser and ST4

When I look at the contents of the libasi package I get this:
$> dpkg -L libasi
/.
/lib
/lib/udev
/lib/udev/rules.d
/lib/udev/rules.d/99-asi.rules
/usr
/usr/include
/usr/include/libasi
/usr/include/libasi/ASICamera2.h
/usr/include/libasi/EAF_focuser.h
/usr/include/libasi/EFW_filter.h
/usr/include/libasi/USB2ST4_Conv.h
/usr/lib
/usr/lib/aarch64-linux-gnu
/usr/lib/aarch64-linux-gnu/libASICamera2.so.1.16.3
/usr/lib/aarch64-linux-gnu/libEAFFocuser.so.0.2.0605
/usr/lib/aarch64-linux-gnu/libEFWFilter.so.1.5.0615
/usr/lib/aarch64-linux-gnu/libUSB2ST4Conv.so.1.0
/usr/share
/usr/share/doc
/usr/share/doc/libasi
/usr/share/doc/libasi/changelog.gz
/usr/share/doc/libasi/copyright
/usr/lib/aarch64-linux-gnu/libASICamera2.so
/usr/lib/aarch64-linux-gnu/libASICamera2.so.1
/usr/lib/aarch64-linux-gnu/libEAFFocuser.so
/usr/lib/aarch64-linux-gnu/libEAFFocuser.so.0
/usr/lib/aarch64-linux-gnu/libEFWFilter.so
/usr/lib/aarch64-linux-gnu/libEFWFilter.so.1
/usr/lib/aarch64-linux-gnu/libUSB2ST4Conv.so
/usr/lib/aarch64-linux-gnu/libUSB2ST4Conv.so.1

So far all is good. Now, when I check the size of the binary drivers, I see this:
$> ll /usr/lib/aarch64-linux-gnu/libASICamera2.so.1.16.3 /usr/lib/aarch64-linux-gnu/libASICamera2.so /usr/lib/aarch64-linux-gnu/libASICamera2.so.1
lrwxrwxrwx 1 root root      18 Feb 23 00:38 /usr/lib/aarch64-linux-gnu/libASICamera2.so -> libASICamera2.so.1
lrwxrwxrwx 1 root root      23 Feb 23 00:38 /usr/lib/aarch64-linux-gnu/libASICamera2.so.1 -> libASICamera2.so.1.16.3
-rw-r--r-- 1 root root 1887712 Feb 23 00:38 /usr/lib/aarch64-linux-gnu/libASICamera2.so.1.16.3

and this is where it starts to get weird. When I download the driver directly from GitHub, I see this size for the file:
$> wget https://github.com/indilib/indi-3rdparty/raw/master/libasi/armv8/libASICamera2.bin
--2021-02-23 12:34:05--  https://github.com/indilib/indi-3rdparty/raw/master/libasi/armv8/libASICamera2.bin
Resolving github.com (github.com)... 140.82.113.4
Connecting to github.com (github.com)|140.82.113.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/indilib/indi-3rdparty/master/libasi/armv8/libASICamera2.bin [following]
--2021-02-23 12:34:06--  https://raw.githubusercontent.com/indilib/indi-3rdparty/master/libasi/armv8/libASICamera2.bin
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.108.133, 185.199.110.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2243289 (2.1M) [application/octet-stream]
Saving to: ‘libASICamera2.bin’
 
libASICamera2.bin                                           100%[=========================================================================================================================================>]   2.14M  3.09MB/s    in 0.7s
 
2021-02-23 12:34:07 (3.09 MB/s) - ‘libASICamera2.bin’ saved [2243289/2243289]
 
$> ll libASICamera2.bin
-rw-rw-r-- 1 ashdered ashdered 2243289 Feb 23 12:34 libASICamera2.bin

Looking into CMakeLists.txt for libasi, the only thing I see is that the .bin file corresponding to the system architecture gets copied to a file with the name ending in .so but that doesn't explain the difference in file size. So my questions are:
  1. Why is there a difference in file size?
  2. Can I simply take the .bin file for my architecture and copy that over the .so file in the /usr/lib/aarch64-linux-gnu directory and will the driver work?

I guess I can try out copying the .bin file after making a backup of the existing .so file but that still doesn't explain the difference in file size.


Thanks, Wouter
Wouter van Reeven

ASI6200MM and 7 slot 2" filter wheel with a SkyWatcher Esprit 80 ED on a SkyWatcher HEQ5-Pro
ASI1600MM-Pro Cooled and 5 slot 1.25" filter wheel with an 8" TS Ritchey-Chrétien on a SkyWatcher EQ6-R
5 months 1 week ago #67710

Please Log in or Create an account to join the conversation.

  • Posts: 1936
  • Thank you received: 414
To answer my second question myself: yes that works.

So the question remains: what is the difference between the driver in the package and the driver at GitHub?
Wouter van Reeven

ASI6200MM and 7 slot 2" filter wheel with a SkyWatcher Esprit 80 ED on a SkyWatcher HEQ5-Pro
ASI1600MM-Pro Cooled and 5 slot 1.25" filter wheel with an 8" TS Ritchey-Chrétien on a SkyWatcher EQ6-R
5 months 1 week ago #67712

Please Log in or Create an account to join the conversation.

  • Posts: 359
  • Thank you received: 131
It seems the library in ASI SDK (and thus repository as I've copied those verbatim) has some debug info included, but the one in deb-package has been stripped of those, at least the size matches exactly if I copy libASICamera2.bin to libASICamera2.so and run "strip" (or llvm-strip actually as I tested this on x64 machine and regular strip doesn't recognize aarch64 binaries) on it:

jpaana@thinkpad:~/src/indi-3rdparty/libasi/armv8$ ls -l libASIC*
-rwxrwxr-x 1 jpaana jpaana 2243289 Jan 5 00:47 libASICamera2.bin
-rwxrwxr-x 1 jpaana jpaana 1887712 Feb 24 00:35 libASICamera2.so
Remote observatory running Ubuntu 20.10 x64 with ScopeDome 2M, Skywatcher EQ8, TS 8" RC, Atik 383L+, ASI178MC, ASI120MM-S, SX Lodestar X2, SX USB wheel with OAG, ZWO EAF, Gemini SnapCap, USB_DewPoint, KomaHub
The following user(s) said Thank You: Wouter van Reeven
5 months 1 week ago #67726

Please Log in or Create an account to join the conversation.

  • Posts: 1936
  • Thank you received: 414
Thanks, that clears this up!
Wouter van Reeven

ASI6200MM and 7 slot 2" filter wheel with a SkyWatcher Esprit 80 ED on a SkyWatcher HEQ5-Pro
ASI1600MM-Pro Cooled and 5 slot 1.25" filter wheel with an 8" TS Ritchey-Chrétien on a SkyWatcher EQ6-R
5 months 6 days ago #67729

Please Log in or Create an account to join the conversation.

Time to create page: 0.468 seconds