Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 945159 - media-video/mplayer-1.5_p20241125 - In function 'm_property_flag_ro': m_property.c:267:24: error: implicit declaration of function 'strdup'; did you mean 'strcmp'?
Summary: media-video/mplayer-1.5_p20241125 - In function 'm_property_flag_ro': m_prope...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2024-11-27 21:47 UTC by ernsteiswuerfel
Modified: 2025-01-19 02:05 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (ppc64, 1.5_p20241125) (mplayer-1.5_p20241125:20241127-212908.log,22.75 KB, text/plain)
2024-11-27 21:47 UTC, ernsteiswuerfel
Details
emerge --info (file_945159.txt,6.73 KB, text/plain)
2024-11-27 21:51 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2024-11-27 21:47:44 UTC
Created attachment 912326 [details]
build.log (ppc64, 1.5_p20241125)

1.5_p20241125 builds fine on glibc but fails on musl:

[...]
powerpc64-unknown-linux-musl-gcc -MMD -MP -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=c11 -D_ISOC99_SOURCE -I. -Iffmpeg -Os -pipe -mcpu=970 -mtune=970 -maltivec -mabi=altivec -fno-tree-vectorize -fno-asynchronous-unwind-tables -maltivec -mabi=altivec -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DPIC -D_REENTRANT -D_REENTRANT -I/usr/include/dvdcss -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DZLIB_CONST -I/usr/include/dvdcss -c -o command.o command.c
powerpc64-unknown-linux-musl-gcc -MMD -MP -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=c11 -D_ISOC99_SOURCE -I. -Iffmpeg -Os -pipe -mcpu=970 -mtune=970 -maltivec -mabi=altivec -fno-tree-vectorize -fno-asynchronous-unwind-tables -maltivec -mabi=altivec -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DPIC -D_REENTRANT -D_REENTRANT -I/usr/include/dvdcss -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DZLIB_CONST -I/usr/include/dvdcss -c -o m_property.o m_property.c
m_property.c: In function 'm_property_flag_ro':
m_property.c:267:24: error: implicit declaration of function 'strdup'; did you mean 'strcmp'? [-Wimplicit-function-declaration]
  267 |         *(char**)arg = strdup((var > prop->min) ? MSGTR_Enabled : MSGTR_Disabled);
      |                        ^~~~~~
      |                        strcmp
m_property.c:267:22: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  267 |         *(char**)arg = strdup((var > prop->min) ? MSGTR_Enabled : MSGTR_Disabled);
      |                      ^
m_property.c: In function 'm_property_string_ro':
m_property.c:382:42: error: pointer/integer type mismatch in conditional expression [-Wint-conversion]
  382 |         *(char**)arg = str ? strdup(str) : NULL;
      |                                          ^
make: *** [Makefile:729: m_property.o] Error 1
 * ERROR: media-video/mplayer-1.5_p20241125::gentoo failed (compile phase):


Same on ppc/musl.
Comment 1 ernsteiswuerfel archtester 2024-11-27 21:51:01 UTC
Created attachment 912327 [details]
emerge --info
Comment 2 Felix Janda 2025-01-19 02:05:51 UTC
Adding "append-flags -D_XOPEN_SOURCE" to src_configure works for me.