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

MacOSX compilation problem #1166

Open
daszyja opened this issue Nov 9, 2021 · 9 comments
Open

MacOSX compilation problem #1166

daszyja opened this issue Nov 9, 2021 · 9 comments

Comments

@daszyja
Copy link

daszyja commented Nov 9, 2021

Hello, i have problem during OSX compilation process:
otclient/src/framework/util/crypt.cpp:270:13: error: use of undeclared identifier 'n' mpz_mul(n, p, q); ^ 1 error generated. make[2]: *** [CMakeFiles/otclient.dir/src/framework/util/crypt.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/otclient.dir/all] Error 2

I'm using https://github.com/edubart/otclient/wiki/Compiling-on-Mac-OS-X ofc
I got M1 Macbook.

ofc: gmp 6.2.1_1 is already installed and up-to-date

@Jankowsky
Copy link

Same on Intel MacBook.

@marmichalski
Copy link
Contributor

Can you try changing

mpz_mul(n, p, q);

-    mpz_mul(n, p, q);
+    mpz_mul(m_n, m_p, m_q);

@marmichalski
Copy link
Contributor

marmichalski commented Nov 15, 2021

GMP seems to not be working at all anyway. Just install openssl: brew install openssl@1.1 🙄

@Jankowsky
Copy link

Tried already, any improvement

@marmichalski
Copy link
Contributor

Tried already, any improvement

There are a few ways you can get cmake to find openssl on macOS, some of that, but not all, include:

  1. Trying to force link with brew
  2. Manually telling cmake where to look at by setting correct definitions with -D
  3. Symlinking openssl on your own

@Jankowsky
Copy link

Use brew install openssl@1.1 and next this command :
export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"
with this changes in code : mpz_mul(m_n, m_p, m_q);

@marmichalski
Copy link
Contributor

Use brew install openssl@1.1 and next this command : export PATH="/usr/local/opt/openssl@1.1/bin:$PATH" with this changes in code : mpz_mul(m_n, m_p, m_q);

When you are using OpenSSL that part of code is not used. Anyway, it does not fix anything, as GMP integration seems to be broken.

@daszyja
Copy link
Author

daszyja commented Dec 8, 2021

any ideas?

@nickolasdeluca
Copy link

Can you try changing

mpz_mul(n, p, q);

-    mpz_mul(n, p, q);
+    mpz_mul(m_n, m_p, m_q);

this did it for me. thanks!

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

4 participants