# AppImage Support



## Joaquin Alcerro (Apr 24, 2020)

Has anyone been able to configure FreeBSD 12.1 to support AppImage. I am trying to run Onivim and getting the follwing error:

dlopen(): error loading libfuse.so.2
AppImages require FUSE to run. You might still be able to extract the contents of this AppImage if you run it with the --appimage-extract option. See https://github.com/AppImage/AppImageKit/wiki/FUSE for more information

I load FUSE on the /boot/loader.conf with fuse_load="YES". This is my kldstat showing fuse loaded:


```
Id Refs Address                Size Name
1   86 0xffffffff80200000  2448d90 kernel
2    1 0xffffffff82649000     80d0 acpi_ibm.ko
3    1 0xffffffff82652000     e1d8 aesni.ko
4    1 0xffffffff82661000    262b0 fuse.ko
5    1 0xffffffff82689000     c408 cuse.ko
6    1 0xffffffff82696000     8210 acpi_video.ko
7    1 0xffffffff82ffa000     494c linprocfs.ko
8    3 0xffffffff82fff000     3178 linux_common.ko
9    1 0xffffffff83003000   12ccb0 i915kms.ko
10    1 0xffffffff83130000    76570 drm.ko
11    4 0xffffffff831a7000    10eb0 linuxkpi.ko
12    3 0xffffffff831b8000    12f30 linuxkpi_gplv2.ko
13    2 0xffffffff831cb000      6d0 debugfs.ko
14    1 0xffffffff831cc000     245d i915_skl_dmc_ver1_27_bin.ko
15    1 0xffffffff831cf000    15d20 if_iwm.ko
16    1 0xffffffff831e5000   205e01 iwm8000Cfw.ko
17    1 0xffffffff833eb000     4260 ng_ubt.ko
18    3 0xffffffff833f0000     9e30 netgraph.ko
19    2 0xffffffff833fa000     91b8 ng_hci.ko
20    1 0xffffffff83404000      9c0 ng_bluetooth.ko
21    1 0xffffffff83405000     18a0 uhid.ko
22    1 0xffffffff83407000     1aa0 wmt.ko
23    1 0xffffffff83409000      970 pflog.ko
24    1 0xffffffff8340a000    32830 pf.ko
25    1 0xffffffff8343d000    3df60 linux.ko
26    1 0xffffffff8347b000    35b20 linux64.ko
27    1 0xffffffff834b1000     88d8 tmpfs.ko
```

Here is the missing library libfuse:


```
➜  Downloads locate libfuse.so.2
/usr/local/lib/libfuse.so.2
/usr/local/lib/libfuse.so.2.9.9
```

I also installed the Linux Compatability as FreeBSD Handbook instructions: https://docs.freebsd.org/doc/12.1-R.../en_US.ISO8859-1/books/handbook/linuxemu.html

Any help is welcome.

Best regards.


----------



## T-Daemon (Apr 24, 2020)

Joaquin Alcerro said:


> Has anyone been able to configure FreeBSD 12.1 to support AppImage.


Apperently /compat/linux/proc needs to be mounted:








						AppImage for BSD · Issue #98 · AppImage/AppImageKit
					






					github.com
				






Joaquin Alcerro said:


> I am trying to run Onivim and getting the follwing error:
> 
> dlopen(): error loading libfuse.so.2


That seems to be a path problem, can be worked arround, but “_OS ABI invalid_” error might arise, see








						AppImage for BSD · Issue #98 · AppImage/AppImageKit
					






					github.com
				




Also note the last posting, linking to








						Releases · kost/static-appimage
					

Alternative AppImage runtime. Contribute to kost/static-appimage development by creating an account on GitHub.




					github.com
				



make-static-appimage_freebsd_amd64


----------



## Joaquin Alcerro (Apr 24, 2020)

Thanks,

For your response. I have been trying to configure my system with that thread and missed the last part. I will try that.

Mean while, this is my mount devices:

➜  ~ mount /dev/ada0p3 on / (ufs, local, journaled soft-update
devfs on /dev (devfs, local, multilabe
procfs on /proc (procfs, loca
linprocfs on /compat/linux/proc (linprocfs, local)
linsysfs on /compat/linux/sys (linsysfs, local)
tmpfs on /compat/linux/dev/shm (tmpfs, local)

For the "OS ABI invalid", I am not getting that error but added the /usr/local/lib in my path to give it a try:

```
➜  Downloads echo $PATH
/home/jalcerro/.asdf/shims:/home/jalcerro/.asdf/bin:/home/jalcerro/.rvm/gems/ruby-2.7.1/bin:/home/jalcerro/.rvm/gems/ruby-2.7.1@global/bin:/home/jalcerro/.rvm/rubies/ruby-2.7.1/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/jalcerro/.rvm/bin:/home/jalcerro/.rvm/bin:/usr/local/lib:/home/jalcerro/.rvm/bin
```
I also downloaded the "make-static-appimage_freebsd_amd64". Then chmod u+x.

Then executed this command:

```
➜  Downloads ./make-static-appimage_freebsd_amd64 Onivim2-x86_64.AppImage ./Onivim2
failed to find 'static-appimage-runtime' src PATH: exec: "static-appimage-runtime": executable file not found in $PATH
```

Not sure about "static-appimage-runtime"

Can you help me out?

Thanks


----------



## T-Daemon (Apr 26, 2020)

Joaquin Alcerro said:


> Not sure about "static-appimage-runtime"
> 
> Can you help me out?


I’m not sure, let me test.

Meanwhile, have you tried the `--appimage-extract` option, as fallback for not using FUSE, as suggested by the error message and described in in the link you posted  earlier? I’m not sure if the .AppImage container will remain when extracting (never used them), you may want to make a copy before. You can try extracting in a /compat/linux/home/<username> directory and run from there, you can also try from a `chroot /compat/linux /bin/bash` environment.


----------



## shkhln (Apr 26, 2020)

/compat/linux is not intended to be usable with chroot.


----------



## Joaquin Alcerro (Apr 26, 2020)

Thanks for your response and support.

So I tried the --appimage-extract option without success but didn't tried moving the application to the /compat/linux folder. I will try it. 

Best regards


----------



## T-Daemon (Apr 26, 2020)

shkhln said:


> /compat/linux is not intended to be usable with chroot.


I advised it based on this Thread 73661, and these postings from it:


SirDice said:


> Try  chroot /compat/linux /bin/bash.





patpro said:


> Its working out of a chroot.


Does that mean the made recommendation of SirDice is not valid and the statement of patpro is probably based on a misinterpretation?


----------



## shkhln (Apr 26, 2020)

T-Daemon said:


> Does that mean the made recommendation of SirDice is not valid and the statement of patpro is probably based on a misinterpretation?



Some packages explicitly or implicitly rely on the ability to access paths outside of /compat/linux:

`% ls -lh /compat/linux/etc/ | grep "/usr/local"
lrwxr-xr-x  1 root  wheel    26B  3 окт.   2019 asound.conf -> /usr/local/etc/asound.conf
lrwxr-xr-x  1 root  wheel    20B  6 июля   2019 fonts -> /usr/local/etc/fonts
lrwxr-xr-x  1 root  wheel    23B  6 июля   2019 openldap -> /usr/local/etc/openldap`


----------



## shkhln (Apr 26, 2020)

As for the OP's question… The advice is very simple: don't even bother until you have learned the Linux emulation basics. Linuxulator can't load FreeBSD shared libraries, "dlopen(): error loading libfuse.so.2" is a message from /compat/linux/lib64/ld-2.17.so meaning it can't find a Linux version of libfuse.so.2.

And, just to be clear, finding dependencies is the easy part there. It only seems like a struggle because so many people don't know what they are doing (and fail the easy part, that is), so they naturally don't get to see more interesting problems. Once you are past that shit you'll have to deal with bugs and missing features in the Linux emulation itself.


----------



## Joaquin Alcerro (Apr 26, 2020)

shkhln thanks for your advise... I installed the fuse-libs in the /compat/linux and the error changed to:
"fuse: mount failed: File name too long"

I will follow that lead.

So I am thinking that this Linux Compatibility has been around for so many years I thought it was going to be very straight forward but it is not. Of course I am new to FreeBSD and trying to make all my applications work coming from Linux. Using Linux Compatibility is for me a workaround until the application works properly with FreeBSD.

Thanks again for your help.

Best regards,


----------



## grahamperrin@ (Feb 26, 2022)

Joaquin Alcerro said:


> …
> dlopen(): error loading libfuse.so.2
> …



eternal_noob the improvement below might fit with your Feature preview / changelog for 13.1 topic.









						linux: improve FUSE support · freebsd/freebsd-src@6bddc31
					

This fixes a number of AppImages; tested with scribus-1.5.6.1-linux-x86_64.AppImage.  Reported By:	@probonopd Reviewed By:	asomers, emaste Sponsored By:	EPSRC Differential Revision:	https://reviews...




					github.com
				




I can't guess the number.



> … tested with scribus-1.5.6.1-linux-x86_64.AppImage.



I haven't tested Scribus, but earlier today I encountered `dlopen(): error loading libfuse.so.2` with an image for Microsoft Teams (I assume that this image will _not_ work with 13.1-RELEASE).

For anyone who's not familiar with the EPSRC acronym: it's probably the UK Engineering and Physical Sciences Research Council.


----------

