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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault when launching #7

Open
p3r7 opened this issue May 29, 2020 · 5 comments
Open

Segfault when launching #7

p3r7 opened this issue May 29, 2020 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@p3r7
Copy link

p3r7 commented May 29, 2020

Hi there.

Nice side-project you got here 馃槃

I am facing issues w/ rogomatic.

It compiles OK-ish (with 471 warnings) but I do get executables generated anyway.

The issue comes when I try to launch with:

$ rogomatic
Segmentation fault (core dumped)
$

I've retrieved the coredump file: https://gist.github.com/p3r7/6fed0d6a772139e2c253ff0c6edce3d5

Please note that I did not forget to create the directory /usr/local/bin/rogue with the appropriate rights (const NEWROGUE in install.h) as described by the instructions of https://github.com/RoguelikeRestorationProject/rgm14.

Also, rogue compiles and runs fine.

I'm using Ubuntu 20.04 (x64), if that could help.

@p3r7 p3r7 changed the title Segfault on rogomatic Segfault when launching May 29, 2020
@flowerbug
Copy link
Owner

flowerbug commented Jun 3, 2020

Sorry for not seeing this sooner, it is gardening season here so I am not on-line as much.

Since you reference RRP I'm not sure you are using the version of rogomatic I am working with?

Can you verify that you are using the code in one of the following locations?

https://github.com/flowerbug/rogomatic/tree/master/rogomatic

or

http://www.anthive.com/project/rogue/

The latest version from there for rogomatic is:

http://www.anthive.com/rog/rogomatic-r2.0.3.tar.gz

It may compile with no major issues, but die or hang when the setup isn't correct. The install instructions for the RRP version may not be complete.

As far as I can tell, you must compile rogomatic with -m32 flag set, so please make sure that is in CFLAGS when you run ./bootstrap and ./configure this should then show up when compiling. rogue itself has been cleaned up enough that you can compile it either way and it will run, but you may still get different results (bugs of some kind in code generation or some other issue there).

See these notes to make sure you have everything needed for my version of rogomatic:

https://github.com/flowerbug/rogomatic/blob/master/rogomatic/NEWS

There are so many versions of rogue and I cannot write interfaces for all of them. Rogomatic is very picky about how it processes the characters coming from a terminal.

Because of that pickyness there are only a few versions of rogue that will get very far (see my page at anthive.com for rogue and rogomatic for more details):

http://www.anthive.com/project/rogue/

Because of the complexity I only work with a companion rogue version for this project with a specific version. see:

https://github.com/flowerbug/rogue-54-for-rogomatic

There are still bugs to be found and fixed, I am currently trying to figure out one in rogue, but it does start and run when set up correctly.

@flowerbug flowerbug self-assigned this Jun 3, 2020
@flowerbug flowerbug added the question Further information is requested label Jun 3, 2020
@p3r7
Copy link
Author

p3r7 commented Jun 3, 2020

OK, I got it to work!

Thanks!

Yes indeed, I was attempting to compile http://www.anthive.com/rog/rogomatic-r2.0.3.tar.gz and already compiled https://github.com/flowerbug/rogue-54-for-rogomatic just fine.

I linked to the README of RRP because that were the only install instruction I found at the time.

I didn't think about looking up install instruction in the NEWS file.

I was compiling like this:

$ ./configure
$ make
$ sudo make install

So I was missing the make installdirs target but I did it manually from the RRP instructions.

Also, in order to cross-compile I had to install the following:

$ sudo apt install flex
$ sudo apt install gcc-10-multilib
$ sudo dpkg --add-architecture i386
$ sudo apt install lib32ncurses-dev

I also had to manually add the -m32 CFLAG in file config.status.

PS: don't worry about the delay in answering. I originally stumbled upon your blog with the rogue post. I was quite surprised to see that the 3/4th of your blog are about gardening. That's some nice vegetable patches you got there.

@flowerbug
Copy link
Owner

flowerbug commented Jun 3, 2020

When installing if you see the instructions for setting things up there is a ./bootstrap script which does:

$ autoreconf -fvi

this will set up all the environment variables for recompiling so if you change those you should clean up and re-run ./boostrap and then ./configure.

Normally I run the following anytime I change anything that might affect configuration or variables used in scripts:

$ make clean
$ make maintainer-clean
$ ./bootstrap
$ ./configure
$ make
$ make install

I am certainly not an autotools wizard so anything I've messed up anywhere in there is my own fault, but the above steps do work for me so I've not done much else with any of it.

I'll mark this as a documentation issue so I won't forget to make that clearer somehow.

@flowerbug flowerbug added documentation Improvements or additions to documentation and removed question Further information is requested labels Jun 3, 2020
@flowerbug
Copy link
Owner

PS: don't worry about the delay in answering. I originally stumbled upon your blog with the rogue post. I was quite surprised to see that the 3/4th of your blog are about gardening. That's some nice vegetable patches you got there.

please send me a note to flowerbug@anthive.com as i do enjoy talking gardens, but this isn't the best place to have that sort of conversation. :)

thanks! :)

@p3r7
Copy link
Author

p3r7 commented Jul 7, 2020

Sorry for the late answer, I was away from my computer for a few weeks.

I've tried again running ./bootstrap and ./configure from a fresh clone of the sources.

The -m32 CFLAG in file config.status still doesn't get set and I need to add it manually to build successfully.

I am certainly not an autotools wizard [...]

Neither do I...
And it has been years since the last time I've attempted cross-compilation.

but the above steps do work for me

I guess it comes down to how each distribution handles cross-compilation.

Anyway, I guess the issue can be addressed by simply adding compilation instructions specific to 64 bit Ubuntu.

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

No branches or pull requests

2 participants