Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

liblttng problem with build for android #9493

Closed
meold opened this issue Jan 2, 2018 · 19 comments
Closed

liblttng problem with build for android #9493

meold opened this issue Jan 2, 2018 · 19 comments
Labels
area-Tracing-coreclr os-linux Linux OS (any supported distro)

Comments

@meold
Copy link

meold commented Jan 2, 2018

Hello!
After i run cross/build-android-rootfs.sh I have this output. Can you help me please??

`CMake Error at src/pal/src/configure.cmake:1347 (message):
Cannot find liblttng-ust-dev. Try installing liblttng-ust-dev (or the
appropriate packages for your platform)
Call Stack (most recent call first):
src/pal/src/CMakeLists.txt:5 (include)

-- Configuring incomplete, errors occurred!
See also "/git/coreclr/bin/obj/Linux.arm64.Debug/CMakeFiles/CMakeOutput.log".
See also "/git/coreclr/bin/obj/Linux.arm64.Debug/CMakeFiles/CMakeError.log".
~/git/coreclr
Failed to generate CoreCLR component build project!`

@jkotas
Copy link
Member

jkotas commented Jan 2, 2018

Try to build with cmakeargs -DFEATURE_EVENT_TRACE=0. It should disable to the tracing subsystem that pulls in lttng.

@jkotas jkotas changed the title Problem with build for android liblttng problem with build for android Jan 2, 2018
@meold
Copy link
Author

meold commented Jan 2, 2018

@jkotas Ok, thanks
I run this: CONFIG_DIR=realpath cross/android/arm64 ROOTFS_DIR=realpath git/coreclr/cross/android-rootfs/toolchain/arm64/sysroot ./build.sh cross arm64 skipgenerateversion skipnuget cmakeargs -DFEATURE_EVENT_TRACE=0

And get this another errors:
In file included from git/coreclr/src/corefx/System.Globalization.Native/calendarData.cpp:9: git/coreclr/src/corefx/System.Globalization.Native/icushim.h:142:1: error: 'ucol_setVariableTop' is deprecated [-Werror,-Wdeprecated-declarations] FOR_ALL_ICU_FUNCTIONS ^ git/coreclr/src/corefx/System.Globalization.Native/icushim.h:137:24: note: expanded from macro 'FOR_ALL_ICU_FUNCTIONS' PER_FUNCTION_BLOCK(ucol_setVariableTop, libicui18n) ^ git/coreclr/cross/android-rootfs/toolchain/arm64/sysroot/../sysroot/usr/include/unicode/ucol.h:1271:1: note: 'ucol_setVariableTop' has been explicitly marked deprecated here ucol_setVariableTop(UCollator *coll, ^ In file included from git/coreclr/src/corefx/System.Globalization.Native/calendarData.cpp:9: git/coreclr/src/corefx/System.Globalization.Native/icushim.h:142:1: error: 'ucol_setVariableTop' is deprecated [-Werror,-Wdeprecated-declarations] FOR_ALL_ICU_FUNCTIONS ^ git/coreclr/src/corefx/System.Globalization.Native/icushim.h:137:24: note: expanded from macro 'FOR_ALL_ICU_FUNCTIONS' PER_FUNCTION_BLOCK(ucol_setVariableTop, libicui18n) ^ git/coreclr/cross/android-rootfs/toolchain/arm64/sysroot/../sysroot/usr/include/unicode/ucol.h:1271:1: note: 'ucol_setVariableTop' has been explicitly marked deprecated here ucol_setVariableTop(UCollator *coll, ^ 1 error generated. src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native_Static.dir/build.make:62: recipe for target 'src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native_Static.dir/calendarData.cpp.o' failed make[2]: *** [src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native_Static.dir/calendarData.cpp.o] Error 1 CMakeFiles/Makefile2:142: recipe for target 'src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native_Static.dir/all' failed make[1]: *** [src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native_Static.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... 1 error generated. src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native.dir/build.make:62: recipe for target 'src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native.dir/calendarData.cpp.o' failed make[2]: *** [src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native.dir/calendarData.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... [ 0%] Building CXX object src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native.dir/casing.cpp.o In file included from git/coreclr/src/corefx/System.Globalization.Native/casing.cpp:8: git/coreclr/src/corefx/System.Globalization.Native/icushim.h:142:1: error: 'ucol_setVariableTop' is deprecated [-Werror,-Wdeprecated-declarations] FOR_ALL_ICU_FUNCTIONS ^ git/coreclr/src/corefx/System.Globalization.Native/icushim.h:137:24: note: expanded from macro 'FOR_ALL_ICU_FUNCTIONS' PER_FUNCTION_BLOCK(ucol_setVariableTop, libicui18n) ^ git/coreclr/cross/android-rootfs/toolchain/arm64/sysroot/../sysroot/usr/include/unicode/ucol.h:1271:1: note: 'ucol_setVariableTop' has been explicitly marked deprecated here ucol_setVariableTop(UCollator *coll, ^ 1 error generated. src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native.dir/build.make:86: recipe for target 'src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native.dir/casing.cpp.o' failed make[2]: *** [src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native.dir/casing.cpp.o] Error 1 CMakeFiles/Makefile2:105: recipe for target 'src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native.dir/all' failed make[1]: *** [src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2 Failed to build CoreCLR component

@jkotas
Copy link
Member

jkotas commented Jan 2, 2018

This was discussed in https://github.com/dotnet/coreclr/issues/5160. There is something wrong with detecting ucol_setMaxVariable.

@meold
Copy link
Author

meold commented Jan 2, 2018

@jkotas ok, thanks
But now i get another error and I can't find smth information about it.

In file included from /git/coreclr/src/corefx/System.Globalization.Native/calendarData.cpp:9: /git/coreclr/src/corefx/System.Globalization.Native/icushim.h:18:10: fatal error: 'unicode/locid.h' file not found #include <unicode/locid.h> ^ In file included from /git/coreclr/src/corefx/System.Globalization.Native/calendarData.cpp:9: /git/coreclr/src/corefx/System.Globalization.Native/icushim.h:18:10: fatal error: 'unicode/locid.h' file not found #include <unicode/locid.h> ^ 1 error generated. 1 error generated. src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native_Static.dir/build.make:62: recipe for target 'src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native_Static.dir/calendarData.cpp.o' failed make[2]: *** [src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native_Static.dir/calendarData.cpp.o] Error 1 CMakeFiles/Makefile2:142: recipe for target 'src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native_Static.dir/all' failed make[1]: *** [src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native_Static.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native.dir/build.make:62: recipe for target 'src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native.dir/calendarData.cpp.o' failed make[2]: *** [src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native.dir/calendarData.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... [ 2%] Building CXX object src/corefx/System.Globalization.Native/CMakeFiles/System.Globalization.Native.dir/casing.cpp.o In file included from /home/yura/git/coreclr/src/corefx/System.Globalization.Native/casing.cpp:8: /git/coreclr/src/corefx/System.Globalization.Native/icushim.h:18:10: fatal error: 'unicode/locid.h' file not found #include <unicode/locid.h> ^ 1 error generated.

@jkotas
Copy link
Member

jkotas commented Jan 3, 2018

No idea about this one.

@jkotas
Copy link
Member

jkotas commented Jan 3, 2018

cc @janvorli

@janvorli
Copy link
Member

janvorli commented Jan 3, 2018

@meold this means that the ICU library headers are not present. Are you sure the rootfs was built without any errors? I remember that there was a problem that a version of the library packages needs to be manually updated from time to time when they get bumped in the repository. See the last change that did that here:
dotnet/coreclr@b3e859c#diff-64e4222a4045c49394b856c6644cefef

My guess is that some of the wget commands have silently failed and you haven't noticed (we should add bash option to the script to make sure that a failed command fails the whole script, which seems to not be there).

@meold
Copy link
Author

meold commented Jan 7, 2018

@janvorli @jkotas, I updated my build-android-rootfs.sh like this(last versions from termux.net):
screen shot 2018-01-07 at 11 42 44 am
screen shot 2018-01-07 at 11 42 58 am

But none of these packages contain libintl.h, so I have the next error:
/git/coreclr/src/pal/src/locale/unicode.cpp:41:10: fatal error: 'libintl.h' file not found #include <libintl.h> ^ 1 error generated. src/pal/src/CMakeFiles/coreclrpal.dir/build.make:854: recipe for target 'src/pal/src/CMakeFiles/coreclrpal.dir/locale/unicode.cpp.o' failed make[2]: *** [src/pal/src/CMakeFiles/coreclrpal.dir/locale/unicode.cpp.o] Error 1 CMakeFiles/Makefile2:240: recipe for target 'src/pal/src/CMakeFiles/coreclrpal.dir/all' failed make[1]: *** [src/pal/src/CMakeFiles/coreclrpal.dir/all] Error 2

Any suggestions would very helpful.
Thanks.

@meold
Copy link
Author

meold commented Jan 8, 2018

@janvorli, @jkotas any ideas about this problem?

@janvorli
Copy link
Member

janvorli commented Jan 9, 2018

@meold this header should be part of gettext-dev package. So it looks like the build-android-rootfs.sh should include getting this package.

@janvorli
Copy link
Member

janvorli commented Jan 9, 2018

@meold
Copy link
Author

meold commented Jan 9, 2018

@janvorli , I added this package, but this package does not contain this header file libintl.h. So I still get the same error(

@janvorli
Copy link
Member

janvorli commented Jan 9, 2018

@meold hmm, I've checked the location of the header and it is actually part of libc on Linuxes. On Android, it is not present. It is strange though that we were able to build the stuff for android in the past just fine.
@qmfrederik, do you happen to remember if we needed to do anything special w.r.t. the libintl.h?

@qmfrederik
Copy link
Contributor

@meold @janvorli Well, it's been a while since I looked at .NET Core on Android ;-).

It looks like libintl.h was previously part of libandroid-support but it has been removed in termux/libandroid-support@08ad732.

@meold Can you try downloading libintl..h and save it to a location where the compiler can find it?

From dotnet/coreclr#15751 it seems you managed to build CoreCLR for Android, how did you handle the libintl.h dependency there?

@meold
Copy link
Author

meold commented Jan 15, 2018

@qmfrederik, I I tried to add libintl.h file, but still get the same error.

@qmfrederik, I downloaded libintl.h file for #15751 from this this link.

@jkotas @qmfrederik @janvorli , so, could you help with the build process for android? Maybe there are some another important steps, that I forgot.

Any suggestions would very helpful.
Thanks.

@janvorli
Copy link
Member

@meold I was on a paternity leave for the last month so I am sorry for low responsiveness. Now I'm back, so I can try to run the android build locally and find out how to fix the issue.

@meold
Copy link
Author

meold commented Jan 15, 2018

@janvorli, thank you very much. Waiting for your reply.

@meold
Copy link
Author

meold commented Jan 16, 2018

@janvorli, thank you for the for this pull request. CoreCLR builds fine now.
But I have another problem - with CoreFX (described here)

Any suggestions would very helpful.
Thanks.

@brianrob
Copy link
Member

Looks like the coreclr build succeeded, so closing this.

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Tracing-coreclr os-linux Linux OS (any supported distro)
Projects
None yet
Development

No branches or pull requests

5 participants