DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD Installation and Upgrading

FreeBSD Installation and Upgrading Installing and upgrading FreeBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 6th April 2017
RJPugh RJPugh is offline
Port Guard
 
Join Date: Jun 2008
Location: Culpeper, VA
Posts: 43
Default checking whether the C compiler works... no {HELP!}

Hello, all.

I’m having trouble with my system C compiler. When I try to install something from the ports tree, I get a set or error messages, with this as the centrepiece:


checking for gcc... cc
checking whether the C compiler works... no
configure: error: in `/usr/ports/audio/libao/work/libao-1.2.0':
configure: error: C compiler cannot create executables


I’ve been digging around various forums, and this error is not unknown. There are a couple of things that can cause it, but the recurring solution seems to be rebuilding or re-linking the C compiler.

I don’t know exactly what caused this problem. But I can say that I’ve been rebuilding my system lately, so I’ve been shaking the ports tree a lot, and using the package registry (for larger programs). In the past, mixing those two has never been a problem. I recently applied the latest metadata patches to those two, and this wasn’t happening before that time. I do not know if that has any bearing on why the C compiler (clang?) isn’t working, and/or isn’t being seen/referenced. My point is that with all the installs I've been doing recently, something strange may have transpired along the way.

What I want to know is simply this: is there a straightforward way to correct this problem, and if so, what is it? If this is spelled out in the documentation somewhere, I have not yet found it, so please point me in the right direction.

If it matters, my system specs include:

getconf LONG_BIT -> 64
uname -mrs -> FreeBSD 12.0-CURRENT amd64


In less technical terms, I’m using the most recent version of TrueOS on a Dell Inspirion series desktop computer. Why FreeBSD calls my processor an amd64, and Windows calls it an Intel series, I have no idea. But both OS’s work fine (up until now?), so I’m not going to worry about it unless I have to.

Also, these compilers are present:

usr/bin/clang
usr/local/bin/gcc

The later is a dynamic link to gcc49, which is in the same directory.

If additional information is necessary, please let me know what is needed and where I can find it, and I’ll retrieve it.

If fixing this is something that strikes most FreeBSD hard core users as obvious or simple, well, please humour me, because it’s not obvious or simple to me. I’m not a FreeBSD newbie, but I’m not an highly experienced power user, either. I know enough about FreeBSD to know that this is likely to require some very involved command line codes, and in my (limited) experience those are inherently dangerous! So I’m not going to try anything until I know exactly what I’m doing.

At any rate, until this little mess is fixed, I’m sort of dead in the water. At least in terms of restoring my system. So any help will be appreciated. If people would rather speak to me in person, my email is RJPugh [at] cyberbard [dot] net. And if I put this question in the wrong forum or sub-forum, well, please accept my heartfelt apologies.

Thank you,


RJPugh
Reply With Quote
  #2   (View Single Post)  
Old 6th April 2017
jb_daefo jb_daefo is offline
Spam Deminer
 
Join Date: May 2008
Posts: 283
Default

How is Culpeper? if I've spelt that right.

To more directly answer your question,

#/bin/sh


export CC=/usr/local/bin/clang39
export CXX=/usr/local/bin/clang++39
export CPP=/usr/local/bin/clang-cpp

IF you can prepend the make with those lines and have that
port installed, it may work for you in some instances. 'export' may
have to be adjusted per your shell.

Maybe other solutions.

All I have time for this morning, sorry! Also sometimes affected
by your Q. for which I have no answer except, usually. Does a
reboot help?
__________________
FreeBSD 12.0-CURRENT
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apached checking its own status? Mantazz FreeBSD Ports and Packages 5 4th August 2010 04:11 AM
checking upgrade worked? carpman FreeBSD Installation and Upgrading 2 6th February 2009 11:37 PM
checking if UIC has KDE plugins available... ccc FreeBSD Ports and Packages 14 14th June 2008 09:36 PM
WARNING: Vulnerability database out of date, checking anyway mfaridi FreeBSD Security 9 8th May 2008 06:13 AM


All times are GMT. The time now is 02:12 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick