-
Notifications
You must be signed in to change notification settings - Fork 62
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
Fail to build on MacOS #143
Comments
I reinstall clatexmath, and the full log is here: (still with the same error it seems)
|
Can you send me the whole log? (apparently I'd assume the problem is, that meson is probably picking a wrong compiler / compiler version and doesn't have that std::not_fn symbol. |
@sp1ritCS I have the same problem. Here are the logs: https://gist.github.com/AndreKoepke/da1b67c33c229a1c6c23f5ac13027641 |
Thanks. I'm currently don't have access to my computer that has the OSX VM I've been testing against (however the VM also runs an outdated version of OSX, so things might have changed anyway). I'm not able to reproduce the issue on linux with clang++, so apple must have changed something. Are you able to compile the following piece of code? #include <string>
#include <iostream>
#include <ostream>
#include <functional>
#include <algorithm>
#if (__cplusplus >= 201703L) || (defined(_MSC_VER) && defined(_HAS_CXX17) && _HAS_CXX17)
#define CLATEX_CXX17 1
#else
#define CLATEX_CXX17 0
#endif
inline std::string& ltrim(std::string& s) {
#if CLATEX_CXX17
s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not_fn<int(int)>(isspace)));
#else
s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::cref<int(int)>(isspace))));
#endif
return s;
}
int main(void) {
std::string body = " padded string";
std::cout << ltrim(body) << std::endl;
} using the each of the following commands clang++ <filename>.cpp
clang++ -std=c++14 <filename>.cpp
clang++ -std=c++17 <filename>.cpp
clang++ -std=c++20 <filename>.cpp and tell me which ones work and which ones fail? |
I've wrote a patch (https://gist.github.com/sp1ritCS/14c0cc891918d58e1af00622f64ee08a) that should fix these issues for now. You might be able to reinstall notekit now (not quite sure). I'm really unhappy with homebrew rn, maybe moving to macports (or simply static linking notekit together) might be a better option. |
Thanks for your effort. :)
c++17 and c++20 fails. How can I tryout the fix? I only used |
I presume with the same reason cLaTeXMath fails?
you probably just want to rerun the same command, given that it has been unable to install it previously. If that doesn't work try installing clatexmath (from HEAD) first (brew install --HEAD sp1ritCS/tap/clatexmath) and then run the install notekit command. EDIT: I don't quite know if homebrew will fetch the latest revision of my tap automatically, you might have to do this manualy. I'm not quite sure of the location, but try running |
Installing notekit neither clatexmath doesn't work. With clatexmath, I got this:
The path is |
great to hear the generated error is really wierd tho. Almost like the preprocessor lexer failing or something 🤷🏻♂️ . I wouldn't know what the issue might be here. |
Fails differently now: #158 |
Hi! I got this error caused by clatexmath package when building on macos:
How can I fix this? Thanks!
The text was updated successfully, but these errors were encountered: