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

Support for Mac OS X, *BSD, and other libc++ environment #28

Open
SchaichAlonso opened this issue Aug 20, 2023 · 3 comments
Open

Support for Mac OS X, *BSD, and other libc++ environment #28

SchaichAlonso opened this issue Aug 20, 2023 · 3 comments
Labels
c++ C++ code related enhancement New feature or request future Task that has lower priority because there is still much to do.

Comments

@SchaichAlonso
Copy link
Contributor

SchaichAlonso commented Aug 20, 2023

libc++ has started supporting the <ranges> library of c++20, which TinyORM uses, in libc++-13, which is part of llvm-13.

Although libc++-13 has <ranges>, the implementation is incomplete and therefore disabled by default. The incomplete implementation can be enabled by passing the -fexperimental-library option to clang.

While <ranges> support is still incomplete in libc++-15, it is sufficient to build TinyORM's querybuilder and run the querybuilder's test cases w/o detecting flaws.

llvm-16's libc++ has full ranges support, and the -fexperimental-library option is no longer required. All of TinyORM can be built and tests run w/o detecting flaws on libc++-16 (TinyORM d98ee5c on FreeBSD edd0014)

On libc++ systems, the _LIBCPP_VERSION macro can be used to investigate the libc++ version being used, which is not required to be the same as the compiler's and will default to the Operating System's one if a compiler was manually installed. As TinyORM's dependencies link against libc++, care needs to be taken the dependencies use the same libc++ or a compatible version to the one used by TinyORM, making it unfeasible to attempt using a custom libc++ with operating system provided dependencies.

At this point, GitHub offers no hosted runners that are capable of building TinyORM using libc++.

This issue will likely resolve on its' own as Operating Systems update their libc++ in their future releases.

@silverqx silverqx added the enhancement New feature or request label Aug 20, 2023
@silverqx
Copy link
Owner

silverqx commented Aug 20, 2023

I tried libc++ about 2-3 years ago and had trouble compiling simple hello world programs with c++20 features so I decided that I will not support libc++ because it would be a pain. Supporting Clang is pain itself 😵‍💫 with all these concept and constraints bugs, TLS wrapper bugs, unfinished aggregate initialization, or an order of static initialization. Clang has by far the most #ifdef in the code, practically all 🙂

At that time it was Clang 9 or 10 I think? But Clang 16 has rapidly evolved and solved many things, we will see how it will be in the near future.

@silverqx
Copy link
Owner

I know you are talking about libc++ and I'm talking about Clang itself but it shows how deep the problem is, incomplete libc++ is problematic too as you are describing.

@silverqx
Copy link
Owner

All of TinyORM can be built and tests run w/o detecting flaws on libc++-16 (TinyORM d98ee5c on FreeBSD edd0014)

These are good news so there is a good or better chance it can be added to supported platforms.

@silverqx silverqx added the future Task that has lower priority because there is still much to do. label Aug 23, 2023
@silverqx silverqx added the c++ C++ code related label Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ C++ code related enhancement New feature or request future Task that has lower priority because there is still much to do.
Projects
None yet
Development

No branches or pull requests

2 participants