Coder Social home page Coder Social logo

Add macOS support about cr HOT 7 CLOSED

fungos avatar fungos commented on July 23, 2024 1
Add macOS support

from cr.

Comments (7)

seanpaultaylor avatar seanpaultaylor commented on July 23, 2024 2

Would love to also have MacOS support!

from cr.

denji avatar denji commented on July 23, 2024 1

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

from cr.

pamarcos avatar pamarcos commented on July 23, 2024

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

from cr.

denji avatar denji commented on July 23, 2024

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::”

from cr.

pamarcos avatar pamarcos commented on July 23, 2024

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

from cr.

denji avatar denji commented on July 23, 2024

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).

from cr.

fungos avatar fungos commented on July 23, 2024

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.

from cr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.