How to manually compile on FreeBSD 10.x

Julien Cigar jcigar at ulb.ac.be
Wed Dec 3 14:46:02 UTC 2014


On Wed, Dec 03, 2014 at 05:21:05PM +0300, Odhiambo Washington wrote:
> On 3 December 2014 at 17:09, Julien Cigar <jcigar at ulb.ac.be> wrote:
> 
> > On Wed, Dec 03, 2014 at 04:57:58PM +0300, Odhiambo Washington wrote:
> > > Hi Mehmet,
> > >
> > > You perhaps did not understand my question or I wasn't clear.
> > >
> > > On previous versions of FreeBSD, issues with compilers have never been an
> > > issue. However from FreeBSD 10, a lot has changed and it appears someone
> > > needs to manually install a compiler.
> >
> > GCC has been removed from BASE in FreeBSD 10+ (and replaced by CLANG)
> >
> > >
> > > I went around my problem by:
> > >
> > > cd /usr/bin
> > > ln -s clang++ gcc
> >
> > that's a very bad idea.. You should install gcc from ports or force
> > CXX=clang++ in the Makefile (or in the env).
> >
> > also I don't understand why you're not using the port (mail/exim) ?
> >
> 
> 
> 
> Hi Julien,
> 
> That very bad idea came from
> http://stackoverflow.com/questions/23180725/how-to-install-g-on-freebsd :-)
> There is also the option to install gcc from the ports, but I went for the
> shortcut of symlink because of obvious reasons - not knowing what is the
> best.
> 

beware of stackoverflow.com, it's full of mistakes, don't trust it

the answer that says "It was renamed in FreeBSD 10. Fixed by creating
symlink in /usr/bin:" is just plain wrong.. GCC is not CLANG

> 
> So I have done away with the symlink.
> 
> [root at admin ~/Exim/exim-4.85_RC2]# export CXX=clang++ (I even added it to
> /etc/make.conf)
> [root at admin ~/Exim/exim-4.85_RC2]# make
> /bin/sh scripts/source_checks
> `Makefile' is up to date.
> 
> gcc buildconfig.c
> make[1]: exec(gcc) failed (No such file or directory)
> *** Error code 1
> 
> Stop.
> make[1]: stopped in /root/Exim/exim-4.85_RC2/build-FreeBSD-i386
> *** Error code 1
> 
> Stop.
> make: stopped in /root/Exim/exim-4.85_RC2
> [root at admin ~/Exim/exim-4.85_RC2]#
> 

you should install GCC from ports, for example lang/gcc (which install
gcc 4.8) and do an $> export CC=gcc48

> The reason I am not using the port is because I want to test the current
> version of Exim.
> 
> What is the best way to handle this? Step-by-step please.
> 
> 
> 
> 
> 
> 
> -- 
> Best regards,
> Odhiambo WASHINGTON,
> Nairobi,KE
> +254733744121/+254722743223
> "I can't hear you -- I'm using the scrambler."

-- 
Julien Cigar
Belgian Biodiversity Platform (http://www.biodiversity.be)
PGP fingerprint: EEF9 F697 4B68 D275 7B11  6A25 B2BB 3710 A204 23C0
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20141203/4789d9f5/attachment.sig>


More information about the freebsd-questions mailing list