# Did I screw up ports?



## mariourk (May 29, 2012)

When I want to install a port, ports seems to ignore any config option.

When I run portsdb -Uu, I get this error:

```
Updating the ports index ... Generating INDEX.tmp - please wait.."/usr/ports/Mk/bsd.options.mk", line 154: warning: Missing closing parenthesis for defined()
"/usr/ports/Mk/bsd.options.mk", line 154: Malformed conditional (!defined(WITH_"ISO-8859-2 fonts support") && !defined(WITHOUT_"ISO-8859-2 fonts support"))
"/usr/ports/Mk/bsd.port.mk", line 6428: if-less endif
"/usr/ports/Mk/bsd.options.mk", line 150: warning: Missing closing parenthesis for defined()
"/usr/ports/Mk/bsd.options.mk", line 150: Malformed conditional (!defined(WITH_"ISO-8859-2 fonts support") && !defined(WITHOUT_"ISO-8859-2 fonts support"))
"/usr/ports/Mk/bsd.port.mk", line 6428: if-less endif
make: fatal errors encountered -- cannot continue
===> databases/rrdtool10 failed
*** Error code 1

failed to generate INDEX!
portsdb: index generation error
```

Whet got screwed up and how can I fix this?


----------



## SirDice (May 29, 2012)

This appears to be a common error. I'm guessing something didn't go as planned in the ports tree.

Similar (if not exactly the same) issue: Thread 32367


----------



## mariourk (May 29, 2012)

I updated ports, but I still get this error. It did fix my other problem though


----------



## wblock@ (May 29, 2012)

portsdb() is from ports-mgmt/portupgrade, so the problem could be internal to it rather than the stock ports system.


----------



## jb_fvwm2 (May 29, 2012)

/usr/ports/Mk is today undergoing a revamp...


----------



## RedRat (May 30, 2012)

The ports system still doesn't work on 6.x versions of FreeBSD. I know 6.x is EOL now, but a plenty of them still using in production, and broken ports system is a real PITA for its owners. :-(


----------



## SirDice (May 30, 2012)

RedRat said:
			
		

> The ports system still doesn't work on 6.x versions of FreeBSD. I know 6.x is EOL now, but a plenty of them still using in production, and broken ports system is a real PITA for it's owners. :-(



End-of-Life means exactly that. People that are still running it should consider updating a.s.a.p.

Besides ports not being able to compile there are also no security updates. The longer you keep running an EoL system the bigger the risk it will get hacked.


----------



## kpa (May 30, 2012)

The ports system won't be fixed for 6.x by the port maintainers, you have basically two options.

1) Fix it yourself and maintain your own fixes yourself (or hire someone else to do those tasks).

2) Upgrade to a supported version of FreeBSD.


----------



## pribis (Jun 1, 2012)

I have one system on 7.0-RELEASE and another on 8.0-RELEASE (Yeah, I know, I need to upgrade).  The last portupgrade broke things similar to the original post (or maybe this is a different problem altogether).  There appears to be a problem with processing OPTIONS in bsd.options.mk.  The for loop is parsing the description string on the spaces, which it shouldn't do.  So 

FOO "Option to enable FOOing" on

Gets parsed as:
FOO
"Option
to
enable
FOOing"
on

I haven't seen a bug report on this yet.


----------



## RedRat (Jun 4, 2012)

SirDice said:
			
		

> People that are still running it should consider updating a.s.a.p.



Sometimes it's just impossible. For example, we use on FreeBSD 6 server a very old billing system, which works fine, but can't be compiled on FreeBSD 8. Yeah, we will change it to another, more modern billing system eventually, but it will take a lot of time and efforts.

As I can see, all the problems with a new ports options system related to the wrong .for statement handling. Maybe it can be worked around by installing another make version from a ports?


----------



## DutchDaemon (Jun 4, 2012)

Have you tried to compile against compat6 libraries?


----------



## gashtaan (Jun 8, 2012)

Is there any solution for this? I'm using FreeBSD 7.0.


----------



## RedRat (Jun 8, 2012)

gashtaan said:
			
		

> I'm using FreeBSD 7.0.



Well, you can simply update your system to the 7.4-RELEASE.


----------



## gashtaan (Jun 8, 2012)

Is it possible to do it remotely without physical access to the server? Does the freebsd-update utility preserve the previous kernel configuration? I'm using geom mirror even for root partition, I'm afraid of disrupting something.


----------



## RedRat (Jun 9, 2012)

Yes, I usually update all my servers remotely, using *make [build|install]world*, not *freebsd-update*.

You can load the geom_mirror module from loader.conf, but even it fails to load, the OS will start fine, you just have to rebuild a mirror using the *gmirror rebuild* command.


----------



## gashtaan (Jun 10, 2012)

Thanks, I'll try, but I doubt that system will start fine without geom_mirror loaded, because there are /dev/mirror/* paths in the /etc/fstab file.


----------



## williamb (Jun 12, 2012)

*Just delete the file*

Hi,
  I had the same issue on FreeBSD 7. I just deleted the bsd.options.mk file and then touched a blank file with the name to satisfy the MakeFile. The ports tree for FreeBSD 6 and 7 did not originally come with the file and it's not 100% needed. The fix worked for me on an old FreeBSD7 box that I can't upgrade just yet. 

cd /usr/ports/Mk/
rm bsd.options.mk
touch /usr/ports/Mk/bsd.options.mk

Go test your port .


----------



## williamb (Jun 12, 2012)

I also want to point out if you're going to be working on an older box you might want to upgrade your utilities that you're using to help out. Pasted is the Handbook article on doing that. 

http://www.freebsd.org/doc/en_US.ISO8859-1/articles/custom-gcc/article.html


----------

