Discussion:
[Rpcemu] rpcemu v01.5 - segmentationfault...
zed
2017-08-10 04:44:50 UTC
Permalink
rpcemu v0.15 on SparkyLinux v5.0 (Debian Testing)

rpcemu extracted and configured with --enable-dynarec --enable-debug.
make went through the process with no errors.

First run, as expected, as no ROMS installed. Installed 4.02roms in the
roms Directory and RO4disc,ff8 in the Directory hostfs and then:

***@zed-pc:~$ cd /home/zed/rpcemu-0.8.15
***@zed-pc:~/rpcemu-0.8.15$ ./rpcemu
Shutting down Allegro due to signal #11
Segmentation fault
***@zed-pc:~/rpcemu-0.8.15$

Your advice is sought, please?

David
--
zed
Smoking kills. If you're killed, you've lost a very important part of your
life.
Ralph Corderoy
2017-08-10 11:19:11 UTC
Permalink
Hi David,
Post by zed
$ ./rpcemu
Shutting down Allegro due to signal #11
Segmentation fault
$
https://wiki.archlinux.org/index.php/Step-by-step_debugging_guide#Segmentation_faults
shows how to `bt full' since it seems you're not used to gdb(1). That
gives us the first clue what might be going on.
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy
zed
2017-08-10 21:48:30 UTC
Permalink
Post by Ralph Corderoy
Hi David,
$ ./rpcemu Shutting down Allegro due to signal #11 Segmentation fault
$
https://wiki.archlinux.org/index.php/Step-by-step_debugging_guide#Segmentation_faults
Post by Ralph Corderoy
shows how to `bt full' since it seems you're not used to gdb(1). That
gives us the first clue what might be going on.
Hi Ralph

Thank you for your very prompt reply.

I visited
https://wiki.archlinux.org/index.php/Step-by-step_debugging_guide#Segmentation_faults

and read about rdb and then ran the command. Here is the result of my
attempt to do something correctly!
------------------------------------------------------------------------------------------------
Terminal output

***@zed-pc:~$ cd /home/zed/rpcemu-0.8.15
***@zed-pc:~/rpcemu-0.8.15$ gdb ./rpcemu
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./rpcemu...done.
(gdb) r
Starting program: /home/zed/rpcemu-0.8.15/rpcemu
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff4afc700 (LWP 21629)]
[New Thread 0x7ffff41ed700 (LWP 21630)]
[New Thread 0x7ffff28be700 (LWP 21631)]
[New Thread 0x7ffff20bd700 (LWP 21632)]
[New Thread 0x7fffe59ea700 (LWP 21633)]
[Thread 0x7fffe59ea700 (LWP 21633) exited]
[New Thread 0x7fffe59ea700 (LWP 21634)]
[New Thread 0x7fffe4fe3700 (LWP 21635)]

Thread 1 "rpcemu" received signal SIGSEGV, Segmentation fault.
0x00005555570becba in rcodeblock ()
(gdb) bt full
#0 0x00005555570becba in rcodeblock ()
No symbol table info available.
#1 0x00007fffffffdf70 in ?? ()
No symbol table info available.
#2 0x0000000000000000 in ?? ()
No symbol table info available.
(gdb)
---------------------------------------------------------------------
which means nothing whatsoever to me - way beyond my paygrade!

Neither did I understand the instructions which followed "Improved gdb
output" on the website, so seek your further assistance, please?

I have three allegro packages installed:
libjpgallwegro4.4 v2.2.2.2-10
liballegro4-dev v2.4.4.2-10
liballegro4.4 v2.4.4.2-10

David
--
zed
CURSOR: An expert in four-letter words.
Ralph Corderoy
2017-08-11 09:03:20 UTC
Permalink
Hi David,
Post by Ralph Corderoy
https://wiki.archlinux.org/index.php/Step-by-step_debugging_guide#Segmentation_faults
and read about rdb and then ran the command. Here is the result of my
attempt to do something correctly!
Yep, you did it right.
Post by Ralph Corderoy
(gdb) r
Starting program: /home/zed/rpcemu-0.8.15/rpcemu
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff4afc700 (LWP 21629)]
[New Thread 0x7ffff41ed700 (LWP 21630)]
[New Thread 0x7ffff28be700 (LWP 21631)]
[New Thread 0x7ffff20bd700 (LWP 21632)]
[New Thread 0x7fffe59ea700 (LWP 21633)]
[Thread 0x7fffe59ea700 (LWP 21633) exited]
[New Thread 0x7fffe59ea700 (LWP 21634)]
[New Thread 0x7fffe4fe3700 (LWP 21635)]
Thread 1 "rpcemu" received signal SIGSEGV, Segmentation fault.
0x00005555570becba in rcodeblock ()
(gdb) bt full
#0 0x00005555570becba in rcodeblock ()
No symbol table info available.
#1 0x00007fffffffdf70 in ?? ()
No symbol table info available.
#2 0x0000000000000000 in ?? ()
No symbol table info available.
(gdb)
I think this is saying the fault occurs in the generated-on-the-fly
machine code to emulate some ARM instructions, so I wouldn't expect that
next section on "more detail" to help.

https://marutan.net/rpcemu/linuxcompile.html has a note at the start
about Ubuntu 16.10 needing CFLAGS=-no-pie. I suspect this may now be
true of Debian also. So try that, going back to the configure stage.
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy
zed
2017-08-12 05:30:16 UTC
Permalink
Hi Ralph
Post by Ralph Corderoy
Hi David,
https://wiki.archlinux.org/index.php/Step-by-step_debugging_guide#Segmentation_faults
Post by Ralph Corderoy
Post by zed
and read about rdb and then ran the command. Here is the result of my
attempt to do something correctly!
Yep, you did it right.
Thank goodness for that!

[snip]
Post by Ralph Corderoy
Post by zed
Thread 1 "rpcemu" received signal SIGSEGV, Segmentation fault.
0x00005555570becba in rcodeblock () (gdb) bt full #0
0x00005555570becba in rcodeblock () No symbol table info available. #1
0x00007fffffffdf70 in ?? () No symbol table info available. #2
0x0000000000000000 in ?? () No symbol table info available. (gdb)
I think this is saying the fault occurs in the generated-on-the-fly
machine code to emulate some ARM instructions, so I wouldn't expect that
next section on "more detail" to help.
https://marutan.net/rpcemu/linuxcompile.html has a note at the start
about Ubuntu 16.10 needing CFLAGS=-no-pie. I suspect this may now be
true of Debian also. So try that, going back to the configure stage.
Went to the website suggested and did as suggested (CFLAGS=-no-pie
./configure --enable-dynarec --enable-debug)and got a response

too many arguments

but unfortunately did not save the output.

I then tried without the configuration options (i.e. just the
CFLAGS=-no-pie) and was returned to

***@zed-pc:~/rpcemu-0.8.15$ CFLAGS=-no-pie

I then started again and got the following output

***@zed-pc:~$ cd /home/zed/rpcemu-0.8.15
***@zed-pc:~/rpcemu-0.8.15$ CFLAGS=-no-pie ./configure --enable-dynarec
--enable-debug
bash: ./configure: No such file or directory
***@zed-pc:~/rpcemu-0.8.15$ ./configure --enable-dynarec --enable-debug
bash: ./configure: No such file or directory
***@zed-pc:~/rpcemu-0.8.15$

Would the fact that I did

***@zed-pc:~/rpcemu-0.8.15$ CFLAGS=-no-pie

have led to the output of No such file or directory?

I have checked and found that doing a cd <directory path> works on every
other Directory I've tried, other than /rpcemu-0.8.15 one.

As an aside, I have Linux Mint v18.2 Mate installed in another partition.
I booted into this and had no difficulty in installing rpcemu-0.8.15,
other than that the window which opened was very small and I could not
adjust it and there was only one screen resolution available. I was able
to run !Draw and Paint! without problem, but could not open a floppy disc
containing !Drawfiles. Just got an error asking whether the disc was
formatted! That could be because when I upgraded this desktop a few years
ago, I've never checked whether the floppy disc drive was connected.

Again, thank you for staying with this. All suggestions welcome.

Regards

David
--
zed
A friendly" program doesn't have a 600 page manual!
David Pitt
2017-08-12 07:43:21 UTC
Permalink
zed, on 12 Aug, wrote:

[snip]
Post by zed
All suggestions welcome.
A google suggested this syntax, which did produce a working build on Ubuntu
17.04.

cd src
./configure CFLAGS=-no-pie --enable-dynarec
make
cd ..
./rpcemu

No errors, RISC OS running.

HTH.
--
David Pitt
Ralph Corderoy
2017-08-12 15:41:21 UTC
Permalink
Hi David,
Post by zed
Post by Ralph Corderoy
https://marutan.net/rpcemu/linuxcompile.html has a note at the start
about Ubuntu 16.10 needing CFLAGS=-no-pie. I suspect this may now be
true of Debian also. So try that, going back to the configure stage.
Went to the website suggested and did as suggested (CFLAGS=-no-pie
./configure --enable-dynarec --enable-debug) and got a response
too many arguments
but unfortunately did not save the output.
That response doesn't make a lot of sense, unless you're using some
weird shell. Does `echo $BASH_VERSION' display a useful
version-number-ish value?
Post by zed
I then tried without the configuration options (i.e. just the
CFLAGS=-no-pie)
That would just set a variable in your shell. Not an error, but no
desired effect.
Post by zed
I then started again and got the following output
bash: ./configure: No such file or directory
Yes, start again. You said at
http://www.riscos.info/pipermail/rpcemu/2017-August/002526.html that you
configured it just fine. You need to repeat that, but with
`CFLAGS=-no-pie' as a word before the ./configure.

When you're entering `./configure' you are asking to run the file
configure in the current directory, `.'. So a plain `ls' should show
the current directory's contents, including configure.
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy
zed
2017-08-13 03:25:06 UTC
Permalink
Ralph Corderoy <***@inputplus.co.uk> wrote:

[snip]
Post by Ralph Corderoy
Post by zed
Went to the website suggested and did as suggested (CFLAGS=-no-pie
./configure --enable-dynarec --enable-debug) and got a response too
many arguments but unfortunately did not save the output.
That response doesn't make a lot of sense, unless you're using some
weird shell. Does `echo $BASH_VERSION' display a useful
version-number-ish value?
***@zed-pc:~$ echo $BASH_VERSION
4.4.12(1)-release
***@zed-pc:~$

and then

***@zed-pc:~$ cd /home/zed/rpcemu-0.8.15/src CFLAGS=-no-pie ./configure
--enable-dynarec
bash: cd: too many arguments
***@zed-pc:~$

So, again, I'mlost!
Post by Ralph Corderoy
Post by zed
I then tried without the configuration options (i.e. just the
CFLAGS=-no-pie)
That would just set a variable in your shell. Not an error, but no
desired effect.
Glad that it didn't result in something which would bite me later.
Post by Ralph Corderoy
Post by zed
./configure: No such file or directory
Yes, start again. You said at
http://www.riscos.info/pipermail/rpcemu/2017-August/002526.html that you
configured it just fine. You need to repeat that, but with
`CFLAGS=-no-pie' as a word before the ./configure.
I did that and got the

bash: cd: too many arguments yet again

I then deleted the copy of rpcemu-0.8.15 and made another from my
Downloads Directory to /home/zed

Decided to try David's option

***@zed-pc:~$ cd /home/zed/Desktop/rpcemu-0.8.15/src
***@zed-pc:~/Desktop/rpcemu-0.8.15/src$ ./configure CFLAGS=-no-pie
--enable-dynarec

***@zed-pc:~/Desktop/rpcemu-0.8.15/src$ cd ..
***@zed-pc:~/Desktop/rpcemu-0.8.15$ ./rpcemu
***@zed-pc:~/Desktop/rpcemu-0.8.15$

and I have a working rpcemu.

Thank you Roy, for putting up with my "fumblings" and David for suggesting
I enter the source directory and enter ./configure before the CFLAGS
option which worked. Obviously the originasl suggestion on the Maratun
website must work for others but just did not on Sparky Linux on my
computer, for some reason. Whatever, I am grateful to both of you for
leading me to a successful conclusion.

The most pressing question, at present, is: Is there any way to run rpcemu
other than through the terminal?

There will be many other questions from me in my attempt to re-learn RISC
OS (like how to enlarge the window which opens. How to change the screen
resolution, etc. etc but for the present, I'm like a "dog with two tails -
both wagging furiously"!

David
--
zed
Bigamy: Too many wives. Monogamy: Same thing.
David Glover-Aoki
2017-08-13 09:12:34 UTC
Permalink
Post by zed
--enable-dynarec
You've glued two separate commands together here.

First do this:
cd /home/zed/rpcemu-0.8.15/src

Then do this:
CFLAGS=-no-pie ./configure --enable-dynarec
--
David Glover-Aoki
https://david.gloveraoki.net/contact
zed
2017-08-13 19:41:22 UTC
Permalink
Hi David
Post by David Glover-Aoki
Post by zed
./configure --enable-dynarec
You've glued two separate commands together here.
First do this: cd /home/zed/rpcemu-0.8.15/src
Then do this: CFLAGS=-no-pie ./configure --enable-dynarec
Thanks for your response. By now my email of 13 August will have reached
the rpcemu mailing list and you will see that David Pitt's suggestion
worked.

David
--
zed
Despite the high cost of living, it remains popular
Ralph Corderoy
2017-08-14 09:36:26 UTC
Permalink
Hi David,
Post by zed
Post by David Glover-Aoki
Post by zed
./configure --enable-dynarec
You've glued two separate commands together here.
First do this: cd /home/zed/rpcemu-0.8.15/src
Then do this: CFLAGS=-no-pie ./configure --enable-dynarec
Thanks for your response. By now my email of 13 August will have reached
the rpcemu mailing list and you will see that David Pitt's suggestion
worked.
Yes, but we're trying to explain what you did wrong so you know for next
time. Especially as you didn't merge the two commands when you
initially successfully got it to configure before asking the list for
help so it seems odd to merge them afterwards.

You were doing the equivalent of

*Dir $.home.zed.rpcemu-0.8.15.src
*Run configure

as

*Dir $.home.zed.rpcemu-0.8.15.src Run configure
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy
zed
2017-08-16 07:48:15 UTC
Permalink
Post by Ralph Corderoy
Hi David,
Post by zed
Post by David Glover-Aoki
Post by zed
./configure --enable-dynarec
You've glued two separate commands together here.
First do this: cd /home/zed/rpcemu-0.8.15/src
Then do this: CFLAGS=-no-pie ./configure --enable-dynarec
Thanks for your response. By now my email of 13 August will have
reached the rpcemu mailing list and you will see that David Pitt's
suggestion worked.
Yes, but we're trying to explain what you did wrong so you know for next
time. Especially as you didn't merge the two commands when you
initially successfully got it to configure before asking the list for
help so it seems odd to merge them afterwards.
You were doing the equivalent of
*Dir $.home.zed.rpcemu-0.8.15.src
*Run configure
as
*Dir $.home.zed.rpcemu-0.8.15.src Run configure
Thanks for the explanation. I hope I do better if I ever need to install
rpcemu again. Certainly this exchange of emails has been saved and will
be available for guidance if a reinstallation is ever necessary. Thank
goodness.

I do appreciate that you, David Pitt and David Glover-Aoki were willing to
give you time to help me and, as a result I have a working rpcemu.

Regards from Waipapa, New Zealand on a rainy and windy Wednesday evening.

David
--
zed
Divorce, n. The past tense of marriage
Loading...