Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 40247 - sandbox compile error when -j>1
Summary: sandbox compile error when -j>1
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: x86 All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2004-02-03 00:23 UTC by Torgeir Hansen
Modified: 2004-02-08 17:55 UTC (History)
0 users

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


Attachments
Makefile patch to solve parallel build issue. (Makefile.patch,694 bytes, patch)
2004-02-03 00:24 UTC, Torgeir Hansen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Torgeir Hansen 2004-02-03 00:23:08 UTC
It appears that the build process for sandbox (portage-2.0.49-r21/src/sandbox-1.1) is broken when using parallell build.
This can easily be tested by entering src/sandbox-1.1 and issuing:
-
make clean; export MAKEFLAGS="-j3"; make 
-
Now you should get a error similar to this:
--
[09:20]root@stue:~/portage-2.0.49-r21/src/sandbox-1.1> make clean; export MAKEFLAGS="-j3"; make 
rm -f libsandbox.so sandbox
rm -f *.o *~ core
rm -f localdecls.h
./create-localdecls
gcc  -Wall -c -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT sandbox_futils.c
gcc  -Wall -c sandbox.c
Checking truncate argument type... off_t
Checking libc version... libc.so.6
Checking glibc subversion... gcc sandbox.o sandbox_futils.o getcwd.c -ldl -lc -o sandbox
In file included from getcwd.c:219:
localdecls.h:4:1: unterminated #ifndef
getcwd.c: In function `__egetcwd':
getcwd.c:300: `SB_PATH_MAX' undeclared (first use in this function)
getcwd.c:300: (Each undeclared identifier is reported only once
getcwd.c:300: for each function it appears in.)
make: *** [sandbox] Error 1
make: *** Waiting for unfinished jobs....

[09:21]root@stue:~/portage-2.0.49-r21/src/sandbox-1.1> 
--
A watchfull eye will discover that getcwd.c is being compiled at the same time  ./create-localdecls is being run, and since create-localdecls is a script that tries to create localdecls.h, which getcwd.c needs - it's not a surprise that this fails :p 

This is rather simple to fix; attaching a patch to sandbox' Makefile, which will ensure that jobs make will attempt to execute in paralell will wait for create-localdecls to execute.
Comment 1 Torgeir Hansen 2004-02-03 00:24:11 UTC
Created attachment 24875 [details, diff]
Makefile patch to solve parallel build issue.
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2004-02-08 17:55:12 UTC
supposed to be fixed in 2.0.50 which is stable now. If this bug is not fixed please reopen.