Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 103941 - dev-util/ltrace-0.3.36 fails parallel make
Summary: dev-util/ltrace-0.3.36 fails parallel make
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Development Tools Team
URL:
Whiteboard:
Keywords:
: 170722 182877 (view as bug list)
Depends on:
Blocks: 302471
  Show dependency tree
 
Reported: 2005-08-27 11:44 UTC by Åsmund Grammeltvedt
Modified: 2011-01-11 16:16 UTC (History)
7 users (show)

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


Attachments
files/ltrace-0.3.36-parallel-make.patch (ltrace-0.3.36-parallel-make.patch,312 bytes, patch)
2006-09-02 01:32 UTC, Tuomas Suutari
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Åsmund Grammeltvedt 2005-08-27 11:44:10 UTC
Ltrace compilation fails after the following failed include in ltrace.h, which
results in missing symbols:

In file included from ltrace.c:15:
/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/ltrace.h:12:20: sysdep.h: No
such file or directory
/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/ltrace.h:26: error:
`BREAKPOINT_LENGTH' undeclared here (not in a function)

ltrace-0.3.36/sysdeps/linux-gnu/Makefile contains the following target:

sysdep.h:       $(ARCH)/arch.h
                cat $(ARCH)/arch.h > sysdep.h

However, ltrace-0.3.36/ltrace.h does not include sysdep.h in the correct
directory. The following diff corrects the error on my system.

--- ltrace-0.3.36.orig/ltrace.h 2005-08-27 19:59:50.000000000 +0200
+++ ltrace-0.3.36/ltrace.h      2005-08-27 20:00:28.000000000 +0200
@@ -9,7 +9,7 @@
 #include "dict.h"

 /* BREAKPOINT_LENGTH is defined in "sysdep.h" */
-#include "sysdep.h"
+#include "sysdeps/linux-gnu/sysdep.h"

 #define MAX_LIBRARY    30

Reproducible: Always
Steps to Reproduce:
Comment 1 Aaron Walker (RETIRED) gentoo-dev 2005-08-28 06:31:07 UTC
emerge --info please.
Comment 2 Åsmund Grammeltvedt 2005-08-28 11:30:51 UTC
Of course.

Portage 2.0.51.22-r2 (default-linux/amd64/2004.3, gcc-3.4.4, glibc-2.3.5-r1,
2.6.12-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.12-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.0_pre6
ccache version 2.3 [disabled]
dev-lang/python:     2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.9
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr//lib/mozilla/defaults/pref /usr/kde/2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown
/usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/bind
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O2 -march=athlon64 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X a52 aac aalib acl alsa avi bash-completion berkdb bitmap-fonts
bonobo bootsplash caps cdda cddb cdio cdparanoia cdr crypt cups curl directfb
dvd dvdr dvdread eds emacs encode ethereal examples exif fam fbcon ffmpeg flac
foomaticdb fortran freetype gd gdbm gif glut gnome gnutls gphoto2 gpm gstreamer
gtk gtk2 gtkhtml guile hal howl ieee1394 imagemagick imlib ipv6 java jikes jpeg
junit kde latex lcms libcaca libwww live lzw lzw-tiff mad matroska mbox mikmod
mng motif mozilla mp3 mpeg multilib mysql ncurses network nls nptl nptonly
offensive ogg oggvorbis opengl pam pdflib perl php png python qt quicktime
readline rtc ruby samba sdl skey slang spell sqlite ssl stream svg tcltk tcpd
tetex tga theora threads tiff truetype truetype-fonts type1-fonts unicode usb
userlocales v4l vcd vorbis wifi wmf xanim xine xinerama xml xml2 xmms xosd xpm
xprint xv xvid zlib video_cards_radeon userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 3 Aaron Walker (RETIRED) gentoo-dev 2005-08-29 12:14:27 UTC
Can you post the whole error?  I am unable to reproduce on amd64 or x86 but can
reproduce on mips64.  I'd like to compare it with your full error output.
Comment 4 Åsmund Grammeltvedt 2005-08-29 15:17:17 UTC
Ah, I believe I have found the problem. If I had looked a bit closer at the
output, I would have noticed the
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu which
should make sysdep.h visible.

make -C sysdeps/linux-gnu
x86_64-pc-linux-gnu-gcc -Wall -O2 -march=athlon64 -pipe
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu -I-
-DHAVE_CONFIG_H -DSYSCONFDIR=\"/etc\"  -c -o ltrace.o ltrace.c
make[1]: Entering directory
`/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu'
cat x86_64/arch.h > sysdep.h
In file included from ltrace.c:15:
/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/ltrace.h:26: error:
`BREAKPOINT_LENGTH' undeclared here (not in a function)
ltrace.c: In function `signal_alarm':
ltrace.c:47: warning: passing arg 4 of `debug_' discards qualifiers from pointer
target type
ltrace.c: In function `signal_exit':
ltrace.c:56: warning: passing arg 4 of `debug_' discards qualifiers from pointer
target type
ltrace.c:63: warning: passing arg 4 of `debug_' discards qualifiers from pointer
target type
ltrace.c: In function `main':
ltrace.c:124: warning: passing arg 4 of `debug_' discards qualifiers from
pointer target type
make: *** [ltrace.o] Error 1
make: *** Waiting for unfinished jobs....

I believe the problem is the -j2 option to make. It seems like this tries to
compile ltrace.c, which includes ltrace.h, which includes sysdep.h, at the same
time as sysdep.h is created. The error does not occur with -j1.

If this is really a timing issue, the exact error, or its occurence, will of
course be a bit unpredictable.
Comment 5 Zoltán B. Vadász 2005-10-09 23:31:16 UTC
I have -j4 and for the first time I also got the error. You can see clearly: the
first make job needs sysdep.h and later a second one creates it.

[...]
i686-pc-linux-gnu-gcc -Wall -O3 -march=pentium4 -funroll-loops -pipe
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu -I-
-DHAVE_CONFIG_H -DSYSCONFDIR=\"/etc\"
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu/i386  -c
-o trace.o trace.c
In file included from ltrace.c:15:
/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/ltrace.h:12:20: sysdep.h: No
such file or directory
In file included from ltrace.c:15:
/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/ltrace.h:26: error:
`BREAKPOINT_LENGTH' undeclared here (not in a function)
i686-pc-linux-gnu-gcc -Wall -O3 -march=pentium4 -funroll-loops -pipe
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu -I-
-DHAVE_CONFIG_H -DSYSCONFDIR=\"/etc\"
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu/i386  -c
-o proc.o proc.c
make: *** [ltrace.o] Error 1
i686-pc-linux-gnu-gcc -Wall -O3 -march=pentium4 -funroll-loops -pipe
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu -I-
-DHAVE_CONFIG_H -DSYSCONFDIR=\"/etc\"
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu/i386  -c
-o breakpoint.o breakpoint.c
make: *** Waiting for unfinished jobs....
make -C i386
make[2]: Entering directory
`/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu/i386'
i686-pc-linux-gnu-gcc -Wall -O3 -march=pentium4 -funroll-loops -pipe
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu -I-
-DHAVE_CONFIG_H -DSYSCONFDIR=\"/etc\"
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu/i386  -c
-o trace.o trace.c
i686-pc-linux-gnu-gcc -Wall -O3 -march=pentium4 -funroll-loops -pipe
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu -I-
-DHAVE_CONFIG_H -DSYSCONFDIR=\"/etc\"
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu/i386  -c
-o regs.o regs.c
i686-pc-linux-gnu-gcc -nostdlib -r -o os.o trace.o proc.o breakpoint.o
i686-pc-linux-gnu-gcc -Wall -O3 -march=pentium4 -funroll-loops -pipe
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu -I-
-DHAVE_CONFIG_H -DSYSCONFDIR=\"/etc\"
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu/i386  -c
-o plt.o plt.c
i686-pc-linux-gnu-gcc -nostdlib -r -o arch.o trace.o regs.o plt.o
make[2]: Leaving directory
`/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu/i386'
i686-pc-linux-gnu-gcc -nostdlib -r -o ../sysdep.o os.o i386/arch.o
make[1]: Leaving directory
`/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu'
make: *** wait: No child processes.  Stop.

!!! ERROR: dev-util/ltrace-0.3.36 failed.
!!! Function src_compile, Line 556, Exitcode 2
!!! emake failed
!!! If you need support, post the topmost build error, NOT this status message.

Sun Oct  9 18:37:16 CEST 2005

I changed nothing just re-run the emerge of ltrace and at this time it was
succesfull.


emerge info
Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r1,
2.6.8-gentoo-r2 i686)
=================================================================
System uname: 2.6.8-gentoo-r2 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz
Gentoo Base System version 1.6.13
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.2.3-r5, 2.3.5-r2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4 -funroll-loops -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.1/share/config
/usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config
/usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config
/usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb
/usr/lib/mozilla/defaults/pref /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="-O3 -march=pentium4 -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks fixpackages sandbox sfperms strict
userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X Xaw3d aalib acl acpi alsa apache2 apm arts avi berkdb bitmap-fonts
bonobo cdr crypt cscope cups curl dga directfb doc dvd dvdr eds emboss encode
esd evo fam fbcon flac foomaticdb fortran gb gd gdbm ggi gif gnome gnomedb gpm
gstreamer gtk gtk2 gtkhtml guile imagemagick imap imlib ipv6 java jikes jpeg
junit kde lcms ldap libg++ libgda libwww mad mbox mikmod motif mozilla mp3 mpeg
mysql ncurses nls odbc ogg oggvorbis opengl oss pam pda pdflib perl plotutils
png postgres ppds python qt quicktime readline samba sdl slang slp snmp speex
spell sqlite sse ssl svga tcpd tetex tiff transcode truetype truetype-fonts
type1-fonts usb videos vorbis wmf xine xml xml2 xmms xosd xv zlib userland_GNU
kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

Comment 6 Robert Steinhäußer 2005-12-10 01:17:56 UTC
I can confirm the missing sysdep.h on x86 while running `emerge -e world`  
after the gcc-3.4 update.  
 
make -C sysdeps/linux-gnu 
i686-pc-linux-gnu-gcc -Wall -march=athlon -O2 -pipe 
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36 
-I/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu -I- 
-DHAVE_CONFIG_H -DSYSCONFDIR=\"/etc\"  -c -o ltrace.o ltrace.c 
make[1]: Entering directory 
`/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/sysdeps/linux-gnu' 
cat i386/arch.h > sysdep.h 
In file included from ltrace.c:15: 
/var/tmp/portage/ltrace-0.3.36/work/ltrace-0.3.36/ltrace.h:12:20: sysdep.h: 
File or directory not found 
 
I do not know if I will lose the `emerge --resume` data if I run `emerge  
info`, so here is some manually collected info:  
  
portage-2.0.51.22-r3  
System uname: 2.6.14-gentoo-r2 i686 AMD Athlon(tm) Processor  
Gentoo Base System version 1.6.13  
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)  
[disabled]  
ccache version 2.3 [enabled]  
USE="3dnow 3dnowext 7zip -afs -aim apache2 -arts bash-completion c++  
cdparanoia crypt dga directfb -doc dvd dvdr dvdread editor -esd exif fbcon  
-font-server -fortran gd gimp gimpprint gnokii -gnome gphoto2 -guile hal icq  
imap -ipv6 jabber jikes -joystick jpeg2k mmx mng mozsvg mozxmlterm msn nodrm  
nptl nvidia -oss pcre pda pic povray real rss sqlite svg symlink sysfs threads  
tidy unicode usb v4l v4l2 vim-with-x win32codecs wmf xinerama xosd xprint xvid  
yahoo tetex"  
CHOST="i686-pc-linux-gnu"  
CFLAGS="-march=athlon -O2 -pipe"  
CXXFLAGS="${CFLAGS}"  
PORTDIR_OVERLAY="/usr/local/portage /usr/local/gentoo-de-portage"  
GENTOO_MIRRORS="http://pandemonium.tiscali.de/pub/gentoo"  
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"  
RSYNC_RETRIES="1"  
RSYNC_TIMEOUT=300  
MAKEOPTS="-j2"  
PORTAGE_NICENESS=3  
PORTAGE_TMPFS="/dev/shm"  
FEATURES="sandbox ccache"  
CLEAN_DELAY=3  
ALSA_CARDS=emu10k1  
VIDEO_CARDS=nvidia  
LINGUAS="de en"  
CAMERAS="canon casio directory mustek"  
 
Comment 7 Robert Steinhäußer 2005-12-11 03:04:50 UTC
I got my `emerge -e world` completed and now emerging ltrace manually works. 
Could it be that parallel building is broken (`cat >sysdeps.h` and then using 
this file as #include) but that this is default in emake in src_compile()? 
 
Now my `emerge --info`: 
Portage 2.0.51.22-r3 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r2, 
2.6.14-gentoo-r2 i686) 
================================================================= 
System uname: 2.6.14-gentoo-r2 i686 AMD Athlon(tm) Processor 
Gentoo Base System version 1.6.13 
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) 
[disabled] 
ccache version 2.3 [enabled] 
dev-lang/python:     2.3.5-r2, 2.4.2 
sys-apps/sandbox:    1.2.12 
sys-devel/autoconf:  2.13, 2.59-r6 
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 
sys-devel/binutils:  2.16.1 
sys-devel/libtool:   1.5.20 
virtual/os-headers:  2.6.11-r2 
ACCEPT_KEYWORDS="x86" 
AUTOCLEAN="yes" 
CBUILD="i686-pc-linux-gnu" 
CFLAGS="-march=athlon -O2 -pipe" 
CHOST="i686-pc-linux-gnu" 
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/texmf/web2c /etc/env.d" 
CXXFLAGS="-march=athlon -O2 -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoconfig ccache distlocks sandbox sfperms strict" 
GENTOO_MIRRORS="http://pandemonium.tiscali.de/pub/gentoo" 
LC_ALL="de_DE.UTF-8" 
LINGUAS="de en" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="/usr/local/portage /usr/local/gentoo-de-portage" 
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" 
USE="x86 3dnow 3dnowext 7zip X alsa apache2 apm audiofile avi bash-completion 
berkdb bitmap-fonts bzip2 c++ cdparanoia cdr crypt cups curl dga directfb dvd 
dvdr dvdread editor eds emboss encode ethereal exif expat fam fbcon ffmpeg 
foomaticdb gd gdbm gif gimp gimpprint glut gmp gnokii gphoto2 gpm gstreamer 
gtk gtk2 hal icq idn imagemagick imap imlib jabber java jikes jpeg jpeg2k kde 
lcms libg++ libwww mad mikmod mmx mng motif mozsvg mozxmlterm mp3 mpeg msn 
ncurses nls nodrm nptl nvidia ogg oggvorbis openal opengl pam pcre pda pdflib 
perl pic png povray python qt quicktime readline real rss samba scanner sdl 
slang spell sqlite ssl svg symlink sysfs tcpd tetex threads tidy tiff truetype 
truetype-fonts type1-fonts udev unicode usb v4l v4l2 vim-with-x vorbis 
win32codecs wmf xinerama xml2 xmms xosd xprint xv xvid yahoo zlib 
video_cards_nvidia linguas_de linguas_en userland_GNU kernel_linux 
elibc_glibc" 
Unset:  ASFLAGS, CTARGET, LANG, LDFLAGS 
 
Comment 8 Andrew Esh 2005-12-14 09:58:54 UTC
I commented out my 'MAKEOPTS="-j2"' in /etc/make.conf, and emerge ltrace worked.
Comment 9 Jochen Trumpf 2006-03-26 16:12:40 UTC
I can confirm this bug on a x86 machine. I have MAKEOPTS="-j2" and emerging ltrace-0.3.36 fails.

MAKEOPTS="-j1" emerge ltrace

succeeds, though.
Comment 10 Tuomas Suutari 2006-09-02 01:32:21 UTC
Created attachment 95714 [details, diff]
files/ltrace-0.3.36-parallel-make.patch

This trivial patch adds sysdep.o as a dependency to other objects, so parallel make will success.
Comment 11 Petteri Räty (RETIRED) gentoo-dev 2007-03-07 22:06:40 UTC
I don't see this problem with 0.4 so marking this as fixed. bug 161844 is tracking that version going stable.
Comment 12 Petteri Räty (RETIRED) gentoo-dev 2007-03-13 17:37:08 UTC
*** Bug 170722 has been marked as a duplicate of this bug. ***
Comment 13 Petteri Räty (RETIRED) gentoo-dev 2007-03-13 17:37:42 UTC
(In reply to comment #12)
> *** Bug 170722 has been marked as a duplicate of this bug. ***
> 

Fox fixed so reopening.
Comment 14 Martin von Gagern 2007-03-13 18:07:41 UTC
(In reply to bug #170722 comment #1)
> I wonder why I can't reproduce this on my Core 2 machine.

Strange. I've a hyperthreading prescott here, and usually run -j3 makes.
With the default -j2 I just got one clean build before the error occured in the second run. Does increasing the job number to something like 20 help to reproduce this for you?
Comment 15 Petteri Räty (RETIRED) gentoo-dev 2007-03-13 18:20:59 UTC
(In reply to comment #14)
> (In reply to bug #170722 comment #1)
> > I wonder why I can't reproduce this on my Core 2 machine.
> 
> Strange. I've a hyperthreading prescott here, and usually run -j3 makes.
> With the default -j2 I just got one clean build before the error occured in the
> second run. Does increasing the job number to something like 20 help to
> reproduce this for you?
> 

Run this like 6 times and then was able to reproduce.
Comment 16 Martin von Gagern 2007-03-13 18:23:07 UTC
Some more investigation:
* Most source files include ltrace.h which in turn includes sysdep.h
* sysdep.h is located in sysdeps/$(OS) and built together with sysdeps/sysdep.o
* sysdeps/sysdep.o is the first prerequisite to the linker rule
* compilation relies on implicit rules, there are no additional prerequisites
Comment 17 Petteri Räty (RETIRED) gentoo-dev 2007-03-13 18:30:56 UTC
(In reply to comment #16)
> Some more investigation:
> * Most source files include ltrace.h which in turn includes sysdep.h
> * sysdep.h is located in sysdeps/$(OS) and built together with sysdeps/sysdep.o
> * sysdeps/sysdep.o is the first prerequisite to the linker rule
> * compilation relies on implicit rules, there are no additional prerequisites
> 

The patch attached here seems to solve it for me so I will commit it. Please reopen if it does not fix it for you too. Thanks Tuomas for the patch.
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2007-06-22 10:35:10 UTC
*** Bug 182877 has been marked as a duplicate of this bug. ***
Comment 19 Wolfram Schlich (RETIRED) gentoo-dev 2009-11-10 12:10:04 UTC
Parallel make is NOT fixed with 0.4-r1:

--8<--
[...]
x86_64-pc-linux-gnu-gcc -Wall -O2 -mtune=nocona -pipe -fforce-addr -iquote /local/portage/tmp/portage/dev-util/ltrace-0.4-r1/work/ltrace-0.4 -iquote /local/portage/tmp/portage/dev-util/ltrace-0.4-r1/work/ltrace-0.4/sysdeps/linux-gnu  -DHAVE_CONFIG_H -DSYSCONFDIR=\"/etc\"  -I/local/portage/tmp/portage/dev-util/ltrace-0.4-r1/work/ltrace-0.4/sysdeps/linux-gnu/x86_64  -c -o trace.o trace.c
In file included from trace.c:10:
/local/portage/tmp/portage/dev-util/ltrace-0.4-r1/work/ltrace-0.4/ltrace.h:12:20: error: sysdep.h: No such file or directory
In file included from trace.c:10:
/local/portage/tmp/portage/dev-util/ltrace-0.4-r1/work/ltrace-0.4/ltrace.h:26: error: ‘BREAKPOINT_LENGTH’ undeclared here (not in a function)
make[1]: *** [trace.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/local/portage/tmp/portage/dev-util/ltrace-0.4-r1/work/ltrace-0.4/sysdeps/linux-gnu'
make: *** [sysdeps/sysdep.o] Error 2
make: INTERNAL: Exiting with 5 jobserver tokens available; should be 4!
--8<--

After merging it with MAKEOPTS=-j1, parallel build seems to work fine, though...
Comment 20 Pacho Ramos gentoo-dev 2010-03-13 18:28:32 UTC
Seems to work ok for me with dev-util/ltrace-0.5.3.1
Comment 21 Samuli Suominen (RETIRED) gentoo-dev 2010-03-26 13:41:14 UTC
(In reply to comment #20)
> Seems to work ok for me with dev-util/ltrace-0.5.3.1
> 

same here, -j9, quadcore. closing as fixed by 0.5.3.1 until proven otherwise.
Comment 22 Tom Rini 2011-01-11 16:16:23 UTC
Not in Gentoo but on a suitably beefy machine you can hit a race where sysdeps.h exists but hasn't been populated yet and thus compile fails.  The right fix is something like:
Index: ltrace-0.5.3/sysdeps/linux-gnu/Makefile.in
===================================================================
--- ltrace-0.5.3.orig/sysdeps/linux-gnu/Makefile.in
+++ ltrace-0.5.3/sysdeps/linux-gnu/Makefile.in
@@ -14,6 +14,7 @@ OBJ		=	events.o trace.o proc.o breakpoin
 
 all:		sysdep.h signalent.h syscallent.h arch_syscallent.h signalent1.h syscallent1.h ../sysdep.o
 
+$(OBJ):		sysdep.h
 sysdep.h:	$(ARCH)/arch.h
 		cat $(ARCH)/arch.h > sysdep.h