# Problems building ports



## vendion (Feb 16, 2013)

First off let me just state that I am new to FreeBSD, I have been using various Linux distributions for years now, I figured I would give FreeBSD a try and see what it is like.  I am running FreeBSD 9.1-RELEASE under a virtual machine with a single processor, 1 GB of Ram, 1 GB Swap space, and 20 GB of hard drive space.  I have the machine install and everything seems to me running smoothly, the issue I am running into is installing ports such as editors/vim-lite, lang/python27, and even x11/xorg-minimal using ether the `# make` or `# portmaster` the compiling of the port is aborted.  In the case of portmaster(8) I am kicked back to a login prompt with an error that the system ran out of swap space.

I know that the version of FreeBSD I choose currently does not have any packages being built for it, and my virtual machine lacks the resources to build from the ports.  I know in the FreeBSD Handbook there is a note about being able to update the PACKAGESITE variable to use a different version, in my case say Packages-9-stable.  When I tried I got the following error:


```
# pkg update
Updating repository catalogue
pkg: ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/repo.txz: File unavailable (e.g., file not found, no access)
```

Other than waiting for packages to start being built for 9.1-RELEASE is there anything I can do to be able to use the package system instead of the ports system to install 3rd party software?

Thanks in advance for your time and any help you offer.


----------



## wblock@ (Feb 16, 2013)

That's odd, 1G RAM plus another 1G swap seems like it ought to be more than enough to build those.  What error is shown when you just use make?

If you can temporarily allocate more memory to the VM, that would be the easiest way.  Without reinstalling, swap space can be added by adding another drive to the VM, then putting an entry for it in /etc/fstab or swapon(8).  But my guess is this is not a space problem.

Don't know about PACKAGESITE when used with pkgng.  I thought that was just for old-style pkg_add(1).


----------



## vendion (Feb 16, 2013)

It strikes me as odd as well, seeing as how x11/xorg-minimal depends on lang/python27 I will start there.  Running `# make` inside of /usr/ports/lang/python27 I get the following error


```
make: Max recursion level (500) exceeded.
```

The full output is quite long so I put it in a pastebin (my apologies in advance if use of pastebin is shunned within the FreeBSD community).

Anyways it looks like the make process is getting caught in some kind of a dependency loop, looks like it is trying to build a package dependency that depends on the parent package?  If this is the case I can easily see this eating through the available RAM and swap space, and throwing more at it may only make matters worse.

As for PACKAGESITE it seems to work seeing as how pkg was trying to grab from "packages-9-stable/" instead of "packages-9.1-RELEASE" which is not available on any of the FreeBSD FTP mirrors, but the VM was rebooted since then so that change was reverted.


----------



## wblock@ (Feb 17, 2013)

Pastebin is fine, we recommend it here from time to time.

Looks like a dependency loop between xcb-proto and Python.  But I don't know how to break it.  If it was not pkgng, adding the Latest packages with pkg_add -r might work.  The brute-force approach would be to rebuild all installed stuff from ports.  The procedure at the end of the portmaster(8) man page shows how.  Given there is not yet an announced date when the pkgng packages will be available, I would take that option.  But I generally build everything from ports anyway.


----------



## vendion (Feb 18, 2013)

Good to know that Pastebin is accepted here.

I have nothing against building the packages myself, makes me feel more at home like Arch Linux's ABS and AUR but I digress.  Seeing as how I have next to nothing installed on this system rebuilding everything from ports shouldn't take to long, I will report back with the results.


----------



## vendion (Feb 19, 2013)

Okay so having portmaster(8) do a complete installation of all my ports seemed to have worked, after doing the 10 steps I was able to build editors/vim-lite and lang/python27, thank you for your assistance.


----------



## Carpetsmoker (Feb 19, 2013)

The problem is/was a circular dependency.

You're trying to install lang/python27, which depends on devel/libffi, which depends on misc/dejagnu, which depends on lang/expect, which depends on x11-toolkits/tk84, which depends on lang/python27, which depends on devel/libffi ... etc.

This is only the case if you use the WITH_PTH option (off by default) and if you haven't got a Python version installed.

Not sure how this can be fixed ...


----------



## BJwojnowski (Feb 19, 2013)

Reading this quick observation makes me recognize that the ISO image I downloaded and burned to DVD was FreeBSD9.1-release not -stable.  This may be the reason for all the difficulties that I am being presented with.  I am now going to go back and read on TheFreeBSDProject how do I obtain a working version of FreeBSD9.1 (i.e. are there other images available that are more supported).


----------



## BJwojnowski (Mar 17, 2013)

xyz solved


----------

