LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-16-2016, 09:03 PM   #1
killingthemonkey
Member
 
Registered: Mar 2011
Location: Winston-Salem, NC
Distribution: Fedora, CentOS, Linux Mint
Posts: 203

Rep: Reputation: 20
GCC and OS X - Warning: couldn't understand kern.osversion `14.5.0'


I have a MacBook Pro, early 2015 model. It's sporting an i7, and 8GB of RAM. I am, at the moment, unable to install software. The computer is supplied by my company. I have sudo rights, but that just means they watch me closer.

For my editor, I'll use TextEdit. (Actually, this is a great text editor.) I tried TextWrangler. I didn't enjoy myself at all. Given my choice, I'd use VS Code, but we're back to not being able to install anything.

Native gcc and gcc-4.2 both throw the same warning you see in the title of this thread. I've searched the web and found multiple suggestions. None helped.

Any help will be very appreciated.

EDIT: I am using OS X Yosemite 10.10.5
EDIT Redux: gcc does apparently function. I am receiving a working executable.

Last edited by killingthemonkey; 12-16-2016 at 09:51 PM.
 
Old 12-16-2016, 11:37 PM   #2
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,590

Rep: Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908Reputation: 1908
Quote:
Originally Posted by killingthemonkey View Post
I am, at the moment, unable to install software. The computer is supplied by my company.
Then your company should take care of admin stuff like installing compilers.
 
Old 12-16-2016, 11:45 PM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,237

Rep: Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656Reputation: 1656
You should talk to your administrator about getting things installed on your company laptop. I don't suggest trying to circumvent their security practices. You might be fired.
 
Old 12-17-2016, 12:18 AM   #4
killingthemonkey
Member
 
Registered: Mar 2011
Location: Winston-Salem, NC
Distribution: Fedora, CentOS, Linux Mint
Posts: 203

Original Poster
Rep: Reputation: 20
I'm not trying to circumvent anything. At the moment, this is my only computer. I'm working my way through a book on C, on my own. gcc is already installed. Apparently, it also works. It's creating executables. I'm trying to understand the warning and turn it off.

If I was trying to circumvent the security settings on the MacBook, I'd just install xCode 6.4 from the Apple Developer Download site. I have the rights to do it. I just want to use the native gcc and not have the annoying warning pop up each time I compile.
 
Old 12-17-2016, 02:10 AM   #5
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_12{.0|.1}
Posts: 5,573
Blog Entries: 11

Rep: Reputation: 3588Reputation: 3588Reputation: 3588Reputation: 3588Reputation: 3588Reputation: 3588Reputation: 3588Reputation: 3588Reputation: 3588Reputation: 3588Reputation: 3588
Depending on the build environment, you may be able to simply pass it -W to inhibit all warnings per GCC Options to Request or Suppress Warnings. From that page:

Quote:
Warnings are diagnostic messages that report constructions that are not inherently erroneous but that are risky or suggest there may have been an error.
GCC warnings are common and largely advisory, so if it produces a working binary you are probably safe ignoring it.

I also found this post which quiets the same warning with an environment variable, export MACOSX_DEPLOYMENT_TARGET=10.9. It is for Yosimite 14.0.0 so I have no idea whether the value would be the same for yours, but you can probably answer that easily enough by further search.

Disclaimer: I am not a Mac user so temper my notes above with your own frst-person knowledge!

Last edited by astrogeek; 12-17-2016 at 02:30 AM. Reason: Shortened thought...
 
Old 12-17-2016, 01:31 PM   #6
killingthemonkey
Member
 
Registered: Mar 2011
Location: Winston-Salem, NC
Distribution: Fedora, CentOS, Linux Mint
Posts: 203

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by astrogeek
export MACOSX_DEPLOYMENT_TARGET=10.9
Fixed it.

Quote:
Originally Posted by astrogeek
Disclaimer: I am not a Mac user so temper my notes above with your own frst-person knowledge.
No, but you are a *nix user, and apparently more skilled at Google than myself.

(In truth, I saw a similar post, but tried to implement it incorrectly.)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
runtest error: Couldn't find library file gcc-dg.exp stark_moris Linux - General 6 09-23-2010 02:20 AM
Why couldn't the gcc(version4.3.3) be used to compile the gcc(version3.3.2)? snc Linux - Newbie 6 01-24-2010 11:26 AM
I couldn't understand HUP exper Linux - Software 3 06-14-2005 12:12 PM
is it possible that hardware support decreased from kern 2.4 to 2.6? (and other kern servnov Linux - Newbie 3 11-11-2004 04:59 PM
Redhat couldn't understand 2nd hardisk bicblue Linux - Laptop and Netbook 2 03-17-2004 11:47 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration