Cannot install the library

23 views
Skip to first unread message

The Vinh Luong

unread,
Sep 6, 2022, 2:08:12 PM9/6/22
to Crypto++ Users
Hi, I tried to install the library with `make -f GNUmakefile-cross install PREFIX=/Users/luongvinh/cryptopp/ios-i386` on macOS Monterey 12.5.1 after succeeded in building the library for ios-i386 but ends up with the following error
```
Using testing flags: -DNDEBUG -g2 -O3 -fPIC -pipe
c++ -DNDEBUG -g2 -O3 -fPIC -pipe -c aria_simd.cpp
In file included from aria_simd.cpp:9:
In file included from ./pch.h:14:
In file included from ./config.h:22:
In file included from ./config_align.h:27:
In file included from ./config_cxx.h:37:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:506:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string_view:175:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__string:57:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:641:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:60:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string.h:60:15: fatal error: 'string.h' file not found
#include_next <string.h>
              ^~~~~~~~~~
1 error generated.
make: *** [aria_simd.o] Error 1
```
Could you guys help me out? Thanks!

Jeffrey Walton

unread,
Sep 6, 2022, 8:09:07 PM9/6/22
to Crypto++ Users List
It looks like the compiler cannot find its C++ header files.

You may want to take a look at
https://www.cryptopp.com/wiki/IOS_(Command_Line) .

Jeff
Jeff

The Vinh Luong

unread,
Sep 10, 2022, 12:22:07 PM9/10/22
to cryptop...@googlegroups.com
Thank you. After some research, I realized that running `GNUmakefile-cross` with sudo make it cannot read the env variabls which were exported when running `setenv-ios.sh`. This leads to the above error. The solution is to run 'GNUmakefile-cross' without sudo.

--
You received this message because you are subscribed to a topic in the Google Groups "Crypto++ Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cryptopp-users/p2WpV0IH2gU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cryptopp-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/CAH8yC8nHsPhgS0ERgrEXcZo1FAzXcPKL1YLAbgVPhOqaNJw%2B%2Bw%40mail.gmail.com.

The Vinh Luong

unread,
Sep 10, 2022, 2:47:40 PM9/10/22
to cryptop...@googlegroups.com
That's why I think the wiki need to change (https://www.cryptopp.com/wiki/IOS_(Command_Line)), since the `make install` in there is using sudo.

Jeffrey Walton

unread,
Sep 10, 2022, 2:59:06 PM9/10/22
to Crypto++ Users List
On Sat, Sep 10, 2022 at 12:22 PM The Vinh Luong
<ltv.luon...@gmail.com> wrote:
>
> Thank you. After some research, I realized that running `GNUmakefile-cross` with sudo make it cannot read the env variabls which were exported when running `setenv-ios.sh`. This leads to the above error. The solution is to run 'GNUmakefile-cross' without sudo.

You should use `sudo -E` if you need the sudo user's environment.

Jeff

The Vinh Luong

unread,
Sep 11, 2022, 7:37:36 AM9/11/22
to cryptop...@googlegroups.com
That works, thanks Jeff!

--
You received this message because you are subscribed to a topic in the Google Groups "Crypto++ Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cryptopp-users/p2WpV0IH2gU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cryptopp-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages