After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796776 - zlib compile failed for Android (regression )
zlib compile failed for Android (regression )
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: cerbero
git master
Other Linux
: Normal normal
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-07-10 03:35 UTC by rland
Modified: 2018-07-21 22:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description rland 2018-07-10 03:35:46 UTC
Ubuntu 16.04,running:
./cerbero-uninstalled -c config/cross-android-armv7.cbc bootstrap
./cerbero-uninstalled -c config/cross-android-armv7.cbc package gstrea
mer-1.0
---

[(2/81) libffi -> compile ]
[(2/81) libffi -> install ]
[(2/81) libffi -> post_install ]
[(3/81) zlib -> fetch ]
-----> Fetching tarball http://zlib.net/fossils/zlib-1.2.11.tar.gz to /home/shakin/work/src/ssc/gstreamer/cerbero/build/so
urces/local/zlib-1.2.11/zlib-1.2.11.tar.gz
[(3/81) zlib -> extract ]
-----> Extracting tarball to /home/shakin/work/src/ssc/gstreamer/cerbero/build/sources/android_armv7/zlib-1.2.11
Unpacking /home/shakin/work/src/ssc/gstreamer/cerbero/build/sources/local/zlib-1.2.11/zlib-1.2.11.tar.gz in /home/shakin/w
ork/src/ssc/gstreamer/cerbero/build/sources/android_armv7
[(3/81) zlib -> configure ]
Recipe 'zlib' failed at the build step 'configure'
Traceback (most recent call last):
  • File "./cerbero/build/oven.py", line 143 in _cook_recipe
    stepfunc()
  • File "./cerbero/build/build.py", line 98 in call
    res = func(*args)
  • File "./cerbero/build/build.py", line 556 in configure
    f = self.write_meson_cross_file()
  • File "./cerbero/build/build.py", line 476 in write_meson_cross_file
    windres = self._old_env.get('WINDRES', '').split(' ')
AttributeError: 'NoneType' object has no attribute 'split'
Select an action to proceed:
[0] Enter the shell
[1] Rebuild the recipe from scratch
[2] Rebuild starting from the failed step
[3] Skip recipe
[4] Abort

The previous compilation of 1.14 is OK.
Comment 1 rland 2018-07-10 07:22:46 UTC
I also noticed that using cerbero(git master )cross-compilation android armv7, the following files :
libgio-2.0.a/libz.a/libgmodule-2.0.a/libgobject-2.0.a/libglib-2.0.a
will not be generated(.la,.so are generated),Does anyone know why?

---
clang: error: no such file or directory: '/home/shakin/work/src/ssc/gstreamer/gst-sdk/gstreamer-1.0-android-armv7-1.15.0.1/lib/libgio-2.0.a'
clang: error: no such file or directory: '/home/shakin/work/src/ssc/gstreamer/gst-sdk/gstreamer-1.0-android-armv7-1.15.0.1/lib/libz.a'
clang: error: no such file or directory: '/home/shakin/work/src/ssc/gstreamer/gst-sdk/gstreamer-1.0-android-armv7-1.15.0.1/lib/libgmodule-2.0.a'
clang: error: no such file or directory: '/home/shakin/work/src/ssc/gstreamer/gst-sdk/gstreamer-1.0-android-armv7-1.15.0.1/lib/libgobject-2.0.a'
clang: error: no such file or directory: '/home/shakin/work/src/ssc/gstreamer/gst-sdk/gstreamer-1.0-android-armv7-1.15.0.1/lib/libglib-2.0.a'
Comment 2 rland 2018-07-11 01:34:27 UTC
The reason why the above .a files are not generated seems I remove '-Os' in cerbero/config/android.config. To have the right symbols for debug, sometimes we do need to remove the optimization, and do not know what causality is between this. :(
Comment 3 Jan Schmidt 2018-07-18 14:52:28 UTC
Confirming that the android build is broken in git master as at 056e448d6a25ebf0d8af71978172d91054b730d4

Adding

os.environ['WINDRES']= ""

to config/android.cbc gets past the first error, but breaks building glib because the values assigned to CFLAGS in the recipe don't get passed to the cross compiler values - in particular not having '-DNVALGRIND=1' doesn't compile, but the GIO settings are also probably important.

Adding -DNVALGRIND=1 to the c_args fixes the first part of that.

Beyond that, zlib and glib are building dynamic libs, not static ones. The output won't be useful.
Comment 4 Nirbheek Chauhan 2018-07-21 22:47:27 UTC
(In reply to Jan Schmidt from comment #3)
> Confirming that the android build is broken in git master as at
> 056e448d6a25ebf0d8af71978172d91054b730d4
> 
> Adding
> 
> os.environ['WINDRES']= ""
>

Fixed with: 

commit ce2d54e7c42afd1147788a7ba8bdaed5efa3cbd9 (centricular/wip/meson)
Author: Nirbheek Chauhan <nirbheek@centricular.com>
Date:   Thu Jul 19 12:09:27 2018 +0530

    cerbero: Don't set old env to None for unset env vars
    
    It's wrong (unset != None) and causes a traceback:

 
> to config/android.cbc gets past the first error, but breaks building glib
> because the values assigned to CFLAGS in the recipe don't get passed to the
> cross compiler values - in particular not having '-DNVALGRIND=1' doesn't
> compile, but the GIO settings are also probably important.
> 
> Adding -DNVALGRIND=1 to the c_args fixes the first part of that.
> 

Fixed with:

commit 7462b0655e714a11e4edb1e0c3ef72c74556c4e8
Author: Nirbheek Chauhan <nirbheek@centricular.com>
Date:   Sat Jul 21 11:37:33 2018 +0530

    cerbero: Rework environment modification in recipes


> Beyond that, zlib and glib are building dynamic libs, not static ones. The
> output won't be useful.

Fixed with:

commit 9c69d11a5f7cef961d9e90bdaab2a0cce758ec6a
Author: Nirbheek Chauhan <nirbheek@centricular.com>
Date:   Thu Jul 19 13:50:15 2018 +0530

    cerbero: Build both static and shared with Meson
    
    Also, detect if someone tries to set `default_library` in
    self.meson_options, and error out before configure. You should set
    self.meson_default_library instead.