Discussion:
[gambit-list] Porting Gambit
Paul Wolneykien
2018-11-21 14:42:14 UTC
Permalink
Hi! Tell me please, is it really hard to port Gambit to another
platform (CPU)? Is there any platform-specific code?

Currently, when I'm trying to build the vanilla sources from
github.com/gambit/gambit.git , it segfaults at the gsc/ part. The gsi
and gsc-boot are built, but they seems to be unusable: both segfaults
instantly.

The arch I'm trying to build for is E2K
(https://en.wikipedia.org/wiki/Elbrus_2000).
Marc Feeley
2018-11-21 16:50:32 UTC
Permalink
When starting a new port you should try to build using the latest release (not a clone of the git repo) so that you avoid the bootstrap process. Also it is useful to configure with --enable-ansi-c to only use the ANSI-C libraries. Once that works you can remove that configure flag to debug the more advanced features.

Are you building Gambit on the E2K itself? Cross-compiling may cause some issues. Make sure the configuration process yielded reasonable values. One aspect that is not handled automatically is the endianness of the processor. The endianness can be forced explicitly with:

./configure --enable-debug --enable-ansi-c CC="gcc -D___LITTLE_ENDIAN"
make

Try using the debugger to run the generated gsi or gsc, to see where the segfault occurs. For example:

gdb gsi/gsi
run

If you get it working please report back the changes needed.

Marc
Post by Paul Wolneykien
Hi! Tell me please, is it really hard to port Gambit to another
platform (CPU)? Is there any platform-specific code?
Currently, when I'm trying to build the vanilla sources from
github.com/gambit/gambit.git , it segfaults at the gsc/ part. The gsi
and gsc-boot are built, but they seems to be unusable: both segfaults
instantly.
The arch I'm trying to build for is E2K
(https://en.wikipedia.org/wiki/Elbrus_2000).
_______________________________________________
Gambit-list mailing list
https://mailman.iro.umontreal.ca/cgi-bin/mailman/listinfo/gambit-list
Paul Wolneykien
2018-11-22 05:57:47 UTC
Permalink
Post by Marc Feeley
When starting a new port you should try to build using the latest release (not a clone of the git repo) so that you avoid the bootstrap process. Also it is useful to configure with --enable-ansi-c to only use the ANSI-C libraries. Once that works you can remove that configure flag to debug the more advanced features.
./configure --enable-debug --enable-ansi-c CC="gcc -D___LITTLE_ENDIAN"
make
Thanks, Marc! It builds (and seems to work!) with these options. Now
I'll try to build it with production options, such as
enable-single-host, etc. There are some minor problems with outdated
config.guess. I'll report back all changes if they arise.
Post by Marc Feeley
gdb gsi/gsi
run
If you get it working please report back the changes needed.
Marc
Post by Paul Wolneykien
Hi! Tell me please, is it really hard to port Gambit to another
platform (CPU)? Is there any platform-specific code?
Currently, when I'm trying to build the vanilla sources from
github.com/gambit/gambit.git , it segfaults at the gsc/ part. The gsi
and gsc-boot are built, but they seems to be unusable: both segfaults
instantly.
The arch I'm trying to build for is E2K
(https://en.wikipedia.org/wiki/Elbrus_2000).
_______________________________________________
Gambit-list mailing list
https://mailman.iro.umontreal.ca/cgi-bin/mailman/listinfo/gambit-list
Loading...