Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Feb 2021 20:23:19 -0700
From:      Gary Aitken <freebsd@dreamchaser.org>
To:        Pete Wright <pete@nomadlogic.org>, FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: which linux libfuse.so.2?
Message-ID:  <c55fa527-c0fe-97f2-d9d9-bc01aa092e23@dreamchaser.org>
In-Reply-To: <8e50ba4b-a419-0d60-c2b5-1c379e2dc604@nomadlogic.org>
References:  <79254130-e926-fab3-9d5b-b6862c6b747b@dreamchaser.org> <8e50ba4b-a419-0d60-c2b5-1c379e2dc604@nomadlogic.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2/9/21 1:56 PM, Pete Wright wrote:
> 
> 
> On 2/9/21 11:11 AM, Gary Aitken wrote:
>> I'm trying to run a linux binary (prusa-slicer) that is in
>> .AppImage format. When run, it complains about missing
>> libfuse.so.2.  I believe this has to be a linux lib, not the fbsd
>> one.  So does it matter which version of linux it was built for?  I
>> presume I need the x86_64 version.  Or can I just make a symlink in
>> compat/linux/lib to the regular fbsd fuse library?
> i think it would depend under which linux distro you are running
> emulation from.  if you are using the c7-linux packages to supply the
> rest of the linux binaries for this program, I'd grab the CentOS rpm
> for x86_64 (assuming your system is x86_64 and not arm).

thanks.

> there is also work happening on getting debian and ubuntu working
> under freebsd - not sure about its availability on 11.4, but i use it
> for GUI apps on my workstations: https://wiki.freebsd.org/LinuxJails
> 
> the nice thing about this method, is once you've bootstrapped your
> debian environment you can chroot into it and run "apt-get install
> blah" and it all pretty much just works.

thanks; I haven't really looked into that but may if time permits.  But it's
hard enough just keeping up with one system.

...
>> And then, how do I unpack the rpm?
> this is covered in the handbook here: 
> https://docs.freebsd.org/en/books/handbook/linuxemu/ see section
> 10.2.3 "Intall a Linux RPM Based Application".

Thanks, my error in not going back and re-reading.

I found a centos x86_64 version and unpacked it:

$ ls -lt /compat/linux/usr/lib64 | head
total 27564
-rwxr-xr-x  1 root  wheel    16176 Feb  9 19:32 libulockmgr.so.1.0.1
lrwxrwxrwx  1 root  wheel       20 Feb  9 19:32 libulockmgr.so.1 -> libulockmgr.so.1.0.1
-rwxr-xr-x  1 root  wheel   269368 Feb  9 19:32 libfuse.so.2.9.7
lrwxrwxrwx  1 root  wheel       16 Feb  9 19:32 libfuse.so.2 -> libfuse.so.2.9.7

But the .AppImage still chokes with an error loading the library:

$ ./PrusaSlicer-2.3.0+linux-x64-202101111322.AppImage
dlopen(): error loading libfuse.so.2

Do I need to do something other than place the lib in the right place?

Is there a way to run /compat/linux/usr/bin/ldd to figure out what it is
really looking for?  I get the same error whether the symlink for libfuse.so.2
is present or not.  If I try to run the linux ldd I get:

$ /compat/linux/usr/bin/ldd PrusaSlicer-2.3.0+linux-x64-202101111322.AppImage
bash: /compat/linux/usr/bin/ldd: /usr/bin/bash: bad interpreter: No such file or directory

There is no /usr/bin/bash (it's in /usr/local/bin/bash), but there is a
/compat/linux/usr/bin/bash.

Gary



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c55fa527-c0fe-97f2-d9d9-bc01aa092e23>