# Filesystem /usr full when compiling Xorg 7.5



## mefizto (Aug 5, 2010)

Greetings all,

I have attempted to compile Xorg 7.5.  My /usr is on UFS with 4.8 GB size, but the compilation stopped with message that file-system is full.  Now I have two questions:

1. The handbook states: http://www.freebsd.org/doc/handbook/x-install.html


```
Note: To build Xorg in its entirety, be sure to have at least 4 GB of free space available.
```

I started the compilation with more than that.  What is the problem?

2. What do I do now?

Thank you,

M


----------



## adamk (Aug 5, 2010)

The handbook also states that Xorg 7.4 is the most recent in ports, so the handbook is clearly out of date.  Perhaps Xorg requires more than 4.8 gigs to build these days.  



> 2. What do I do now?



Free up space on /usr and try again 

Adam


----------



## fronclynne (Aug 5, 2010)

Assuming you have a ton of space available in /home you could add a line like

```
WRKDIRPREFIX= /home
```
to /etc/make.conf.

In this case it would create a directory called /home/ports/ and then populate that as needed with subdirectories to build in.

Another thing you might look at is how much cruft is hanging about in /usr/ports/distfiles/.


----------



## mefizto (Aug 5, 2010)

Dear Adam,

thank you for the reply; however, I am confused.  If I "[f]ree up space on /usr and try again" as you suggested, I end up in the same situation as I cannot increase its size.  This is a fresh install and the /usr was about 250MB when I started.

Dear fronclynne,

I guess my second question is ambiguous.  Let me rephrase it.

First, I need to clear the /usr directory so that the OS quits complaining about the full file system.  But how do I know which directories/files I can delete? Ditto, re "cruft is hanging about in /usr/ports/distfiles/."  Even assuming, that I can clear the "cruft" will it not be populated again when I start re-compiling?  Do not forget that this is fresh install of 8.1. 

Second, when I create the /home/ports/, what do I copy there?

Finally, do I have to re-start the compilation, or is the system smart enough to remember what was already done?

Maybe I should go back to Windows for the laptop?

Thank you,

M


----------



## jb_fvwm2 (Aug 5, 2010)

run the command, "df".  Figure out which
filesystem (/usr, /var, etc) has enough space if 
any.  

```
mkdir -p /var/builds
```
  and 
then

```
/bin/rm -rf work && make install WRKDIRPREFIX=/var/builds
```
I've set W'X (above) to failing-with-bad-sectors-hard-disks
even to get more months of use from them...
You can cntl-c a build and resume it if the /work/ build
directory is is the same location (not re-located to
a new WRKDIRPREFIX...) usually.
And you can even  ncftp to
ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/[x11,www,etc] 
and check for prebuilt packages to save space and time
if the packages match the Makefiles.


----------



## mefizto (Aug 5, 2010)

Dear jb_fvwm2,

I have removed the content of the /usr/obj directory and this is what the df -h command shows:


```
Filesystem           Size    Used   Avail Capacity  Mounted on
/dev/label/rootfs    989M    490M    420M    54%    /
devfs                1.0K    1.0K      0B   100%    /dev
/dev/label/usr       4.8G    3.2G    1.3G    72%    /usr
basefs               116G     18K    116G     0%    /basefs
basefs/var           116G     53M    116G     0%    /var
/dev/md0             496M     12K    456M     0%    /tmp
```

So, now I have space on /usr, but when I try to re-start the compilation, several lines scroll by too fast to read and I get an Error 1.

How do I capture the output, just redirecting it to a file?  But then I will not see what is happening.

What is the next step?

Thank you,

M


----------



## gilinko (Aug 5, 2010)

mefizto said:
			
		

> Dear jb_fvwm2,
> 
> I have removed the content of the /usr/obj directory and this is what the df -h command shows:
> 
> ...



You /usr is 4.8G in size, but you only have 1.3G free which is very very low and that is what gets used up during compilation. That also includes the home directory for your users in /usr/home, and you installed ports in /usr/local. As a rule of thumb my /usr is at least 10G in size, and /usr/home is on an entirely different slice.

You really need to increase the size of /usr in your current setting to the max, or at least to 10G and not have the home dirs in the same slice.


----------



## mefizto (Aug 5, 2010)

Greetings all,

I was able to solve the problem, it turned out that I have dislodged the cable to a router, so the compilation failed to download a file it needed.  Afterward, it finished and I have nice X, albeit without any response to a mouse and keyboard.

Now the result of df -h is:


```
Filesystem           Size    Used   Avail Capacity  Mounted on
/dev/label/rootfs    989M    493M    417M    54%    /
devfs                1.0K    1.0K      0B   100%    /dev
/dev/label/usr       4.8G    1.7G    2.8G    37%    /usr
basefs               116G     18K    116G     0%    /basefs
basefs/var           116G     54M    116G     0%    /var
/dev/md0             496M     12K    456M     0%    /tmp
```

Onto solving the mouse and keyboard issue.

Kindest regards,

M


----------



## SirDice (Aug 5, 2010)

mefizto said:
			
		

> Onto solving the mouse and keyboard issue.



It's answered here:

[thread=4224]Sticky: Configuring X - read before you ask questions![/thread]


----------



## mefizto (Aug 5, 2010)

Dear SirDice,

my apologies, I do not know how to mark a thread [SOLVED]; the part you cited was not a question, just an exclamation of relief that I have X working and am ready to tackle a new issue - I actually solved it by manually editing xorg.conf.

Kindest regards,

M


----------

