> RE: > ffmpeg-4.4 > > DJGPP CROSS COMPILER, GCC v12.2.0 > link <https://github.com/andrewwutw/build-djgpp>
link <https://ffmpeg.org/platform.html#DOS> > > host > macbook pro, macOS Monterey > "DJGPP Cross Compiler 12.2.0 Fails to Recognize Parameters in FFmpeg Source Code" Hi, I am using the DJGPP cross compiler 12.2.0, to build the FFmpeg source code, and it's failing to recognize certain parameters and the script I used to build FFmpeg SRC follows: #!/usr/bin/env bash # Path to DJGPP cross compiler export DJGPP_PREFIX="/Users/owner/djcc" # export DJGPP_PREFIX=${DJGPP_PREFIX-/Users/owner/djcc} export DJGPP_PREFIX2=${DJGPP_PREFIX2-/Users/owner/ffcc} # export DJGPP_PREFIX3=${DJGPP_PREFIX3-/Users/owner/Documents/DOSBox/NET/watt} # system path export PATH="$DJGPP_PREFIX/bin:$PATH" # Your cross compilation target TARGET_ARCH="$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp" # set C_INCLUDE_PATH environment variable export C_INCLUDE_PATH="#DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include" # Download FFmpeg source code FFMPEG_VERSION="4.4" FFMPEG_ARCHIVE="https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.gz" FFMPEG_SOURCE_DIR="ffmpeg-${FFMPEG_VERSION}" # Download FFmpeg source echo "Downloading FFmpeg source..." wget -c "$FFMPEG_ARCHIVE" || exit 1 tar -xf "ffmpeg-${FFMPEG_VERSION}.tar.gz" || exit 1 cd "$FFMPEG_SOURCE_DIR" || exit 1 # clean debri gmake clean # Redirect both stdout and stderr to separate .err files exec > >(tee -ia gcca.txt) 2> >(tee -ia gcc_err.err >&2) # Configure FFmpeg for cross-compilation echo "Configuring FFmpeg for cross-compilation..." ./configure --enable-cross-compile \ --prefix="$DJGPP_PREFIX2" \ --target-os=ms-dos \ --arch=i486 \ --cross-prefix="$TARGET_ARCH-" \ --extra-cflags="-I$DJGPP_PREFIX/i586-pc-msdosdjgpp/sys-include -I$DJGPP_PREFIX/include -I$DJGPP_PREFIX3/inc2 -I$DJGPP_PREFIX3/inc3" \ --extra-ldflags="-L$DJGPP_PREFIX/i586-pc-msdosdjgpp/lib -L$DJGPP_PREFIX/lib -L$DJGPP_PREFIX3/lib2 -L$DJGPP_PREFIX3/lib3" \ --enable-debug \ --disable-shared \ --enable-static \ --disable-doc \ --disable-programs \ || exit 1 # Compile a hello world program for testing echo "Compiling hello world program for testing..." cat > helloai.c <<EOF #include <stdio.h> int main() { printf("Hello, world!\\n"); return 0; } EOF "$TARGET_ARCH-gcc" helloai.c -o helloai || exit 1 # Compile FFmpeg echo "Compiling FFmpeg..." gmake CC="$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp-gcc" || exit 1 # gmake install || exit 1 echo "Compilation complete." ******* The following 36 issues surfaced compiling FFmpeg DJGPP 'make' cross compile, stating, "error: declaration for parameter 'XX_XXXX_XX_XXXX' but no such parameter:". " 1) 'ff_log_net_error' 2) 'ff_socket' 3) 'ff_http_match_no_proxy' 4) 'ff_listen_connect' 5) 'ff_accept' 6) 'ff_listen' 7) 'ff_listen_bind' 8) 'ff_is_multicast_address' 9) 'ff_gai_strerror' 10)'ff_getnameinfo' 11) 'ff_freeaddrinfo' 12) 'ff_getaddrinfo' 13) 'sockaddr_union' 14) 'ff_network_sleep_interruptible' 15) 'ff_network_wait_fd_timeout' 16) 'ff_network_wait_fd' 17) 'ff_tls_deinit' 18) 'ff_tls_init' 19) 'ff_network_close' 20) 'ff_network_init' 21) 'ff_socket_nonblock' 22) 'ff_connect_parallel' 23) 'ff_log_net_error' 24) 'ff_socket' 25) 'ff_http_match_no_proxy' 26) 'ff_listen_connect' 27) 'ff_accept' 28) 'ff_listen' 29)'ff_listen_bind' 30) 'ff_is_multicast_address' 31) 'ff_gai_strerror' 32) 'ff_getnameinfo' 33) 'ff_freeaddrinfo' 34) 'ff_getaddrinfo' 35) 'sockaddr_union' 36) 'ff_network_sleep_interruptible' " **** The 'no such parameter', observed in 'libavformat/network.h', has now shown up in '/libavformat/avio.c': " libavformat/avio.c:57:23: error: declaration for parameter 'options' but no such parameter libavformat/avio.c:64:15: error: declaration for parameter 'ffurl_context_class' but no such parameter " Therefore, please explain the root cause . . . *** // libavformat/avio.c #include "libavutil/avstring.h" #include "libavutil/dict.h" #include "libavutil/opt.h" #include "libavutil/time.h" #include "libavutil/avassert.h" #include "os_support.h" #include "avformat.h" #include "internal.h" #if CONFIG_NETWORK #include "network.h" #endif #include "url.h" /** @name Logging context. */ /*@{*/ static const char *urlcontext_to_name(void *ptr) { URLContext *h = (URLContext *)ptr; if (h->prot) return h->prot->name; else return "NULL"; } static void *urlcontext_child_next(void *obj, void *prev) { URLContext *h = obj; if (!prev && h->priv_data && h->prot->priv_data_class) return h->priv_data; return NULL; } #define OFFSET(x) offsetof(URLContext,x) #define E AV_OPT_FLAG_ENCODING_PARAM #define D AV_OPT_FLAG_DECODING_PARAM static const AVOption options[] = { // L57:23 {"protocol_whitelist", "List of protocols that are allowed to be used", OFFSET(protocol_whitelist), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D }, {"protocol_blacklist", "List of protocols that are not allowed to be used", OFFSET(protocol_blacklist), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D }, {"rw_timeout", "Timeout for IO operations (in microseconds)", offsetof(URLContext, rw_timeout), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_DECODING_PARAM }, { NULL } }; const AVClass ffurl_context_class = { // L64:15 .class_name = "URLContext", .item_name = urlcontext_to_name, .option = options, .version = LIBAVUTIL_VERSION_INT, .child_next = urlcontext_child_next, #if FF_API_CHILD_CLASS_NEXT .child_class_next = ff_urlcontext_child_class_next, #endif .child_class_iterate = ff_urlcontext_child_class_iterate, }; /*@}*/ _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".