Re: Build error

493 views
Skip to first unread message
Message has been deleted

Chih-Wei Huang

unread,
Aug 31, 2016, 12:24:08 AM8/31/16
to Android-x86
2016-08-31 3:24 GMT+08:00 Ronit Sajeey <i7l...@gmail.com>:
> Here's my error:
>
> external/mesa/src/compiler/nir/nir.h:42:10: fatal error: 'nir_opcodes.h'
> file not found

Full build log, please.
(upload it to Google Drive or pastebin.com, etc)


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Ye Roger

unread,
Aug 31, 2016, 1:09:42 AM8/31/16
to Android-x86
That's because libmesa_nir is not built. I don't know the root cause in the Makefile. The workaround is you can build it separately and build the image again.
$ make libmesa_nir

Chih-Wei Huang

unread,
Aug 31, 2016, 2:24:38 AM8/31/16
to Android-x86
2016-08-31 13:09 GMT+08:00 Ye Roger <shug...@gmail.com>:
> That's because libmesa_nir is not built. I don't know the root cause in the
> Makefile.

That's why I asked full build log.
We need to find what dependency is missing
and fix it.
Message has been deleted

Chih-Wei Huang

unread,
Sep 1, 2016, 2:37:44 AM9/1/16
to Android-x86
2016-08-31 23:41 GMT+08:00 Ronit Sajeey <i7l...@gmail.com>:
> Here's my full build log: http://pastebin.com/Gzxrirtr

Very strange.
I cannot reproduce this issue.
Nor I can find any dependency flaw in
the makefiles of mesa.

The following commands demo how the dependency work.
By explicitly removing st_glsl_to_nir.o,
the generated nir_opcodes.h and libmesa_nir object files,
then build 32-bit libmesa_st_mesa.a directly.
The build system correctly calculates the dependency
to generate nir_opcodes.h first then st_glsl_to_nir.o
and libmesa_st_mesa.a.

In short, there is nothing wrong in the makefiles.
Indeed you are the only one who encountered the issue.
I suspect you have something wrong in
your build environment.

cwhuang@icm01:~/git/nougat-x86$ rm -rf
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_nir_intermediates/
out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_nir_intermediates/
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/state_tracker/st_glsl_to_nir.o

cwhuang@icm01:~/git/nougat-x86$ m -j32 showcommands
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/libmesa_st_mesa.a============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.0
TARGET_PRODUCT=android_x86_64
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=x86_64
TARGET_ARCH_VARIANT=x86_64
TARGET_CPU_VARIANT=
TARGET_2ND_ARCH=x86
TARGET_2ND_ARCH_VARIANT=x86
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.13.0-40-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NRD90M
OUT_DIR=out
============================================
make: Entering directory `/home/cwhuang/git/android-x86-7.0'
Running kati to generate build-android_x86_64.ninja...
out/host/linux-x86/bin/ckati --ninja --ninja_dir=out
--ninja_suffix=-android_x86_64 --regen --ignore_dirty=out/%
--no_ignore_dirty= --ignore_optional_include=out/%.P
--detect_android_echo --use_find_emulator -f build/core/main.mk
--gen_all_targets BUILDING_WITH_NINJA=true SOONG_ANDROID_MK=
No need to regenerate ninja file
Starting build with ninja
export NINJA_STATUS="[%p %s/%t] " && source out/env-android_x86_64.sh
&& out/host/linux-x86/bin/makeparallel --ninja
prebuilts/ninja/linux-x86/ninja
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/libmesa_st_mesa.a
-C . -f out/build-android_x86_64.ninja "-v"
ninja: Entering directory `.'
[ 1% 3/238] /bin/bash -c "(mkdir -p
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_nir_intermediates/
&& rm -f out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_nir_intermediates/export_includes.tmp
) && (for d in
out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_nir_intermediates/nir
external/mesa/src/compiler/nir; do echo \"-I \$d\" >>
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_nir_intermediates/export_includes.tmp;
done ) && (if cmp -s
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_nir_intermediates/export_includes.tmp
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_nir_intermediates/export_includes
; then rm
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_nir_intermediates/export_includes.tmp
; else mv
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_nir_intermediates/export_includes.tmp
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_nir_intermediates/export_includes
; fi )"
[ 2% 5/238] /bin/bash -c "(mkdir -p
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/
&& rm -f out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/import_includes
) && (for f in out/target/product/x86_64/obj_x86/SHARED_LIBRARIES/libdrm_intermediates/export_includes
out/target/product/x86_64/obj_x86/SHARED_LIBRARIES/libc++_intermediates/export_includes
out/target/product/x86_64/obj_x86/SHARED_LIBRARIES/libdl_intermediates/export_includes
out/target/product/x86_64/obj_x86/SHARED_LIBRARIES/libc_intermediates/export_includes
out/target/product/x86_64/obj_x86/SHARED_LIBRARIES/libm_intermediates/export_includes
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_nir_intermediates/export_includes
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/export_includes
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_sse41_intermediates/export_includes
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_program_intermediates/export_includes;
do cat \$f >>
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/import_includes;
done )"

[ 14% 34/238] /bin/bash -c "python
external/mesa/src/compiler/nir/nir_opcodes_h.py
external/mesa/src/compiler/nir/nir_opcodes.py >
out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_nir_intermediates/nir/nir_opcodes.h"
<=== nir_opcodes.h is generated!!

[ 14% 35/238] /bin/bash -c "python
external/mesa/src/compiler/nir/nir_builder_opcodes_h.py
external/mesa/src/compiler/nir/nir_opcodes.py >
out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_nir_intermediates/nir/nir_builder_opcodes.h"

...(skipped)

[ 99% 236/238] /bin/bash -c "(PWD=/proc/self/cwd
prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++ -I
external/mesa/src/mapi -I external/mesa/src/mesa/main -I
external/mesa/src/compiler/nir -I external/mesa/src/gallium/auxiliary
-I external/mesa/src/gallium/include -I
out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/main
-I external/mesa/src -I external/mesa/include -I
external/mesa/src/mesa -I
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_st_mesa_intermediates
-I out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_st_mesa_intermediates
-I libnativehelper/include/nativehelper \$(cat
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/import_includes)
-isystem system/core/include -isystem system/media/audio/include
-isystem hardware/libhardware/include -isystem
hardware/libhardware_legacy/include -isystem hardware/ril/include
-isystem libnativehelper/include -isystem frameworks/native/include
-isystem frameworks/native/opengl/include -isystem
frameworks/av/include -isystem frameworks/base/include -isystem
out/target/product/x86_64/obj/include -isystem
bionic/libc/arch-x86/include -isystem bionic/libc/include -isystem
bionic/libc/kernel/uapi -isystem bionic/libc/kernel/common -isystem
bionic/libc/kernel/uapi/asm-x86 -isystem bionic/libm/include -isystem
bionic/libm/include/i387 -c -fno-exceptions -Wno-multichar -O2
-Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2
-Wstrict-aliasing=2 -ffunction-sections -fno-short-enums
-fstrict-aliasing -funwind-tables -fstack-protector-strong -m32
-no-canonical-prefixes -march=prescott -msse4 -msse4.1 -msse4.2
-DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self
-Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor
-Werror=address -Werror=sequence-point -Werror=date-time -O2 -g
-fno-strict-aliasing -DNDEBUG -UDEBUG
-D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion
-Wno-reserved-id-macro -Wno-format-pedantic
-Wno-unused-command-line-argument -fcolor-diagnostics -nostdlibinc
-msse3 -target i686-linux-android
-Bprebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/bin
-mstackrealign -Wsign-promo -Wno-inconsistent-missing-override
-nostdlibinc -fno-rtti -Wno-unused-parameter -Wno-date-time
-Wno-pointer-arith -Wno-missing-field-initializers
-Wno-initializer-overrides -Wno-mismatched-tags
-DPACKAGE_VERSION=\\\"12.1.0-devel\\\"
-DPACKAGE_BUGREPORT=\\\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\\\"
-DANDROID_VERSION=0x0700 -D__STDC_CONSTANT_MACROS
-D__STDC_LIMIT_MACROS -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS
-DHAVE___BUILTIN_FFSLL -DHAVE_FUNC_ATTRIBUTE_FLATTEN
-DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_FORMAT
-DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE___BUILTIN_CTZ
-DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL
-DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL
-DHAVE___BUILTIN_UNREACHABLE -DHAVE_PTHREAD=1 -DHAVE_DLOPEN
-DTEXTURE_FLOAT_ENABLED -fvisibility=hidden -Wno-sign-compare
-DHAVE_LLVM=0x0308 -DMESA_LLVM_VERSION_PATCH=0
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-DHAVE_LIBDRM -fPIC -DUSE_SSE41
-DDEFAULT_DRIVER_DIR=\\\"/system/lib/dri\\\" -D_USING_LIBCXX
-std=gnu++14 -std=c++11 -Wno-error=non-virtual-dtor
-Wno-non-virtual-dtor -Werror=int-to-pointer-cast
-Werror=pointer-to-int-cast -Werror=address-of-temporary
-Werror=null-dereference -Werror=return-type -MD -MF
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/state_tracker/st_glsl_to_nir.d
-o out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/state_tracker/st_glsl_to_nir.o
external/mesa/src/mesa/state_tracker/st_glsl_to_nir.cpp ) && (cp
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/state_tracker/st_glsl_to_nir.d
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/state_tracker/st_glsl_to_nir.P;
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e
's/\$/ :/' < out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/state_tracker/st_glsl_to_nir.d
>> out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/state_tracker/st_glsl_to_nir.P;
rm -f out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/state_tracker/st_glsl_to_nir.d
)"
external/mesa/src/mesa/state_tracker/st_glsl_to_nir.cpp:237:57:
warning: suggest braces around initialization of subobject
[-Wmissing-braces]
nir_lower_wpos_ytransform_options wpos_options = {0};
^
{}
1 warning generated. ===> 32-bit st_glsl_to_nir.o is built correctly.
Message has been deleted

Paul

unread,
Sep 9, 2016, 1:44:58 AM9/9/16
to Android-x86
I had this exact same error on a clean build of the nougat-x86 branch on Ubuntu 16.04 LTS 64-bit.  After the build was interrupted by the error, I ran the three rm commands and then built libmesa_st_mesa.a as suggested. I restarted the built and it went to completion.

FWIW, I was having the same problem with building the marshmallow-x86 branch. Since Nougat is now building, I haven't tried this workaround on marshmallow, but I suspect it will work there as well.

LMK if I can help with the diagnosis of this.


On Friday, September 2, 2016 at 2:02:02 AM UTC-4, Ronit Sajeey wrote:
It seems like the issue has been resolved when running these commands from your post:

rm -rf out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_nir_intermediates/ 
rm -rf out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_nir_intermediates/ 
rm -rf out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/state_tracker/st_glsl_to_nir.o
m -j32 showcommands out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/libmesa_st_mesa.a

But now there's another "file not found" issue: {Full build log} = http://pastebin.com/2S6myuLk

Also, can you list all of the packages that you used to build nougat-x86? I have followed Google's "Establishing a Build Environment" page, but there are some packages missing. (like Mako, and other stuff which I had to un-officially install it from somewhere else)

Ye Roger

unread,
Jan 5, 2017, 11:51:06 PM1/5/17
to Android-x86
When I do a clean build on marshmallow-x86 branch today, this happen again on the ubuntu 12.04, but not on the ubuntu 14.04. It seems this is related to the build environment. All workaround can help to complete the build, but I haven't figured the root cause.


Nassar Mahmood

unread,
Mar 1, 2017, 10:24:03 PM3/1/17
to Android-x86
On Friday, 6 January 2017 04:51:06 UTC, Ye Roger wrote:
> When I do a clean build on marshmallow-x86 branch today, this happen again on the ubuntu 12.04, but not on the ubuntu 14.04. It seems this is related to the build environment. All workaround can help to complete the build, but I haven't figured the root cause.

I did a clean build as well, including nuking my CCACHE dir.
I got this issue as well, fixed by deleting the STATIC intermediates and doing 'm libmesa_nir' before resuming.
My environment is a trusty docker container with all of aosp pre-reqs running on xenial.
Until the clean had no issues like this for over 2 months.
Reply all
Reply to author
Forward
0 new messages