Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 167698
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Science Mathematics related packages <sci-mathematics@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Jozsef Daniel <simius@mail.tvnet.hu>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
scilab-4.1-printf-fix.patch proposed patch to fix printf issues patch Markus Dittrich 2007-02-20 03:19 0000 702 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 167698 depends on: Show dependency tree
Bug 167698 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-02-19 23:32 0000
I have installed sci-mathematics/scilab-4.1 with sci-libs/blas-atlas-3.7.24 and
sci-libs/lapack-atlas-3.7.24-r1.
It installed, and seems to run okay, however when I try to run the
"Introduction to SCILAB" Demo, after a few steps, scilab dies without leaving
any error messages.

When run under gdb with scilab -debug, I got an error message. Here is the gdb
/ scilab output:

(gdb) run
Starting program: /usr/lib64/scilab-4.1/bin/scilex 
(no debugging symbols found)
...
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 47468505893216 (LWP 32581)]
        -------------------------------------------
                         scilab-4.1

                  Copyright (c) 1989-2006          
              Consortium Scilab (INRIA, ENPC)      
        -------------------------------------------


Warning: the operational team of the Scilab Consortium
   does not directly provide nor officially support this
   version of Scilab built with the GTK widget



Startup execution:
  loading initial environment

 pause mode: enter empty lines to continue.

>>
-->//               SCILAB OBJECTS
>>
-->//               1. SCALARS
>>
-->// Copyright INRIA
>>
-->a=1               //real constant
 a  =

    1.  
>>
-->1==1              //boolean
 ans  =

  T  
>>
-->'string'          //character string
 ans  =

 string   
>>
-->z=poly(0,'z')     // polynomial with variable 'z' and with one root at zero
 z  =

    z   
>>
-->p=1+3*z+4.5*z^2   //polynomial
 p  =

At line 17 of file formatnumber.f
Internal Error: printf is broken

Program exited with code 03.
(gdb)

***

The important parts of emerge --info:
System uname: 2.6.18-gentoo-r6.Daniel.Jozsef.20070112.02 x86_64 AMD Processor
Model Unknown
Gentoo Base System release 1.12.9
Timestamp of tree: Mon, 19 Feb 2007 12:50:01 +0000
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="-march=k8 -O2 -pipe"
MAKEOPTS="-j3"

------- Comment #1 From Markus Dittrich 2007-02-20 03:18:18 0000 -------
Hi Jozsef,

Thanks for your bug report! Unfortunately, I can not reproduce it on any
of my dev boxes. Could you please provide all of your emerge --info!
Below follows a patch that might help - please give it a try and report
back.

Thanks,
Markus

------- Comment #2 From Markus Dittrich 2007-02-20 03:19:17 0000 -------
Created an attachment (id=110708) [details]
proposed patch to fix printf issues

------- Comment #3 From Jozsef Daniel 2007-02-20 08:42:24 0000 -------
(In reply to comment #2)
> Created an attachment (id=110708) [edit] [details]
> proposed patch to fix printf issues
> 

Well, scilab doesn't crash with this patch, but instead doesn't print
polynomials and matrices.

It's like this:

>>
-->p=1+3*z+4.5*z^2   //polynomial
 p  =

 (f 3. 0)  [   ]
 (f 3. 0)  [   ]
 (f 4. 1)  [    ]
                 2  
      +  z +    z   

or

>>
-->A=[a+1 2 3
-->     0 0 atan(1)
-->     5 9 -1]      //3 x 3 constant matrix
 A  =

 (f 3. 0)  [   ]
 (f 3. 0)  [   ]
 (f 3. 0)  [   ]

 (f 3. 0)  [   ]
 (f 3. 0)  [   ]
 (f10. 7)  [          ]

 (f 3. 0)  [   ]
 (f 3. 0)  [   ]
 (f 3. 0)  [   ]
              -            

------- Comment #4 From Jozsef Daniel 2007-02-20 08:45:58 0000 -------
My emerge --info in full:

Portage 2.1.2-r9 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r0,
2.6.18-gentoo-r6.Daniel.Jozsef.20070112.02 x86_64)
=================================================================
System uname: 2.6.18-gentoo-r6.Daniel.Jozsef.20070112.02 x86_64 AMD Processor
Model Unknown
Gentoo Base System release 1.12.9
Timestamp of tree: Tue, 20 Feb 2007 06:50:01 +0000
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/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/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf
/etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.inf.elte.hu/ ftp://ftp.nyx.hu/gentoo
http://gentoo.inode.at/"
LANG="en_US.UTF-8"
LINGUAS="en hu ja"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="16bit 3ds 64bit X X509 a52 aac aalib acpi aiglx alsa amd64 amr ao asf
audacious audiofile background bcmath binary-drivers bittorrent blender-game
bluetooth branding bzip2 c++ cairo canna cdda cddb cdparanoia cdr cdsound cg
chm cjk cli colordiff cracklib cran crosscompile crypt css ctype cups curl
curlwrappers cursors dbus depth32 directfb divx4linux djvu dlloader doc
double-precision dri dts dv dvd dvdr dvdread effects emul-linux-x86 encode exif
fat fbcon ffmpeg firefox flac flash flatfile fontconfig forceunicode fortran ft
ftp gaim gdbm gif gimp ginac glsa glut gmedia gmp gnome gnome-print gpgme gpm
gs gstreamer gtk gtk2 gtkhtml gzip hal hddtemp html http icons iconv idea idn
ieee1394 image imagemagick imap imlib imlib2 inquisitio irc iso14755 java java5
javacomm javascript jbig jce jikes jpeg jpeg2k lame lcms libcaca libg++ libwww
linuxthreads-tls live lm_sensors lzo lzw mad madwifi maildir math matroska midi
mikmod mime ming mjpeg mmap mmkeys mng modplug mono motif mouse mozbranding mp3
mp4 mpeg mpeg2 mplayer msdfs msn musepack nautilus ncurses net netbeans netpbm
network nforce2 nls nptl nptlonly nsplugin ntp nvidia nvidis nvtv offensive ogg
oggvorbis on-the-fly-crypt onoe openal openexr opengl openssl oss pam pango
paste64 patented pcre pdf perl pink player png posix ppds pppd python qq rar
readline reflection reiserfs rle rss rtc samba sdk sdl session shorten sid
skins smp smtp sndfile speex spell spl ssl stream svg svgz sysfs syslog sysvipc
szip t1lib tcpd tga theora threads thunderbird tiff timidity transcode truetype
truetype-fonts type1 type1-fonts unicode unzip usb userlocales v4l v4l2 vcd vim
vim-with-x visualization vorbis vorbis-psy wifi wma wmf wmp wv wxwindows x264
xanim xchattext xcomposite xforms xml xml2 xorg xpm xrandr xscreensaver xsl xv
xvid zip zlib zvbi" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x
ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0
intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file
hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route
share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev"
KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001
mtxorb ncurses text" LINGUAS="en hu ja" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS,
PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #5 From Markus Dittrich 2007-02-20 14:09:27 0000 -------
Thanks for testing! It looks like this is a problem with gfortran,
x86_64 and scilab. I'll have another look at scilab's fortran code
but if there's no easy fix we will probably have to file a bug upstream.

Thanks,
Markus

------- Comment #6 From Andrea Pinazzi 2007-04-13 12:26:55 0000 -------
I've got a similar problem when I try to open Events palette in scicos.
Launching "scilab -nw" I can get the error

At line 82 of file cvdm.f
Internal Error: printf is broken

My emerge --info
emerge --info
Portage 2.1.2.2 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.5-r0,
2.6.18-suspend2-r1 i686)
=================================================================
System uname: 2.6.18-suspend2-r1 i686 Intel(R) Pentium(R) M processor 1.73GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Wed, 11 Apr 2007 11:20:02 +0000
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -mmmx -msse -msse2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf
/etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=i686 -mmmx -msse -msse2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg distlocks fixpackages parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.bih.net.ba/gentoo/
ftp://mirror.bih.net.ba/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/"
LANG="it_IT.UTF-8"
LC_ALL="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
LINGUAS="it"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages
--filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/science
/usr/portage/local/layman/sunrise /usr/portage/local/layman/gechi
/usr/portage/local/layman/pro-audio /usr/portage/local/layman/gentopia"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acpi alsa apache2 audiofile berkdb bitmap-fonts branding bzip2
cairo cdparanoia cdr cli cracklib crypt cups dbus directfb dri dvb dvd dvdr
dvdread emboss encode exif fam fbcon ffmpeg firefox flac fortran ftp gdbm gif
gnome gpm gstreamer gtk gtk2 gtkhtml hal iconv imagemagick isdnlog java jikes
jpeg jpeg2k lcms ldap libg++ lm_sensors mad midi mikmod mmx mng mp3 mpeg
ncurses nls nptl nptlonly offensive ogg openal opengl pam pcre perl png ppds
pppd python quicktime readline reflection samba sdl session spell spl sse sse2
ssl svg svga tcpd theora threads tiff truetype truetype-fonts type1-fonts
unicode usb v4l vorbis win32codecs x264 x86 xine xml xorg xv xvid zlib"
ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1
emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m
maestro3 trident usb-audio via82xx via82xx-modem ymfpci"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file
hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route
share shm softvol" CAMERAS="canon ptp2" ELIBC="glibc" INPUT_DEVICES="keyboard
mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk
hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" USERLAND="GNU"
VIDEO_CARDS="radeon vesa vga"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS,
PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


As you can see I'm on x86. If any oter infos are needed, just ask

------- Comment #7 From Markus Dittrich 2007-04-16 13:10:59 0000 -------
Since I still can't reproduce this here, would one of you be able to
check if this is still an issue with gcc-4.1.2?

Thanks,
Markus

------- Comment #8 From Andrea Pinazzi 2007-04-17 16:00:58 0000 -------
I'm compiling gcc.Should I try emerge scilab with or without the patch provided
here?

------- Comment #9 From Markus Dittrich 2007-04-17 18:31:46 0000 -------
Hi Andrea,

I think at this point I would mainly like to know if it works as is, i.e.
without
the patch. If it still breaks I have to think about what to do since the patch
probably only fixes one of several issues.

Thanks for your help,
Makrus

------- Comment #10 From Andrea Pinazzi 2007-04-18 06:00:28 0000 -------
I did
# emerge -u gcc && emerge scilab

Nothing changes, I've got the same error.
Did I have to recompile anything else?

------- Comment #11 From Andrea Pinazzi 2007-04-18 10:39:58 0000 -------
Hal9000 ~ # emerge -pv scilab

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sci-mathematics/scilab-4.1  USE="gtk java -Xaw3d -debug -ocaml
-tk" 0 kB 

I'm posting my USE for scilab. Also I noticed that the error reported in first
post happens only in scilab window. If I do the same sequence in a console
running "scilab -nw" it gives me the right answer.

Thanks for your help

------- Comment #12 From Markus Dittrich 2007-04-18 12:39:04 0000 -------
Hi Andrea,

Thanks much for testing! I had a look at your emerge --info and 
noticed that you don't set any FFLAGS. In this case scilab will
be compiled without any since portage does NOT automatically
set FFLAGS=CFLAGS. I am not sure if this has anything to do 
with your reported problem but we should rule it out.
That said, could you explicitly set FFLAGS
and try re-emerging the package. To to this, either set

1) FFLAGS="${CFLAGS}" in your /etc/make.conf and
    then re-emerge scilab

or just

2) FFLAGS="-O2 -march=i686 ....." /usr/bin/emerge scilab


Thanks,
Markus

------- Comment #13 From Andrea Pinazzi 2007-04-18 18:37:17 0000 -------
Hal9000 ~ # grep FLAGS /etc/make.conf | grep -v "#"
CFLAGS="-O2 -march=i686 -mmmx -msse -msse2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
FFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"

and I also compiled it without --as-needed LDFLAG. But the error is still
there... :(

------- Comment #14 From Markus Dittrich 2007-04-19 12:35:29 0000 -------
Hi  Andrea,

Thanks much for testing this as well. We should probably check
upstream's bugzilla for any bugs along what you are seeing and
if there are none file a bug with them. I hope I can have a closer
look at this soon.

Thanks,
Makrus

------- Comment #15 From Andrea Pinazzi 2007-04-19 15:46:16 0000 -------
I've tried different USE
[ebuild   R   ] sci-mathematics/scilab-4.1  USE="java tk -Xaw3d -debug -gtk
-ocaml"

I've added tk and removed gtk.
Now it works, (both errors are gone) but, obviously,  it looks very very ugly.

I've done this because I saw a warning when i started gtk compiled one saying
that Scilab Consortium doesn't support gtk versions....

If there could be a fix for gtk+ code...

------- Comment #16 From Markus Dittrich 2007-04-19 21:53:34 0000 -------
(In reply to comment #15)
> I've done this because I saw a warning when i started gtk compiled one saying
> that Scilab Consortium doesn't support gtk versions....
> 
> If there could be a fix for gtk+ code...
> 

Ahh, interesting. Unfortunately, it escapes me at the moment how
the gtk interface could cause this. Well, at least it works now!
I'll have to look at the code over the weekend to see if there is something
that comes to mind.

@Jozsef: Does switching to the tk interface solve your problem as well?

Thanks,
Markus

------- Comment #17 From Markus Dittrich 2007-05-24 13:02:52 0000 -------
Folks,

Are there still the same issues with then newest scilab-4.1.1?

Thanks,
Markus

------- Comment #18 From Andrea Pinazzi 2007-05-25 13:23:28 0000 -------
The "Event Palette" Issue is still there with gtk interface. Didn't test other
one. If you got clues that help you solve'em you're welcome, otherwise I think
we have better wait for scilab-5 (coming out in october) which should be Java
Based

------- Comment #19 From Jérôme Borme 2007-05-26 19:09:55 0000 -------
Workaround is to compile with USE="tk gtk". Scilab will appear with gtk look
and feel but bug does not show up, at least on my box.

Examples:
# # Here is the bug. 
# USE="-tk gtk debug" emerge scilab
$ scilab -debug
(gdb) r
[...]
-->log(10)
 ans  =

At line 17 of file formatnumber.f
Internal Error: printf is broken

Program exited with code 03.
(gdb) l
1      
/mnt/stockage/sys/tmp/portage/sys-libs/glibc-2.5-r2/work/build-amd64-x86_64-pc-linux-gnu-nptl/nptl/crti.S:
No such file or directory.
        in
/mnt/stockage/sys/tmp/portage/sys-libs/glibc-2.5-r2/work/build-amd64-x86_64-pc-linux-gnu-nptl/nptl/crti.S
(gdb) q

# Here is the apparent workaround.
USE="tk gtk debug" emerge scilab
$ scilab -debug
--> log(10)
 ans  =

    2.3025851  

If you can confirm this workaround, could you tune the ebuild to force USE="tk"
for the amd64 arch?

------- Comment #20 From Markus Dittrich 2007-05-27 12:42:40 0000 -------
Hi Jérôme,

Thanks a lot for the pointer! Unfortunately, I can not reproduce
this error on my x86 dev boxes. It seems quite strange that
USE="tk gtk" versus USE="-tk gtk" could lead to this problem.

Anyway, if your suggestion helps Jozsef as well then I will probably
remove the tk useflag altogether and force the presence of tk/tcl.

That said, Jozsef could you please test if USE="tk gtk" works
for you as well.

Thanks,
Markus

------- Comment #21 From Andrea Pinazzi 2007-05-28 07:03:37 0000 -------
Compiled with both tk and gtk. Now events palette displays correctly.

Thanks

------- Comment #22 From Markus Dittrich 2007-05-28 12:29:57 0000 -------
Hi Andrea,

Thanks for testing and great to hear that it works now!
I guess I will change the ebuild to force tk even if compiled
against gtk since this seems to be the culprit.

Best,
Markus

------- Comment #23 From Markus Dittrich 2007-05-30 13:27:17 0000 -------
I have updated the scilab-4.1.1 ebuild correspondingly
hopefully taking care of all the problems reported in this bug.

Please re-open should there still be issues on amd64.

Thanks for all the help and testing.

cheers,
Markus

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug