From a3b736950d56bd8a1799f1d637da3d0b0f5edcde Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Thu, 2 Feb 2023 03:47:44 +0100 Subject: [PATCH 1/4] libvisual: configure.ac: Drop harmful AC_FUNC_MALLOC and AC_FUNC_REALLOC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Link errors for examples on Debian bullseye: > [..] > make[2]: Entering directory '[..]/libvisual/examples' > /bin/bash ../libtool --tag=CC --mode=link gcc -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -O1 -pipe -g -fsanitize=address -fno-omit-frame-pointer -g -fsanitize=address -o simplesdl simplesdl.o -lSDL ../libvisual/libvisual-0.4.la -lm -ldl > libtool: link: gcc -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -O1 -pipe -g -fsanitize=address -fno-omit-frame-pointer -g -fsanitize=address -o .libs/simplesdl simplesdl.o -lSDL ../libvisual/.libs/libvisual-0.4.so -lm -ldl -Wl,-rpath -Wl,[..]/INSTALL_PREFIX/lib > /usr/bin/ld: ../libvisual/.libs/libvisual-0.4.so: undefined reference to `rpl_malloc' > /usr/bin/ld: ../libvisual/.libs/libvisual-0.4.so: undefined reference to `rpl_realloc' > collect2: error: ld returned 1 exit status > [..] Compile error for lv-tool on Debian bullseye: > [..] > make[2]: Entering directory '[..]/libvisual/tools/lv-tool' > [..] > In file included from /usr/include/c++/10/stdlib.h:36, > from /usr/include/SDL/SDL_stdinc.h:40, > from /usr/include/SDL/SDL_main.h:26, > from /usr/include/SDL/SDL.h:30, > from lv-tool.cpp:30: > /usr/include/c++/10/cstdlib:151:11: error: ‘malloc’ has not been declared in ‘::’ > 151 | using ::malloc; > | ^~~~~~ > /usr/include/c++/10/cstdlib:164:11: error: ‘realloc’ has not been declared in ‘::’ > 164 | using ::realloc; > | ^~~~~~~ > In file included from /usr/include/SDL/SDL_stdinc.h:40, > from /usr/include/SDL/SDL_main.h:26, > from /usr/include/SDL/SDL.h:30, > from lv-tool.cpp:30: > /usr/include/c++/10/stdlib.h:65:12: error: ‘malloc’ has not been declared in ‘std’ > 65 | using std::malloc; > | ^~~~~~ > /usr/include/c++/10/stdlib.h:73:12: error: ‘realloc’ has not been declared in ‘std’ > 73 | using std::realloc; > | ^~~~~~~ > [..] --- libvisual/configure.ac | 2 -- 1 file changed, 2 deletions(-) diff --git a/libvisual/configure.ac b/libvisual/configure.ac index 34406ae8f..b8205fe2c 100644 --- a/libvisual/configure.ac +++ b/libvisual/configure.ac @@ -135,8 +135,6 @@ AC_MSG_RESULT($lv_have_gnuc_varargs) AC_C_BIGENDIAN(bigendian=yes, bigendian=no, ) # Checks for library functions. -AC_FUNC_MALLOC -AC_FUNC_REALLOC AC_FUNC_SELECT_ARGTYPES AC_CHECK_FUNCS([gettimeofday usleep nanosleep select memset sqrt strdup strndup sysconf]) From 62a43ba6af4268c4e5aaaed23053415185130274 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Fri, 3 Feb 2023 04:00:54 +0100 Subject: [PATCH 2/4] libvisual: configure.ac: Resolve needless checks for C99 functions --- libvisual/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvisual/configure.ac b/libvisual/configure.ac index b8205fe2c..4c7382e32 100644 --- a/libvisual/configure.ac +++ b/libvisual/configure.ac @@ -136,7 +136,7 @@ AC_C_BIGENDIAN(bigendian=yes, bigendian=no, ) # Checks for library functions. AC_FUNC_SELECT_ARGTYPES -AC_CHECK_FUNCS([gettimeofday usleep nanosleep select memset sqrt strdup strndup sysconf]) +AC_CHECK_FUNCS([gettimeofday usleep nanosleep select strdup strndup sysconf]) AC_CHECK_LIB([dl], [dlsym], [LIBS="-ldl $LIBS"], AC_MSG_WARN([*** You need dlsym() to make use of Libvisual.])) From c5f949cf6242ad3b4f20d5c0e6792dc0e0b9474e Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Thu, 2 Feb 2023 03:46:53 +0100 Subject: [PATCH 3/4] Plugins: configure.ac: Drop harmful AC_FUNC_MALLOC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compile error on Debian bullseye: > [..] > make[4]: Entering directory '[..]/plugins/actor/corona' > /bin/bash ../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../.. -I[..]/include/libvisual-0.4 -O1 -pipe -g -fsanitize=address -fno-omit-frame-pointer -DUNIX_X -D_REENTRANT -MT actor_corona.lo -MD -MP -MF .deps/actor_corona.Tpo -c -o actor_corona.lo actor_corona.cpp > libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../.. -I[..]/include/libvisual-0.4 -O1 -pipe -g -fsanitize=address -fno-omit-frame-pointer -DUNIX_X -D_REENTRANT -MT actor_corona.lo -MD -MP -MF .deps/actor_corona.Tpo -c actor_corona.cpp -fPIC -DPIC -o .libs/actor_corona.o > In file included from /usr/include/c++/10/stdlib.h:36, > from actor_corona.cpp:29: > /usr/include/c++/10/cstdlib:151:11: error: ‘malloc’ has not been declared in ‘::’ > 151 | using ::malloc; > | ^~~~~~ > In file included from actor_corona.cpp:29: > /usr/include/c++/10/stdlib.h:65:12: error: ‘malloc’ has not been declared in ‘std’ > 65 | using std::malloc; > | ^~~~~~ > [..] --- libvisual-plugins/configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/libvisual-plugins/configure.ac b/libvisual-plugins/configure.ac index e2af05843..be6f0aeea 100644 --- a/libvisual-plugins/configure.ac +++ b/libvisual-plugins/configure.ac @@ -51,7 +51,6 @@ dnl 'Standard' header files. AC_CHECK_HEADERS([fcntl.h unistd.h stdlib.h string.h sys/time.h]) dnl Library functions. -AC_FUNC_MALLOC AC_CHECK_FUNCS([floor gettimeofday memmove memset pow sqrt]) AC_CHECK_FUNC([munmap], lv_have_munmap=yes, lv_have_munmap=no) AC_FUNC_MMAP From d4eda886f60fc47a26ae4fcd7d1b6ec69ad60fb3 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Fri, 3 Feb 2023 04:00:19 +0100 Subject: [PATCH 4/4] Plugins: configure.ac: Resolve needless checks for C99 functions --- libvisual-plugins/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvisual-plugins/configure.ac b/libvisual-plugins/configure.ac index be6f0aeea..9bc0e5306 100644 --- a/libvisual-plugins/configure.ac +++ b/libvisual-plugins/configure.ac @@ -51,7 +51,7 @@ dnl 'Standard' header files. AC_CHECK_HEADERS([fcntl.h unistd.h stdlib.h string.h sys/time.h]) dnl Library functions. -AC_CHECK_FUNCS([floor gettimeofday memmove memset pow sqrt]) +AC_CHECK_FUNCS([gettimeofday]) AC_CHECK_FUNC([munmap], lv_have_munmap=yes, lv_have_munmap=no) AC_FUNC_MMAP