meebey / smuxi

Smuxi is an user-friendly and free IRC client for Linux, Windows and Mac OS X based on GNOME / GTK+
https://smuxi.im/
GNU General Public License v2.0
171 stars 46 forks source link

Smuxi fails to build on Debian bookworm using dpkg-buildpackage #295

Closed jeremyp3 closed 1 year ago

jeremyp3 commented 1 year ago

after seeing the release of smuxi v1.2.1, I was very happy to try it on my debian, the problem is that the debian folder doesn't seem to support debian BookWorm yetn

I build successfully using ./autogen.sh && ./configure && make

On the other hand, when I use dpkg-buildpackage, I get an error on obsolete stuff: "./Views/Chats/ChatView.cs(537,41): warning CS0618: Smuxi.Engine.ChatModel.Messages' is obsolete:Use ChatModel.MessageBuffer instead.'"

I attach the output of my build output-build-smuxi.txt

thanks !

Jeremyp3

meebey commented 1 year ago

Thank you for reporting this build issue. The CI builds are not catching this problem.

./Frontend.cs(192,69): error CS0234: The type or namespace name `RuntimeInformation' does not exist in the namespace `System.Runtime.InteropServices'. Are you missing an assembly reference?

Looks like a build regression that was introduced by the .NET runtime detection in https://github.com/meebey/smuxi/commit/f4f37c70bac1506d590d74b7582b482dff8a3ec6

Please upload the output of a ./configure run so I can add appropriate Mono version checks before using RuntimeInformation.

jeremyp3 commented 1 year ago

I don't know if I understood what you want configure.txt

jeremyp3 commented 1 year ago

I take this opportunity to add the mono packages that are installed dpkg-mono.txt

meebey commented 1 year ago

These 2 output files were exactly what I needed to triage the problem.

So Mono 6.8 doesn't provide the RuntimeInformation type. The CI build with Mono 6.12 works, so the fix will be to only call RuntimeInformation if Mono >= 6.12. I will make a patch for this.

If you don't want to wait you can just comment the line 199 and 200 in src/Frontend-GNOME/Frontend.cs and you should get Smuxi 1.2.1 compiled on your Debian system.

jeremyp3 commented 1 year ago

on the other hand, what makes me question, as I said in my first post, is that if I don't try to make a debian package, I can compile smuxi 1.2.1. it's just with the debian package that I have this error. since my English is not great, I just wanted to make sure I explained my issue well :)

meebey commented 1 year ago

Thanks for clarifying that. I thought it always failed on Debian Bookworm, regardless of how trying to build it. So dpkg-buildpackage fails while ./configure && make works.

In that case, please upload the full output of a dpkg-buildpackage run. Your output-build-smuxi.txt file seem to be only the output of a "make" run, so I focused on that.

jeremyp3 commented 1 year ago

I'm sorry I sent the wrong thing to clean everything, I did a make clean && make distclean. then I made a dpkg-buildpackage -b -us -uc and here is the output dpkg-buildpackage-smuxi.txt

meebey commented 1 year ago

I pushed a commit that should fix the problem. Please try dpkg-buildpackage from this branch: https://github.com/meebey/smuxi/tree/debian_fix

jeremyp3 commented 1 year ago

it still doesn't work, but it seems to go further make clean && make distclean dpkg-buildpackage -b -us -uc dpkg-buildpackage-branch-debian_fix.txt

meebey commented 1 year ago

@jeremyp3 I could reproduce your build error on Debian. If you try the https://github.com/meebey/smuxi/tree/debian_ci branch it should now build for you.

jeremyp3 commented 1 year ago

I confirm that it works!

thanks !