"ld: fatal: file /dev/zero: cannot mmap file: Not enough space"... but why ?

"ld: fatal: file /dev/zero: cannot mmap file: Not enough space"... but why ?

Post by Roland Main » Thu, 02 Nov 2000 04:09:39



Hi !

----

Any idea why ld failes here ?

-- snip --
mozilla/M18/mozilla/objdir/layout/build% make
../../config/nsinstall -R -m 444 ../../../layout/build/nsLayoutCID.h
gbdate.h ../../dist/include
rm -f libgklayout.so
c++ -fno-rtti -fno-exceptions -pedantic -Wno-long-long -O  -DDEBUG
-DDEBUG_gisburn -DTRACING -g -G -h libgklayout.so -o libgklayout.so    
nsLayoutDLF.o nsLayoutFactory.o nsLayoutModule.o      -Wl,-z
-Wl,allextract ../../dist/lib/libgkevents_s.a
../../dist/lib/libgkhtmlbase_s.a ../../dist/lib/libgkhtmlcon_s.a
../../dist/lib/libgkhtmldoc_s.a ../../dist/lib/libgkhtmlforms_s.a
../../dist/lib/libgkhtmlstyle_s.a ../../dist/lib/libgkhtmltable_s.a
../../dist/lib/libgkxmlcon_s.a ../../dist/lib/libgkxmldoc_s.a
../../dist/lib/libgkxsldoc_s.a ../../dist/lib/libgkxulcon_s.a
../../dist/lib/libgkxulbase_s.a ../../dist/lib/libgkxbl_s.a
../../dist/lib/libgkbase_s.a  ../../dist/lib/libgkmathmlcon_s.a
../../dist/lib/libgkmathmlbase_s.a  ../../dist/lib/libgksvgcon_s.a
../../dist/lib/libgksvgbase_s.a  -Wl,-z -Wl,defaultextract
-L../../dist/bin -ljsdom -lgkgfx -L../../dist/bin -lplds4 -lplc4 -lnspr4
-lpthread -L../../dist/bin -lxpcom -lmozjs   -lw -lposix4 -lintl -lelf
-lnsl -lsocket -lresolv -ldl -lm    
ld: fatal: file /dev/zero: cannot mmap file: Not enough space
collect2: ld returned 1 exit status
make: *** [libgklayout.so] Error 1
-- snip --

This was an attempt to compile Mozilla M18 on Solaris
2.7/MU4/106541-12/sun4u/gcc-2.95.1, 512MB real memory, ~2GB swap (4%
used), filesystem has ~10GB free.
And to make it more mysterious: Previous compilation yesterday completed
without any problems...

Any hints what's going wrong ?

----

Bye,
Roland

--
  __ .  . __


  /O /==\ O\  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
 (;O/ \/ \O;) TEL +49 641 99-13193 FAX +49 641 99-41359

 
 
 

"ld: fatal: file /dev/zero: cannot mmap file: Not enough space"... but why ?

Post by Russ Allber » Fri, 03 Nov 2000 15:53:04


In netscape.public.mozilla.unix,


> ld: fatal: file /dev/zero: cannot mmap file: Not enough space
> collect2: ld returned 1 exit status
> This was an attempt to compile Mozilla M18 on Solaris
> 2.7/MU4/106541-12/sun4u/gcc-2.95.1, 512MB real memory, ~2GB swap (4%
> used), filesystem has ~10GB free. And to make it more mysterious:
> Previous compilation yesterday completed without any problems...
> Any hints what's going wrong ?

ld is attempting to allocate a large slab of memory using mmap and this
failed.  According to the Solaris 7 mmap man page:

     ENOMEM    The MAP_FIXED option was specified and  the  range
               [addr,  addr  +  len) exceeds that allowed for the
               address space of a process.

               The MAP_FIXED option was not specified  and  there
               is  insufficient  room  in  the  address  space to
               effect the mapping.

               The mapping could not  be  locked  in  memory,  if
               required by mlockall(3C), because it would require
               more space than the system is able to supply.

               The  composite  size  of  len  plus  the   lengths
               obtained from all previous calls to mmap() exceeds
               RLIMIT_VMEM (see  getrlimit(2)).

That last one sounds suspicious.  Have you checked to see if you're
running into a datasize soft limit?

--


 
 
 

"ld: fatal: file /dev/zero: cannot mmap file: Not enough space"... but why ?

Post by Justin Murdoc » Sun, 05 Nov 2000 04:00:00


Roland> Hi !

Roland> Any idea why ld failes here ?

-- snip --
mozilla/M18/mozilla/objdir/layout/build% make
../../config/nsinstall -R -m 444 ../../../layout/build/nsLayoutCID.h
gbdate.h ../../dist/include
rm -f libgklayout.so
c++ -fno-rtti -fno-exceptions -pedantic -Wno-long-long -O  -DDEBUG
-DDEBUG_gisburn -DTRACING -g -G -h libgklayout.so -o libgklayout.so    
nsLayoutDLF.o nsLayoutFactory.o nsLayoutModule.o      -Wl,-z
-Wl,allextract ../../dist/lib/libgkevents_s.a
../../dist/lib/libgkhtmlbase_s.a ../../dist/lib/libgkhtmlcon_s.a
../../dist/lib/libgkhtmldoc_s.a ../../dist/lib/libgkhtmlforms_s.a
../../dist/lib/libgkhtmlstyle_s.a ../../dist/lib/libgkhtmltable_s.a
../../dist/lib/libgkxmlcon_s.a ../../dist/lib/libgkxmldoc_s.a
../../dist/lib/libgkxsldoc_s.a ../../dist/lib/libgkxulcon_s.a
../../dist/lib/libgkxulbase_s.a ../../dist/lib/libgkxbl_s.a
../../dist/lib/libgkbase_s.a  ../../dist/lib/libgkmathmlcon_s.a
../../dist/lib/libgkmathmlbase_s.a  ../../dist/lib/libgksvgcon_s.a
../../dist/lib/libgksvgbase_s.a  -Wl,-z -Wl,defaultextract
-L../../dist/bin -ljsdom -lgkgfx -L../../dist/bin -lplds4 -lplc4 -lnspr4
-lpthread -L../../dist/bin -lxpcom -lmozjs   -lw -lposix4 -lintl -lelf
-lnsl -lsocket -lresolv -ldl -lm    
ld: fatal: file /dev/zero: cannot mmap file: Not enough space
collect2: ld returned 1 exit status
make: *** [libgklayout.so] Error 1
-- snip --

Roland> This was an attempt to compile Mozilla M18 on Solaris
Roland> 2.7/MU4/106541-12/sun4u/gcc-2.95.1, 512MB real memory, ~2GB
Roland> swap (4% used), filesystem has ~10GB free.  And to make it
Roland> more mysterious: Previous compilation yesterday completed
Roland> without any problems...

Roland> Any hints what's going wrong ?

at a guess one of your requested components has got it self (soft)
linked to /dev/zero

This is an infinate file, and so when ld uses mmap to assign memory
addresses to each byte it runs out of adress space.

Roland> Bye, Roland

 
 
 

1. Why "fdisk /dev/hdb1" works but not "fdisk /dev/hdb"!?

Hi,
        I am trying to make linux partitions on an empty second 170MB
Hard drive.  The drive has been low-level formatted, with
no partitions, and dos fdisk reports everything correct.  I
boot from slackware diskettes, and boot msg says:

check partitions:
hda:  /dev/hda1
hdb: bad partition table

Of course, "fdisk /dev/hdb" does not work, nor "fdisk /dev/hdb1".
(err msg: Unable to read /dev/hdxx).  Suprisingly, fdisk /dev/hda
also gives the same message.

Now, I go back to dos, create and dos format a 16MB partition on
the second hard drive.  Boot under slackware, and boot msg says:

check partitions:
hda: /dev/hda1
hdb: /dev/hdb1

Now, "fdisk /dev/hdb" still gives "unable to read /dev/hdb" msg,
but "fdisk /dev/hdb1" allows me into fdisk.  Unfortunately, it
gives total garbage when I print out contents of partition table
within fdisk (/dev/hdb11 through /dev/hdb12 are all defined with
physical/logical boundry errors).  But as "fdisk /dev/hdb1"
should not work, as /dev/hdb1 is a partition and not a device,
I am not suprised.  But why does fdisk try to operate on a
partition, but not let me operate on the device /dev/hdb????

Help! At wit's end... Any suggestions appreciated, as I am
getting nowhere.  I just want to create linux partitions
on my second hard drive (and I have no problems creating dos
partitions on that drive, so the drive seems to be recognized
find...).

thanks in advance,
Brad Miller

2. help in migration fron Ultar2 to Ultra10

3. "> file" versus "cp /dev/null file"

4. Ipchains question

5. "not enough space in file system" message

6. Perl and chat2.pl

7. Why do I get "ld: cannot open -lc: No such file or directory"

8. config problems for sending traps????

9. "Standard Journaled File System" vs "Large File Enabled Journaled File System"

10. "/dev/zero": no such file or directory?

11. Problems compiling with gcc- "ld: cannot open crt1.o: No such file or directory"

12. while building qpopper "ld cannot open -ldbm: No such file or directory"

13. ld fails with "Not enough room for program headers"