[swift-dev] Glibc.swift: error: no such module 'SwiftGlibc'

Jordan Rose jordan_rose at apple.com
Thu Nov 10 17:23:59 CST 2016


> On Nov 10, 2016, at 15:16, Eric Wing <ewmailing at gmail.com> wrote:
> 
> On 11/10/16, Jordan Rose <jordan_rose at apple.com <mailto:jordan_rose at apple.com>> wrote:
>> 
>>> On Nov 10, 2016, at 13:34, Eric Wing <ewmailing at gmail.com> wrote:
>>> 
>>> On 11/9/16, Eric Wing <ewmailing at gmail.com> wrote:
>>>> On 11/9/16, Eric Wing <ewmailing at gmail.com> wrote:
>>>>> On 11/9/16, Jordan Rose <jordan_rose at apple.com> wrote:
>>>>>> Ah, that does help. The logic to build the Glibc module map comes from
>>>>>> stdlib/public/Platform/CMakeLists.txt, and explicitly checks for
>>>>>> “LINUX”,
>>>>>> “FREEBSD”, “ANDROID”, and “CYGWIN”. Does the Steam-Runtime build use a
>>>>>> different SDK name?
>>>>>> 
>>>>>> Jordan
>>>>>> 
>>>>> 
>>>>> How would I verify/debug this for sure? I haven't been setting
>>>>> anything differently when I build under Steam-Runtime vs. Ubuntu. (And
>>>>> I have gotten through a pure Linux (no Android) build under
>>>>> Steam-Runtime successfully.) Steam-Runtime is just a Linux. (It is
>>>>> originally derived from Ubuntu 12.04LTS, though it probably has all
>>>>> its Ubuntu identifiers stripped/replaced.)
>>>>> 
>>>>> 
>>>>> I checked the CMakeCache.txt in
>>>>> build/Ninja-ReleaseAssert/swift-linux-x86_64
>>>>> 
>>>>> Both files are identical between the Steam-Runtime and Ubuntu versions
>>>>> when building for Android. The variable SWIFT_SDKS is:
>>>>> SWIFT_SDKS:STRING=ANDROID;LINUX
>>>>> 
>>>>> 
>>>>> Obviously something is different somewhere since it seems to be
>>>>> skipping the glibc.modulemap in the Steam-Runtime case.
>>>>> 
>>>>> 
>>>>> Thanks,
>>>>> Eric
>>>>> 
>>>> 
>>>> Oops. Correction to my last post. The CMakeCache.txt are not
>>>> identical. I compared the wrong files.
>>>> 
>>>> However, the SWIFT_SDKS variable are the same in each.
>>>> 
>>>> Here are some differences I did spot:
>>>> 
>>>> In Ubuntu, LIBXML2_XMLLINT_EXECUABLE is not found, but defined in my
>>>> SteamRT cache.
>>>> 
>>>> Ubuntu:
>>>> SWIFT_HAVE_WORKING_STD_REGEX_TEST:INTERNAL=1
>>>> Steam
>>>> SWIFT_HAVE_WORKING_STD_REGEX_TEST:INTERNAL=
>>>> 
>>>> Ubuntu:
>>>> SWIFT_HAVE_WORKING_STD_REGEX_TEST_EXITCODE:INTERNAL=0
>>>> Steam:
>>>> SWIFT_HAVE_WORKING_STD_REGEX_TEST_EXITCODE:INTERNAL=FAILED_TO_RUN
>>>> 
>>>> 
>>>> The remaining of the differences are tool version differences and
>>>> stuff with libICU (because Steam-Runtime doesn't supply it so I must
>>>> build/supply it myself). But most of these differences are expected.
>>>> 
>>>> Thanks,
>>>> Eric
>>>> 
>>> 
>>> 
>>> It looks like the problem is related to which version of CMake you use.
>>> 
>>> Ubuntu 16.10 supplies CMake 3.5.2.
>>> Steam-Runtime ships a version that is way too old, so I built and used
>>> the latest stable CMake version, 3.6.3.
>>> 
>>> Using 3.6.3 seems to always trigger this problem with the Swift build.
>>> 
>>> I tested it both ways:
>>> 
>>> 1. I changed Ubuntu 16.10 to use CMake 3.6.3 and the build broke in
>>> exactly the same way I described.
>>> 
>>> 2. In Steam-Runtime, I built/used CMake 3.5.2 instead, and the build
>>> completed.
>>> 
>>> 
>>> I still don’t know specifically what the build script bug is. This is
>>> going to need to be fixed eventually if all newer versions of CMake
>>> lead to a broken build process.
>> 
>> Nice job tracking this down! I can’t reproduce it with CMake 3.6.3 on Ubuntu
>> 16.04 with a default configuration, though—or at least, I still see the
>> glibc.modulemap target being generated in the Ninja file and listed as a
>> dependency. Can you include your full build-script invocation line?
>> 
>> Jordan
>> 
>> 
> 
> 
> My PATH is modified to make sure to use my built version of CMake
> instead of the system one.
> 
> ./swift/utils/build-script --release --skip-test-linux --android
> --android-ndk=/home/pinky/Android/android-ndk --android-api-level=21
> --android-icu-uc
> /home/pinky/Source/SWIFTANDROID/libiconv-libicu-android/armeabi-v7a/lib/libicuucswift.so
> --android-icu-uc-include
> /home/pinky/Source/SWIFTANDROID/libiconv-libicu-android/armeabi-v7a/include
> --android-icu-i18n
> /home/pinky/Source/SWIFTANDROID/libiconv-libicu-android/armeabi-v7a/lib/libicui18nswift.so
> --android-icu-i18n-include
> /home/pinky/Source/SWIFTANDROID/libiconv-libicu-android/armeabi-v7a/include/
> --extra-cmake-options="-DCMAKE_VERBOSE_MAKEFILE=1"
> 
> 
> The top of my git log is:
> 
> commit 7a3a1e3697e104522734aaea62987e6ef7d58e79
> Merge: 23525d9 9577d98
> Author: swift-ci <swift-ci at users.noreply.github.com <mailto:swift-ci at users.noreply.github.com>>
> Date:   Thu Oct 27 13:43:11 2016 -0700
> 
>    Merge pull request #5500 from nkcsgexi/closure

Aha, even in your "on Ubuntu" build it's still a cross build for Android. In that case I'm not set up to reproduce it at the moment.

Adding Brian, who unofficially owns the unofficial Android build support. It's a spare time project for him, though, so I don't know if he'll be able to respond.

Jordan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20161110/84d3860b/attachment.html>


More information about the swift-dev mailing list