Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 291888 - media-libs/coin-3.1.0: configure hangs when binfmt_misc used with wine
Summary: media-libs/coin-3.1.0: configure hangs when binfmt_misc used with wine
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Maciej Mrozowski
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-04 18:45 UTC by Michał Górny
Modified: 2011-01-13 21:11 UTC (History)
2 users (show)

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


Attachments
The 'unfinished' build log (build.log,1.26 KB, text/plain)
2009-11-07 08:24 UTC, Michał Górny
Details
Build log after waiting a while (build.log,19.75 KB, text/plain)
2009-11-07 08:31 UTC, Michał Górny
Details
Fresh build log (build.log,3.49 KB, text/plain)
2010-01-05 17:37 UTC, Michał Górny
Details
config.log file (config.log,8.90 KB, text/plain)
2010-01-05 17:37 UTC, Michał Górny
Details
Fixes configure issue. (coin-3.1.0-WrapMSVCWineFix.patch,19.59 KB, patch)
2010-01-11 17:26 UTC, Tom Fredrik Blenning Klaussen
Details | Diff
Fix for Coin-3.1.2 (coin-3.1.2-WrapMSVCWineFix.patch,14.66 KB, patch)
2010-01-12 11:36 UTC, Tom Fredrik Blenning Klaussen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-11-04 18:45:23 UTC
One of the tests performed by configure script of coin-3.1.0 calls PE32 binary. In simple case, the output looks like this:

  checking setup for wrapmsvc.exe... not working (as expected)

But if the system has binfmt_misc configured to run such executables using wine, it is started and hangs, requiring user to manually kill the process to allow configure to continue.
Comment 1 Víctor Ostorga (RETIRED) gentoo-dev 2009-11-06 22:42:35 UTC
Please attach build log and emerge --info
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-11-07 08:24:24 UTC
Created attachment 209510 [details]
The 'unfinished' build log

This is the build log to the moment configure hangs. But now I see that after about 5 minutes it goes on, and I'll attach more info in a while.

--
emerge --info:

Portage 2.2_rc48 (default/linux/amd64/10.0/desktop, gcc-4.4.2, glibc-2.11-r0, 2.6.31-gentoo-r5-mgorny-amd64 x86_64)
=================================================================
System uname: Linux-2.6.31-gentoo-r5-mgorny-amd64-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_3800+-with-gentoo-2.0.1
Timestamp of tree: Fri, 06 Nov 2009 14:45:01 +0000
app-shells/bash:     4.0_p35
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.4, 2.7_pre20091101
dev-python/pycrypto: 2.1.0_beta1
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     9999
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.20
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/srv/nfs/common/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y --ask --keep-going"
FEATURES="assume-digests buildpkg collision-protect distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
GENTOO_MIRRORS="        http://ftp.vectranet.pl/gentoo/         http://gentoo.mirror.pw.edu.pl/         http://gentoo.prz.rzeszow.pl/   http://gentoo.zie.pg.gda.pl/     http://gentoo.po.opole.pl/      http://gentoo.mirror.dkm.cz/pub/gentoo/         http://ftp.uni-erlangen.de/pub/mirrors/gentoo/   http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ "
LC_ALL="pl_PL.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="pl en_US en"
MAKEOPTS="-j2"
PKGDIR="/srv/nfs/common/packages/athlon64"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/cache/portage/local /usr/local/portage/layman/sunrise /usr/local/portage/layman/gnash-cvs /usr/local/portage/layman/java-overlay /usr/local/portage/layman/kvm /usr/local/portage/layman/perl-experimental /usr/local/portage/layman/pythonhead /usr/local/portage/layman/vdr-experimental /usr/local/portage/layman/vdr-testing /usr/local/portage/layman/voip /usr/local/portage/layman/qting-edge /usr/local/portage/layman/dotnet /usr/local/portage/layman/mozilla /usr/local/portage/layman/python /usr/local/portage/layman/science /home/mgorny/projekty/emdzientoo"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acpi alsa amd64 amrnb amrwb bash-completion bluetooth branding bzip2 cairo caps cdparanoia cdr cli consolekit cracklib crypt curl dbus dri dts dv dvb dvd dvdr dvdread emboss encode evo exif expat fame ffmpeg firefox flac fontconfig fontforge fortran fpx gif glib gmp gnutls gpg gpgme gs iconv idn imagemagick ipv6 jack jbig jpeg jpeg2k kdeenablefinal latex libnotify lirc logrotate lzma mad mbox mikmod mmap mmx mmxext mng modplug modules mp3 mp4 mpeg mudflap multilib musepack ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss oss4 pam pch pcre pdf perl png ppds pppd pulseaudio python qt3support quicktime readline reflection rle rtsp scanner sdl session slang speex spl sqlite3 sse sse2 ssl startup-notification svg sysfs syslog tcpd tetex tga theora threads thunar tiff timidity truetype unicode usb v4l v4l2 vcd vhosts vim-syntax vorbis wmf x264 xattr xcb xine xinetd xml xorg xpm xulrunner xv xvid xvmc zlib" ALSA_CARDS="hda-intel emu10k1 virmidi mpu401 pcsp" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl en_US en" LIRC_DEVICES="serial" USERLAND="GNU" VIDEO_CARDS="nouveau nv vesa radeon radeonhd nvidia" 
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-11-07 08:31:30 UTC
Created attachment 209512 [details]
Build log after waiting a while

After waiting these ~5 minutes configure goes like normal (assuming that program failed) but then emerge hangs with sandbox violations.
Comment 4 Roelof Wobben 2009-12-17 16:02:46 UTC
Oke, 

Does the same happens when you upgrade Coin to 3.1.2 which in now in Portage.

Roelof
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2009-12-29 13:26:06 UTC
(In reply to comment #4)
> Does the same happens when you upgrade Coin to 3.1.2 which in now in Portage.

Yes, it does.
Comment 6 Roelof Wobben 2010-01-05 16:18:36 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Does the same happens when you upgrade Coin to 3.1.2 which in now in Portage.
> Yes, it does.

Hello Michal, 

Can you provide the configure.log for Coin so upstream can look what the problem is.
One question : Do youave CONFIG_BINFMT_MISC enabled in ther kernel.

Roelof
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-01-05 17:36:21 UTC
Ok, now I get slightly different results (maybe due to wine upgrade or sth) and configure fails totally. I attach fresh build.log & config.log.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-01-05 17:37:30 UTC
Created attachment 215313 [details]
Fresh build log

Of course, the 'checking setup for wrapmsvc.exe' part takes a lot of time.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-01-05 17:37:55 UTC
Created attachment 215315 [details]
config.log file
Comment 10 Tom Fredrik Blenning Klaussen 2010-01-05 22:50:38 UTC
Hi Michael

Roleof is asking the correct question here, do you have support for MISC binaries. It seems wrapmsvc, is trying to run and manages to do so. Which seems to fool configure into believing you are running on Windows. I can see no other reason a windows program will run on Linux, except having MISC binaries support.
Comment 11 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-01-05 23:10:37 UTC
(In reply to comment #10)
> Roleof is asking the correct question here, do you have support for MISC
> binaries. It seems wrapmsvc, is trying to run and manages to do so. Which seems
> to fool configure into believing you are running on Windows. I can see no other
> reason a windows program will run on Linux, except having MISC binaries
> support.

Yes, I have and I am using it. As the summary and description of the bug states.
Comment 12 Tom Fredrik Blenning Klaussen 2010-01-06 08:04:40 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > Roleof is asking the correct question here, do you have support for MISC
> > binaries. It seems wrapmsvc, is trying to run and manages to do so. Which seems
> > to fool configure into believing you are running on Windows. I can see no other
> > reason a windows program will run on Linux, except having MISC binaries
> > support.
> 
> Yes, I have and I am using it. As the summary and description of the bug
> states.

Sorry, I missed that. I'll need to have a look into how Coin can be patched to avoid this in the future.
Comment 13 Tom Fredrik Blenning Klaussen 2010-01-11 17:26:14 UTC
Created attachment 216088 [details, diff]
Fixes configure issue.

The attached patch is untested, but should fix this issue for Coin-3.1.0

I can recreate this patch for other releases as well, if desired.
Comment 14 Roelof Wobben 2010-01-12 08:09:58 UTC
(In reply to comment #13)
> Created an attachment (id=216088) [details]
> Fixes configure issue.
> The attached patch is untested, but should fix this issue for Coin-3.1.0
> I can recreate this patch for other releases as well, if desired.

Hello, 

Can you recreate this big patch also for 3.1.2. ?

Roelof


Comment 15 Tom Fredrik Blenning Klaussen 2010-01-12 11:36:48 UTC
Created attachment 216207 [details, diff]
Fix for Coin-3.1.2
Comment 16 Roelof Wobben 2010-01-12 11:43:42 UTC
(In reply to comment #15)
> Created an attachment (id=216207) [details]
> Fix for Coin-3.1.2
> 

Hello Tom, 

Thank you.
Michel and I will test this patches and report back if we find problems or report back if the patch has repaired the problem.

Roelof

Comment 17 Roelof Wobben 2010-01-12 16:55:06 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > Created an attachment (id=216207) [details] [details]
> > Fix for Coin-3.1.2
> > 
> 
> Hello Tom, 
> 
> Thank you.
> Michel and I will test this patches and report back if we find problems or
> report back if the patch has repaired the problem.
> 
> Roelof
> 

Hello Tom, 

On my system the patch don't work.
I get this error log :

***** coin-3.1.0-WrapMSVCWinefix.patch *****

============================================

PATCH COMMAND:  patch -p0 -g0 -E --no-backup-if-mismatch < '/usr/portage/media-libs/coin/files/coin-3.1.0-WrapMSVCWinefix.patch'

============================================
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -r 4fcac12559f8 aclocal.m4
|--- a/aclocal.m4       Tue Jun 02 13:03:34 2009 +0000
|+++ b/aclocal.m4       Mon Jan 11 18:23:22 2010 +0100
--------------------------
No file to patch.  Skipping patch.
3 out of 3 hunks ignored
can't find file to patch at input line 119
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -r 4fcac12559f8 configure
|--- a/configure        Tue Jun 02 13:03:34 2009 +0000
|+++ b/configure        Mon Jan 11 18:23:22 2010 +0100
--------------------------
No file to patch.  Skipping patch.
19 out of 19 hunks ignored
can't find file to patch at input line 580
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -r 4fcac12559f8 src/discard.h.in
|--- a/src/discard.h.in Tue Jun 02 13:03:34 2009 +0000
|+++ b/src/discard.h.in Mon Jan 11 18:23:22 2010 +0100
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
============================================

PATCH COMMAND:  patch -p1 -g0 -E --no-backup-if-mismatch < '/usr/portage/media-libs/coin/files/coin-3.1.0-WrapMSVCWinefix.patch'

============================================
patching file aclocal.m4
Hunk #1 FAILED at 603.
Hunk #2 succeeded at 9215 with fuzz 2 (offset 50 lines).
Hunk #3 succeeded at 9388 (offset 7 lines).
1 out of 3 hunks FAILED -- saving rejects to file aclocal.m4.rej
patching file configure
Hunk #1 FAILED at 1817.
Hunk #2 FAILED at 1881.
Hunk #3 FAILED at 1917.
Hunk #4 FAILED at 5278.
Hunk #5 FAILED at 6413.
Hunk #6 FAILED at 7476.
Hunk #7 FAILED at 7744.
Hunk #8 FAILED at 7848.
Hunk #9 FAILED at 10193.

Roelof

Comment 18 Tom Fredrik Blenning Klaussen 2010-01-12 17:35:00 UTC
(In reply to comment #17)
> On my system the patch don't work.
> I get this error log :
> 
> ***** coin-3.1.0-WrapMSVCWinefix.patch *****
> 
> ============================================
> 
> PATCH COMMAND:  patch -p0 -g0 -E --no-backup-if-mismatch <
> '/usr/portage/media-libs/coin/files/coin-3.1.0-WrapMSVCWinefix.patch'
> 
> ============================================
> can't find file to patch at input line 4
> Perhaps you used the wrong -p or --strip option?
> The text leading up to this was:

As the text says, if you replace -p0 with -p1, you would probably be a bit better of.
Comment 19 Roelof Wobben 2010-01-12 17:50:21 UTC
(In reply to comment #18)
> (In reply to comment #17)
> > On my system the patch don't work.
> > I get this error log :
> > 
> > ***** coin-3.1.0-WrapMSVCWinefix.patch *****
> > 
> > ============================================
> > 
> > PATCH COMMAND:  patch -p0 -g0 -E --no-backup-if-mismatch <
> > '/usr/portage/media-libs/coin/files/coin-3.1.0-WrapMSVCWinefix.patch'
> > 
> > ============================================
> > can't find file to patch at input line 4
> > Perhaps you used the wrong -p or --strip option?
> > The text leading up to this was:
> 
> As the text says, if you replace -p0 with -p1, you would probably be a bit
> better of.
> 

I don't agree with you.
See last lines of the log where -p1 is used.
Can I be the problem that I first used the expat patches and after that this patch.

Roelof
Comment 20 Roelof Wobben 2010-01-13 12:16:44 UTC
(In reply to comment #19)
> (In reply to comment #18)
> > (In reply to comment #17)
> > > On my system the patch don't work.
> > > I get this error log :
> > > 
> > > ***** coin-3.1.0-WrapMSVCWinefix.patch *****
> > > 
> > > ============================================
> > > 
> > > PATCH COMMAND:  patch -p0 -g0 -E --no-backup-if-mismatch <
> > > '/usr/portage/media-libs/coin/files/coin-3.1.0-WrapMSVCWinefix.patch'
> > > 
> > > ============================================
> > > can't find file to patch at input line 4
> > > Perhaps you used the wrong -p or --strip option?
> > > The text leading up to this was:
> > 
> > As the text says, if you replace -p0 with -p1, you would probably be a bit
> > better of.
> > 
> I don't agree with you.
> See last lines of the log where -p1 is used.
> Can I be the problem that I first used the expat patches and after that this
> patch.
> Roelof


Hello Tom, 

Can you confirm this problem ?

Roelof
Comment 21 Roelof Wobben 2010-01-13 14:01:45 UTC
(In reply to comment #20)
> (In reply to comment #19)
> > (In reply to comment #18)
> > > (In reply to comment #17)
> > > > On my system the patch don't work.
> > > > I get this error log :
> > > > 
> > > > ***** coin-3.1.0-WrapMSVCWinefix.patch *****
> > > > 
> > > > ============================================
> > > > 
> > > > PATCH COMMAND:  patch -p0 -g0 -E --no-backup-if-mismatch <
> > > > '/usr/portage/media-libs/coin/files/coin-3.1.0-WrapMSVCWinefix.patch'
> > > > 
> > > > ============================================
> > > > can't find file to patch at input line 4
> > > > Perhaps you used the wrong -p or --strip option?
> > > > The text leading up to this was:
> > > 
> > > As the text says, if you replace -p0 with -p1, you would probably be a bit
> > > better of.
> > > 
> > I don't agree with you.
> > See last lines of the log where -p1 is used.
> > Can I be the problem that I first used the expat patches and after that this
> > patch.
> > Roelof
> 
> 
> Hello Tom, 
> 
> Can you confirm this problem ?
> 
> Roelof
> 

Hello Tom,

I did a little investigation myself and it seems that this patch can't work if someone uses the expat files.

Roelof
Comment 22 Tom Fredrik Blenning Klaussen 2010-01-13 14:57:35 UTC
I commented a bit wrong on the expat issue. Use only those patches in the order they are indicated to be applied. Patch #1, fixes these issues as well.
Comment 23 Roelof Wobben 2010-01-13 15:05:20 UTC
(In reply to comment #22)
> I commented a bit wrong on the expat issue. Use only those patches in the order
> they are indicated to be applied. Patch #1, fixes these issues as well.
> 

Oke, 

Then we wait till Michal can confirm that the patches work.

Roelof
Comment 24 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-01-13 15:53:44 UTC
Yes, it works.
Comment 25 Roelof Wobben 2010-01-13 16:05:09 UTC
(In reply to comment #24)
> Yes, it works.
> 

Hoi Michal.

Does it work on 3.1.0 and 3.1.2 ?

Roelof
Comment 26 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-01-13 16:23:11 UTC
(In reply to comment #25)
> (In reply to comment #24)
> > Yes, it works.
> > 
> Does it work on 3.1.0 and 3.1.2 ?

I've checked only 3.1.2; if it applies, it should work on old one too.
Comment 27 Maciej Mrozowski gentoo-dev 2011-01-13 00:19:08 UTC
@Tom
Can we have a patch for 3.1.3 or it's fixed already in this regard?
Comment 28 Tom Fredrik Blenning Klaussen 2011-01-13 00:34:33 UTC
(In reply to comment #27)
> @Tom
> Can we have a patch for 3.1.3 or it's fixed already in this regard?
> 

It's been some time since I created these patches, but it seems what I did was too fix some m4 macros, and bootstrap anew. If this was the case, this should automatically be fixed in a newer Coin version. Please give feedback, if it isn't.
Comment 29 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-01-13 05:06:11 UTC
Seems to work with coin-3.1.3-r1:

    checking setup for wrapmsvc.exe... not a cygwin host
Comment 30 Maciej Mrozowski gentoo-dev 2011-01-13 21:11:34 UTC
Thanks for all involved!