Discussion:
make error after envsetup.sh
(too old to reply)
UniCav
2018-11-16 19:41:18 UTC
Permalink
I'm trying to set up my source and environment to build, but I've come upon
an odd issue that completely breaks it.
I've tested this on both a Debian Stretch system (where I was building
other linux kernels before) and an Ubuntu 18.04 system.
As soon as you run . build/envsetup.sh you can no longer access most of
make's options.
After (twice now) going through all the prerequisites to install packages,
set up the build environment, getting the source with repo sync, and then
running the envsetup.sh script, which outputs the include lines.
Running lunch android_x86_64-userdebug works and prints out the .config
Now the trouble starts ... running

$ make -C kernel O=$OUT/obj/kernel ARCH=x86 menuconfig

results in "Unknown option: -C"

Running make -v spits out the same error - "Unknown option: -v"
Now running it as sudo or root gives you version info with no issues. I've
gone through this twice between the systems, reinstalled all the packages,
syncing the repo, setting up the environment.
Every time BEFORE I run the envsetup script, I could config and build
kernels fine as non-root. I could run make -v and get version.
BUT as soon as that script is run you're screwed and you can't access any
of make's options unless you sudo or su
and we're not supposed to run any of this as root ... so what the heck?
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
UniCav
2018-11-16 20:46:38 UTC
Permalink
EDIT: Have discovered that above the android-x86 directory - i.e. $HOME, I
can run make normally, and make -v give me version info. But the build
commands have to be run inside the android-x86 top directory.
Something must be wrong inside the tree.
This is the oreo-x86 repo
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Don Quijote
2018-11-18 18:57:08 UTC
Permalink
I've also discovered, that the make -C doesn't work anymore with the oreo
branch. Here's what I do (using Kubuntu 18.04):


1. cd into [android-x86-folder]/kernel
2. "make xconfig" (this starts a Qt kernel config program. You can also
try "make menuconfig" or "make gconfig". You may also need to install some
packages before that)
3. Manually load "/arch/x86/configs/android-x86_64_defconfig"
4. Do all my changes
5. Hit save, the changes get saved to ".config" in the kernel folder
6. Copy the ".config"-file to /arch/x86/configs/myownconfig
7. Type "make mrproper" in the kernel folder
8. cd ..
9. export LC_ALL=C
10. . build/envsetup.sh
11. lunch
12. make -j4 iso_img TARGET_KERNEL_CONFIG=myownconfig
Post by UniCav
EDIT: Have discovered that above the android-x86 directory - i.e. $HOME, I
can run make normally, and make -v give me version info. But the build
commands have to be run inside the android-x86 top directory.
Something must be wrong inside the tree.
This is the oreo-x86 repo
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
UniCav
2018-11-19 18:42:35 UTC
Permalink
Chih-Wei that was very helpful and I was able to get menuconfig by
invoking the /usr/bin/make directly.
Don thank you as well that would also have gotten me up and going.
I have run menuconfig and tweaked a few options, trying a compile and iso
build now - fingers crossed!

Now that I have a .config built in /out/target/product/x86_64/obj/kernel,
can you guys clarify for the the command to build that kernel and iso
without
That's because since AOSP Oreo it overrode the make common by a shell
alias in envsetup.sh. You can still invoke the original make command by
/usr/bin/make (or the full path in your distro)
Post by UniCav
EDIT: Have discovered that above the android-x86 directory - i.e. $HOME,
I can run make normally, and make -v give me version info. But the build
commands have to be run inside the android-x86 top directory.
Something must be wrong inside the tree.
This is the oreo-x86 repo
--
You received this message because you are subscribed to the Google Groups
"Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
UniCav
2018-11-19 19:31:51 UTC
Permalink
Error during build:
[ 4% 4195/102296] Lex: applypatch <= bootable/recovery/edify/lexer.ll
FAILED: out/target/product/x86_64/obj/STATIC_LIBRARIES/
libedify_intermediates/lexer.cpp
/bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39
-oout/target/product/x86_64/obj/STATIC_LIBRARIES/libedify_intermediates/lexer.cpp
bootable/recovery/edify/lexer.ll"
flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt <
(sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))'
failed.
Aborted (core dumped)
ninja: build stopped: subcommand failed.
13:27:48 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
Post by UniCav
Chih-Wei that was very helpful and I was able to get menuconfig by
invoking the /usr/bin/make directly.
Don thank you as well that would also have gotten me up and going.
I have run menuconfig and tweaked a few options, trying a compile and iso
build now - fingers crossed!
Now that I have a .config built in /out/target/product/x86_64/obj/kernel,
can you guys clarify for the the command to build that kernel and iso
without
That's because since AOSP Oreo it overrode the make common by a shell
alias in envsetup.sh. You can still invoke the original make command by
/usr/bin/make (or the full path in your distro)
Post by UniCav
EDIT: Have discovered that above the android-x86 directory - i.e. $HOME,
I can run make normally, and make -v give me version info. But the build
commands have to be run inside the android-x86 top directory.
Something must be wrong inside the tree.
This is the oreo-x86 repo
--
You received this message because you are subscribed to the Google
Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
UniCav
2018-11-19 20:03:46 UTC
Permalink
Sorry over posting on this. If I'd followed Don's advice to start with I
probably wouldn't have seen this error.
specifically
export LC_ALL=C


has been reported for causing this error.
now that that's been done and starting build again, we'll see what happens
next :)
Post by UniCav
[ 4% 4195/102296] Lex: applypatch <= bootable/recovery/edify/lexer.ll
FAILED: out/target/product/x86_64/obj/STATIC_LIBRARIES/
libedify_intermediates/lexer.cpp
/bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39
-oout/target/product/x86_64/obj/STATIC_LIBRARIES/libedify_intermediates/lexer.cpp
bootable/recovery/edify/lexer.ll"
flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt <
(sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))'
failed.
Aborted (core dumped)
ninja: build stopped: subcommand failed.
13:27:48 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
Post by UniCav
Chih-Wei that was very helpful and I was able to get menuconfig by
invoking the /usr/bin/make directly.
Don thank you as well that would also have gotten me up and going.
I have run menuconfig and tweaked a few options, trying a compile and iso
build now - fingers crossed!
Now that I have a .config built in /out/target/product/x86_64/obj/kernel,
can you guys clarify for the the command to build that kernel and iso
without
That's because since AOSP Oreo it overrode the make common by a shell
alias in envsetup.sh. You can still invoke the original make command by
/usr/bin/make (or the full path in your distro)
Post by UniCav
EDIT: Have discovered that above the android-x86 directory - i.e.
$HOME, I can run make normally, and make -v give me version info. But the
build commands have to be run inside the android-x86 top directory.
Something must be wrong inside the tree.
This is the oreo-x86 repo
--
You received this message because you are subscribed to the Google
Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
UniCav
2018-11-19 21:07:04 UTC
Permalink
Still getting the error. For some reason the build script is insisting on
using /prebuilts/misc/linux-x86/flex/flex-2.5.39 which seems to have the
problems with locale.
flex on Ubuntu 18.04 is 2.6.4 which shouldn't have the issue
And setting LC_ALL=C does not work as in tons of threads on the error.
On first run this failed at 4%, this time at 8%, not sure why it made it
that far this time.
Still searching for answers
Post by UniCav
Sorry over posting on this. If I'd followed Don's advice to start with I
probably wouldn't have seen this error.
specifically
export LC_ALL=C
has been reported for causing this error.
now that that's been done and starting build again, we'll see what happens
next :)
Post by UniCav
[ 4% 4195/102296] Lex: applypatch <= bootable/recovery/edify/lexer.ll
FAILED: out/target/product/x86_64/obj/STATIC_LIBRARIES/
libedify_intermediates/lexer.cpp
/bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39
-oout/target/product/x86_64/obj/STATIC_LIBRARIES/libedify_intermediates/lexer.cpp
bootable/recovery/edify/lexer.ll"
flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt <
(sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))'
failed.
Aborted (core dumped)
ninja: build stopped: subcommand failed.
13:27:48 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
Post by UniCav
Chih-Wei that was very helpful and I was able to get menuconfig by
invoking the /usr/bin/make directly.
Don thank you as well that would also have gotten me up and going.
I have run menuconfig and tweaked a few options, trying a compile and
iso build now - fingers crossed!
Now that I have a .config built in
/out/target/product/x86_64/obj/kernel, can you guys clarify for the the
command to build that kernel and iso without
That's because since AOSP Oreo it overrode the make common by a shell
alias in envsetup.sh. You can still invoke the original make command by
/usr/bin/make (or the full path in your distro)
Post by UniCav
EDIT: Have discovered that above the android-x86 directory - i.e.
$HOME, I can run make normally, and make -v give me version info. But the
build commands have to be run inside the android-x86 top directory.
Something must be wrong inside the tree.
This is the oreo-x86 repo
--
You received this message because you are subscribed to the Google
Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Don Quijote
2018-11-19 21:26:24 UTC
Permalink
Try that (a little bit redundant, could use less steps, but anyway):

Delete with sudo rights everything in /usr/lib/locale
Force a reinstall of the "locales" and "locales-all" packages
Run "sudo dpkg-reconfigure locales" and select your language
Run "sudo locale-gen --purge"
It should now regenerate all locale files.

Then restart the system, and do the procedure again: export LC_ALL=C,
envsetup.sh, lunch and make
Post by UniCav
Still getting the error. For some reason the build script is insisting on
using /prebuilts/misc/linux-x86/flex/flex-2.5.39 which seems to have the
problems with locale.
flex on Ubuntu 18.04 is 2.6.4 which shouldn't have the issue
And setting LC_ALL=C does not work as in tons of threads on the error.
On first run this failed at 4%, this time at 8%, not sure why it made it
that far this time.
Still searching for answers
Post by UniCav
Sorry over posting on this. If I'd followed Don's advice to start with I
probably wouldn't have seen this error.
specifically
export LC_ALL=C
has been reported for causing this error.
now that that's been done and starting build again, we'll see what
happens next :)
Post by UniCav
[ 4% 4195/102296] Lex: applypatch <= bootable/recovery/edify/lexer.ll
FAILED: out/target/product/x86_64/obj/STATIC_LIBRARIES/
libedify_intermediates/lexer.cpp
/bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39
-oout/target/product/x86_64/obj/STATIC_LIBRARIES/libedify_intermediates/lexer.cpp
bootable/recovery/edify/lexer.ll"
flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt <
(sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))'
failed.
Aborted (core dumped)
ninja: build stopped: subcommand failed.
13:27:48 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
Post by UniCav
Chih-Wei that was very helpful and I was able to get menuconfig by
invoking the /usr/bin/make directly.
Don thank you as well that would also have gotten me up and going.
I have run menuconfig and tweaked a few options, trying a compile and
iso build now - fingers crossed!
Now that I have a .config built in
/out/target/product/x86_64/obj/kernel, can you guys clarify for the the
command to build that kernel and iso without
That's because since AOSP Oreo it overrode the make common by a shell
alias in envsetup.sh. You can still invoke the original make command by
/usr/bin/make (or the full path in your distro)
Post by UniCav
EDIT: Have discovered that above the android-x86 directory - i.e.
$HOME, I can run make normally, and make -v give me version info. But the
build commands have to be run inside the android-x86 top directory.
Something must be wrong inside the tree.
This is the oreo-x86 repo
--
You received this message because you are subscribed to the Google
Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it,
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
UniCav
2018-11-19 22:22:35 UTC
Permalink
Came with the the same error at 8%
Wonder if there isn't some way to make it use new flex version?
Just for good measure I'll run through another apt update and upgrade,
force reinstall of the locales again, sync the repo and try it one more
time, but this is really odd that it won't keep the locale straight through
a compile.
Post by Don Quijote
Delete with sudo rights everything in /usr/lib/locale
Force a reinstall of the "locales" and "locales-all" packages
Run "sudo dpkg-reconfigure locales" and select your language
Run "sudo locale-gen --purge"
It should now regenerate all locale files.
Then restart the system, and do the procedure again: export LC_ALL=C,
envsetup.sh, lunch and make
Post by UniCav
Still getting the error. For some reason the build script is insisting on
using /prebuilts/misc/linux-x86/flex/flex-2.5.39 which seems to have the
problems with locale.
flex on Ubuntu 18.04 is 2.6.4 which shouldn't have the issue
And setting LC_ALL=C does not work as in tons of threads on the error.
On first run this failed at 4%, this time at 8%, not sure why it made it
that far this time.
Still searching for answers
Post by UniCav
Sorry over posting on this. If I'd followed Don's advice to start with I
probably wouldn't have seen this error.
specifically
export LC_ALL=C
has been reported for causing this error.
now that that's been done and starting build again, we'll see what
happens next :)
Post by UniCav
[ 4% 4195/102296] Lex: applypatch <= bootable/recovery/edify/lexer.ll
FAILED: out/target/product/x86_64/obj/STATIC_LIBRARIES/
libedify_intermediates/lexer.cpp
/bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39
-oout/target/product/x86_64/obj/STATIC_LIBRARIES/libedify_intermediates/lexer.cpp
bootable/recovery/edify/lexer.ll"
flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt
< (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))'
failed.
Aborted (core dumped)
ninja: build stopped: subcommand failed.
13:27:48 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
Post by UniCav
Chih-Wei that was very helpful and I was able to get menuconfig by
invoking the /usr/bin/make directly.
Don thank you as well that would also have gotten me up and going.
I have run menuconfig and tweaked a few options, trying a compile and
iso build now - fingers crossed!
Now that I have a .config built in
/out/target/product/x86_64/obj/kernel, can you guys clarify for the the
command to build that kernel and iso without
That's because since AOSP Oreo it overrode the make common by a shell
alias in envsetup.sh. You can still invoke the original make command by
/usr/bin/make (or the full path in your distro)
Post by UniCav
EDIT: Have discovered that above the android-x86 directory - i.e.
$HOME, I can run make normally, and make -v give me version info. But the
build commands have to be run inside the android-x86 top directory.
Something must be wrong inside the tree.
This is the oreo-x86 repo
--
You received this message because you are subscribed to the Google
Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it,
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
UniCav
2018-11-19 19:32:35 UTC
Permalink
Thanks that got me going
That's because since AOSP Oreo it overrode the make common by a shell
alias in envsetup.sh. You can still invoke the original make command by
/usr/bin/make (or the full path in your distro)
Post by UniCav
EDIT: Have discovered that above the android-x86 directory - i.e. $HOME,
I can run make normally, and make -v give me version info. But the build
commands have to be run inside the android-x86 top directory.
Something must be wrong inside the tree.
This is the oreo-x86 repo
--
You received this message because you are subscribed to the Google Groups
"Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...