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

Add macOS support #1

Closed
fungos opened this issue Nov 22, 2017 · 7 comments
Closed

Add macOS support #1

fungos opened this issue Nov 22, 2017 · 7 comments

Comments

@fungos
Copy link
Owner

fungos commented Nov 22, 2017

A missing wanted feature is support to macOS, at the current moment I don't have access to a Mac, but will try to get this done one way or another.

@denji
Copy link

denji commented Nov 28, 2017

https://docs.travis-ci.com/user/reference/osx/

@pamarcos
Copy link

pamarcos commented Dec 4, 2017

I have inspected briefly the code and I think porting to macOS should be pretty easy. It's a matter of replacing the ELF-related stuff with Mach-O. I have actually tried to compile this for macOS but got the following error when running python fips build:

fips-googletest/gtest/include/gtest/internal/gtest-port.h:495:13: fatal error: 'tr1/tuple' file not found
#   include <tr1/tuple>
            ^~~~~~~~~~~
1 error generated.

Doing a quick search it seems that's something fixed in GTest quite some time ago to support newer compilers. This is my current compiler in macOS High Sierra 10.13.1:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.38)
Target: x86_64-apple-darwin17.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I can still try to build everything else, but wanted to let you know that you may need to update the sources for GTest at https://github.com/fungos/fips-googletest to support macOS

@denji
Copy link

denji commented Dec 4, 2017

https://github.com/fungos/fips-googletest/blob/03ae580/gtest/include/gtest/internal/gtest-port.h#L432-L500

libc++ has no support for tr1, since that is not part of the C++11 standard.
All of std::tr1 (with the exception of some esoteric math functions), is now just in “std::”

@pamarcos
Copy link

pamarcos commented Dec 4, 2017

Yes, my understanding is that in order to use tuple before it was standardized in C++11 you needed to use the tr prefix, in a similar way that you need to use experimental for filesystem now. The issue is that the GTest header used in https://github.com/fungos/fips-googletest is quite old and prior to the point where typle was already in std

@denji
Copy link

denji commented Dec 4, 2017

GTest header used in https://github.com/fungos/fips-googletest is quite old and prior to the point where typle was already in std

Yes they are quite old they do not contain instructions for LLVM/Clang compatibility (only MSC & GCC).

@fungos
Copy link
Owner Author

fungos commented Dec 4, 2017

I don't expect it being harder than a couple of hours, as it you've pointed it being more a question of Mach-O and maybe some issue with the signal handling.

I'll take a look at upgrading fips-googletest then, thanks for the early research to both of you.

A next step will be to ifdef-out linux specific things (mostly the state transfer stuff) and try to get it at least compiling on travis osx.

UPDATE: fips-googletest is up-to-date, it should work now. You should delete your local one, then when generating the cr solution it should fetch the new one.

@seanpaultaylor
Copy link

Would love to also have MacOS support!

@fungos fungos closed this as completed in c687084 Nov 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants