#2 Make all failed due to the following error

クローズ
1 年間 前kogisin によって開かれました · 7 コメント
kogisin1 年間 前 にコメントしました

Hi, doublesine.

Appreciate for the time you spent to build this fantastic navicat-keygen. Do you what what causes the following error when building the project?

Information

OS: macOS High Sierra Version 10.13.6 gcc: Apple LLVM version 9.1.0 (clang-902.0.39.2) openssl: LibreSSL 2.2.7

Steps to reproduce

$ git clone -b mac --single-branch https://github.com/DoubleLabyrinth/navicat-keygen.git

$ cd navicat-keygen 
$ make all

g++ -std=c++17 -O2 \
-I./common/ \
-I/usr/local/opt/openssl@1.1/include -L/usr/local/opt/openssl@1.1/lib \
  \
  \
  \
./navicat-patcher/CapstoneDisassembler.cpp ./navicat-patcher/KeystoneAssembler.cpp ./navicat-patcher/Misc.cpp ./navicat-patcher/X64ImageInterpreter.cpp ./navicat-patcher/PatchSolution0.cpp ./navicat-patcher/PatchSolution1.cpp ./navicat-patcher/PatchSolution2.cpp ./navicat-patcher/PatchSolution3.cpp ./navicat-patcher/main.cpp -o ./bin/navicat-patcher -lcrypto -lcapstone -lkeystone -lplist++
In file included from ./navicat-patcher/PatchSolution0.cpp:1:
./navicat-patcher/PatchSolutions.hpp:9:10: fatal error: 'optional' file not found
#include <optional>
         ^~~~~~~~~~
1 error generated.
In file included from ./navicat-patcher/PatchSolution1.cpp:1:
./navicat-patcher/PatchSolutions.hpp:9:10: fatal error: 'optional' file not found
#include <optional>
         ^~~~~~~~~~
1 error generated.
In file included from ./navicat-patcher/PatchSolution2.cpp:1:
./navicat-patcher/PatchSolutions.hpp:9:10: fatal error: 'optional' file not found
#include <optional>
         ^~~~~~~~~~
1 error generated.
In file included from ./navicat-patcher/PatchSolution3.cpp:1:
./navicat-patcher/PatchSolutions.hpp:9:10: fatal error: 'optional' file not found
#include <optional>
         ^~~~~~~~~~
1 error generated.
In file included from ./navicat-patcher/main.cpp:10:
./navicat-patcher/PatchSolutions.hpp:9:10: fatal error: 'optional' file not found
#include <optional>
         ^~~~~~~~~~
1 error generated.
make: *** [patcher] Error 1

Update

I think this has something to do with g++ compiler, which Apple only update clang compiler itself, but not about the standard library libc++. Need to find a way to update missing headers.

g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Hi, doublesine. Appreciate for the time you spent to build this fantastic navicat-keygen. Do you what what causes the following error when building the project? ### Information OS: macOS High Sierra Version 10.13.6 gcc: Apple LLVM version 9.1.0 (clang-902.0.39.2) openssl: LibreSSL 2.2.7 ### Steps to reproduce ``` $ git clone -b mac --single-branch https://github.com/DoubleLabyrinth/navicat-keygen.git $ cd navicat-keygen $ make all g++ -std=c++17 -O2 \ -I./common/ \ -I/usr/local/opt/openssl@1.1/include -L/usr/local/opt/openssl@1.1/lib \ \ \ \ ./navicat-patcher/CapstoneDisassembler.cpp ./navicat-patcher/KeystoneAssembler.cpp ./navicat-patcher/Misc.cpp ./navicat-patcher/X64ImageInterpreter.cpp ./navicat-patcher/PatchSolution0.cpp ./navicat-patcher/PatchSolution1.cpp ./navicat-patcher/PatchSolution2.cpp ./navicat-patcher/PatchSolution3.cpp ./navicat-patcher/main.cpp -o ./bin/navicat-patcher -lcrypto -lcapstone -lkeystone -lplist++ In file included from ./navicat-patcher/PatchSolution0.cpp:1: ./navicat-patcher/PatchSolutions.hpp:9:10: fatal error: 'optional' file not found #include <optional> ^~~~~~~~~~ 1 error generated. In file included from ./navicat-patcher/PatchSolution1.cpp:1: ./navicat-patcher/PatchSolutions.hpp:9:10: fatal error: 'optional' file not found #include <optional> ^~~~~~~~~~ 1 error generated. In file included from ./navicat-patcher/PatchSolution2.cpp:1: ./navicat-patcher/PatchSolutions.hpp:9:10: fatal error: 'optional' file not found #include <optional> ^~~~~~~~~~ 1 error generated. In file included from ./navicat-patcher/PatchSolution3.cpp:1: ./navicat-patcher/PatchSolutions.hpp:9:10: fatal error: 'optional' file not found #include <optional> ^~~~~~~~~~ 1 error generated. In file included from ./navicat-patcher/main.cpp:10: ./navicat-patcher/PatchSolutions.hpp:9:10: fatal error: 'optional' file not found #include <optional> ^~~~~~~~~~ 1 error generated. make: *** [patcher] Error 1 ``` ## Update I think this has something to do with g++ compiler, which Apple only update clang compiler itself, but not about the standard library libc++. Need to find a way to update missing headers. ``` g++ --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 9.1.0 (clang-902.0.39.2) Target: x86_64-apple-darwin17.7.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin ```
Double Sine1 年間 前 にコメントしました
オーナー

<optional> is a header introduced since c++17. Please make sure that your compiler fully supports c++17 standard.

`<optional>` is a header introduced since c++17. Please make sure that your compiler fully supports c++17 standard.
Double Sine1 年間 前 にコメントしました
オーナー

Oh, and by the way, here's a link that may help you.

Oh, and by the way, here's a [link](https://stackoverflow.com/questions/48445191/compile-with-c17-mac) that may help you.
kogisin9 ヶ月 前 にコメントしました
ポスター

Hi @DoubleSine,

Can you help me a little? The last time we had conversation, you stated that make sure that the compiler fully supports c++17 standard. So I searched around and found this https://stackoverflow.com/questions/39091173/how-to-enable-c17-on-mac.

However, it still throws an error. Do you have any idea, why? Does this have to do XCode?

Versions

  • MacOS Catalina (10.15.7)
  • gcc version gcc -v Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/c++/4.2.1 Apple clang version 12.0.0 (clang-1200.0.32.29) Target: x86_64-apple-darwin19.6.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Steps

# Install required libraries
brew install openssl
brew install capstone
brew install keystone
brew install rapidjson
brew install libplist


# Git clone 
git clone -b mac https://notabug.org/doublesine/navicat-keygen.git
cd navicat-keygen
make all

# Build all
$ make all
g++ -std=c++17 -O2 \
-I./common/ \
-I/usr/local/opt/openssl@1.1/include -L/usr/local/opt/openssl@1.1/lib \
  \
  \
  \
./navicat-patcher/CapstoneDisassembler.cpp ./navicat-patcher/KeystoneAssembler.cpp ./navicat-patcher/Misc.cpp ./navicat-patcher/X64ImageInterpreter.cpp ./navicat-patcher/PatchSolution0.cpp ./navicat-patcher/PatchSolution1.cpp ./navicat-patcher/PatchSolution2.cpp ./navicat-patcher/PatchSolution3.cpp ./navicat-patcher/main.cpp -o ./bin/navicat-patcher -lcrypto -lcapstone -lkeystone -lplist++
ld: library not found for -lplist++
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Update

According to google search, Xcode supports C ++17 and XCode 9.3+ is needed, which requires at least MacOS 10.13 on the build machine.

Since I am using MacOS Catalina version (pretty old), I'll upgrade my MacOS to the latest and see if it works.

Hi @DoubleSine, Can you help me a little? The last time we had conversation, you stated that make sure that the compiler fully supports c++17 standard. So I searched around and found this https://stackoverflow.com/questions/39091173/how-to-enable-c17-on-mac. However, it still throws an error. Do you have any idea, why? Does this have to do XCode? ## Versions - MacOS Catalina (10.15.7) - gcc version ``` gcc -v Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/c++/4.2.1 Apple clang version 12.0.0 (clang-1200.0.32.29) Target: x86_64-apple-darwin19.6.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin ``` ## Steps ``` # Install required libraries brew install openssl brew install capstone brew install keystone brew install rapidjson brew install libplist # Git clone git clone -b mac https://notabug.org/doublesine/navicat-keygen.git cd navicat-keygen make all # Build all $ make all g++ -std=c++17 -O2 \ -I./common/ \ -I/usr/local/opt/openssl@1.1/include -L/usr/local/opt/openssl@1.1/lib \ \ \ \ ./navicat-patcher/CapstoneDisassembler.cpp ./navicat-patcher/KeystoneAssembler.cpp ./navicat-patcher/Misc.cpp ./navicat-patcher/X64ImageInterpreter.cpp ./navicat-patcher/PatchSolution0.cpp ./navicat-patcher/PatchSolution1.cpp ./navicat-patcher/PatchSolution2.cpp ./navicat-patcher/PatchSolution3.cpp ./navicat-patcher/main.cpp -o ./bin/navicat-patcher -lcrypto -lcapstone -lkeystone -lplist++ ld: library not found for -lplist++ clang: error: linker command failed with exit code 1 (use -v to see invocation) ``` ## Update According to google search, Xcode supports C ++17 and XCode 9.3+ is needed, which requires at least MacOS 10.13 on the build machine. Since I am using MacOS Catalina version (pretty old), I'll upgrade my MacOS to the latest and see if it works.
kogisin9 ヶ月 前 にコメントしました
ポスター

Oops... someone else already closed this issue.

#8

Oops... someone else already closed this issue. https://notabug.org/doublesine/navicat-keygen/issues/8
kogisin 9 ヶ月 前 に閉じられました
vinurs9 ヶ月 前 にコメントしました

@kogisin could u store password on password now?

@kogisin could u store password on password now?
kogisin9 ヶ月 前 にコメントしました
ポスター

@vinurs What do you mean storing password on password? I had a trouble building binaries due to the compiler issue, but it got resolved by soft linking the required libraries.

@vinurs What do you mean storing password on password? I had a trouble building binaries due to the compiler issue, but it got resolved by soft linking the required libraries.
vinurs9 ヶ月 前 にコメントしました

@kogisin on moacos, my navicat can not store password

@kogisin on moacos, my navicat can not store password
会話に参加するには サインイン してください。
ラベルなし
マイルストーンなし
担当者なし
3 参加者
読み込み中…
キャンセル
保存
まだコンテンツがありません