package/fakedate: fix libcec build error
PATCH 1/1 package/fakedate: fix libcec build error
This defconfig breaks building libcec:
BR2_x86_64=y
BR2_REPRODUCIBLE=y
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_LIBCEC=y
with this error message:
In file included from /home/bernd/buildroot/output/build/libcec-4.0.2/src/libcec/CECClient.cpp:34:0:/home/bernd/buildroot/output/build/libcec-4.0.2/src/libcec/env.h:92:19: warning: missing terminating " character
#define LIB_INFO ("git revision: 2017.11+950-973b1fd, compiled on date: Warning: using $SOURCE_DATE_EPOCH instead of true time
The warning emitted by fakedate adds a line break to the output of the date command. This output is stored by libcec configure into env.h to be compiled into the resulting binary:
https://github.com/Pulse-Eight/libcec/blob/master/src/libcec/cmake/SetBuildInfo.cmake#L29
src/libcec/env.h contains these two lines:
#define LIB_INFO ("git revision: 2017.11+950-973b1fd~dirty, compiled on date: Warning: using $SOURCE_DATE_EPOCH instead of true time Wed Jan 31 19:32:08 UTC 2018 by user at machine on Linux 4.14.16-amd64 (x86_64), features: P8_USB, DRM")
Removing the warning from fakedate fixes the build error.
--- package/fakedate/fakedate | 1 - 1 file changed, 1 deletion(-)
package/fakedate/fakedate +0 -1
@@ -43,7 +43,6 @@ if [ -n "$SOURCE_DATE_EPOCH" ]; then fi done if [ $FORCE_EPOCH -eq 1 ]; then - echo "date: Warning: using \$SOURCE_DATE_EPOCH instead of true time" >&2 ARGS="-d @$SOURCE_DATE_EPOCH" fi fi
Signature · 1 line
2.11.0
PATCH 1/1 package/fakedate: fix libcec build error
Quoted 38 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Bernd" == Bernd Kuhls <[email protected]> writes:
This defconfig breaks building libcec:
BR2_x86_64=y
BR2_REPRODUCIBLE=y
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_LIBCEC=ywith this error message:
In file included from
/home/bernd/buildroot/output/build/libcec-4.0.2/src/libcec/CECClient.cpp:34:0:/home/bernd/buildroot/output/build/libcec-4.0.2/src/libcec/env.h:92:19: warning: missing terminating " character
#defineLIB_INFO("git revision: 2017.11+950-973b1fd, compiled on date: Warning: using $SOURCE_DATE_EPOCH instead of true timeThe warning emitted by fakedate adds a line break to the output of the date command. This output is stored by libcec configure into
env.hto be compiled into the resulting binary:https://github.com/Pulse-Eight/libcec/blob/master/src/libcec/cmake/SetBuildInfo.cmake#L29
src/libcec/env.hcontains these two lines:#define
LIB_INFO("git revision: 2017.11+950-973b1fd~dirty, compiled on date: Warning: using $SOURCE_DATE_EPOCH instead of true time Wed Jan 31 19:32:08 UTC 2018 by user at machine on Linux 4.14.16-amd64 (x86_64), features:P8_USB, DRM")Removing the warning from fakedate fixes the build error.
Signed-off-by Bernd Kuhls <[email protected]>--- package/fakedate/fakedate | 1 - 1 file changed, 1 deletion(-)package/fakedate/fakedate +0
-0
package/fakedate/fakedate if [ -n "$SOURCE_DATE_EPOCH" ]; then · line 46
Quoted 5 lines
package/fakedate/fakedate +0
-1@@ -43,7 +43,6 @@ if [ -n "$SOURCE_DATE_EPOCH" ]; then fi done if [ $FORCE_EPOCH -eq 1 ]; then - echo "date: Warning: using \$SOURCE_DATE_EPOCH instead of true time" >&2 ARGS="-d @$SOURCE_DATE_EPOCH"
Hmm, it is a pity that exec_program also grabs stderr.
I'm not sure if we should really get rid of the warning, but OK - I cannot think of other simple solutions.
There seems to be a lof of things in that cmake file breaking reproducible builds though (hostname, username, uname), so maybe the real fix is to make these things optional and disable when BR2_REPRODUCIBLE is enabled.
Signature · 1 line
Bye, Peter Korsgaard