[x264-devel] x264 build problem under Mac OS X El Capitan
BugMaster
BugMaster at narod.ru
Fri Apr 15 21:19:07 CEST 2016
On Sat, 16 Apr 2016 02:57:57 +0900, 桃源老師 wrote:
> Hello,
> I'm not sure this list is correct place to post my issue. But please let me try...
> I got error with building x264 using make fprofiled.
> It occurs under Mac OS X El Capitan only. I mean that I have
> confirmed x264 can be build without error under previous version of Mac OS X, Yosemite and Mavericks.
> The error is occurring following line:
> /Applications/Xcode.app/Contents/Developer/usr/bin/make
> CFLAGS="-Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64
> -Wall -I. -I. -D_DARWIN_C_SOURCE -mdynamic-no-pic -arch x86_64
> -std=gnu99 -D_POSIX_C_SOURCE=200112L -D_GNU_SOURCE
> -fomit-frame-pointer -fno-tree-vectorize -fprofile-use"
> LDFLAGS="-m64 -lm -arch x86_64 -lpthread -ldl -fprofile-use"
> gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall
> -I. -I. -D_DARWIN_C_SOURCE -mdynamic-no-pic -arch x86_64 -std=gnu99
> -D_POSIX_C_SOURCE=200112L -D_GNU_SOURCE -fomit-frame-pointer
> -fno-tree-vectorize -fprofile-use -c -o x264.o x264.c
> The error is:
> error: Could not read profile default.profdata: No such file or directory
> I checked x264 source directory and found there are a file named
> "default.profraw". This file is created under Mac OS X El Capitan only.
> After this error, I can generate the file "default.profdata" using the following command:
> $ xcrun llvm-profdata merge -output=default.profdata default.profraw
> And I can build x264 successfully by running make fprofiled again.
> But in my think, this procedure is irregular. The error should not be occurred. Am I right?
> Best Regards,
> // Miya aka. TougenRoushi
Hi. IMHO currently we don't support fprofiled builds with clang (XCode).
We only support use of -fprofile-generate/-fprofile-use options with gcc/clang.
But according to http://clang.llvm.org/docs/UsersManual.html#profiling-with-instrumentation
while clang supports this options they looks like don't really equivalent to their GCC
counterparts. As it looks like they still need intermediate step for converting profiling
data format:
llvm-profdata merge -output=default.profdata default.profraw
As for why it worked in older versions of Mac OS X, than may be used another version of clang
that simply ignored (not supported) -fprofile-generate/-fprofile-use options. Or old versions
more correctly mimicked gcc behaviour and new versions broke this for some reason.
More information about the x264-devel
mailing list