# clang version problem



## roelof (Aug 17, 2012)

Hello, 

I did install  devel/clang version 3.1 from ports.
But when I do `# clang -v` I see this message : 
	
	



```
FreeBSD clang version 3.0 (branches/release30 142614) 20111021
```

Why does it show FreeBSD clang version 3.1 ?

Roelof


----------



## cpm@ (Aug 17, 2012)

If you really want clang 3.1 you should be tracking 9-STABLE, source branch not RELEASE.


----------



## roelof (Aug 17, 2012)

Hello, 

Difficult choice. Using clang 3.1 but then freebsd-update does not work so I will not recieve the security updates. 

Roelof


----------



## cpm@ (Aug 17, 2012)

If your 'uname -r' output does not mention '-RELEASE', freebsd-update can't update it.


----------



## roelof (Aug 17, 2012)

I run release now because of the security updates.
So I have to look how I can secure my box when I run Stable.

Roelof


----------



## cpm@ (Aug 17, 2012)

Using a source-based method, you can upgrade your FreeBSD system.

http://forums.freebsd.org/showpost.php?p=187371&postcount=4


----------



## roelof (Aug 17, 2012)

I know how to update by using csup.

I still try to find information about how to implemtent security updates into Stable.

Roelof


----------



## kpa (Aug 17, 2012)

Straight from the horse's mouth, for example:

http://security.freebsd.org/advisories/FreeBSD-SA-12:05.bind.asc

Read the part that mentions RELENG_9. Basically you update your sources and compile new world, kernel and install them using the procedure given in the handbook.


----------



## oops (Aug 17, 2012)

roelof said:
			
		

> I did install  devel/clang version 3.1 from ports.
> But when I do `# clang -v` I see this message :
> 
> 
> ...


Because /usr/local/bin is placed after /usr/bin in *PATH* by default. See environ(7), /etc/login.conf and initialization scripts for your shell: usually ~/.cshrc or ~/.profile.

So, edit *PATH* if you want clang 3.1 or invoke it using pathname, e.g.
`$ export CC=/usr/local/bin/clang`
`$ $CC -v`
`$ cd /usr/ports/misc/figlet; make install`


----------

