I had just updated this port. Next time, I will check if someone else has updated a port first. :) I do have one addition to this patch. The share/sane directory is created by xsane as well as sane-backends. Maybe the following line should be added to the end of xsane anyway? @unexec rmdir %D/share/sane 2> /dev/null || true
One last addition. FreeBSD 4 should use GCC 3.3 (or maybe 3.2) to compile. xsane tickles an optimization bug in GCC 2.95.4 which causes color previews to crash xsane. The Preview struct claims the width is over 100000 for an image that is actually about 500. Compiling with GCC 3.3.5 fixed it. Line to add to Makefile: USE_GCC= 3.3 I am not sure how this affects FreeBSD 5. Sean ----------------------- sean-freebsd@farley.org
On Tue, 14 Sep 2004, Sean Farley wrote: > One last addition. FreeBSD 4 should use GCC 3.3 (or maybe 3.2) to > compile. xsane tickles an optimization bug in GCC 2.95.4 which causes > color previews to crash xsane. I'd hesitate to depend on a newer GCC version. As far as I know, the bug also disappears if you try different compiler options (e.g. CFLAGS=-g). YMMV. -- Yours, Dominik
On Thu, 16 Sep 2004, Dominik Brettnacher wrote: > On Tue, 14 Sep 2004, Sean Farley wrote: > >> One last addition. FreeBSD 4 should use GCC 3.3 (or maybe 3.2) to >> compile. xsane tickles an optimization bug in GCC 2.95.4 which >> causes color previews to crash xsane. > > I'd hesitate to depend on a newer GCC version. > > As far as I know, the bug also disappears if you try different > compiler options (e.g. CFLAGS=-g). That is what I have read. Removing the -O should work around the optimization bug. Possibilities: 1. Use newer GCC. I tested with GCC v3.3.5. This idea suffers from having to install another GCC. 2. Prevent '-O' from being used. The only problem is that the Makefile has to prevent -O from being in CFLAGS (even user-defined in make.conf) at least for the funciton in question (preview_autoselect_scanarea()/xsane-preview.c). According to this post, the -g flag is not necessary; only removing -O is needed. http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=b0clss%242nq%241%40newsreader2.netcologne.de Sean ----------------------- sean-freebsd@farley.org
Hi, I'm wondering, how it's possible to reproduce the crash? I've tried several (color) previews and (color) scans with my old AGFA SnapScan 310, but got no crash @FreeBSD 4.10. I've even tried acquiring a preview of an image which started dark, and ended up in a light white. That made all prior versions (up to 0.92 - no newer versions tried) coredump. Now it works. Anyway, with that change, it should be possible, to strike out -O: .if ${OSVERSION} < 500035 CONFIGURE_ENV+= CFLAGS="${CFLAGS:C/-O[0-9]*//g}" .endif Dominik: Is it ok for you to commit with that change? (So no new compiler would NOT be needed for FreeBSD 4) But, I would like to know how to reproduce the crash first! Greetings -- Oliver Lehmann http://www.pofo.de/ http://wishlist.ans-netz.de/
On Tue, 26 Oct 2004, Oliver Lehmann wrote: > Hi, > > I'm wondering, how it's possible to reproduce the crash? I've tried > several (color) previews and (color) scans with my old AGFA SnapScan > 310, but got no crash @FreeBSD 4.10. I've even tried acquiring a > preview of an image which started dark, and ended up in a light white. > That made all prior versions (up to 0.92 - no newer versions tried) > coredump. Now it works. From the URL I posted and what I use for a scanner, it looks like Epson 1200U scanners are related. Sean -- sean-freebsd@farley.org
On Tue, 26 Oct 2004, Oliver Lehmann wrote: > I'm wondering, how it's possible to reproduce the crash? I've tried > several (color) previews and (color) scans with my old AGFA SnapScan 310, > but got no crash @FreeBSD 4.10. I've even tried acquiring a preview of an > image which started dark, and ended up in a light white. That made all > prior versions (up to 0.92 - no newer versions tried) coredump. Now it > works. I think it is the nature of bugs like these that they aren't easy to reproduce - after all it seems to be a compiler bug. > Anyway, with that change, it should be possible, to strike out -O: > > .if ${OSVERSION} < 500035 > CONFIGURE_ENV+= CFLAGS="${CFLAGS:C/-O[0-9]*//g}" > .endif > > Dominik: > Is it ok for you to commit with that change? (So no new compiler would NOT > be needed for FreeBSD 4) I'm fine with it. Could you create a patch against the current xsane port, so that one of the committers could apply it? At the moment, I am spending a few months abroad without a FreeBSD machine at hand. Therefore I would be very glad if you could do me that favor. -- Regards, Dominik
State Changed From-To: open->closed Committed, Thanks