[OpenSmalltalk/opensmalltalk-vm] Difficulties to compile Bochs plugins (#427)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[OpenSmalltalk/opensmalltalk-vm] Difficulties to compile Bochs plugins (#427)

Eliot Miranda-3
 

I want to simulate VM from a Spur64VMMaker.image
Unfortunately, it gets really difficult to compile Bochs plugins these days...

WINDOWS (cygwin64):

$ cd processors/IA32/winbochs/
$ source ./conf.COG

checking build system type... ../bochs/config.guess: unable to guess system type

This script, last modified 2002-03-20, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

ftp://ftp.gnu.org/pub/gnu/config/

If the version you run (../bochs/config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to [hidden email] in order to provide the needed
information to handle your system.

config.guess timestamp = 2002-03-20

uname -m = x86_64
uname -r = 3.0.7(0.338/5/3)
uname -s = CYGWIN_NT-10.0
uname -v = 2019-04-30 18:08

/usr/bin/uname -p = unknown

MAC (Darwin 17.7.0 Xcode 10.1):

$ cd processors/IA32/macbochs
$ ./conf.COG 

checking build system type... i386-apple-darwin17.7.0
checking host system type... i386-apple-darwin17.7.0
checking target system type... i386-apple-darwin17.7.0
checking if you are configuring for another platform... no
checking for standard CFLAGS on this platform... -fpascal-strings -fno-common -Wno-four-char-constants -Wno-unknown-pragmas -Dmacintosh
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
cp config.h bochsconfig.h
cp: config.h: No such file or directory
and don't forget to run ../bochs/makeem

LINUX (Ubuntu 18.04 thru WSL)

$ cd processors/IA32/linuxbochs
$ ./conf.COG

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking if you are configuring for another platform... no
checking for standard CFLAGS on this platform...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use --host'. See config.log' for more details.
cp config.h bochsconfig.h
cp: cannot stat 'config.h': No such file or directory
and don't forget to run ../bochs/makeem

The problem is that the Bochs copy is super old. So we won't get support for compilation on uptodate machines...
We cannot upgrade easily, since there are COG specific changes requiring to be replayed...
grep -r COG processors\IA32.

I also have doubts about the conf.COG files:
is --disable-x86-64 really what we want?
https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/e77147b63208fb40a9a1712a2d94d369886e91ab/processors/IA32/macbochs/conf.COG
https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/processors/IA32/macbochs/conf.COG


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/427?email_source=notifications\u0026email_token=AIJPEW26GB45LWTS4CJS7ILQJP3SVA5CNFSM4IWT4NL2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HLKLOZA", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/427?email_source=notifications\u0026email_token=AIJPEW26GB45LWTS4CJS7ILQJP3SVA5CNFSM4IWT4NL2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HLKLOZA", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Difficulties to compile Bochs plugins (#427)

Eliot Miranda-3
 
Hi Nicolas,

yes it would be good to update Bochs. I looked at it a few years ago
and it was quite done work. So I’ve avoided it until now. Looking at what
you’re going below it may still be possible to build it. The conf.COG
scripts to run are those in build.*/bochs*. So...

On macOS High Sierra:
$ uname -a
Darwin Aeolus.attlocal.net 17.7.0 Darwin Kernel Version 17.7.0: Sun Jun 2
20:31:42 PDT 2019; root:xnu-4570.71.46~1/RELEASE_X86_64 x86_64
$ cd build.macos64x64/bochsx64/
$ ./conf.COG
checking build system type... i386-apple-darwin17.7.0
...
cp config.h bochsconfig.h
and don't forget to run ./makeem
$ ./makeem
/Users/eliot/Cog/3dicc/opensmalltalk-vm/build.macos64x64/bochsx64/cpu
g++ -c -I.. -I../../../processors/IA32/bochs/cpu/.. -I../instrument/stubs
-I../../../processors/IA32/bochs/cpu/../instrument/stubs -g -pipe -O3
-fomit-frame-pointer -finline-functions -Dlongjmp=_longjmp -Dsetjmp=_setjmp
-fpascal-strings -fno-common -Wno-four-char-constants -Wno-unknown-pragmas
-Dmacintosh -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DCOG=1
../../../processors/IA32/bochs/cpu/init.cc -o init.o
...
ranlib libdisasm.a
$ ls -l */*.a
-rw-rw-r-- 1 eliot staff 12222688 Sep 14 08:31 cpu/libcpu.a
-rw-rw-r-- 1 eliot staff 707296 Sep 14 08:31 disasm/libdisasm.a
-rw-rw-r-- 1 eliot staff 1788256 Sep 14 08:31 fpu/libfpu.a

On cygwin it does look like we have to update at least the configure
scripts:
$ cd build.win32x86/bochsx64/

eliot@terf /cygdrive/z/opensmalltalk-vm/build.win32x86/bochsx64
$ ./conf.COG
checking build system type... ../../processors/IA32/bochs/config.guess:
unable to guess system type

*This script, last modified 2002-03-20, has failed to recognize*
*the operating system you are using. It is advised that you*
*download the most up to date version of the config scripts from*

* ftp://ftp.gnu.org/pub/gnu/config/ <ftp://ftp.gnu.org/pub/gnu/config/>*

If the version you run (../../processors/IA32/bochs/config.guess) is
already up to date, please
send the following data and any information you think might be
pertinent to <[hidden email]> in order to provide the needed
information to handle your system.

config.guess timestamp = 2002-03-20

uname -m = x86_64
uname -r = 3.0.7(0.338/5/3)
uname -s = CYGWIN_NT-10.0
uname -v = 2019-04-30 18:08

/usr/bin/uname -p = unknown
/bin/uname -X =

hostinfo =
/bin/universe =
/usr/bin/arch -k =
/bin/arch = x86_64
/usr/bin/oslevel =
/usr/convex/getsysinfo =

UNAME_MACHINE = x86_64
UNAME_RELEASE = 3.0.7(0.338/5/3)
UNAME_SYSTEM = CYGWIN_NT-10.0
UNAME_VERSION = 2019-04-30 18:08
configure: error: cannot guess build type; you must specify one
$

So we should
- add build directories in build.win64x64/{bochsx64,bochsx86,gdbarm32}
& build.win32x86/gdbarm32
- update the configure scripts only in processors/IA32/bochs
- make sure the build procedure is documented

I only develop the VM on macOS so I've not noticed that the cygwin build no
longer works. I apologize.

_,,,^..^,,,_ (phone)

On Sep 13, 2019, at 1:44 PM, Nicolas Cellier <[hidden email]>
wrote:

I want to simulate VM from a Spur64VMMaker.image
Unfortunately, it gets really difficult to compile Bochs plugins these
days...

WINDOWS (cygwin64):

$ cd processors/IA32/winbochs/
$ source ./conf.COG

checking build system type... ../bochs/config.guess: unable to guess system
type

This script, last modified 2002-03-20, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

ftp://ftp.gnu.org/pub/gnu/config/

If the version you run (../bochs/config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to [hidden email] in order to provide the needed
information to handle your system.

config.guess timestamp = 2002-03-20

uname -m = x86_64
uname -r = 3.0.7(0.338/5/3)
uname -s = CYGWIN_NT-10.0
uname -v = 2019-04-30 18:08

/usr/bin/uname -p = unknown

MAC (Darwin 17.7.0 Xcode 10.1):

$ cd processors/IA32/macbochs
$ ./conf.COG

checking build system type... i386-apple-darwin17.7.0
checking host system type... i386-apple-darwin17.7.0
checking target system type... i386-apple-darwin17.7.0
checking if you are configuring for another platform... no
checking for standard CFLAGS on this platform... -fpascal-strings
-fno-common -Wno-four-char-constants -Wno-unknown-pragmas -Dmacintosh
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
cp config.h bochsconfig.h
cp: config.h: No such file or directory
and don't forget to run ../bochs/makeem

LINUX (Ubuntu 18.04 thru WSL)

$ cd processors/IA32/linuxbochs
$ ./conf.COG

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking if you are configuring for another platform... no
checking for standard CFLAGS on this platform...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C
compiled programs.
If you meant to cross compile, use --host'. See config.log' for more
details.
cp config.h bochsconfig.h
cp: cannot stat 'config.h': No such file or directory
and don't forget to run ../bochs/makeem

The problem is that the Bochs copy is super old. So we won't get support
for compilation on uptodate machines...
We cannot upgrade easily, since there are COG specific changes requiring to
be replayed...
grep -r COG processors\IA32.

I also have doubts about the conf.COG files:
is --disable-x86-64 really what we want?
https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/e77147b63208fb40a9a1712a2d94d369886e91ab/processors/IA32/macbochs/conf.COG
https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/processors/IA32/macbochs/conf.COG


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/427?email_source=notifications&email_token=ADY5VUF6IQMTZPW6DUSGVO3QJP3SVA5CNFSM4IWT4NL2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HLKLOZA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADY5VUHZPE2YAFICVUBJQYLQJP3SVANCNFSM4IWT4NLQ>
.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/427?email_source=notifications\u0026email_token=AIJPEW2HCNY2WMXVZFF2KLDQJUBXVA5CNFSM4IWT4NL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6W6KXQ#issuecomment-531490142", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/427?email_source=notifications\u0026email_token=AIJPEW2HCNY2WMXVZFF2KLDQJUBXVA5CNFSM4IWT4NL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6W6KXQ#issuecomment-531490142", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>