[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error compiling for iPhone simulator


On Thu, 2020-06-25 at 18:21 +0000, ahmedyarub@xxxxxxxxx wrote:
> I've compiled the latest master branch to Windows, Android, and other
> platforms successfully using similar parameters. However, when I try
> building on the latest MacOS Catalina (beta) with the latest iOS SDK
> and XCode targeting iPhone simulator, I get the following errors:
> /Users/[USER]/Documents/cpp/libssh/src/buffer.c:158:9: error:
> implicit declaration of function 'explicit_bzero' is invalid in C99 
>     [-Werror,-Wimplicit-function-declaration]       
> explicit_bzero(buffer->data, buffer->allocated);       
> ^/Users/[USER]/Documents/cpp/libssh/src/buffer.c:207:9: error:
> implicit declaration of function 'explicit_bzero' is invalid in C99 
>     [-Werror,-Wimplicit-function-declaration]       
> explicit_bzero(buffer->data, buffer->used);       
> ^/Users/[USER]/Documents/cpp/libssh/src/buffer.c:243:9: error:
> implicit declaration of function 'explicit_bzero' is invalid in C99 
>     [-Werror,-Wimplicit-function-declaration]       
> explicit_bzero(ptr, burn_pos);       
> ^/Users/[USER]/Documents/cpp/libssh/src/buffer.c:268:9: error:
> implicit declaration of function 'explicit_bzero' is invalid in C99 
>     [-Werror,-Wimplicit-function-declaration]       
> explicit_bzero(buffer->data, buffer->allocated);
> I configure CMake using with the following options:cmake -G Xcode
> -DCMAKE_TOOLCHAIN_FILE=~/Documents/ios-cmake/ios.toolchain.cmake
> -DPLATFORM=SIMULATOR64 -DBUILD_SHARED_LIBS=FALSE
> -DCMAKE_INSTALL_PREFIX=/usr/local/iossim64
> -DCMAKE_SYSTEM_PREFIX_PATH=/usr/local/iossim64 -DWITH_MBEDTLS=TRUE
> -DWITH_SERVER=FALSE -DWITH_EXAMPLES=FALSE -DWITH_PCAP=FALSE
> ~/Documents/cpp/libssh
> then build like this:cmake --install . --config Debug-iphonesimulator
> I used similar parameters for compiling other libraries but only
> libssh is giving me this error. I had to use Mbed TLS because I'm
> creating a cross-platform application, and compiling against OpenSSL
> didn't work for me on Android. 

Can you share the build log with a bit more context before the errors?
The explicit_bzero() is not available in OSX if I am right, but it
should be correctly recognized during the configure time and local
implementation from src/misc.c used.

Unfortunately, gitlab does not offer OSX runners in Gitlab CI so we can
not simply test OSX builds as part of CI at this moment.

Regards,
-- 
Jakub Jelen
Senior Software Engineer
Security Technologies
Red Hat, Inc.


Follow-Ups:
Re: Error compiling for iPhone simulator"ahmedyarub@xxxxxxxxx" <ahmedyarub@xxxxxxxxx>
References:
Error compiling for iPhone simulator"ahmedyarub@xxxxxxxxx" <ahmedyarub@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org