# Having issues with using ports.



## Delmania (Feb 22, 2010)

Greetings all, I am new user to FreBSD, and have been experiencing some difficulties with using ports.  It seems that every time I try to install a port, I experience either a compiler error or the compiler seems to simply hang on the compilation of a file.  It's not deterministic, sometimes the compiler will hang, sometimes it will generate an error, and sometimes it will successfully build the port.  These occur on fairly standard ports, like Xorg and Xfce4.  

The setup in question is a basic install of FreeBSD, with no "canned" installation package selected and no packages, other than cvsup installed.  If this common from FreeBSD?  It's discouraging me that I am having such a hard time setting this system up!


----------



## SirDice (Feb 22, 2010)

Without knowing what kind of errors you're getting we can't really help you.


----------



## DutchDaemon (Feb 22, 2010)

And no, this is not 'common from FreeBSD' at all (as I'm running 614 ports with zero errors right now).


----------



## Delmania (Feb 22, 2010)

Part of my issue is that I can't tell what the error is, because it tends to scroll off the screen.


----------



## thuglife (Feb 22, 2010)

Use the ScrLk key to see the error.

Is your network configured properly? Maybe you are having issues with the distfiles.


----------



## phoenix (Feb 22, 2010)

Or, use the handy script(1) program to capture all output to a text file:  `# script ~/port-install.txt make install`

The first option "~/port-install.txt" tells it where to save the output.  Everything after that is passed on to the shell for executing.  After the make job errors out, you can open the ~/port-install.txt file to see what's up.


----------



## Ruler2112 (Feb 22, 2010)

Might want to test the RAM in your machine too.  I've heard that the compiler stresses out your RAM/CPU and that if there's something wrong, it'll cause unexpected errors.

Note that there are compiler warnings that are a part of many ports I've installed.  (Typecasting errors, deprecated syntax, etc.)


----------



## moatdib (Feb 22, 2010)

I'm a newbie too, having a bit of a hard time to compile gnome, once in a while I get a compile error in one dependency and compil stops. So far I managed to go in the dep folder where the error occured, run a make clean and build it then go back to gnome2, make clean and make install clean again. I'm getting there but I had to do this for libgphoto,  libxul and gnome-applet so far. 
Hope it is finished soon, it's a bit stressfull, everytime something compile in the process I feel like I'm throwing dice and wait for a 6 ;-)


----------



## SirDice (Feb 22, 2010)

Building on a clean system (with no installed ports on it) shouldn't produce any problems or errors. Updating an existing system however might. You should always read /usr/ports/UPDATING. It will contain important notes, sometimes you need to update things in a certain order or you will indeed run into some difficulties.


----------



## moatdib (Feb 22, 2010)

Agreed, it is a clean install for me with a minimal install from sysinstall. Overall things go smoothly considering the amount of ports to compile, yet it is not completely trouble free.
I get once in a while an md5 or sha256 sum wrong, maybe there is a little thing with my NIC, it uses the ale driver. I'm personnaly not too worried, not far off the end I think.


----------



## Delmania (Feb 23, 2010)

The machine in question has 1 Gb RAM, 150 Gb HDD, and it's been around so that I am no longer remember what processor it has.  What are the specs that people around here are using?


----------



## SirDice (Feb 23, 2010)

Delmania said:
			
		

> The machine in question has 1 Gb RAM, 150 Gb HDD, and it's been around so that I am no longer remember what processor it has.  What are the specs that people around here are using?



A P2-350, a core2 dual and a few things in between. You can see the specs if you read the output of dmesg(8).


----------



## Delmania (Feb 23, 2010)

Alright, so I guess the machine's hardware should be sufficient for the compilation of porta such as Xorg and Xfce4, but when I get to work on it again, I will post the results of dmesg as well as some of the errors I am getting.  I will mention that the errors I get tend to be of the flavor of "internal compiler error, please submit a bug report."


----------



## ckester (Feb 23, 2010)

Ruler2112 said:
			
		

> Might want to test the RAM in your machine too.  I've heard that the compiler stresses out your RAM/CPU and that if there's something wrong, it'll cause unexpected errors.



This is definitely true.  Compiling will often bring to light problems with RAM that escape notice during other, less intensive operations.   The symptoms are usually very random and intermittent.  



> Note that there are compiler warnings that are a part of many ports I've installed.  (Typecasting errors, deprecated syntax, etc.)



This is also true.  It's important to distinguish between ports that fail to build and ports that generate compiler warnings.  

By definition, a compiler "warning" is not fatal: the build might succeed despite the warning and the app will be quite usable.


----------



## ckester (Feb 23, 2010)

Delmania said:
			
		

> The machine in question has 1 Gb RAM, 150 Gb HDD, and it's been around so that I am no longer remember what processor it has.  What are the specs that people around here are using?



Since you say it has 1GB RAM, I'll bet it's at least a Pentium.  Older processors tend to be found on systems with less RAM than that.

While it might be intolerably slow, even a Pentium is powerful enough to compile anything in the ports tree.   So I doubt your processor model is the problem.


----------



## Delmania (Feb 24, 2010)

ckester said:
			
		

> Since you say it has 1GB RAM, I'll bet it's at least a Pentium.  Older processors tend to be found on systems with less RAM than that.
> 
> While it might be intolerably slow, even a Pentium is powerful enough to compile anything in the ports tree.   So I doubt your processor model is the problem.



Yes, it's an AMD 1.7 GHz processor.  I actually built the machine myself, back when I had time and money!


----------



## Delmania (Feb 24, 2010)

One more thing, the majority of the errors I receive are internal compiler errors, so I am not sure if there is much I can do about those.  However, I found if I just keep simply running make after an error is generated, it seems to be able to work just fine.


----------



## Ruler2112 (Feb 24, 2010)

I'd definitely run memtest on that box for several hours or a few days... sounds very much like flaky hardware to me.  (Fails one time and works the next without changing anything...)


----------



## fbsd1 (Feb 28, 2010)

Xorg and Xfce4 are mega ports. That means they have a very large count of dependants all of which have to be compiled. You have to download the complete ports tree so all the dependants make files are on your system and then do the make install on xorg. Be warned, you will be in compile mode for a very long time. CPU under 1Ghz would run for 20+ hours or longer on a box older than 2000


----------

