CorePlot failed to build in XCode 4.4 - build

I am using CorePlot 0.3, everything was ok until I upgraded XCode to 4.4 (2 days ago), CorePlot failed to build and I got some errors with message:
clang: error: -Z-reserved-lib-stdc++: 'linker' input unused when '-c' is present
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
I have tried to search and it seems there are many people have a same problem, and I also found some suggestions and solution to fix it, I have applied to my CorePlot version but no luck, the issue appear in some classes such as: CPTPlot.m, CPTScatterPlot.m, CPTBarPlot.m, CPTPlotSymbol.m.
I have spending 2 days on this problem but still not able solve it, please help me, thanks in advance.

The latest coreplot will fix your issues with Xcode 4.4 - https://github.com/djw/core-plot
I have not however got those latest changes to work properly in both Xcode 4.4 and Xcode 4.3 so if you are working in teams, different versions, be careful.

I was able to resolve this issue by switching the selected Compiler in Build Options to "LLVM GCC 4.2". It looks like the Validate Settings operation is what is switching the compiler to "Apple LLVM compiler 4.0".

Related

Trying to get CUDA 7.5 to work with GCC 5.x

So, if you try to use nvcc when the system GCC is version 5 and up, you get an "unsupported version" error. But - I've heard people report that they've just commented this out and that CUDA 7.5 "works for them" with GCC 5.x .
When I do the same, however (the check is in $CUDA_DIR/host_config.h), and compile something, I get the following errors:
/usr/lib/gcc/x86_64-redhat-linux/5.3.1/include/mwaitxintrin.h(36): error: identifier "__builtin_ia32_monitorx" is undefined
/usr/lib/gcc/x86_64-redhat-linux/5.3.1/include/mwaitxintrin.h(42): error: identifier "__builtin_ia32_mwaitx" is undefined
and a bunch of others, but those may be dependent on these. Now, these are MMX-related intrinsics for X86 architectures. I don't use them directly, so I'm guessing they're opted-in somehow. Perhaps this can be avoided?
Is there a way to overcome these errors and actually get GCC 5 to coexist with CUDA 7.5? And for code to build and run?
Notes:
I've read a suggestion to use -D__STRICT_ANSI__. I have, and it doesn't seem to help.
I'm on Fedora 22 in case it matters.
I think a -D_MWAITXINTRIN_H_INCLUDED option should fix the issue. Actually I employed a slightly different approach, commenting out the #include <mwaitxintrin.h> line in x86intrin.h, and successfully built TensorFlow with CUDA 7.5 and GCC 5.2.1.
UPDATE
For the latest version of TensorFlow (v0.8.0), simply choose to use gcc 4.x when invoking the configure script.
Consider installing and temporary selecting an older version of the gcc:
apt-get install gcc-4.8
Then update your alternatives:
update-alternatives --remove-all gcc
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10
After compiling TensorFlow you can use previous version of gcc calling above command with proper path to /usr/bin/gcc-5.x.
It's essentially futile to try to get GCC 5.x to work with CUDA 7.5 - there are some (or many?) incompatiblity issues which you simply can't resolve. Instead, just upgrade to CUDA 8.0 which has become available since this question was asked.

Unable to compile openFrameworks

While trying to set up OF on eclipse (linux mint 17), I keep getting the following error :
g++: error: unrecognized command line option ‘-std=c++14’
I cannot find a solution online. I have tried updating my g++, replacing my libs/frameworks/video files with the latest on github, but nothing seems to work.
Though this issue has been closed here, i am unable to solve mine.
Is there a way to change the make file so that it builds successfully?
g++ doesn't support -std=c++14 until 4.9
See (for example) https://askubuntu.com/questions/428198/getting-installing-gcc-g-4-9-on-ubuntu for how to install 4.9 on Ubuntu

Xcode LLVM 5.0 Error -Wunused-command-line-argument-hard-error-in-future

I am getting the following error in Xcode 5.1: clang: error: unknown argument: '-fstack-check' [-Wunused-command-line-argument-hard-error-in-future]
My operating system is OSx Mavericks 10.9.
Any help would be greatly appreciated since this would allow my brother to complete the work for Stanford CS106b. I am aware that this question has been asked before on SO, but I have been unsuccessful after four hours of trying suggestions including:
Adding -fstack-check to the compiler flags under Compile Sources.
Typing export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future" in Terminal
Adding 'ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future' to ~/.bash_profile
Editing Scheme in Xcode, setting ARCHFLAGS to -Wunused-command-line-argument-hard-error-in-future
Adding a .plist file with ARCHFLAGS set to -Wno-error=unused-command-line-argument-hard-error-in-future
All of these attempts have resulted in the same error popping up when I click build. Here is the full error:
clang: error: unknown argument: '-fstack-check' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
clang: error: unknown argument: '-fstack-check' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
Command
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
I will REALLY appreciate a solution since this has been consuming hours of my time, and it will give my brother a productive coding environment. Thanks!!
My guess is that 'fstack-check' isn't compatible with LLVM 5.0. I've tried compiling the C++ projects on XCode 5, XCode 6 beta on both Mavericks and Yosemite to no avail.
Finally I just installed XCode 4.6.3 it compiled without errors with LLVM 4. Just download it from here and it should work fine. Hopefully Stanford does release some updates to their existing libraries so it'll be compatible with the later versions of LLVM.

Error Xcode 5.1 : unknown argument: '-cclib' [-Wunused-command-line-argument-hard-error-in-future]

Today, Apple release iOS 7.1. So, I have to download Xcode 5.1 to build on iOS 7.1. In my code has C language. But when I build, I have an error:
unknown argument: '-cclib' [-Wunused-command-line-argument-hard-error-in-future]
Some one tell : This is a serious problem because several common gcc flags are not supported under clang (most notably -mno-fused-madd)
So, how can I fix that problem, or I have to wait a fix version from Apple?
Answer from OP:
RESOLVED:
I found the answer for this problem. I remove -cclib flag in Build Setting/Other Linker Flag. And no error happen. I think -cclib is not required in clang compiler.
I see some one also have same problem : unknown argument: -fno-obj-arc' [-Wunused-command-line-argument-hard-error-in-future]. Please replace -fno-obj-arc with -fno-objc-arc
I solved this by removing arm64 from my valid architectures in Build Settings.

Stanford Engineering Everywhere CS106B C++ Libraries in XCode 4.6.2

Like many others, I'm taking the CS106B class on iTunes and, although the class is old, I am attempting to use the Stanford C++ libraries that are current. They are found here: http://www.stanford.edu/class/cs106b/.
During the Build Phase of projects, I have inserted into "Link Binary with Libraries" the files "random.h" and "libStanfordCPPlib.a". When I do this, I get the following error messages:
Check dependencies
warning: skipping file '/Users/lewis/Documents/Think Like a Programmer/CS106/VotingSimulation/../../../Programming Abstractions/Assignment 1/Assignment1-xcode/0 - Warmup/StanfordCPPLib/random.h' (unexpected file type 'sourcecode.c.h' in Frameworks & Libraries build phase)
ld: warning: ignoring file /Users/lewis/Documents/Programming Abstractions/Assignment 1/Assignment1-xcode/0 - Warmup/StanfordCPPLib/libStanfordCPPLib.a, file was built for archive which is not the architecture being linked (x86_64): /Users/lewis/Documents/Programming Abstractions/Assignment 1/Assignment1-xcode/0 - Warmup/StanfordCPPLib/libStanfordCPPLib.a
Undefined symbols for architecture x86_64:
"randomChance(double)", referenced from:
_main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using Mac OS X 10.7.5 and XCode 4.6.2. I have set the Build Settings Base SDK to OS X 10.7 for both the Project and the Target.
It appears to me that the "libStanfordCPPlib.a" file may be an archive file that I have to unarchive before I can link the implementation code for the header files. Is this what I need to do, and if so, how do I do it? Am I doing something else wrong in linking the files?
I'm a noob and I'd appreciate help from anyone who has been successful in getting the current Stanford CS106B C++ libraries to work in XCode 4.6.2.
I just ran into this problem myself after upgrading to the newest version of xcode (ver. 5.0, OSX ver. 10.8.5).
Try switching the architecture of the project to 32-bit Intel (i386). The default is "Standard Architectures 64-bit Intel (x86_64)".
I'm currently using xcode 6.4 and trying to work through the cs 106b course work, I had the same issue of not being able to run the sample files and assignment files (can be found here btw http://web.stanford.edu/class/archive/cs/cs106b/cs106b.1136/ ). After changing the Architectures for both the Project and Target to 32-bit-intel as listed above I still received errors. I had to take the additional step of changing the OSX deployment target from 10.10 to 10.8 under the Project info.
This allowed the program to build but I received a notification that i needed to install the Java Runtime Environment, and there was no consult output. Installing this did not resolve the issue. I was only able to fully execute the code after installing the Java Development Kit. I am now able to compile all files for the course.
I hope this update helps more recent attempts to access this info.
I hope you've found an answer to your problem by now, but as I was suffering from a similar problem, trying to get xcode 5.1 to compile Warmup.cpp, I thought I'd post my solution for those others trying to get xcode to work with the cs106b libraries.
After struggling with xcode 5.1.1 and 5.0.2, I downloaded xcode 4.6.3 off of the apple dev site, www.developer.apple.com, and trashed the later versions. After installing 4.6.3, I still got errors, but after switching the Architecures for the Project and for the Target, to "32-bit-Intel", as messysaurus suggests, the warmupp.cpp compiled fine. Trying this same technique with xcode 5.1.1 and 5.0.2 yielded no results.
Hope this helps anyone else running into problems.