Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install script fails on OS X Yosemite 10.10.1 #3

Closed
lhigueragamboa opened this issue Jan 24, 2015 · 8 comments
Closed

Install script fails on OS X Yosemite 10.10.1 #3

lhigueragamboa opened this issue Jan 24, 2015 · 8 comments

Comments

@lhigueragamboa
Copy link

Hi, I just wanted to install silicon but I got the following error:

CMake Error at /usr/local/Cellar/cmake/3.1.0/share/cmake/Modules/CMakePackageConfigHelpers.cmake:254 (file):
file RELATIVE_PATH must be passed a full path to the file:
Call Stack (most recent call first):
CMakeLists.txt:17 (configure_package_config_file)

The log file CMakeOutput.log does not seem to include useful information.

OS:
OS X Yosemite 10.10.1

clang:
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix

cmake:
cmake version 3.1.0
CMake suite maintained and supported by Kitware (kitware.com/cmake).

@matt-42
Copy link
Owner

matt-42 commented Jan 24, 2015

I do not have OSX but it seems like readlink -f does not work:
http://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac

I updated the install.sh script with an alternative. See a558a8b

Can you tell me whether it fixes your problem or not ?

@lhigueragamboa
Copy link
Author

That did help. Thanks! But it seems that clang does not support "-std=c++14", at least not the version I have. I'm installing a new version, in addition to gcc 4.9. I did some hack with sed to change c++14 into c++1y and that allowed me to install silicon (I will learn cmake to not rely on this).

When I try to compile the example I run into errors, which I suspect are due the same reason, my current clang version not supporting some c++14 features. I'm not going to paste the errors until I test the new version of clang and also gcc 4.9, nonetheless I wanted to share my results so far.

@lhigueragamboa
Copy link
Author

It works with clang++:
clang version 3.7.0
Target: x86_64-apple-darwin14.0.0
Thread model: posix

I have a problem compiling with g++ 4.9.2 related to: https://gcc.gnu.org/gcc-4.9/porting_to.html
Specifically the error is:
/usr/include/c++/4.9.0/cstddef:51:11: error: ‘::max_align_t’ has not been declared
using ::max_align_t;

@matt-42
Copy link
Owner

matt-42 commented Jan 26, 2015

Good to know that it works of OSX. On archlinux it compiles fine with gcc 4.9.2. Did you try to add #include at the very begining of the code?

@lhigueragamboa
Copy link
Author

Yes I did, but it gives me the same error. Actually, I also created an empty main function and just added the relevant #include (header ) at the very beginning of the code, when I compile the program it returns the same error. This makes me think that the error is on me since the gcc workaround isn't working.

I haven't had any chance to investigate this further.

@matt-42
Copy link
Owner

matt-42 commented Feb 2, 2015

Sorry, I just realized that the github formating was hidding the include name. I meant

#include <cstddef>

Did you add this one?

@lhigueragamboa
Copy link
Author

Yes, that was the header I included at the beginning. I didn't realize the name of the header was missing from my comment either, thanks for noticing. If I have the chance I will try again today.

@matt-42 matt-42 changed the title Install script fails Install script fails on OS X Yosemite 10.10.1 Feb 5, 2015
@lhigueragamboa
Copy link
Author

I don't thinks there is an issue with your code but with the compiler. I'm closing this since it is possible to compile and install in OS X provided you use homebrew gcc 4.9.2.

The problem is with clang actually. You can compile silicon with the version of clang that ships with Yosemite iff you modify the std flag to c++1y. Compiling with clang from homebrew (v 3.7.0) gives the following error:

100%] Building CXX object tools/CMakeFiles/iod_generate_symbols.dir/iod_generate_symbols.cc.o
/Users/alfonso/repos/silicon/silicon_build/externals/iod/tools/iod_generate_symbols.cc:89:21: error: implicit instantiation of undefined template
'std::__1::basic_stringstream<char, std::__1::char_traits, std::__1::allocator >'
std::stringstream symbols_content;
^
/usr/local/Cellar/llvm/HEAD/bin/../include/c++/v1/iosfwd:126:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_stringstream;
^
1 error generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants