Summary: | media-video/x264-encoder-0.0.20151011: Configure fails on endian test with LTO | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | tokiclover <tokiclover> |
Component: | Current packages | Assignee: | Gentoo Media-video project <media-video> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | logankaser, lynx1534 |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=497714 https://code.videolan.org/videolan/x264/-/merge_requests/45 https://bugs.gentoo.org/show_bug.cgi?id=853121 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 618550 | ||
Attachments: |
Shell trace of configure script (with `set -x')
endian-test.patch new endian test patch for media-video/x264-encoder-0.0.20170701 |
Description
tokiclover
2016-05-15 09:15:32 UTC
Oh write... no need to post the `strings' output do I? There is no `BIGE' nor `EGIB' string. I found this in one search/try: --- /* Ref: http://esr.ibiblio.org/?p=5095 */ #include <stdint.h> #define IS_BIG_ENDIAN (*(uint16_t *)"\0\xff" < 0x100) int main(void) { return IS_BIG_ENDIAN; } --- works fine... but I don't know the magic behind it. So, this is not a proper proposal. Still, it's an elegant one-liner test. Cheers. Created attachment 434716 [details, diff]
endian-test.patch
Little configure patch with the previous one-liner endian test.
I get the same error. It is caused by -flto. But fundamentally the reason it fails is that grepping for a string in a binary relies on compiler implementation details of the compiler that it should not rely on. The endian-test.patch from 2016-05-19 is the right way to fix this. It has very low complexity and is easy to verify. It has been here for over a year, yet there has been no action. What is the reason nothing is happening on this bug? (In reply to tokiclover from comment #1) > Oh write... no need to post the `strings' output do I? There is no `BIGE' > nor `EGIB' string. > > I found this in one search/try: > > --- > /* Ref: http://esr.ibiblio.org/?p=5095 */ > #include <stdint.h> > > #define IS_BIG_ENDIAN (*(uint16_t *)"\0\xff" < 0x100) > > int main(void) { return IS_BIG_ENDIAN; } > --- > > works fine... but I don't know the magic behind it. So, this is not a proper > proposal. Still, it's an elegant one-liner test. > > Cheers. I understand how it works, and I see this as a proper proposal. Created attachment 531320 [details, diff]
new endian test patch for media-video/x264-encoder-0.0.20170701
Bug still occurs for me with `amd64-llvm-openrc` with -flto, configure succeeds as soon as -flto is removed. (In reply to Logan Kaser from comment #6) > Bug still occurs for me with `amd64-llvm-openrc` with -flto, configure > succeeds as soon as -flto is removed. I'm surprised that https://code.videolan.org/videolan/x264/-/merge_requests/45 didn't help. (In reply to Sam James from comment #7) > (In reply to Logan Kaser from comment #6) > > Bug still occurs for me with `amd64-llvm-openrc` with -flto, configure > > succeeds as soon as -flto is removed. > > I'm surprised that > https://code.videolan.org/videolan/x264/-/merge_requests/45 didn't help. I can't reproduce the failure with x264-encoder-0.0.20220222. Please include the full build.log. |