Error building `aidl`

I’m trying to build a ROM using @harvey186’s builde.sh script from [HOWTO] Build /e/ without docker for non LineageOS supported devices

The build is consistently failing while creating the build tools. It fails with the following error message

[  1% 675/34789] Lex: aidl <= system/tools/aidl/aidl_language_l.ll
FAILED: /bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -o/srv/src/NOUGAT/out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_l.cpp system/tools/aidl/aidl_language_l.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

Can anyone give me a clue where to start trying to solve the problem?

Thanks.

The builde.sh isn’t working anymore. I thought I have added a commend in that post.
Better using this way

And which locale is active on your build environment?

I’ve now read that post again and looked at the scripts. I have more idea of what the scripts are doing, and why. I’ll move on to those next time I try to build.

Before I do, I have a couple of questions.

  1. If I’m buiding a ‘normal’ ROM, with all the standard system apps, then I should use 161.sh, and use 1312.sh for a minimal customised ROM?
  2. Using 1312.sh, what is the format of entries in the personal apps section? Do you have an example?

Thanks

PS My locale is UK English

I know, I have seen this error before and it has something to do with the locale of your system. But I can’t find the post with the solution / which locale is needed. Could you try with us_utf8 ?I will search and I hope I will finde the related post

try this: export LC_ALL=C you can put it in script, or cmd line.

1 Like

Ah, yes, that’s what I was looking for. Thx @andrelam

Thanks. That seemed to do the trick. The build has got past building aidl, so I’ll go out for the rest of the day, and look forward to finding a ROM waiting for me when I get home :slight_smile:

2 Likes

Failed at 87%
Full error message is at https://pastebin.com/u2P0utvY
The important bits seem to be
Building with Jack: /srv/src/NOUGAT/out/target/common/obj/APPS/Dialer_intermediates/with-local/classes.dex FAILED: /bin/bash -c "(rm -f /srv/src/NOUGAT/out/target/common/obj/APPS/Dialer_intermediates/with-local/classes.dex ) && (rm -f /srv/src/NOUGAT/out/target/common/obj/APPS/Dialer_intermediates/classes.jack ) && ...
and
....( rm -rf /srv/src/NOUGAT/out/target/common/obj/APPS/Dialer_intermediates/classes.jack; exit 41 ) ) && (mv /srv/src/NOUGAT/out/target/common/obj/APPS/Dialer_intermediates/jack-rsc/classes*.dex /srv/src/NOUGAT/out/target/common/obj/APPS/Dialer_intermediates/with-local/ ) && (rm -f /srv/src/NOUGAT/out/target/common/obj/APPS/Dialer_intermediates/jack-rsc/java-source-list ) && (mv /srv/src/NOUGAT/out/target/common/obj/APPS/Dialer_intermediates/jack-rsc/java-source-list-uniq /srv/src/NOUGAT/out/target/common/obj/APPS/Dialer_intermediates/jack-rsc.java-source-list )" ERROR: /srv/src/NOUGAT/packages/apps/Dialer/src/com/android/dialer/about/Licenses.java:54: Assert cannot be resolved [ 87% 43313/49662] Building with Jack: /srv/src/NOUGAT/out/target/common/obj/APPS/EmergencyInfo_intermediates/with-local/classes.dex ninja: build stopped: subcommand failed.

Try this command before building

export ANDROID_JACK_VM_ARGS="- Dfile.encoding =UTF-8 -XX:+TieredCompilation -Xmx4G"

That line is already in the script. But I’ll give it a try

Ah ok, than it’s a different error

You can try updating jack on your build system.

That was this line I talked about in my post on your topic when I asked about the “JAVA line”.
Is it necessary ? What is the goal of this line please ?

AH OK, you was meaning that one.
I’m not really sure, but as far as I know, it gives the jack server some needed information and space for compilation. I have found it in several build instructions or people which are running into build errors regarding Jack.

In my personal build steps I never use it. By the way @petefoth could you try building without that line ?

1 Like