Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 201503 - games-emulation/zsnes-1.51-r1 fails to compile: "makefile.dep:85: *** target pattern contains no `%'. Stop."
Summary: games-emulation/zsnes-1.51-r1 fails to compile: "makefile.dep:85: *** target ...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-06 18:25 UTC by Arvid Norlander
Modified: 2008-03-22 18:07 UTC (History)
1 user (show)

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


Attachments
Faulty makefile.dep (makefile.dep,7.40 KB, text/plain)
2007-12-06 18:26 UTC, Arvid Norlander
Details
config.log (config.log,30.56 KB, text/plain)
2007-12-11 10:38 UTC, Arvid Norlander
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Norlander 2007-12-06 18:25:03 UTC
When I try to emerge zsnes I get the error below.

This happens in both 32-bit chroot and in 64-bit.

I checked the generated file in question, attached below. It seems like two rules got written to same line.

Reproducible: Always

Steps to Reproduce:
1. emerge -pv zsnes
[ebuild     U ] games-emulation/zsnes-1.51-r1 [1.42] USE="opengl png (-ao) -custom-cflags%" 0 kB
2. emerge zsnes

Actual Results:  
# cat /var/log/portage/games-emulation:zsnes-1.51-r1:20071206-181828.log
>>> Unpacking source...
>>> Unpacking zsnes151src.tar.bz2 to /var/tmp/portage/games-emulation/zsnes-1.51-r1/work
 * Applying zsnes-1.51-libpng.patch ...                                                                                                                                                      [ ok ]
 * Applying zsnes-1.51-archopt-july-23-update.patch ...                                                                                                                                      [ ok ]
 * Running eautoreconf in '/var/tmp/portage/games-emulation/zsnes-1.51-r1/work/zsnes_1_51/src' ...
 * Running aclocal ...                                                                                                                                                                       [ ok ]
 * Running autoconf ...                                                                                                                                                                      [ ok ]
 * Running autoheader ...                                                                                                                                                                    [ ok ]
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/games-emulation/zsnes-1.51-r1/work/zsnes_1_51/src ...
 * econf: updating zsnes_1_51/src/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating zsnes_1_51/src/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --prefix=/usr/games --libdir=/usr/games/lib32 --datadir=/usr/share/games --sysconfdir=/etc/games --localstatedir=/var/games --disable-libao --enable-libpng --enable-opengl --disable-debug --enable-release --build=x86_64-pc-linux-gnu
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes
checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... none needed
checking for x86_64-pc-linux-gnu-g++... x86_64-pc-linux-gnu-g++
checking whether we are using the GNU C++ compiler... yes
checking whether x86_64-pc-linux-gnu-g++ accepts -g... yes
checking for x86_64-pc-linux-gnu-nasm... no
checking for nasm... nasm
checking for sdl-config... /usr/bin/sdl-config
checking for SDL - version >= 1.2.0... yes
checking for zlib - version >= 1.2.3... yes
checking for libpng - version >= 1.2.0... yes
checking if you want the zsnes debugger... yes
checking for initscr in -lcurses... yes
checking for initscr in -lncurses... yes
checking for initscr in -lpdcurses... no
checking if you want libao support... no
checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E
checking for X... libraries /usr/lib64, headers
checking for glGetError in -lGL... yes
checking for OpenGL... yes
checking for JMA support... yes
checking for cpu info... found
checking if you want gdb friendly executable... no
checking which cpu architecture to optimize for... k8
checking if you want crazy optimizations... yes
configure: WARNING: If you intend to distribute this binary, make sure you use force_arch and set to i586 (or whichever CPU Arch you intend for)
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether sys/types.h defines makedev... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h


ZSNES v1.51

SDL support                   Version 1.2.11
NASM support                  NASM version 0.98.39 compiled on Dec  6 2007
zlib support                  Version 1.2.3
PNG support                   Yes, version 1.2.22
OpenGL support                Yes
JMA support                   Yes
ZSNES debugger                Enabled

The binary will be installed in /usr/games/bin

Configure complete, now type 'make' and pray.

x86_64-pc-linux-gnu-g++  -march=k8 -pipe -O2 -I. -D__UNIXSDL__  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -D__OPENGL__ -march=k8 -O3 -fomit-frame-pointer -fprefetch-loop-arrays -fforce-addr  -D__RELEASE__ -fno-rtti -o tools/fileutil.o -c tools/fileutil.cpp
x86_64-pc-linux-gnu-g++  -march=k8 -pipe -O2 -I. -D__UNIXSDL__  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -D__OPENGL__ -march=k8 -O3 -fomit-frame-pointer -fprefetch-loop-arrays -fforce-addr  -D__RELEASE__ -fno-rtti -o tools/strutil.o -c tools/strutil.cpp
x86_64-pc-linux-gnu-g++  -march=k8 -pipe -O2 -I. -D__UNIXSDL__  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -D__OPENGL__ -march=k8 -O3 -fomit-frame-pointer -fprefetch-loop-arrays -fforce-addr  -D__RELEASE__ -fno-rtti -o tools/depbuild tools/depbuild.cpp tools/fileutil.o tools/strutil.o
tools/depbuild x86_64-pc-linux-gnu-gcc " -march=k8 -pipe -O2 -I. -D__UNIXSDL__  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -D__OPENGL__ -march=k8 -O3 -fomit-frame-pointer -fprefetch-loop-arrays -fforce-addr  -D__RELEASE__" nasm " -w-orphan-labels -D__UNIXSDL__ -f elf -DELF -D__OPENGL__ -O99999999 -D__RELEASE__" cfg.o endmem.o init.o initc.o input.o md.o patch.o ui.o vcache.o version.o zloader.o zmovie.o zpath.o zstate.o ztime.o ztimec.o chips/c4emu.o chips/c4proc.o chips/dsp1emu.o chips/dsp1proc.o chips/dsp2proc.o chips/dsp3emu.o chips/dsp3proc.o chips/dsp4emu.o chips/dsp4proc.o chips/fxemu2.o chips/fxemu2b.o chips/fxemu2c.o chips/fxtable.o chips/obc1emu.o chips/obc1proc.o chips/sa1proc.o chips/sa1regs.o chips/sdd1emu.o chips/seta10.o chips/sfxproc.o chips/st10proc.o chips/7110proc.o chips/seta11.o chips/st11proc.o cpu/dma.o cpu/dsp.o cpu/dspproc.o cpu/execute.o cpu/executec.o cpu/irq.o cpu/memory.o cpu/memtable.o cpu/spc700.o cpu/stable.o cpu/table.o cpu/tablec.o debugasm.o debugger.o gui/gui.o gui/guifuncs.o gui/menu.o effects/burn.o effects/smoke.o effects/water.o jma/7zlzma.o jma/crc32.o jma/iiostrm.o       jma/inbyte.o jma/jma.o jma/lzma.o jma/lzmadec.o jma/winout.o jma/zsnesjma.o mmlib/mm.o mmlib/linux.o  video/makev16b.o video/makev16t.o video/makevid.o video/mode716.o video/mode716b.o video/mode716d.o video/mode716e.o video/mode716t.o video/mode7.o video/mode7ext.o video/mv16tms.o video/m716text.o video/newg162.o video/newgfx.o video/newgfx16.o video/newgfx2.o video/procvid.o video/procvidc.o video/sw_draw.o video/2xsaiw.o video/hq2x16.o video/hq2x32.o video/hq3x16.o video/hq3x32.o video/hq4x16.o video/hq4x32.o video/ntsc.o video/copyvwin.o linux/audio.o linux/battery.o linux/sdlintrf.o linux/sdllink.o linux/gl_draw.o linux/sw_draw.o linux/safelib.o zip/unzip.o zip/zpng.o > makefile.dep
makefile.dep:85: *** target pattern contains no `%'.  Stop.
 *
 * ERROR: games-emulation/zsnes-1.51-r1 failed.
 * Call stack:
 *              ebuild.sh, line 1701:  Called dyn_compile
 *              ebuild.sh, line 1039:  Called qa_call 'src_compile'
 *              ebuild.sh, line   44:  Called src_compile
 *   zsnes-1.51-r1.ebuild, line   70:  Called die
 * The specific snippet of code:
 *      emake || die "emake failed"
 *  The die message:
 *   emake failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/games-emulation:zsnes-1.51-r1:20071206-181828.log'.
 *


Expected Results:  
It should compile older versions did.

# emerge --info
Portage 2.1.3.19 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.22-gentoo-r8 x86_64)
=================================================================
System uname: 2.6.22-gentoo-r8 x86_64 AMD Sempron(tm) Processor 3300+
Timestamp of tree: Thu, 06 Dec 2007 07:46:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
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.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -pipe -O2 -msse3"
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 /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=k8 -pipe -O2 -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.linux.ee/pub/gentoo/distfiles/ http://mirror.uni-c.dk/pub/gentoo/"
LINGUAS="en en_GB sv sv_SE"
MAKEOPTS="-j1"
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/crossdev-overlay /usr/local/portage/cpan-overlay /usr/local/portage/nethack-overlay /usr/local/portage/generic-overlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X acl acpi alsa amd64 apache2 arts audiofile bash-completion berkdb bitmap-fonts bzip2 cairo caps ccache cdb cdr cli cracklib crypt cups curl dri dvd dvdr dvdread emacs emboss encode evo exif expat fam fbcon firefox flac fontconfig foomaticdb fortran gd gdbm gif glep gmp gnutls gpm gstreamer gtk iconv idea idn ieee1394 imlib iproute2 ipv6 isdnlog jack javascript joystick jpeg jpeg2k kde kqemu lcms lm_sensors logrotate mad mbox midi mikmod mmx mmxext mng mono mozdevelop mp3 mpeg mudflap mysql mysqli ncurses nls nptl nptlonly nsplugin objc ogg openexr opengl openmp pam pcre pdf perl php physfs pic png ppds pppd python qt3 qt3support qt4 quicktime readline reflection scanner sdl session sndfile spell spl sqlite sse sse2 ssl svg tcl tcpd tiff tk truetype truetype-fonts type1-fonts unicode usb utempter vorbis xcomposite xorg xpm xv zlib zsh-completion" ALSA_CARDS="emu10k1 loopback seq-dummy dummy" 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" 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB sv sv_SE" USERLAND="GNU" VIDEO_CARDS="ati radeon vesa fbdev r128 nv nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Arvid Norlander 2007-12-06 18:26:41 UTC
Created attachment 137895 [details]
Faulty makefile.dep

The faulty file.
Comment 2 Arvid Norlander 2007-12-06 18:38:30 UTC
The problem in the make file seems to be that:

jma/iiostrm.o: jmavideo/makev16b.o: video/makev16b.asm macros.mac video/vidmacro.mac
video/makev16t.o: video/makev16t.asm macros.mac video/vidmacro.mac
...
video/hq4x32.o: video/hq4x32.asm macros.mac
/iiostrm.cpp jma/portable.h jma/iiostrm.h \
   jma/crc32.h
jma/inbyte.o: jma/inbyte.cpp jma/inbyte.h jma/iiostrm.h \
   jma/portable.h

That should be:
jma/iiostrm.o: jma/iiostrm.cpp jma/portable.h jma/iiostrm.h \
   jma/crc32.h
video/makev16b.o: video/makev16b.asm macros.mac video/vidmacro.mac
video/makev16t.o: video/makev16t.asm macros.mac video/vidmacro.mac
...
video/hq4x32.o: video/hq4x32.asm macros.mac
jma/inbyte.o: jma/inbyte.cpp jma/inbyte.h jma/iiostrm.h \
   jma/portable.h

Why that happened I got no idea however.
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2007-12-10 21:30:56 UTC
attach the config.log file from the build directory please.
Comment 4 Arvid Norlander 2007-12-11 10:38:44 UTC
Created attachment 138240 [details]
config.log

Here it is
Comment 5 Arvid Norlander 2008-01-08 10:00:46 UTC
Any update on this? I still get this error.
Comment 6 Arvid Norlander 2008-01-08 10:48:28 UTC
I talked to some developers in #zsnes on freenode about this today, after some  trial and error we found that the command:

tools/depbuild [......] > makefile.dep
causes this problem, while:
tools/depbuild [......]

and then pasting the output by hand to that file, works.



<insane_coder> it's the > via the shell that kills it
<insane_coder> so yeah, if you copy and paste into makefile.dep yourself, no problem
<insane_coder> hence, our code should be fine. Why > is killing it is another story, I blame libc, if you can find me a different reason, I'll be glad to hear it
<AnMaster> well I don't know, libc or shell I guess
<insane_coder> is your gentoo for some reason handling popen() or pipe() differently than other installs?
<AnMaster> not that I know, I'm not a gentoo developer (I'm hardly a developer at all, not in C at least)
<insane_coder> I can imagine there being a scenerio that the pipe in use by depbuild with GCC is being controlled by the shell, perhaps since some file descriptor is being shared, I don't know anything for sure though
<insane_coder> maybe I should modify depbuild to use my own implementation of popen() that makes sure GCC is operating on a different stdout than the shell is
<insane_coder> it shouldn't be needed though
<AnMaster> I haven't had any problems with any other program so I'm a bit confused, if glibc was broken, shouldn't it cause problems about everywhere
<insane_coder> ah yes, I can't fix it since I can't replicate it. But if you're willing to stick around here for a couple of days, I can try whipping up some alternate methods when I get a chance, and you can tell me how it works
<insane_coder> AnMaster: I'm not sure how many apps try opening up a pipe on stdout, while their own stdout is currently piped elsewhere
<AnMaster> insane_coder, btw why do you open a pipe on stdout?
<insane_coder> depbuild talks to GCC, and GCC outputs to stdout
<AnMaster> ok true, but why on the STDOUT fd?, iirc there are lots more to choose from?
<insane_coder> I might be able to do some craziness with dup2() musical chairs to avoid some issues
<insane_coder> I don't specifically tell it to use that fd, I'm using popen(), it's doing whatever it's written to do in libc

I hope this can bring some light to the issue.
Comment 7 Mr. Bones. (RETIRED) gentoo-dev 2008-02-28 19:31:22 UTC
Does it still fail?

Does MAKEOPTS=-j1 help?
Comment 8 Mr. Bones. (RETIRED) gentoo-dev 2008-03-21 04:11:24 UTC
No reply, works for me on stable x86
Comment 9 Arvid Norlander 2008-03-22 12:21:53 UTC
I have been away for a while and -j1 does not help
Comment 10 Mr. Bones. (RETIRED) gentoo-dev 2008-03-22 18:07:36 UTC
well reopen if you have more information.  I can't reproduce the issue.