-
-
Notifications
You must be signed in to change notification settings - Fork 563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AppImage for BSD #98
Comments
Why don't you try out yourself. I think the same process can be followed for BSD too. Just try with your native package manager. Come back when you have a problem compiling. |
I haven't tried so far; mainly because I don't have a BSD Live ISO that can be live-booted with GRUB2. |
@asdedhj have you ever tried to get an AppImage run on BSD? I mean, after all, the only Linux-specific dependency we have is FUSE, which I assume is available on BSD as well. There's a few Linux specific code snippets in our code we could replace, but first, someone should test what needs to be done for proper BSD support. |
While I agree, we won't be working on it unless some BSD user/developer steps up to do it. That person would, of course, have our full support. |
Let's not close this, but add the "help wanted" flag instead. We wouldn't reject a PR implementing support for this, of course. |
libfuse: available in all the major UNIX (both free and proprietary)
I'm away-from-desk rn, I'll have to take a look at the build documentation soon |
I have a tree with FreeBSD support I've just finished. The only problem is that it currently requires "/proc/curproc/file" ( FreeBSD equivalent of /proc/self/exe ). For most FreeBSD users, I'm sure this is acceptable, but I'm not sure how you all feel about it. Let me know, and ill clean up my changes and make a pull request. Right now my tree has dlopen for fuse |
@kolbycrouch, for my freeBSD I feel that your solution could be ok. I hope you provide instruction on installation procedure. |
Hi @kolbycrouch that's great to hear! Is there any way to try it out without having to wipe a full hard disk? |
@probonopd you could just install to a USB disk... @kolbycrouch that is really the only change needed? Wow, I expected more changes. I'll check how we can check whether we build for a BSD with CMake and will add some preprocessor changes to use the other path then. |
Wait a second, are we talking about a port of AppImage (i.e., |
My guess was the former, but I wasn't sure hence the question. |
@kolbycrouch as for the first requirement for Appimages to work in FreeBSD, aka emulating a linux /proc filesysytem, I solved the issue, since FreebSD has a built-in facility for that, called linprocfs filesystem. The command for emulating linux /proc filesystem is: I'm now trying to solve the FUSE issue, without success. I loaded the FUSE kernel module with "kldload fuse" (you can verify with "kldstat") then installed sysutils/fusefs-libs, but when I launch an .Appimage I still see this error: Notice that I see on my system is present /usr/local/lib/libfuse.so.2 (a symbolic link to the actual library) |
I'm talking about porting AppImage to run on FreeBSD. Now that you mention it though, I believe the OP is talking about running a Linux appimage on FreeBSD. Right now I'm having some problem where the squashfs gets mounted, but I think something goes wrong in creating the temp directory. The appimage will start, run the binary that AppRun points too, but stalls for several minutes trying to unmount the filesystem. Trying to read the temp directory with anything (i.e. /bin/ls or /bin/du) stalls as well. Once I figure it out everything should be good to go. Quick question though. After glancing over runtime.c some more, it looks like we remove the files that are mounted? Am I wrong about this, or is this really how it works? If so, why not simply unmount the filesystem? @brunobiondo If you want to run a Linux appimage, you will need ALL the dependencies that AppImage needs placed in the /compat/linux directory. The easiest way to do this is probably extracting a full rootfs of the latest Ubuntu lts and perhaps even chrooting into it to install everything else you need. I'm not 100% sure if that will work, but I've seen guides on the internet about running full distros in a chroot on freebsd. Keep in mind though. The compat layer is not complete. You may end up running into some issue where a syscall isn't implemented, and the error might be quite cryptic to you. The best thing to do would be to see if you can build a freebsd binary from source if it's available. I messed around with a few crypto miners/wallets a couple of years ago, and was able to get everything except for the CUDA-dependent stuff working. This way you won't need linux compat or AppImage support. |
The workflow is:
|
Ok, I understand you are trying to port native AppImage support to FreeBSD :)
Yes, I'm trying to install a wallet for the upcoming groundbreaking IOTA crypto currency.
I follow your advice, I will not try to run a Linux AppImage, but I have a curiosity just en-passant, and would like your opinion: but in general installing a rootfs in a docker container could it be a viable solution for testing applications written for other OSes? |
Out of curiosity, please try the Inkscape 1.0 pre-alpha AppImage from inkscape.org. Unlike most other AppImages, this one bundles everything, so there should be no external dependencies. I am wondering how it would fare with the BSD Linux compatibility layer. As a temporary workaround as long as FUSE is not working, you can extract and run it with |
Hi @probonopd, as per your suggestions, and after having set up linux compatibility as per instructions here https://www.freebsd.org/doc/handbook/linuxemu-lbc-install.html, /root > ./Inkscape-9dee831-x86_64.AppImage --appimage-extract-and-run Also notice that using 'brandelf -t linux ./Inkscape-9dee831-x86_64.AppImage' PRODUCED NO OUTPUT. |
OK, so it seems like the extraction does work but running |
Hi @probonopd, I've read the section about FUSE here https://github.com/AppImage/AppImageKit/wiki/FUSE, where you cite AppRun, then I noticed that AppRun is a bash shell script, and wanted to point out that the so-called she-bang (1st line) for where to search the shell interpreter, in AppRun is '#!/usr/bin/bash'. This can work for many unix flavors OSes, but in FreeBSD, by default, the interpreters are put in /usr/local/bin, and there are some (posix?) specifications that come in aid for more portability in general: specify the she-bang as '#!/usr/bin/env bash', |
Thanks @brunobiondo. The different shells are not always 100% compatible, so I explicitly set it to Every AppImage may contain something else as the AppRun entry point. Some AppImages use a compiled (C) executable as the AppRun, others (e.g., those generated by linuxdeployqt) use just a symlink to the main executable. So to become more "Linux compatible", BSD users might install a symlink to the Bourne Again Shell in |
Hi @probonopd, given that the AppRun I poke around is a bash shell script extracted from the AppImage available (among other packaged formats) on the IOTA Trinity wallet project at https://github.com/iotaledger/trinity-wallet/releases. I know that unfortunately :( there may exist even big behavioral and syntax differences among various kinds of unix shell interpreters that have historically occurred over the years (from Bourne to Korn to C Shell to Bourne Again to Zsh and others: I personally use the youngest, much more linear and syntactically clear, yet powerful as well and less error-prone Fish shell, but that's another story). That's why it is a normal habit to specify which interpreter to choose in the she-bang, like, in the case of the Trinity's AppRun is '#!/usr/bin/bash'. And I said that you can also specify bash by putting this shebang: '#!/usr/bin/env bash', that is more portable across different unixes and unix-likes. That said, as a FreeBSD user, if I were to make bash script with 'first-style shebang' working, I would opt for your proposal, that is making a symlink /usr/bin/bash that points to the real Bourne Again shell. |
That's great to hear. Just to verify: You can download an AppImage and run it on FreeBSD with Focal userspace? This would be an awesome achievement!
For one, helloSystem is still FreeBSD 12.2 based, and there I get Note to self:
|
What I've meant with Focal was testing it by hand using squashfuse(1) in Focal chroot. However, I think I've figured out what's wrong, appimages end up calling the kernel mount(2) function in a somewhat weird way. There's a patch at https://reviews.freebsd.org/D30606 which should make it work. I was able to successfully run scribus-1.5.6.1-linux-x86_64.AppImage, as root, from within Focal chroot. I don't have any experience with Scribus, but it, well, looks okay :-) Now, regarding the crashes - can you tell me some more about your system? Does your CPU support SMAP, by any chance? The cpuid-etallen port/package should tell. |
You are spot on. Crashes (= instant reboot) on
Does not crash (= works) on
To reproduce:
|
I don't have a SMAP-enabled system to test, unfortunately (that would have a display attached), but I'm pretty sure you're hitting the bug fixed in freebsd/freebsd-src@fb580451456 and freebsd/freebsd-src@60cb98a1bd2. The Scribus AppImage worked for me on non-SMAP machine. |
https://github.com/realthunder/FreeCAD_assembly3/releases
Here is the FreeCAD code in question:
I get the same error if I extract the AppImage with
and then run @trasz do you have an idea why this fails? |
@trasz Is there a way to expose D-Bus that is running on the FreeBSD side to the Linuxulator? Example use case: says
|
I have a theory why DBus doesn't work and how to fix it (basically make the FreeBSD port use LOCAL_CREDS_PERSISTENT), but it's at guesswork stage at the moment. |
Having D-Bus would possibly allow the https://github.com/LANDrop/LANDrop/releases/ AppImage to run. |
@probonopd Would it be possible to add a page to https://github.com/AppImage/docs.appimage.org about BSD support and tracking its usage as well? |
Once it is working and supported. |
What's about it now? |
FreeBSD 13.1 should possibly start to run AppImages: |
Woah |
Hi!
Good work! ;)
"26 April 2022": I look forward to upgrading!
Cheers
Il giorno mer 23 feb 2022 alle ore 20:15 probonopd ***@***.***>
ha scritto:
… FreeBSD 13.1 should possibly start to run AppImages:
***@***.***
<freebsd/freebsd-src@6bddc31>
—
Reply to this email directly, view it on GitHub
<#98 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDFPQ46WMA2FFKJCY5XIXTU4UW4XANCNFSM4B4S7YIA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It seems not work. I also try both
|
Do you have |
OK. I install libfuse.so.2, but also not work.
I just try others AppImage like FreeCAD, and also not work.
I changed files name:
|
I have it almost working now using an experimental build of helloSystem using FreeBSD 13.1-BETA1:
Results in:
Running with
So clearly the AppImage does get mounted using FUSE since it knows about I also testeed this using Can you reproduce this @trasz? |
Using https://github.com/helloSystem/ISO/releases/tag/experimental-14.0-0.8.0_0H77 Live ISO based on FreeBSD 14, we can run AppImages that bundle everything without the need for any Linux compatibility libraries to be installed on the FreeBSD system using FUSE built into FreeBSD. Tested with
The above runs a Linux AppImage that bundle everything on a FreeBSD 14.0-CURRENT based system on which no Linux compatiblity libraries are installed, and uses that AppImage to create another AppImage, which also runs. (Eating our own dogfood.) |
Something strange is still going on. Getting To reproduce:
Why are we getting this?
What is going on? What is causing the |
If you happen to want to add support for this on other *BSD's and/or SunOS, I have a way to get the appimage image path written for each of these so you can easily set the $APPIMAGE environment variable: OpenBSD in particular was a struggle to figure out a semi-reliable means, as there is not a OS-provided API to do this. As it stands, the code I have can get the executable path to every executable running on a fresh install of OpenBSD running Xorg. |
No description provided.
The text was updated successfully, but these errors were encountered: