# trouble installing from ports



## BJwojnowski (Feb 25, 2013)

Ok.  I tried to run `# portmaster x11-servers/xorg-server` in the /usr/ports/x11-servers/xorg-server directory.

The good news is that 96 files successfully compiled.

The bad news is that I keep getting stuck in a recursive loop.  It spins round and round occasionally catching a "cog" and prints out the following or something similar:

```
===> port Directory: /usr/ports/x11-toolkits/tk84
  ===> Starting Check for build dependencies
  ===> gathering dependency list /usr/ports/x11-toolkits/tk84
```

/usr/ports/x11-toolkits/tk84 >> x11/libx11 >> x11/libxcb >> lang/python27 >> devel/libffi >> misc/dejagnu >> lang/expect >> x11-toolkits/tk84

I do a Ctrl-c to break the loop and exit.

What am I doing wrong?

What can I do to remediate this issue?

I tried running `# portmaster-r x11-servers/xorg-server` and I get:

```
===>>>The argument -r must be a package name or a glob pattern
 ===>>>Aborting update
```


----------



## wblock@ (Feb 25, 2013)

There are multiple problems here.  First, as Thread 37784 shows, this happens when the PTH option is enabled on the Python port.  So turn off that option and try again:

```
# cd /usr/ports/lang/python27
# make clean
# make config
(turn off the PTH option)
# make install clean
```

The second problem is easier, just interpretation of the error shown by portmaster.  You have given it an _origin_ directory and name, but it only takes a package name like xorg-server-1.10.6_2,1 or a glob pattern like xorg-server\*.

But don't try to compile individual pieces of xorg.  Instead, install the meta-port, which will install all the ports needed:

```
# cd /usr/ports/x11/xorg
# make clean
# make install clean
```


----------



## BJwojnowski (Feb 25, 2013)

*Following Instructions*

Thank you Wblock@ for your help.

I did as instructed and went to /usr/ports/x11/xorgand ran `# make clean && make install && make install clean`. 

The problem I encountered is that I was given a config option and I chose to "install" gnome desktop when the option was offered.  I did not know that glib20 was a dependency that was required for the make install of gnome.  When the option arose to check it off in the config I failed to select it.

My question is, "How do I effectively backtrack so that 'menu' which offers the choice of installing glib20, a dependency, is offered again so that I avoid the error: Stop, Error 1 the file in question(glib20) can not be found?

Reiterating how do I get to the point just before I errored in not selecting to install glib20 as a dependency?


----------



## wblock@ (Feb 25, 2013)

In general, figure out which port fails to build, then re-run make config in that port's directory, then build and install that port.  Again, avoid trying to build little pieces when there is a meta-port.  For Gnome, in this case, it's x11/gnome2.


----------



## Carpetsmoker (Feb 25, 2013)

> make clean && make install && make install clean



As a sidenote, just typing *make clean install install clean* has the same effect. Not that running *make install* twice make any sense (it doesn't do anything, the port `remembers' if the install target has been run).


----------



## BJwojnowski (Feb 25, 2013)

Well I am now really approaching the limits of insanity doing the same thing over and over expecting different results.  I used `# portmaster -f x11/xorg`.  Plenty of Ports compile.  Promising.  However two, there are several more, will not compile.  The principal culprits are `# portmaster devel/bison` and `# portmaster lang/perl5.14`.  They do not compile no matter how many times I try.  They both tell me error number one whatever that means and that I can resume by just resuming portmaster on `# the program that didn't compile`.  All the programs that will not compile are interdependent.

Is it really that hard to set up a desktop environment in FreeBSD?  When I accomplished installing FreeBSD several years ago on a much more obsolete machine I do not remember having as much trouble.


----------



## wblock@ (Feb 25, 2013)

Why did you suddenly use portmaster?  Why did you use -f?  That will just force it to needlessly recompile a bunch of things.

error #1 just means there was an error that happened somewhere before.

No, it's not too hard to set up a desktop on FreeBSD, it just takes a while.  And if there are misunderstandings, it takes longer.  The Handbook has sections on using ports and installing and configuring X and desktops.


----------



## BJwojnowski (Feb 26, 2013)

*This is where I am now in the process*

I ran portmaster because it seems to me to involve the least person computer interaction to install ports and it was suggested by taz in the thread how to do a minimal desktop install.

This is where I am now.

I ran `# pkg_version`.  There were many compiled ports and all of them except one were the latest.  The one that wasn't devel/bison.  There is a newer version available.  When I went to devel/bison and ran `# make install clean`to create the package it informed me that it depended on the package lang/perl5.14.  So I went to lang/perl5.14 and ran `# make install clean`.

The problem appeared again with it saying among other things, error 1 and that it used ./config.sh that was there.  It would not install.  In the same file I ran `# make rmconfig`.  In the options listed there are nine options:
DEBUGGING
GDBM
PERL_MALLOC
PERL_64BITINT
THREAD
PTHREADS
MULTIPLICITY
SITECUSTOMIZE
USE_PERL.
The machine and code by default select PTHREAD.  I read somewhere to disable it.  So I did.  With it on or off does not make any difference the file will not compile.

I have three questions:
1)Which options should I select in Perl5.14 config file?
2)How can I get Perl5.14 compile?
3)If we cannot get any of this to work should I reinstall the system from scratch?

Thank you


----------



## wblock@ (Feb 26, 2013)

BJwojnowski said:
			
		

> 1)Which options should I select in Perl5.14 config file?



Leave them at the default settings unless there is a specific reason to change.  That applies to all ports.  make rmconfig in the port directory will reset the options to default, then the port can be rebuilt and reinstalled.



> 2)How can I get Perl5.14 compile?



By default, it should work.  If it fails to build, it could be that one of the build dependencies has not been built correctly.



> 3)If we cannot get any of this to work should I reinstall the system from scratch?



No.  At worst, deinstall all ports with pkg_delete -a, delete /var/db/ports to get rid of all non-default options settings, update the ports tree, and start installing ports again.


----------



## BJwojnowski (Feb 26, 2013)

*Making Progress*

We are making progress.

I ran `#/usr/ports/lang/perl5.14 make rmconfig`.

Then I ran `#/usr/ports/lang/perl5.14 portmaster -i lang/perl5.14`.

The -i flag would have the compiler ask me for each additional dependency whether to install.  No "permissions" were asked for.  The problem compiling appeared again but this time the meat and potatoes of the error message only took up one screen.  This is what was displayed:


```
Stripping down executable paths...
 Creating config.sh...
./config.sh: 120: Syntax error: "(" unexpected
===> Script "Configure" failed unexpectedly
Please report the problem to [email]skv@FreeBSD.org[/email] [maintainer] and attach the
 "usr/ports/lang//perl5.14/work/perl-5.14.2/config.log" including the output of the failure of your make
 command.  Also,it might be a good idea to provide an overview of all packages installed on your system
 (e.g. a /usr/sbin/pkg_info -Ea
***  do-configure.  Error code 1

Stop in /usr/ports/lang/perl5.14
*** [build] Error code 1

Stop in /usr/ports/lang/perl5.14

===>make failed for lang/perl5.14
===>aborting update

Terminated

===>You can restart from the point of failure with this command line:
        [CMD="#"]portmaster[/CMD] <flags> lang/perl5.14
```

Is there an easy way to get a screen of the above type output sent to this forum so whoever is assisting me will see what I have seen directly instead of me transcribing twice?

How should I proceed? do I do as suggested before and `# pkg_delete -a`, remove /var/db/ports, update the ports tree, and reinstall the ports?
or should I somehow find the pesky unexpected "("?

I will also email a copy of this to skv@FreeBSD.org as requested.


----------



## wblock@ (Feb 26, 2013)

You do not include enough context to see the actual error.  See Thread 17309.

To be clear, _stop using portmaster to install individual ports_.  It tries to do other things besides just building that single port, and may hide the actual error.  So:

```
# script /tmp/perl.log
# cd /usr/ports/lang/perl5.14
# make clean
# make rmconfig
# make
# exit
```

The /tmp/perl.log file will contain a copy of the input and output of the session.  This can be posted on pastebin.com.  Still, I suspect the error is in a build dependency, or maybe somewhere else like /etc/make.conf.


----------



## BJwojnowski (Feb 27, 2013)

*Status*

I have decided to take the third option:



> No.  At worst, deinstall all ports with pkg_delete -a delete /var/db/ports to get rid of all non-default options settings, update the ports tree, and start installing ports again.



I have also read more clearly and accurately Chapter 5 of the FreeBSD Handbook:  Overview of Software Installation.

The first port I installed was portaudit. No "problems".

The second port I attempted to install was portupgrade.  It presented a problem.  It depends on ruby (do not know specific version that was listed) and wonder of wonders ruby depends on our culprit perl5.14.  I could not install portupgrade.

As I was going through Ch 5.6.5.1 of the handbook (_the electronic version not the hardcopy which I just rcvd in snail mail and does not resemble at all the current electronic version_)it referred me to /usr/ports/UPDATING which I went through.  Update files went back as far a 1-08-2008.  There were several instances of special directions for perl*.  In /usr/ports/lang there are five separate ports for perl.  When I try to install the port perl5.14 the same error occurs and the port can not be installed.

How do I follow the hints in UPDATING referring to perl?

As an aside as I was reading Chapter 5 it clarified the way to install software in FreeBSD.  The pkgng method has some allure to me.


----------



## wblock@ (Feb 27, 2013)

Don't install portupgrade, it's another port management tool that is not needed.  Or at least not needed yet.

/usr/ports/UPDATING is an ongoing list of notes.  Normally, you check it for new entries--entries that have been added since the last time you installed ports--before installing or updating ports.  Since you are starting from today with no ports installed, it has nothing that applies to your system.

pkgng is not something I recommend at present because the package repository is not ready yet.

Remove all the ports as shown above, but also make sure you have not added anything to /etc/make.conf.

If you run pkg_info, it should show no ports installed.

Then install Perl, just that one port.  Do it using script(1) as shown above to save the log.  If it works, then move on to other ports.


----------



## BJwojnowski (Feb 27, 2013)

When I checked for /etc/make.conf there was no such file.  There was /etc/mac.conf.  I do not know if the two are related.

Now in order to post the script file I will need to boot into the Windows 7 portion of this dual boot system.  How do I mount the NTFS portion of the HD so that I can copy the script from the FreeBSD portion of the HD to a file in the Windows 7 portion? 

If I can do that I will be able to boot into Windows 7 so that I can login into the forum and post the /tmp/perl.log


----------



## MauroEldritch (Feb 27, 2013)

BJwojnowski said:
			
		

> When I checked for /etc/make.conf there was no such file.  There was /etc/mac.conf.  I do not know if the two are related.
> 
> Now in order to post the script file I will need to boot into the Windows 7 portion of this dual boot system.  How do I mount the NTFS portion of the HD so that I can copy the script from the FreeBSD portion of the HD to a file in the Windows 7 portion?
> 
> If I can do that I will be able to boot into Windows 7 so that I can login into the forum and post the /tmp/perl.log



I think they're not related. While make.conf is make command-relative YOUDONTSAY mac.conf is related to Mandatory Access Control, to define labels, in short terms. 

You can check out this if you like.

Hope this helps.


----------



## wblock@ (Feb 27, 2013)

BJwojnowski said:
			
		

> When I checked for /etc/make.conf there was no such file.  There was /etc/mac.conf.  I do not know if the two are related.



No, they are not related.  While we are talking about background, please post the version of FreeBSD you are using, and how you have updated the ports tree.



> Now in order to post the script file I will need to boot into the Windows 7 portion of this dual boot system.  How do I mount the NTFS portion of the HD so that I can copy the script from the FreeBSD portion of the HD to a file in the Windows 7 portion?



FreeBSD has mount_ntfs(8).  I don't feel it is safe to write to a proprietary filesystem and have only used it for reading.  The man page says it can write, but goes no further.

A safer way is a USB memory stick formatted with FAT (MS-DOS).  That can be read and written on both systems.


----------



## BJwojnowski (Feb 27, 2013)

*Version of BSD*



			
				wblock@ said:
			
		

> please post the version of FreeBSD you are using, and how you have updated the ports tree.



I am using FreeBSD_9.1 for AMD64 and updated the port tree using `# portsnap update`.  I had already initially used `# portsnap fetch` and `# portsnap extract` in previous interactions with the OS.

Thank you. I'll dig up a memory stick and proceed.


----------



## wblock@ (Feb 27, 2013)

Thank you.  I'm sorry installing ports is putting up such a fight; it is not a normal thing.


----------



## BJwojnowski (Feb 27, 2013)

Where do I place the perl.log file?  Should I just put the output in a thread?


----------



## SirDice (Feb 27, 2013)

It's probably quite big, post it on pastebin or a similar service and post a link to it.


----------



## BJwojnowski (Feb 27, 2013)

I've pasted on pastebin. http://pastebin.com/6VS2GnwH

Thank you.


----------



## wblock@ (Feb 27, 2013)

Please show the first 150 or so lines from /usr/ports/lang/perl5.14/work/perl-5.14.2/config.sh.

Line 120 on my system is:

```
d_Gconvert='sprintf((b),"%.*g",(n),(x))'
```


----------



## BJwojnowski (Feb 27, 2013)

Here is a link to approximately the first 150 lines of /usr/ports/lang/perl5.14/work/perl-5.14.2/config.sh

http://pastebin.com/EETJ9T1z

Thank you for all your assistance.

Somehow your request appears differently in my email than in this forum.  The above is a response to what I see in the forum.  The below is a link as requested in my email box.

http://pastebin.com/R4w2wNT2


----------



## wblock@ (Feb 27, 2013)

Yes, I misread the line number at first.

The lines are the same, but let me suggest something else as a potential problem: you have a single quote in the hostname.  That could do any number of unexpected things.

```
cf_email='root@stan's.machine'
```

Remove the single quote, however it is defined in /etc/rc.conf, reboot, and try to build again.


----------



## BJwojnowski (Feb 27, 2013)

*Steps taken*

I went to /etc/rc.conf,edited out the "'" with vi, and then proceeded to 





			
				wblock@ said:
			
		

> deinstall all ports with pkg_delete -a, delete /var/db/ports to get rid of all non-default options settings, update the ports tree, and start installing ports again.



The first port I tried to build and install was /usr/ports/ports-mgmt/portupgrade.  As pointed out before this port has a dependency of perl5.14.  In the portupgrade directory I ran`# make install clean`. 

Errors of the same sort appeared again


----------



## wblock@ (Feb 27, 2013)

Please show the full contents of /etc/rc.conf.  Have you edited other system config files?


----------



## BJwojnowski (Feb 27, 2013)

No.  The only conf file I have edited is the rc.conf file.

Here it is:
http://pastebin.com/pg4fdtBy


----------



## wblock@ (Feb 28, 2013)

If the error is exactly the same as before, there is something basic wrong that just is not evident to me.  At this point, reinstalling may be the quickest way to get around that.  Don't edit any files except /etc/rc.conf and maybe /etc/wpa_supplicant.conf, and don't use any special characters in names.


----------



## BJwojnowski (Feb 28, 2013)

*Resolution of Problem and Thanks*

FreeBSD forum and wblock@,

Thank you for the patience in trying to figure out what was giving me the inordinate amount of difficulty with installation of ports.

As you suggested, wblock@, I reinstalled FreeBSD_9.1 for AMD 64 on my toshiba satellite L770.
That worked.

Then the first port I installed was portupgrade since it had a dependency on Perl5.14 which was giving us so much trouble.  It installed with no problem.

Then I went on to install the meta port xorg.  Except with one error in install where it could not find dmidecode-2.11 it installed without a problem.  The absence of dmidecode-2.11 was resolved by simply retyping make, then make install in the /usr/ports/x11/xorg directory.  Both ports, portupgrade and  xorg were installed by explicitly going to their corresponding /usr/ports directory and typing in `# make`, then `# make install`, and then `# make clean`.

Two of the previous, possible problems were:
1)  had an " ' " in the hostname
2)  attempte to do a minimal install of a desktop and used portmaster to manage ports.  Either something inherent in portmaster or my great ignorance in managing ports could have introduced the error.

Once again thanks to all.


----------

