Skip to content
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

can't build #1

Open
xoureldeen opened this issue Jun 21, 2024 · 18 comments
Open

can't build #1

xoureldeen opened this issue Jun 21, 2024 · 18 comments

Comments

@xoureldeen
Copy link

xoureldeen commented Jun 21, 2024

how to setup build?

@xoureldeen
Copy link
Author

xoureldeen commented Jun 21, 2024

ninja and meson installed
Caused by: java.lang.RuntimeException: Ninja failed to build CassiaExt: 127
STDOUT:

STDERR:
/bin/bash: line 1: ninja -C build_linux all: command not found

@MixedVictor
Copy link

I managed atleast to point the build system to build cassiaext (I see here to build cassiapp, you need to build cassiaext first) using the cassiaext.cfg, which is what probably you need to do here right now.
But the bigger problem here is not even cassiapp, but cassiaext.
I was trying to build cassiaext using a Arch Linux distrobox, but since there was a nix file that contained the dependencies, I decided instead to create a devcontainer that uses a nix image (you can see it in my cassiaext fork). However, even using a nix image, I had to add some missing dependencies to it (ex: libtool), and even then, cassiaext doesn't really seem compilable. On the Arch Linux distrobox I got some missing dependencies errors even with the packages installed (libdrm is one of then, downloading the wrap file from WrapDB does fix this, but it's not supposed to happen and there are some missing dependencies that isn't available on WrapDB), and on nix I think I am one step back compared to my Arch container since I got stuck on some libtool error, even with it being installed. There is also this invalid -Dstub_session=true argument on cassiaext's main CMakeLists.txt, preventing it to compile.
I have absolutely no idea what to do right now to compile all this.

@xoureldeen
Copy link
Author

I managed atleast to point the build system to build cassiaext (I see here to build cassiapp, you need to build cassiaext first) using the cassiaext.cfg, which is what probably you need to do here right now. But the bigger problem here is not even cassiapp, but cassiaext. I was trying to build cassiaext using a Arch Linux distrobox, but since there was a nix file that contained the dependencies, I decided instead to create a devcontainer that uses a nix image (you can see it in my cassiaext fork). However, even using a nix image, I had to add some missing dependencies to it (ex: libtool), and even then, cassiaext doesn't really seem compilable. On the Arch Linux distrobox I got some missing dependencies errors even with the packages installed (libdrm is one of then, downloading the wrap file from WrapDB does fix this, but it's not supposed to happen and there are some missing dependencies that isn't available on WrapDB), and on nix I think I am one step back compared to my Arch container since I got stuck on some libtool error, even with it being installed. There is also this invalid -Dstub_session=true argument on cassiaext's main CMakeLists.txt, preventing it to compile. I have absolutely no idea what to do right now to compile all this.

i think we can avoid this cassia-ext by understanding what .kt scripts need
like building wine and fex using the patches then compressing it as app needs (totally headache)
i just need the x11 bcuz termux-x11 devs are very toxic when i does issue for my fork bcuz the app freaze with no reason when i load cmdentry like termux-x11.deb does but it freazes with no logs, im done with this shit.

@rlukas210
Copy link

I managed atleast to point the build system to build cassiaext (I see here to build cassiapp, you need to build cassiaext first) using the cassiaext.cfg, which is what probably you need to do here right now. But the bigger problem here is not even cassiapp, but cassiaext. I was trying to build cassiaext using a Arch Linux distrobox, but since there was a nix file that contained the dependencies, I decided instead to create a devcontainer that uses a nix image (you can see it in my cassiaext fork). However, even using a nix image, I had to add some missing dependencies to it (ex: libtool), and even then, cassiaext doesn't really seem compilable. On the Arch Linux distrobox I got some missing dependencies errors even with the packages installed (libdrm is one of then, downloading the wrap file from WrapDB does fix this, but it's not supposed to happen and there are some missing dependencies that isn't available on WrapDB), and on nix I think I am one step back compared to my Arch container since I got stuck on some libtool error, even with it being installed. There is also this invalid -Dstub_session=true argument on cassiaext's main CMakeLists.txt, preventing it to compile. I have absolutely no idea what to do right now to compile all this.

hi. i have managed to build cassia-ext using your fork, and had some troubles with gamescope compile errors, but after some trials and error, and a bit of workaround, i was able to build cassia-ext and it have generated an .gz archive, now, how do i use it/integrate into the app?

@MixedVictor
Copy link

MixedVictor commented Jun 28, 2024

hi. i have managed to build cassia-ext using your fork, and had some troubles with gamescope compile errors, but after some trials and error, and a bit of workaround, i was able to build cassia-ext and it have generated an .gz archive, now, how do i use it/integrate into the app?

Okay, could you please upload the gz file here or somewhere so I can investigate a bit too? It would be also nice to say how you got it compiled too.
We probably need to compile cassiaext using the cassiaext.cfg so the build system does the rest when it finishes compiling cassiaext. Unfortunately this would probably need Android Studio too, since the devcontainers aren't made for GUI apps, I had the idea of using a NixOS virtual machine. I'll probably do an investigation over how to get the build system to accept the gz file without having to compile cassiaext.
Meanwhile, I had fixed the libtool errors by merging cassiaruntime's nix file dependencies with the cassiaext's one, however I then got stuck with errors that certain libraries isn't compatible with AArch64 or something like that. (EDIT: turns out the libtool error still persists, the problem is that installing the freetype package was giving errors when compiling the cassiaext's freetype package, this is why it was giving me AArch64 incompatible library errors) Well I guess I am a bit late with that, lol.

@rlukas210
Copy link

rlukas210 commented Jun 28, 2024

hi. i have managed to build cassia-ext using your fork, and had some troubles with gamescope compile errors, but after some trials and error, and a bit of workaround, i was able to build cassia-ext and it have generated an .gz archive, now, how do i use it/integrate into the app?

Okay, could you please upload the gz file here or somewhere so I can investigate a bit too? It would be also nice to say how you got it compiled too. We probably need to compile cassiaext using the cassiaext.cfg so the build system does the rest when it finishes compiling cassiaext. Unfortunately this would probably need Android Studio too, since the devcontainers aren't made for GUI apps, I had the idea of using a NixOS virtual machine. I'll probably do an investigation over how to get the build system to accept the gz file without having to compile cassiaext. Meanwhile, I had fixed the libtool errors by merging cassiaruntime's nix file dependencies with the cassiaext's one, however I then got stuck with errors that certain libraries isn't compatible with AArch64 or something like that. (EDIT: turns out the libtool error still persists, the problem is that installing the freetype package was giving errors when compiling the cassiaext's freetype package, this is why it was giving me AArch64 incompatible library errors) Well I guess I am a bit late with that, lol.

i have tried importing libdrm into cmake, manually changng the gamescope files, to be able to locate drm headers, and i have removed a lot of code from gamescope hdmi.h, to fix some compile errors. i also didn't have any error related to libtool. i will redo all steps, to ensure everything is fine, and send you as patch or PR, whathever you want. also, i will send the compiled cassiaext file from google drive.

cassiaext prefix: https://drive.google.com/file/d/14EIlGqyw2_p60vKIG-uZuC3054GJM8TG/view?usp=sharing

@MixedVictor
Copy link

I DID IT!

I guess all is missing is the cassia runtime.
I managed to build doing the following:

  • In the build.gradle.kts comment these two lines:
val process3 = ProcessBuilder().command(*shellWrapper, "ninja -C $cassiaExtPath all").start()
if (process3.waitFor() != 0)
     throw RuntimeException("Ninja failed to build CassiaExt: ${process3.exitValue()}\nSTDOUT:\n${process3.inputStream.reader().readText().trim()}\nSTDERR:\n${process3.errorStream.reader().readText().trim()}")
  • Now you'll put the prefix.tar.gz in the folder that is defined in the cassiaext.cfg (if you defined one), and then compile cassiapp on Android Studio

For example, my cassiaext.cfg:

/home/mixedvictor/Git/cassiaext/build

The prefix.tar.gz will be inside the build folder.

@rlukas210
Copy link

I DID IT! I guess all is missing is the cassia runtime. I managed to build doing the following:

  • In the build.gradle.kts comment these two lines:
val process3 = ProcessBuilder().command(*shellWrapper, "ninja -C $cassiaExtPath all").start()
if (process3.waitFor() != 0)
     throw RuntimeException("Ninja failed to build CassiaExt: ${process3.exitValue()}\nSTDOUT:\n${process3.inputStream.reader().readText().trim()}\nSTDERR:\n${process3.errorStream.reader().readText().trim()}")
  • Now you'll put the prefix.tar.gz in the folder that is defined in the cassiaext.cfg (if you defined one), and then compile cassiapp on Android Studio

For example, my cassiaext.cfg:

/home/mixedvictor/Git/cassiaext/build

The prefix.tar.gz will be inside the build folder.

Congratulations 👏🏻👏🏻 now let's move on to try to correct the other steps
also, you're brazilian? i'm asking due the portuguese time in your phone screen

@MixedVictor
Copy link

also, you're brazilian? i'm asking due the portuguese time in your phone screen

Yep.

@rlukas210
Copy link

Yep.

i'm also. do you have dc or telegram?

@MixedVictor
Copy link

i'm also. do you have dc or telegram?

I do have DC

@rlukas210
Copy link

rlukas210 commented Jun 28, 2024

I do have DC

so, can we continue on dc?
mine is same as github @rlukas210

@MixedVictor
Copy link

so, can we continue on dc? mine is same as github @rlukas210

Okay could you send me request? Mine's also the same as github.

@xoureldeen
Copy link
Author

I DID IT! I guess all is missing is the cassia runtime. I managed to build doing the following:

  • In the build.gradle.kts comment these two lines:
val process3 = ProcessBuilder().command(*shellWrapper, "ninja -C $cassiaExtPath all").start()
if (process3.waitFor() != 0)
     throw RuntimeException("Ninja failed to build CassiaExt: ${process3.exitValue()}\nSTDOUT:\n${process3.inputStream.reader().readText().trim()}\nSTDERR:\n${process3.errorStream.reader().readText().trim()}")
  • Now you'll put the prefix.tar.gz in the folder that is defined in the cassiaext.cfg (if you defined one), and then compile cassiapp on Android Studio

For example, my cassiaext.cfg:

/home/mixedvictor/Git/cassiaext/build

The prefix.tar.gz will be inside the build folder.

Congratulations 👏🏻👏🏻 now let's move on to try to correct the other steps also, you're brazilian? i'm asking due the portuguese time in your phone screen

Nice guys, can u share the apk and prefix to test?,
Tg: xoureldeen
Discord: xoureldeen

@xoureldeen
Copy link
Author

FATAL EXCEPTION: main
Process: cassia.app, PID: 29860
java.lang.RuntimeException: Unable to create application cassia.app.CassiaApplication: java.io.FileNotFoundException: cassiaext.id
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7312)
at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2337)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8501)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
Caused by: java.io.FileNotFoundException: cassiaext.id
at android.content.res.AssetManager.nativeOpenAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:910)
at android.content.res.AssetManager.open(AssetManager.java:887)
at cassia.app.store.CassiaExtStore.(CassiaExtStore.kt:30)
at cassia.app.CassiaApplication.onCreate(CassiaApplication.kt:34)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1379)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7307)
at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2337) 
at android.os.Handler.dispatchMessage(Handler.java:107) 
at android.os.Looper.loopOnce(Looper.java:232) 
at android.os.Looper.loop(Looper.java:317) 
at android.app.ActivityThread.main(ActivityThread.java:8501) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878) 

@MixedVictor
Copy link

Me and @rlukas210 have managed to make cassiaext and cassia-runtime sucessfully compile. You can see in my forks that I have automated the compilation with a build.sh shell file.
@xoureldeen I have built an APK for you, however, I haven't managed to create a working runtime for cassia yet (you need the runtime to create the prefix), but you can try compiling for yourself on my cassia-runtime repo. You can download the APK here: https://gofile.io/d/9Qt8GD (will expire in 10 days)

@xoureldeen
Copy link
Author

Me and @rlukas210 have managed to make cassiaext and cassia-runtime sucessfully compile. You can see in my forks that I have automated the compilation with a build.sh shell file. @xoureldeen I have built an APK for you, however, I haven't managed to create a working runtime for cassia yet (you need the runtime to create the prefix), but you can try compiling for yourself on my cassia-runtime repo. You can download the APK here: https://gofile.io/d/9Qt8GD (will expire in 10 days)

image

where shuld i get and put prefix and runtime

@MixedVictor
Copy link

where shuld i get and put prefix and runtime

To create the prefix, you'll need a runtime, and as I said, I haven't got the runtime to work yet. You would put the runtime folder inside the runtimes folder here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants