epasveer / seer

Seer - a gui frontend to gdb
GNU General Public License v3.0
2.13k stars 69 forks source link

Cannot build on Manjarao Cinnamon x64 #41

Closed awsdert closed 2 years ago

awsdert commented 2 years ago

The package manager has support for installing directly via the AUR so I tried both variants that showed up in the search, one fails & aborts, the other causes a total system crash. I'm sure you have virtual box or something so just give it a try there to see what I mean, I attached the log for the one that doesn't crash the system, can't do anything about the other though. seer_build_log.txt .

epasveer commented 2 years ago

Hmmm. My choice of "Seer" as the name of my project seems to be the same as other projects. The one you tried was something with Rust. Which has compile/install problems.

For Arch, my Seer debugger is "seer-gdb-git"

https://aur.archlinux.org/packages/seer-gdb-git

Give it a try and let me know.

Thanks.

awsdert commented 2 years ago

That must be the one that kept crashing my PC then because I definitely tried it already

Edit: To be exact the ones I tried are seer-gdb-git & seer-git

epasveer commented 2 years ago

Okay. It's seer-gdb-git that you should use.

I'll have to set myself with an Arch installation. When you say "crashing" -- it crashes your PC (ie: reboots) or does Seer segfault?

Are you able to run it with valgrind?

% valgrind --tool=memcheck --error-limit=no --num-callers=50 --track-origins=yes   seer yourprog  arg1 arg2  

It may show an obvious coding error on my part.

awsdert commented 2 years ago

Everything freezes, I have to hold down the power button and reboot the computer from a forced shutdown state, it happens midway through the compile/install stage so I can't run valgrind or anything on it since it never finishes the install, btw I think I forgot to mention my system is manjaro cinnamon x64.

Edit: I'll try again but I'll take a photo of where it freezes with my phone and try uploading that

awsdert commented 2 years ago

20220329_161659.jpg

awsdert commented 2 years ago

Here's a screenshot I took of the version before running it. Screenshot from 2022-03-29 16-10-54

epasveer commented 2 years ago

Ah. It's freezing/hanging in the building of the app. I misunderstood. I assumed it was when you ran the Seer program. You haven't got that far yet.

It's curious that the last line is about the "resource" file. I include a bunch of icons there so that they get released with the Seer program. This may require some memory/swapspace on your machine to do that part of the build.

So, I wonder if your machine is running out of memory/swap etc. Can you run this command on your terminal and give me the result?

> free -g
awsdert commented 2 years ago

Well I tried, this is what I got

free -g
free: Multiple unit options doesn't make sense.
awsdert commented 2 years ago

Looking at the information the system info app gives me I should have a total of 8GB memory, I highly doubt memory is the issue, either way there should be somewhere in the /usr/share that you can put the icons instead, the launchers only need a path for the icon after all

Edit: Having just looked at the contents of the folder you should be able to just use a folder like /usr/share/seer-debugger/icons

epasveer commented 2 years ago

I had to include them in Seer because not all distributions have the icons I want.

Maybe try this command:

> free
awsdert commented 2 years ago

This is what shows up:

free
**               total        used        free      shared  buff/cache   available
Mem:            7956        3901        2953         120        1100        3643
Swap:              0           0           0
epasveer commented 2 years ago

Okay. You have 8gb of memory and no swap.

It's not ideal but it should work. I did a google of Qt's resource compiler and other people have made similar complaints. I'll do some research and will get back to you.

epasveer commented 2 years ago

Are you able to run the "make" yourself?

I'm interested in the results of :

> make clean
> make VERBOSE=1

There will be a lot of output. It will freeze again but it should print the command that it is executing.

I don't think it's the resources. I've run tests running the resource compiler manually. It's just not using that much memory. About 5MB.

I think it's freezing when it does the final link of the program. The VERBOSE should verify that.

awsdert commented 2 years ago

I'll give it a try in a moment after I've finished coding something, getting tired of chmod's lack of recursive features so I've just started something I'm calling chent, it'll ignore anything that isn't a file or directory & will distinguish directories from files by default, sure it will apply rwx permissions but for directories it will enforce the octal that declares it a directory to avoid breaking the directory, no symlinks will be followed

epasveer commented 2 years ago

% chmod -R doesn't work?

I usually end up using 'find'.

% find . -type f -exec chmod a+rwx {} \;

awsdert commented 2 years ago

That might be fine for 1 level but I have a whole slew of sub directories & sub sub directories etc to go through, and it's frequent enough that I find it a hassle to keep using chmod or finding a work around, rather just build a custom app & try submitting it as a core application later. Anyways I've just finished the basic logic, not sure if it will work out but I'll compile & give it a try later, for now though I'll close my apps & try what you suggested.

awsdert commented 2 years ago

I forgot that I had the packages downloading & building in a custom directory, found that then tried your make commands after finding what I think was the right makefile:

$ make clean
$ make VERBOSE=1
/usr/bin/cmake -S/mnt/MEDIA/Builds/seer-gdb-git/src/seer/src -B/mnt/MEDIA/Builds/seer-gdb-git/src/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /mnt/MEDIA/Builds/seer-gdb-git/src/build/CMakeFiles /mnt/MEDIA/Builds/seer-gdb-git/src/build//CMakeFiles/progress.marks
make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/mnt/MEDIA/Builds/seer-gdb-git/src/build'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/mnt/MEDIA/Builds/seer-gdb-git/src/build'
/usr/bin/cmake -E cmake_progress_start /mnt/MEDIA/Builds/seer-gdb-git/src/build/CMakeFiles 0

I tried this in the src/build directory that the package created during download/compile (not sure which), haven't found any log file so I can't give that. Anyways I need to get some shuteye so I'll return to this 2mw. If you've got manjaro in vbox or something try redirecting the package download/compile area to somewhere you can easily access then take a look through the directories yourself for anything you think might be usable if I upload my copy.

awsdert commented 2 years ago

If by chance you were interested in chent, this is what I've cobbled together (and made sure works pretty much the way I intended, not sure if I want to ignore permission errors yet so it just breaks at the 1st instance) [chent.zip](https://github.com/epasveer/seer/files/8380229/chent.zip)

The binary/binaries should work as is on your system since I compiled with -fPIC but if you wanna modify it or it didn't simply run then the code's there, also would appreciate some ideas on extra options... just realised how off topic I got with this, I'll leave this as the last post on chent until I've got seer working on my system, don't want to cause tiresome searching for future viewers. For those who do take an interest, look for my username on gitlab, I may have uploaded the mini-project there at some point.

epasveer commented 2 years ago

Cool! I'll take a look at it.

epasveer commented 2 years ago

Getting back to the crashing. When you get time. Can you run these commands.

make clean
make VERBOSE=1 seer

I'm only interested in the last few lines that happen just before your machine crashes.

Thanks.

awsdert commented 2 years ago

From which directory should I actually try the commands though? Screenshot from 2022-04-01 00-22-00

Edit: I'm assuming you went to bed like I'm about to do, if not then just responses to wait until 2mw, I have the tab pinned anyways so it won't take long for me to notice after getting out of bed (lack of job helps in that respect :|)

epasveer commented 2 years ago

The ".../seer-gdb-git/src/build" directory.

No rush. When every you can. Thanks for helping!

awsdert commented 2 years ago

Started the build then it occured to me I could just redirect the output into a file that I could upload, so redid the make clean before doing make VERBOSE=1 seer > build_log.txt, currently running

awsdert commented 2 years ago

Apparently that avoided a crash, had plenty of errors by the looks of what appeared on screen, also you should add the flag -Werror to your build since you seem to have overlooked things that should never be overlooked, wether they're warnings or errors I treat them the same, something that should never appear in a release build build_log.txt

Edit: Figured since that worked I'd try running sudo make VERBOSE=1 install > install_log.txt which seemed to run without issue, perhaps seer just doesn't like the package manager then?

epasveer commented 2 years ago

perhaps seer just doesn't like the package manager then? Perhaps. I'm not that familiar with Arch. Maybe it imposes some memory limits????

Yes, thanks for pointing out the -Werror flag. I will add it to my cmake build.

epasveer commented 2 years ago

I think if you want to install Seer outside your package manager, you can do these steps.

awsdert commented 2 years ago

Github needs to do better at notifying about comments. Anyways as mentioned I have managed to install it, won't be using cd, mainly because nemo takes care of that for me when I tell it to open a terminal in a folder, I'll try to remember your comment when I go to update it for the 1st time.

epasveer commented 2 years ago

Okay. Good to hear you can build it. Thanks for helping!

I'll close this task. It can be re-opened if needed. Or a new task can be created.