Summary: | media-video/vlc: fails compilation with Atlivec support (video_chroma/i420_yuy2.c:213:13: error: implicit declaration of function ‘vec_ld’ [-Werror=implicit-function-declaration]) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Josh Cantwell <cantwell.josh> |
Component: | Current packages | Assignee: | Gentoo Media-video project <media-video> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | PPC64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 870412 | ||
Attachments: |
Build log
emerge --info config log file Config.log |
Description
Josh Cantwell
2022-12-09 22:47:12 UTC
Please include the full build.log (and config.log) as attachments without truncation. Please also run 'emerge --info' and include its output in a comment here. Created attachment 841191 [details]
Build log
Build log showing error during compilation
Created attachment 841193 [details]
emerge --info
output of emerge --info
Created attachment 841195 [details]
config log file
config log file I hope
I've attached the requested files. ../doltlibtool --tag=CC --mode=compile powerpc64-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DMODULE_STRING=\"$(p="audio_filter/converter/libaudio_format_plugin_la-format.lo"; p="${p##*/}"; p="${p#lib }"; p="${p%_plugin*}"; p=$(echo "$p"|sed 's/-/_/g'); p="${p%.lo}"; echo "$p")\" -D__PLUGIN__ -I./access -I./codec -I../include -I../include -O2 -pipe -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith - Wvolatile-register-var -Wformat -Wformat-security -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Werror-implicit-function-declaration -Winit-self -Wlogical-op -Wshadow=local -fvisibility=hidden -c -o audio_filter/converter/libaudio_format_plugin_la-format.lo `test -f 'audio_filter/converter/format.c' || echo './'`audio_filter/converter/format.c ../doltlibtool --tag=CC --mode=compile powerpc64-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DMODULE_STRING=\"$(p="video_chroma/libi420_yuy2_altivec_plugin_la-i420_yuy2.lo"; p="${p##*/}"; p="${p#lib}" ; p="${p%_plugin*}"; p=$(echo "$p"|sed 's/-/_/g'); p="${p%.lo}"; echo "$p")\" -D__PLUGIN__ -I./access -I./codec -DMODULE_NAME_IS_i420_yuy2_altivec -I../include -I../include -O2 -pipe -Wall -Wextra -Wsign- compare -Wundef -Wpointer-arith -Wvolatile-register-var -Wformat -Wformat-security -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Werror-implicit-function-declaration -Winit-self -Wlogical-op -Wsha dow=local -fvisibility=hidden -c -o video_chroma/libi420_yuy2_altivec_plugin_la-i420_yuy2.lo `test -f 'video_chroma/i420_yuy2.c' || echo './'`video_chroma/i420_yuy2.c video_chroma/i420_yuy2.c: In function ‘I420_YUY2’: video_chroma/i420_yuy2.c:213:13: error: implicit declaration of function ‘vec_ld’ [-Werror=implicit-function-declaration] 213 | u_vec = vec_ld( 0, p_u ); p_u += 16; \ | ^~~~~~ video_chroma/i420_yuy2.c:239:17: note: in expansion of macro ‘VEC_LOAD_UV’ 239 | VEC_LOAD_UV( ); | ^~~~~~~~~~~ video_chroma/i420_yuy2.c:213:13: error: incompatible types when assigning to type ‘__vector unsigned char’ {aka ‘__vector(16) unsigned char’} from type ‘int’ 213 | u_vec = vec_ld( 0, p_u ); p_u += 16; \ | ^~~~~~ video_chroma/i420_yuy2.c:239:17: note: in expansion of macro ‘VEC_LOAD_UV’ 239 | VEC_LOAD_UV( ); | ^~~~~~~~~~~ video_chroma/i420_yuy2.c:214:13: error: incompatible types when assigning to type ‘__vector unsigned char’ {aka ‘__vector(16) unsigned char’} from type ‘int’ 214 | v_vec = vec_ld( 0, p_v ); p_v += 16; | ^~~~~~ video_chroma/i420_yuy2.c:239:17: note: in expansion of macro ‘VEC_LOAD_UV’ 239 | VEC_LOAD_UV( ); | ^~~~~~~~~~~ video_chroma/i420_yuy2.c:240:28: error: implicit declaration of function ‘vec_mergeh’ [-Werror=implicit-function-declaration] 240 | VEC_MERGE( vec_mergeh ); | ^~~~~~~~~~ [...] (In reply to Josh Cantwell from comment #4) > Created attachment 841195 [details] > config log file > > config log file I hope This isn't config.log -- can you attach /var/tmp/portage/media-video/vlc-3.0.18/work/vlc-3.0.18/config.log? Created attachment 841201 [details]
Config.log
configure:32405: checking for altivec.h configure:32405: powerpc64-unknown-linux-gnu-gcc -c -O2 -pipe -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -Wformat -Wformat-security -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Werror-implicit-function-declaration -Winit-self -Wlogical-op -Wshadow=local -fvisibility=hidden conftest.c >&5 In file included from conftest.c:190: /usr/lib/gcc/powerpc64-unknown-linux-gnu/11.3.0/include/altivec.h:34:2: error: #error Use the "-maltivec" flag to enable PowerPC AltiVec support 34 | #error Use the "-maltivec" flag to enable PowerPC AltiVec support | ^~~~~ configure:32405: $? = 1 (In reply to Sam James from comment #9) > configure:32405: checking for altivec.h > configure:32405: powerpc64-unknown-linux-gnu-gcc -c -O2 -pipe -Wall -Wextra > -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -Wformat > -Wformat-security -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes > -Werror-implicit-function-declaration -Winit-self -Wlogical-op > -Wshadow=local -fvisibility=hidden conftest.c >&5 > In file included from conftest.c:190: > /usr/lib/gcc/powerpc64-unknown-linux-gnu/11.3.0/include/altivec.h:34:2: > error: #error Use the "-maltivec" flag to enable PowerPC AltiVec support > 34 | #error Use the "-maltivec" flag to enable PowerPC AltiVec support > | ^~~~~ > configure:32405: $? = 1 I saw that however -maltivec has been supplied. This error occurs when __VEC__ or __ALIVEC__ hasn't been defined. The assumption is that passing -maltivec to the compiler will define one of these two symbols. I've been looking into this an in the file i420_yuy2.c in modules/video_chroma during the includes this #if fails: #if defined (MODULE_NAME_IS_i420_yuy2_altivec) && defined(HAVE_ALTIVEC_H) # include <altivec.h> #endif Looking at the above #if, we can see it is composed of a definition check for MODULE_NAME_IS_i420_yuy2_altivec and a definition check for HAVE_ALTIVEC_H. I think I have found the cause of HAVE_ALTIVEC_H not being included: the definition for HAVE_ALTIVEC_H fails as when ./configure is run (which generates config.h), there are a pair of lines in config.h commented out which are as follows: /* Define to 1 if you have the <altivec.h> header file. */ /* #undef HAVE_ALTIVEC_H */ I can only assume that the ./configure script looks for altivec.h, fails to find it and does not generate the symbol HAVE_ALTIVEC_H therefore causing the compilation of i420_yuy2.c to fail. By manually modifying config.h to defin HAVE_ALTIVEC_H, the preprocessor finds HAVE_ALTIVEC_H when looking at i420_yuy2.c therefore leaving the only issue now to be the definition check for MODULE_NAME_IS_i420_yuy2_altivec. This is puzzling as on my x86-64 machine the same line of code does not reference MODULE_NAME_IS_i420_yuy2_altivec but instead looks for the definition of PLUGIN_ALTIVEC yet the source code came from the same source. Either way neither PLUGIN_ALTIVEC or MODULE_NAME_IS_i420_yuy2_altivec are defined on the PowerPC machine., i'm currently looking into it. This definition for PLUGIN_ALTIVEC/MODULE_NAME_IS_i420_yuy2_altivec comes from the Makefile.am at line 60. on my x86-64 it looks like this: 58) # AltiVec 59) libi420_yuy2_altivec_plugin_la_SOURCES = video_chroma/i420_yuy2.c video_chroma/i420_yuy2.h 60) libi420_yuy2_altivec_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DPLUGIN_ALTIVEC on my PowerPC it looks like this: 58) # AltiVec 59) libi420_yuy2_altivec_plugin_la_SOURCES = video_chroma/i420_yuy2.c video_chroma/i420_yuy2.h 60) libi420_yuy2_altivec_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \ 61) -DMODULE_NAME_IS_i420_yuy2_altivec (In reply to Josh Cantwell from comment #10) > (In reply to Sam James from comment #9) > > configure:32405: checking for altivec.h > > configure:32405: powerpc64-unknown-linux-gnu-gcc -c -O2 -pipe -Wall -Wextra > > -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -Wformat > > -Wformat-security -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes > > -Werror-implicit-function-declaration -Winit-self -Wlogical-op > > -Wshadow=local -fvisibility=hidden conftest.c >&5 > > In file included from conftest.c:190: > > /usr/lib/gcc/powerpc64-unknown-linux-gnu/11.3.0/include/altivec.h:34:2: > > error: #error Use the "-maltivec" flag to enable PowerPC AltiVec support > > 34 | #error Use the "-maltivec" flag to enable PowerPC AltiVec support > > | ^~~~~ > > configure:32405: $? = 1 > > I saw that however -maltivec has been supplied. This error occurs when > __VEC__ or __ALIVEC__ hasn't been defined. The assumption is that passing > -maltivec to the compiler will define one of these two symbols. -maltivec was not supplied during conftest, which is why it fails to #include <altivec.h>, which is why HAVE_ALTIVEC_H is not defined. There should probably be something in the ebuild to add "-maltivec" when USE= contains cpu_flags_ppc_altivec. |