Re: Cannot install the library

Jeffrey Walton <[email protected]> Sat, 10 Sep 2022 14:58:43 -0400
Newsgroups gmane.comp.encryption.cryptopp
Message-ID <CAH8yC8ms9+edxWZKkZdxOkvXzXmkucTt8zVKbva22fcHts2KHQ@mail.gmail.com>
On Sat, Sep 10, 2022 at 12:22 PM The Vinh Luong
<[email protected]> 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

> On Wed, Sep 7, 2022 at 7:09 AM Jeffrey Walton <[email protected]> wrote:
>>
>> On Tue, Sep 6, 2022 at 2:08 PM The Vinh Luong
>> <[email protected]> wrote:
>> >
>> > 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!
>>
>> 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

-- 
You received this message because you are subscribed to the Google Groups "Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/CAH8yC8ms9%2BedxWZKkZdxOkvXzXmkucTt8zVKbva22fcHts2KHQ%40mail.gmail.com.