Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 91601 - dev-lang/smarteiffel-2.0_rc2 problem - AMD64 specific?
Summary: dev-lang/smarteiffel-2.0_rc2 problem - AMD64 specific?
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: Maintainers for Miscelleneous Language Packages [OBSOLETE]
URL:
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2005-05-05 12:52 UTC by Mathematical Orchid
Modified: 2009-11-14 16:58 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathematical Orchid 2005-05-05 12:52:38 UTC
I tried to compile a tiny Eiffel program, and got an error from the compiler. Looks like it "died" rather than found an error in my source - but I COULD be wrong. If somebody would like to check this on x86 to see if it works right...?

(I have no idea if this problem is Gentoo-related or if it's a bug in the upstream code. I also don't know if it's AMD64 specific or not.)

Reproducible: Always
Steps to Reproduce:
1. emerge smarteiffel (plus tell it to accept ~amd64)

2. Create a folder somewhere. Put 2 files in it:

-----complex.e-----
expanded class COMPLEX

  -- Class to represent complex numbers.
  -- this class is concrete; objects are expanded and immutable.

creation {ANY}
  grid,
  polar

feature {ANY}
  grid(re:REAL; im:REAL) is
  do
    Re := re;
    Im := im;
    
    Grid := false;
    Polar := true;
  end;
  
  polar(mag:REAL; arg:REAL) is
  require
    mag >= 0
  do
    Mag := mag;
    Arg := arg;
    
    Grid := false;
    Polar := true;
  end;
  
feature {COMPLEX}
  Re, Im, Mag, Arg : REAL;
  Polar, Grid: BOOLEAN;

end; -- class COMPLEX
-----complex.e-----
-----main.e-----
class MAIN

creation {ANY}
  make

feature {ANY}
  make is
  local
    x, y, z : COMPLEX;
  do
    create x.grid(7, 11);
    create y.polar(7, 11);
    create z.polar(-1, 2);
  end;

end; -- class MAIN
-----main.e-----

3. compile main
Actual Results:  
bash-2.05b$ compile main
Received signal 11.
Eiffel program crash at run time.
No trace when using option "-boost"
File "main.make" not found. Error(s) during `compile_to_c'.


Expected Results:  
Result SHOULD be a single file called a.out, plus some other temp files. Either
that or - if my source is actually wrong - an explanatory message saying what's
wrong.

Removing the keyword "expanded" causes the program to compile normally. It hits
an exception at runtime - which suggests my code is wrong. But even so,
shouldn't "crash" the compiler with no meaningful error.

As I say, if somebody could find out what it does on x86...

bash-2.05b# emerge --info
Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3,
glibc-2.3.4.20041102-r1,2.6.11-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.11-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, May  2 2005, 10:29:55)]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4-r1
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.8.5-r3, 1.7.9-r1, 1.6.3, 1.4_p6, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-march=k8 -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox strict"
GENTOO_MIRRORS="http://gentoo.blueyonder.co.uk
ftp://mirrors.blueyonder.co.uk/mirrors/gentoo
http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/
ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.uk.gentoo.org/gentoo-portage"
USE="amd64 X acpi alsa arts bitmap-fonts bzip2 bzlib ccache cdda cddb cdr cdrom
crypt curl dvd dvdr dvdread ecc encode esd fam flac font-server freetype ftp gif
gpg gpm gtk2 imlib ipv6 jack java javascript jikes jp2 jpeg jpeg2k kde libwww
logitech-mouse lzo lzw lzw-tiff motif mozilla mp3 mpeg msn ncurses nls ogg
oggvorbis opengl pam png povray qt readline sdl speex spell ssl svg szip tcltk
tcpd tetex theora threads tiff truetype truetype-fonts type1-fonts usb
userlocales vorbis xml2 xpm xrandr xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY


*** I would like to mention that I've writted a number of small programs, all of
which compile perfectly and execute as expected on AMD64. So it appears this
isn't horrifically broken.
Comment 1 Mathematical Orchid 2005-05-05 12:56:18 UTC
DUH! I didn't say what VERSION of SmartEiffel, did I? :-/

dev-lang/smarteiffel-2.0_rc2
Comment 2 Raphael Mack 2006-08-09 05:43:50 UTC
This is a bug in smarteiffel, neither gentoo, nor amd64 related.

Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-08-22 06:11:09 UTC
Still a problem w/ 2.2?
Comment 4 Alex Miller 2009-05-17 22:46:20 UTC
Under version 2.2, the compiler now gives the error:

****** Fatal Error: Unable to find the default creation procedure
for expanded type COMPLEX. An expanded type must have one unique
creation procedure with no argument: the creation procedure used
for automatic initialization. Please, consider to add explicitely
the `default_create' procedure from ANY or some other existing
procedure with no arguments. For expanded class with no creation
clause, the `default_create' procedure is the one used for automatic
initialization.

The source lines involved by the message are the following:

Line 9 column 15 in MAIN (/home/gentoo/workspace/gentoo-bugs/91601/main.e):
    x, y, z : COMPLEX;
              ^       
Line 6 column 1 in COMPLEX (/home/gentoo/workspace/gentoo-bugs/91601/complex.e):
creation {ANY}
^             
------
Error occurs while compiling. Compilation process aborted.

Problem is fixed.
Comment 5 Tomáš Chvátal (RETIRED) gentoo-dev 2009-11-14 16:58:11 UTC
removed