Revision 1311 does not compile on Cygwin

Bug #179878 reported by leppie on 2008-01-02
2
Affects Status Importance Assigned to Milestone
Ikarus Scheme
High
Abdulaziz Ghuloum

Bug Description

Just did an update, and I get this:

gcc -g -O2 -c -o ikarus-enter.o ikarus-enter.s
ikarus-enter.s: Assembler messages:
ikarus-enter.s:135: Error: bad register name `%rsi'
ikarus-enter.s:140: Error: bad register name `%rcx'
ikarus-enter.s:145: Error: bad register name `%rdi'
ikarus-enter.s:156: Error: symbol `ik_asm_enter' is already defined
ikarus-enter.s:157: Error: symbol `_ik_asm_enter' is already defined
ikarus-enter.s:182: Error: symbol `L_call' is already defined
ikarus-enter.s:185: Error: symbol `ik_underflow_handler' is already defined
ikarus-enter.s:188: Error: symbol `L_do_underflow' is already defined
ikarus-enter.s:196: Error: symbol `L_multivalue_underflow' is already defined
ikarus-enter.s:202: Error: symbol `ik_asm_reenter' is already defined
ikarus-enter.s:203: Error: symbol `_ik_asm_reenter' is already defined
ikarus-enter.s:221: Error: symbol `L_multi_reentry' is already defined
ikarus-enter.s:227: Error: symbol `ik_foreign_call' is already defined
ikarus-enter.s:228: Error: symbol `_ik_foreign_call' is already defined
ikarus-enter.s:243: Error: symbol `check_ecx' is already defined
ikarus-enter.s:251: Error: symbol `L_two' is already defined
ikarus-enter.s:253: Error: symbol `L_one' is already defined
ikarus-enter.s:255: Error: symbol `L_zero' is already defined
ikarus-enter.s:259: Error: symbol `L_loop' is already defined
ikarus-enter.s:265: Error: symbol `L_set' is already defined
make[3]: *** [ikarus-enter.o] Error 1
make[3]: Leaving directory `/home/leppie/ikarus.dev/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/leppie/ikarus.dev/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/leppie/ikarus.dev'
make: *** [all] Error 2

Did a make clean, and a ./configure for sanity, same result.

gcc version 3.4.4

Michael D. Adams (mdmkolbe) wrote :

This is not specific to Cygwin. I also see it on my Ubuntu (7.10) machine. My guess is that the "%rsi" etc. crept in as Aziz was in the process of getting Ikarus to run in 64 bit mode.

Abdulaziz Ghuloum (aghuloum) wrote :

I think the __x86_64__ flag that I'm using is incorrect. I'll investigate what's the right one should be. Thanks.

Changed in ikarus:
assignee: nobody → aghuloum
importance: Undecided → High
status: New → Confirmed

On Jan 2, 2008, at 11:22 AM, Abdulaziz Ghuloum wrote:

> I think the __x86_64__ flag that I'm using is incorrect. I'll
> investigate what's the right one should be. Thanks.

I need to go sleep now :-) so if you want, you should be able to
either undef that flag or replace the

#if __x86_64__

lines with

#if 0

I'll try to figure something out when I wake up unless somebody races
me to it.
Thanks.

leppie (leppie) wrote :

I think I know the problem, it seems the C preprocessor does not execute on assembler files, its simply seen as comment as far as I can see.

leppie (leppie) wrote :

Ok here is the fix:

change the folwling in the 2 .s files.

#if ... -> .ifdef ....
#else -> .else
#endif -> .endif

leppie (leppie) wrote :

Unfortunately this change hoses the boot file :(

make[2]: Entering directory `/home/leppie/ikarus.dev/scheme'
echo '(define ikarus-version "0.0.2patched")' >ikarus.config.ss
echo '(define ikarus-revision "1309")' >>ikarus.config.ss
echo '(define ikarus-lib-dir "/usr/local/lib/ikarus")' >>ikarus.config.ss
../src/ikarus -b ./ikarus.boot.prebuilt --r6rs-script makefile.ss
      8 [main] ikarus 4980 _cygtls::handle_exceptions: Error while dumping state (probably corrupted stack)
make[2]: *** [ikarus.boot] Segmentation fault (core dumped)
make[2]: Leaving directory `/home/leppie/ikarus.dev/scheme'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/leppie/ikarus.dev'
make: *** [all] Error 2

leppie (leppie) wrote :

The fix for above :)

leppie@UBER-VISTA ~/ikarus.dev
$ cd scheme/

leppie@UBER-VISTA ~/ikarus.dev/scheme
$ ikarus --r6rs-script makefile.ss

leppie@UBER-VISTA ~/ikarus.dev/scheme
$ cd ..

leppie@UBER-VISTA ~/ikarus.dev
$ make

IMO, to prevent 'size' changes in the boot file to cause the build error, the makefile should check for an installed (and very likely still working) ikarus.

leppie (leppie) wrote :

Erm, ok, that doesn't seem to work :( Now I have no working ikarus...

Michael D. Adams (mdmkolbe) wrote :

GCC determines whether an assembler file needs to be preprocessed based on the extension. "file.s" means no pre-processor, but "file.S" will get pre-processed. You can explicitly set this with "-x assembler-with-cpp", but the file extension is the more usual way.

Abdulaziz Ghuloum (aghuloum) wrote :

Fixed in revision 1314. Renamed the files and fixed a minor bug in ikarus-fasl.c.

Changed in ikarus:
status: Confirmed → Fix Committed
Abdulaziz Ghuloum (aghuloum) wrote :

On Jan 2, 2008, at 5:14 PM, Michael D. Adams wrote:

> GCC determines whether an assembler file needs to be preprocessed
> based
> on the extension. "file.s" means no pre-processor, but "file.S" will
> get pre-processed. You can explicitly set this with "-x assembler-
> with-
> cpp", but the file extension is the more usual way.

BTW: I did rename the extensions at some point but it made no difference
under Mac OS (both .s and .S files seem to get preprocessed the same
way)
so I decided that it was not needed. They're now named *.S. Thanks.

Abdulaziz Ghuloum (aghuloum) wrote :

On Jan 2, 2008, at 12:17 PM, leppie wrote:

> IMO, to prevent 'size' changes in the boot file to cause the build
> error, the makefile should check for an installed (and very likely
> still
> working) ikarus.

Revisions are sometimes not binary compatible so you cannot, in general,
use an older ikarus to build the newer one. You *need* the new one.
Plus, any new changes need to be tested. If you don't want to be
testing
the development version, you can always stick to the 0.0.2 release.

Abdulaziz Ghuloum (aghuloum) wrote :

On Jan 2, 2008, at 12:20 PM, leppie wrote:

> Erm, ok, that doesn't seem to work :( Now I have no working ikarus...

I just tested the newest revision under cygwin and it seems to be
working fine now. Sorry about the trauma that I caused. :-)

leppie (leppie) wrote :

Thanks, working now :)

Abdulaziz Ghuloum (aghuloum) wrote :

This bug report is about to be closed as the fix comitted
previously will be incorporated in the next 0.0.3 release of
Ikarus Scheme, scheduled for January 31, 2008. A release
candidate tarball is available for download from:
http://www.cs.indiana.edu/~aghuloum/ikarus/ikarus-0.0.3-rc1.tar.gz
Please do test it if you have the time and report any issues
you might encounter. Thank you very much for your support.
(Sorry for the duplicates; I'm updating every open bug.)

Changed in ikarus:
milestone: none → 0.0.3
Changed in ikarus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers