# Port upgrading cmake segmentation fault.



## wimrijnders (Jan 1, 2013)

Hello all,

I recently upgraded my server from 6.3 to 8.3. Since then, I'm having a lot of problems getting my ports up to date. I've tried several methods of port upgrading, notably portupgrade, portmaster and the manual way, with very limited success. I believe this forum is the right location for asking port installation related questions.

I have several issues, on examination it appears that the build tools used for the port upgrading are broken on my server. The issue I am currently running up against is the following error:


```
/usr/ports/devel/cmake/work/cmake-2.8.9/Source/cmMakefileLibraryTargetGenerator.cxx:248: internal compiler error: Segmentation fault: 11
```

This happens during the build of cmake-2.8.9.
How can I fix this? I would be happy to supply more info if necessary.


----------



## cpm@ (Jan 1, 2013)

Please, show output:

`# cat /etc/make.conf`


----------



## jb_fvwm2 (Jan 1, 2013)

Not a fix, but may work

```
cd /usr/ports/devel/cmake
make build || make build && make build || make build && make build
```
Unsure of the order/syntax in that pipe, but it may (if corrected) continue after a segmentation fault and maybe until the port compiles fully.


----------



## wimrijnders (Jan 2, 2013)

cpu82 said:
			
		

> Please, show output:
> 
> `# cat /etc/make.conf`



Here it is:

```
X11BASE=${LOCALBASE}
SENDMAIL_MC=/etc/mail/gini.porcile.mc
SENDMAIL_SUBMIT_MC=/etc/mail/gini.porcile.mc
# added by use.perl 2012-12-29 03:56:08
PERL_VERSION=5.12.4
```


----------



## wimrijnders (Jan 2, 2013)

jb_fvwm2 said:
			
		

> Not a fix, but may work
> 
> ```
> cd /usr/ports/devel/cmake
> ...



Tried this as stated, segmentation fault still occurs, but now three times. I'm not sure what the correct syntax should be.


----------



## SirDice (Jan 2, 2013)

How did you update to 8.3? Through using the source? Did you do a *make delete-old* and a *make delete-old-libs*? There may be some things left over from 6.3.


----------



## jb_fvwm2 (Jan 2, 2013)

wimrijnders said:
			
		

> Tried this as stated, segmentation fault still occurs, but now three times. I'm not sure what the correct syntax should be.



I've had ports compile to completion that needed almost thirty or fifty restarts... not enough memory for that particular port to compile with the set parameters maybe.


----------



## cpm@ (Jan 2, 2013)

Try to build devel/cmake without X11BASE variable.

The X11BASE variable has been deprecated for a long time. Read this thread.


----------



## wimrijnders (Jan 3, 2013)

SirDice said:
			
		

> How did you update to 8.3? Through using the source? Did you do a *make delete-old* and a *make delete-old-libs*? There may be some things left over from 6.3.



I upgraded by using this procedure, and substituting 8.3 for 7.0. It is entirely possible that the portupgrade didn't process all ports properly, it took several days to complete and some errors could have slipped through.

At what moment should *make delete-old* and *make delete-old-libs* be run? Haven't ever done this. After a *make install* and then for every installed package?


----------



## wimrijnders (Jan 3, 2013)

jb_fvwm2 said:
			
		

> I've had ports compile to completion that needed almost thirty or fifty restarts... not enough memory for that particular port to compile with the set parameters maybe.



Memory is not a problem, I've had top running and checked it continuously. Memory usage got nowhere near the max.

Wrt. restarting, I've been cycling between manual install, portupgrade and portmaster, trying different parameters, without much success. After getting the same results, I didn't see the point of retrying yet again.


----------



## wimrijnders (Jan 3, 2013)

cpu82 said:
			
		

> Try to build devel/cmake without X11BASE variable.
> 
> The X11BASE variable has been deprecated for a long time. Read this thread.



Thanks for this tip. Should I remove it from make.conf and try again?


----------



## SirDice (Jan 3, 2013)

wimrijnders said:
			
		

> I upgraded by using this procedure, and substituting 8.3 for 7.0. It is entirely possible that the portupgrade didn't process all ports properly, it took several days to complete and some errors could have slipped through.


Did you use that same freebsd-update?



> At what moment should *make delete-old* and *make delete-old-libs* be run? Haven't ever done this. After a *make install* and then for every installed package?


They are for when you do a source upgrade (*make installworld* and all in /usr/src/), you used a binary upgrade with freebsd-update(8) so they shouldn't be needed.


----------

