Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 301116 - sys-devel/make - problematic commandline handling for very long commands
Summary: sys-devel/make - problematic commandline handling for very long commands
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: http://thread.gmane.org/gmane.comp.gn...
Whiteboard:
Keywords:
Depends on:
Blocks: 300867
  Show dependency tree
 
Reported: 2010-01-15 16:54 UTC by Priit Laes (IRC: plaes)
Modified: 2011-12-03 00:01 UTC (History)
0 users

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


Attachments
make-commandline-limit.patch (make.patch,3.20 KB, patch)
2010-01-15 16:56 UTC, Priit Laes (IRC: plaes)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Priit Laes (IRC: plaes) 2010-01-15 16:54:37 UTC
GNU make sometimes runs into per-argument length limit when it constructs commandline string for certain commands. This happens at least when running make dist for webkit-gtk.

The description of that issue and fix are available from
http://thread.gmane.org/gmane.comp.gnu.make.bugs/4219
Comment 1 Priit Laes (IRC: plaes) 2010-01-15 16:56:08 UTC
Created attachment 216614 [details, diff]
make-commandline-limit.patch

Fixed patch that applies correctly to our in-tree make.

Tested with `make dist` in webkit tree (which used to fail without the patch).
Comment 2 SpanKY gentoo-dev 2010-01-17 00:44:09 UTC
i tweaked the patch to avoid autotool issues and added to 3.81-r1
Comment 3 Yixun Lan archtester gentoo-dev 2010-02-10 07:44:10 UTC
I have problem with this patch when doing cross compile, previous version make-3.81 is fine

emerge-armv7a-softfloat-linux-gnueabi make

if armv7a-softfloat-linux-gnueabi-gcc -DLOCALEDIR=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DINCLUDEDIR=\"/usr/include\" -DHAVE_CONFIG_H -I. -I. -I.      -O2 -ftree-vectorize -pipe -fomit-frame-pointer  -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -I/usr/armv7a-softfloat-linux-gnueabi/usr/include/ -I/usr/armv7a-softfloat-linux-gnueabi/include/ -MT main.o -MD -MP -MF ".deps/main.Tpo" -c -o main.o main.c; \
        then mv -f ".deps/main.Tpo" ".deps/main.Po"; else rm -f ".deps/main.Tpo"; exit 1; fi
job.c: In function ‘construct_command_argv_internal’:
job.c:2713: error: ‘PAGE_SIZE’ undeclared (first use in this function)
job.c:2713: error: (Each undeclared identifier is reported only once
job.c:2713: error: for each function it appears in.)
make[2]: *** [job.o] Error 1
make[2]: *** Waiting for unfinished jobs....
main.c: In function ‘die’:
main.c:3069: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result
make[2]: Leaving directory `/var/build/portage/sys-devel/make-3.81-r1/work/make-3.81'
make[1]: *** [all-recursive] Error 1


(In reply to comment #1)

Comment 4 Priit Laes (IRC: plaes) 2010-02-10 07:53:58 UTC
(In reply to comment #3)
> I have problem with this patch when doing cross compile, previous version
> make-3.81 is fine
> 
> emerge-armv7a-softfloat-linux-gnueabi make
> 
> if armv7a-softfloat-linux-gnueabi-gcc -DLOCALEDIR=\"/usr/share/locale\"
> -DLIBDIR=\"/usr/lib\" -DINCLUDEDIR=\"/usr/include\" -DHAVE_CONFIG_H -I. -I. -I.
>      -O2 -ftree-vectorize -pipe -fomit-frame-pointer  -pipe -march=armv7-a
> -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
> -I/usr/armv7a-softfloat-linux-gnueabi/usr/include/
> -I/usr/armv7a-softfloat-linux-gnueabi/include/ -MT main.o -MD -MP -MF
> ".deps/main.Tpo" -c -o main.o main.c; \
>         then mv -f ".deps/main.Tpo" ".deps/main.Po"; else rm -f
> ".deps/main.Tpo"; exit 1; fi
> job.c: In function ‘construct_command_argv_internal’:
> job.c:2713: error: ‘PAGE_SIZE’ undeclared (first use in this function)
> job.c:2713: error: (Each undeclared identifier is reported only once
> job.c:2713: error: for each function it appears in.)
> make[2]: *** [job.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> main.c: In function ‘die’:
> main.c:3069: warning: ignoring return value of ‘chdir’, declared with
> attribute warn_unused_result
> make[2]: Leaving directory
> `/var/build/portage/sys-devel/make-3.81-r1/work/make-3.81'
> make[1]: *** [all-recursive] Error 1
> 
> 
> (In reply to comment #1)
> 

PAGE_SIZE itself is defined inside sys/user.h which this patch **should** include on linux.

It seems that you need newer version of glibc that includes this definition :S
Comment 5 Yixun Lan archtester gentoo-dev 2010-02-10 08:03:35 UTC
Ok, I did cross installed glibc in my host (using crossdev), and its version is glibc-2.11-r1, there is one file in /usr/armv7a-softfloat-linux-gnueabi/usr/include/sys/user.h, but I didn't find it define PAGE_SIZE.
Looking at file /usr/include/sys/user.h, it do has PAGE_SIZE, strange~

Btw, emerge-armv7a-softfloat-linux-gnueabi  -pv glibc 
show me that glibc has not installed for the target

(In reply to comment #4)
Comment 6 Yixun Lan archtester gentoo-dev 2010-02-10 08:09:49 UTC
I made a ugly hack, add following two lines into "/usr/armv7a-softfloat-linux-gnueabi/usr/include/sys/user.h", then it pass the compilation

#define PAGE_SHIFT              12
#define PAGE_SIZE               (1UL << PAGE_SHIFT)


(In reply to comment #5)
Comment 7 SpanKY gentoo-dev 2010-02-10 08:44:16 UTC
this is not a bug about cross-compiling

the issue is already reported/tracked in another bug
Comment 8 Priit Laes (IRC: plaes) 2010-02-10 10:52:15 UTC
(In reply to comment #7)
> this is not a bug about cross-compiling
> 
> the issue is already reported/tracked in another bug
> 

Aha, bug #301431