Make command performs badly and refuses to compile on 200000 files


 
Thread Tools Search this Thread
Operating Systems HP-UX Make command performs badly and refuses to compile on 200000 files
# 1  
Old 07-01-2010
Make command performs badly and refuses to compile on 200000 files

I am trying to run make command on 200000 files in HP UX but it refuses to compile giving a message that " command line is too long .stop" I checked and found out that there is a limit imposed by the operating system on the command line .for Eg refer following link :
The maximum length of arguments for a new process

But a resolution is also given. See the link:
Overcoming Command Line Length Limits - GNAT User's Guide for Unix Platforms

There is a way out if we create create sudirectories for better organisation. But when i tried to create 5 subdirectories havinh 20000 files each the problem is I am getting 5 default makefiles .How I run all those sevem makefiles on single make command on one go. so that make command compiles all the 2LAC files together.

Thanks
Regards
Madhur Tripathi
# 2  
Old 07-01-2010
What was the actual command line you issued ? There are usually simple ways round this.
# 3  
Old 07-01-2010
Many thanx for replying....I don't have any clue how to compile five makefiles in single go with make command... Please suggest me a workaround as u suggested...I would really appreciate your help
# 4  
Old 07-01-2010
Can you post a command which works for one file and the command which failed? It is impossible to guess what you are trying to do.
# 5  
Old 07-02-2010
ok this is what i am trying to do..
Now when I try to create say 2LAC files in a directory and then run

mkmf -f Makefile then my makefile gets made in that directory. now when i run "make Makefile" command it pops up a message saying "command line too long .Stop" ...
then i thought that i would create five subdirectory and would create 20000 files in each one of them so that the command line in make command disen't get too long...
now if i run mkmf makefile in those subdirectory then i am getting five Makefiles all with same name ie Makefile . How i run make command on those makefiles simultaneously..in case of single directry i run make makefile ..bit here i want to simultaneously compile 2LAC files distibuted in bundles of 20000 files in five subdirectory..i want to run make command on 2LAC files simultaneously..but after running mkmf command in 5 directories i have 5 makefiles ..hoe do i run makecommand becouser make command allows only one makefile..please suggest a turnaround


regards
Madhur
# 6  
Old 07-03-2010
Question is too obfuscated for me. Suggest your refer this to HP with full evidence.
# 7  
Old 07-04-2010
Assuming your current working directory is the directory that contains 5 folders each storing 20k files and one Makefile, you could try this?
Code:
for i in */Makefile; do
make $i &
done

For memory and performance reasons I'd rather run these make commands one by one (without &) than run all 5 of them at the same time.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Run compile command make as another user

Hello I'm trying to compile LibreOffice core from github.com. But this can - as far as I know - not be done as root user. So I compiled it as login user (the user as I log in) and compilation works. Now I try to compile LibreOffice core as a user I created using useradd: useradd -r -U -m... (2 Replies)
Discussion started by: go4bash
2 Replies

2. Programming

Using basic UNIX commands to make/compile JAVA files

Hello! This is my first post, and I just learned what UNIX was this week. For a JAVA programming class I am taking, I must be able to create a directory in UNIX, use the nano command to create a JAVA program, compile it, and then run it on the command prompt using the java command. For some... (5 Replies)
Discussion started by: UNdvoItX
5 Replies

3. Linux

Is it possible to insert compile module after compiled "make" without installing

Hi gud day, I would like to ask if possible to load the driver i compiled module without installing it in the ubuntu-kernel-distro/updates* or simple not executing "make install". what i mean is i compile the compat wireless driver using make and i want to try to load on the system without... (1 Reply)
Discussion started by: jao_madn
1 Replies

4. Shell Programming and Scripting

Running rename command on large files and make it faster

Hi All, I have some 80,000 files in a directory which I need to rename. Below is the command which I am currently running and it seems, it is taking fore ever to run this command. This command seems too slow. Is there any way to speed up the command. I have have GNU Parallel installed on my... (6 Replies)
Discussion started by: shoaibjameel123
6 Replies

5. UNIX for Dummies Questions & Answers

Compiling gcc to compile make to compile yaboot

I have just installed OpenBSD on a 333MHz PPC iMac G3. It has a 6GB HDD that has been partitioned as 1GB MacOS 8.5.1, 3GB MacOS X 10.3.9, 2GB OpenBSD 4.8. I now need to install a bootloader so that my computer can recognize the OpenBSD partition at startup. I have been trying to install... (0 Replies)
Discussion started by: t04st3r
0 Replies

6. Shell Programming and Scripting

Program to tar files to packages less then 200000 bytes

Trying to write program to archive files from a file system. I got some problem with appropriate selection of files in regard to size. Algorithm basic : ----------------- 1. Remotely executes on machine ls cmd and its output redirects and sorts by size of a files : # cd... (0 Replies)
Discussion started by: presul
0 Replies

7. Programming

compile fails in linux ... "No rule to make target" ... HELP

hello all, attached you can find a tool (written in C) that i really need to make it compile under linux i am able to compile and run it successfully in mac os x, but in linux the compilation fails the only thing that i did so far is to change the following #include <sys/malloc.h> to... (13 Replies)
Discussion started by: OneDreamCloser
13 Replies

8. Solaris

PHP 5.3 compile on Solaris 10 : make distclean :: fatal error

I'm trying to install PHP 5.3 on Solaris 10 . I'm using etc/apache2 and installed mysql 5.1.39. When I tried to compile PHP 5.3, with the following configure text, ./configure --with-mysql=/usr/local/mysql \ --with-mysqli=/usr/local/mysql/bin/mysql_config --with-zlib-dir=/usr/local \... (21 Replies)
Discussion started by: ppa108
21 Replies

9. Shell Programming and Scripting

who to compile needed libs with Make

Hello all my project is contains 2 directories, 2 directories are building library and one for the executable that using the libes from the other 2 Now what im doing is compiling first the 2 libs directories and then the main directory. But I will like to automate the process and to be able ... (0 Replies)
Discussion started by: umen
0 Replies

10. UNIX for Dummies Questions & Answers

Moving files till the size is less than 200000.

Hi, I need your help. Suppose I have a directory called /home/rooh This directory contains files and directories. For ex drwxr-xr-x 3 rooha arboradm 96 Apr 6 03:24 batches drwxr-xr-x 2 rooha arboradm 96 Apr 6 03:21 worker -rw-rw-rw- 1 rooha arboradm ... (1 Reply)
Discussion started by: rooh
1 Replies
Login or Register to Ask a Question