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

glib2: update to 2.64.2 #11442

Merged
merged 1 commit into from
Apr 18, 2020
Merged

glib2: update to 2.64.2 #11442

merged 1 commit into from
Apr 18, 2020

Conversation

neheb
Copy link
Contributor

@neheb neheb commented Feb 27, 2020

Modified to use meson as upstream has abandoned autotools.

Added license information.

Cleaned up Makefile for consistency between packages.

Removed static builds. I have no idea how or if to enable them.

Removed old patches and add new ones.

Removed BUILD_PARALLEL options. These are default with ninja/meson.

Removed most build dependencies. They seem not to be needed with meson.

Signed-off-by: Rosen Penev rosenp@gmail.com

Maintainer: @tripolar
Compile tested: ath79

@dhewg I'm having some trouble with this.

I set the host iconv to the libc version as it errors when using -Diconv=external.

I also cannot figure out what MESON_VARS is for. They seem to be set, but they don't do anything. I ended up patching out the issues.

I also wonder what this external iconv is for. Both glibc and musl support iconv natively. Only uClibc-ng does not. It's marked as BROKEN and probably should not be used.

@Andy2244 this would impact cifsd-tools as static libraries are no longer generated. It seems meson demands that you choose between one or the other. No idea what happened with the no-glib stuff.

@neheb
Copy link
Contributor Author

neheb commented Feb 27, 2020

Despite adding meson/host and ninja/host to the build, it's still faster to compile with ninja.

1:55 vs 3:11 . Quite nice.

I have no idea if this can be done for CMake projects as well. I know CMake supports ninja.

@dhewg
Copy link
Contributor

dhewg commented Feb 27, 2020

I'm not familiar with glib's iconv implementation.
MESON_VARS are just envvars to pass to the meson process. But usually you don't use envvars to control the build with meson, especially for cross compiling.

@neheb
Copy link
Contributor Author

neheb commented Feb 27, 2020

Meh so patches it is.

@Andy2244
Copy link
Contributor

Andy2244 commented Feb 27, 2020

No idea what happened with the no-glib stuff.

Not much yet, was merged for a few days and later removed again, since upstream wanted to review/test the patch more. No idea what the state on it is atm, but they seem busy fixing some smb1 + big endian stuff atm.

So i need to switch to a dynamic glib2 again than it seems.

@neheb
Copy link
Contributor Author

neheb commented Feb 28, 2020

Removed those host vars.

I feel that that libiconv change would break several hosts. But I have no idea how to fix.

@dengqf6
Copy link
Contributor

dengqf6 commented Mar 2, 2020

A dirty workaround for static libs:

define Build/Compile
	$(call Build/Compile/Meson)
	$(call Ninja,-C $(MESON_BUILD_DIR) install,DESTDIR="$(PKG_INSTALL_DIR)")
	$(call Meson, \
		--reconfigure \
		--buildtype plain \
		--native-file $(PKG_BUILD_DIR)/openwrt-native.txt \
		--cross-file $(PKG_BUILD_DIR)/openwrt-cross.txt \
		-Ddefault_library=static \
		$(MESON_ARGS) \
		$(MESON_BUILD_DIR) \
		$(PKG_BUILD_DIR), \
		$(MESON_VARS))
endef

@neheb neheb force-pushed the glb branch 3 times, most recently from 277454c to e79a10f Compare March 2, 2020 23:29
@neheb
Copy link
Contributor Author

neheb commented Mar 2, 2020

Updated to 2.64.0, which AFAIK is a stable version.

I added the static build hack. Although I wonder how useful it is...

Only ksmbd-tools really use it AFAIK.

@fantom-x
Copy link

fantom-x commented Mar 3, 2020

Only ksmbd-tools really use it AFAIK.

irqbalance as of a few days ago.

@neheb neheb changed the title glib2: update to 2.63.6 glib2: update to 2.64.0 Mar 4, 2020
@neheb
Copy link
Contributor Author

neheb commented Mar 4, 2020

So it stays.

@neheb neheb changed the title glib2: update to 2.64.0 glib2: update to 2.64.1 Mar 17, 2020
@neheb
Copy link
Contributor Author

neheb commented Mar 17, 2020

Updated to .1

@neheb
Copy link
Contributor Author

neheb commented Mar 20, 2020

Added back libffi/host . It seems to be needed by libgobject.

@neheb
Copy link
Contributor Author

neheb commented Mar 26, 2020

I'm getting linking errors with uClibc-ng with this. cannot find libiconv_xxx. No real idea how to fix.

@neheb neheb mentioned this pull request Mar 28, 2020
@neheb neheb force-pushed the glb branch 2 times, most recently from 32e1b5c to a436274 Compare March 28, 2020 05:15
@neheb
Copy link
Contributor Author

neheb commented Mar 28, 2020

Got rid of nls.mk. It's totally broken. My understanding is that when meson builds a shared library, it expects to link to a libiconv.so instead of .a (the stub has only .a). I haven't been able to figure out a solution to get it to link.

In other news: glib2 is using https://github.com/frida/proxy-libintl for gettext internally. Seems like a cool project. I assume it's less buggy than the current stub that is available, based on a quick look.

@neheb neheb changed the title glib2: update to 2.64.1 glib2: update to 2.64.2 Apr 10, 2020
@neheb
Copy link
Contributor Author

neheb commented Apr 10, 2020

Updated to 2.64.2

@neheb neheb marked this pull request as ready for review April 10, 2020 00:10
@neheb neheb force-pushed the glb branch 4 times, most recently from a4c98e9 to cf98411 Compare April 17, 2020 01:54
@neheb
Copy link
Contributor Author

neheb commented Apr 17, 2020

This is pretty much ready to go.

No idea how to fix uClibc-ng, but that's marked as BROKEN.

Modified to use meson as upstream has abandoned autotools.

Added license information.

Cleaned up Makefile for consistency between packages.

Added hack to compile static libs.

Removed old patches and add new ones.

Removed BUILD_PARALLEL options. These are default with ninja/meson.

Removed gettext build dependencies. glib2 now includes its own solution.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
@tripolar tripolar merged commit eee8f19 into openwrt:master Apr 18, 2020
@neheb neheb deleted the glb branch April 18, 2020 11:24
@hnyman
Copy link
Contributor

hnyman commented Apr 19, 2020

Should this be reverted?

Still fails after "make dirclean,
HEAD of master, r13023-8d9c1087e4
making for mvebu on Ubuntu 19.10

/Openwrt/wrt3200/staging_dir/host/bin/python /Openwrt/wrt3200/staging_dir/hostpkg/lib/meson/meson.py  --buildtype plain --native-file /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-native.txt --cross-file /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-cross.txt  -Dselinux=disabled -Dlibmount=disabled -Dinternal_pcre=true -Dman=false -Ddtrace=false -Dsystemtap=false -Dgtk_doc=false -Dbsymbolic_functions=true -Dforce_posix_threads=true -Dfam=false -Dinstalled_tests=false -Dnls=disabled -Doss_fuzz=disabled -Dxattr=true /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-build /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2
The Meson build system
Version: 0.54.0
Source dir: /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2
Build dir: /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-build
Build type: cross build
Project name: glib
Project version: 2.64.2

../../../../build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/meson.build:1:0: ERROR: Compiler gcc can not compile programs.

A full log can be found at /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-build/meson-logs/meson-log.txt
make[3]: *** [Makefile:134: /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/.configured_68b329da9893e34099c7d8ad5cb9c940] Error 1

Meson log:

perus@ub1910:/Openwrt/wrt3200$ cat /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-build/meson-logs/meson-log.txt
Build started at 2020-04-19T16:01:40.743769
Main binary: /Openwrt/wrt3200/staging_dir/host/bin/python
Build Options: -Dselinux=disabled -Dlibmount=disabled -Dinternal_pcre=true -Dman=false -Ddtrace=false -Dsystemtap=false -Dgtk_doc=false -Dbsymbolic_functions=true -Dforce_posix_threads=true -Dfam=false -Dinstalled_tests=false -Dnls=disabled -Doss_fuzz=disabled -Dxattr=true -Dbuildtype=plain '--cross-file /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-cross.txt' '--native-file /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-native.txt'
Python system: Linux
The Meson build system
Version: 0.54.0
Source dir: /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2
Build dir: /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-build
Build type: cross build
None of 'PKG_CONFIG_PATH_FOR_BUILD' are defined in the environment, not changing global flags.
None of  are defined in the environment, not changing global flags.
Project name: glib
Project version: 2.64.2
None of 'CFLAGS_FOR_BUILD' are defined in the environment, not changing global flags.
None of 'LDFLAGS_FOR_BUILD' are defined in the environment, not changing global flags.
None of 'CPPFLAGS_FOR_BUILD' are defined in the environment, not changing global flags.
None of 'CC_LD_FOR_BUILD' are defined in the environment, not changing global flags.
Sanity testing C compiler: gcc
Is cross compiler: False.
Sanity check compiler command line: gcc /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-build/meson-private/sanitycheckc.c -o /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-build/meson-private/sanitycheckc.exe -O2 -I/Openwrt/wrt3200/staging_dir/host/include -I/Openwrt/wrt3200/staging_dir/hostpkg/include -I/Openwrt/wrt3200/staging_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/host/include -I/Openwrt/wrt3200/staging_dir/host/include -I/Openwrt/wrt3200/staging_dir/hostpkg/include -I/Openwrt/wrt3200/staging_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/host/include -pipe -D_FILE_OFFSET_BITS=64 -L/Openwrt/wrt3200/staging_dir/host/lib -L/Openwrt/wrt3200/staging_dir/hostpkg/lib -L/Openwrt/wrt3200/staging_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/host/lib -liconv
Sanity check compile stdout:

-----
Sanity check compile stderr:
/usr/bin/ld: cannot find -liconv
collect2: error: ld returned 1 exit status

-----

../../../../build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/meson.build:1:0: ERROR: Compiler gcc can not compile programs.

@neheb
Copy link
Contributor Author

neheb commented Apr 19, 2020

No. See my other comment. The buildbot should be fine as it builds libiconv before glib2.

@njhsi
Copy link

njhsi commented Apr 20, 2020

Should this be reverted?

Still fails after "make dirclean,
HEAD of master, r13023-8d9c1087e4
making for mvebu on Ubuntu 19.10

/Openwrt/wrt3200/staging_dir/host/bin/python /Openwrt/wrt3200/staging_dir/hostpkg/lib/meson/meson.py  --buildtype plain --native-file /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-native.txt --cross-file /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-cross.txt  -Dselinux=disabled -Dlibmount=disabled -Dinternal_pcre=true -Dman=false -Ddtrace=false -Dsystemtap=false -Dgtk_doc=false -Dbsymbolic_functions=true -Dforce_posix_threads=true -Dfam=false -Dinstalled_tests=false -Dnls=disabled -Doss_fuzz=disabled -Dxattr=true /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-build /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2
The Meson build system
Version: 0.54.0
Source dir: /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2
Build dir: /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-build
Build type: cross build
Project name: glib
Project version: 2.64.2

../../../../build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/meson.build:1:0: ERROR: Compiler gcc can not compile programs.

A full log can be found at /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-build/meson-logs/meson-log.txt
make[3]: *** [Makefile:134: /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/.configured_68b329da9893e34099c7d8ad5cb9c940] Error 1

Meson log:

perus@ub1910:/Openwrt/wrt3200$ cat /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-build/meson-logs/meson-log.txt
Build started at 2020-04-19T16:01:40.743769
Main binary: /Openwrt/wrt3200/staging_dir/host/bin/python
Build Options: -Dselinux=disabled -Dlibmount=disabled -Dinternal_pcre=true -Dman=false -Ddtrace=false -Dsystemtap=false -Dgtk_doc=false -Dbsymbolic_functions=true -Dforce_posix_threads=true -Dfam=false -Dinstalled_tests=false -Dnls=disabled -Doss_fuzz=disabled -Dxattr=true -Dbuildtype=plain '--cross-file /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-cross.txt' '--native-file /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-native.txt'
Python system: Linux
The Meson build system
Version: 0.54.0
Source dir: /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2
Build dir: /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-build
Build type: cross build
None of 'PKG_CONFIG_PATH_FOR_BUILD' are defined in the environment, not changing global flags.
None of  are defined in the environment, not changing global flags.
Project name: glib
Project version: 2.64.2
None of 'CFLAGS_FOR_BUILD' are defined in the environment, not changing global flags.
None of 'LDFLAGS_FOR_BUILD' are defined in the environment, not changing global flags.
None of 'CPPFLAGS_FOR_BUILD' are defined in the environment, not changing global flags.
None of 'CC_LD_FOR_BUILD' are defined in the environment, not changing global flags.
Sanity testing C compiler: gcc
Is cross compiler: False.
Sanity check compiler command line: gcc /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-build/meson-private/sanitycheckc.c -o /Openwrt/wrt3200/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/openwrt-build/meson-private/sanitycheckc.exe -O2 -I/Openwrt/wrt3200/staging_dir/host/include -I/Openwrt/wrt3200/staging_dir/hostpkg/include -I/Openwrt/wrt3200/staging_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/host/include -I/Openwrt/wrt3200/staging_dir/host/include -I/Openwrt/wrt3200/staging_dir/hostpkg/include -I/Openwrt/wrt3200/staging_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/host/include -pipe -D_FILE_OFFSET_BITS=64 -L/Openwrt/wrt3200/staging_dir/host/lib -L/Openwrt/wrt3200/staging_dir/hostpkg/lib -L/Openwrt/wrt3200/staging_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/host/lib -liconv
Sanity check compile stdout:

-----
Sanity check compile stderr:
/usr/bin/ld: cannot find -liconv
collect2: error: ld returned 1 exit status

-----

../../../../build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/glib-2.64.2/meson.build:1:0: ERROR: Compiler gcc can not compile programs.

workaround:
$ make package/libiconv/host/compile

BKPepe added a commit that referenced this pull request Apr 20, 2020
It is not ready and there are some issues described in
#11442

This reverts commit b465ac3.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
@BKPepe
Copy link
Member

BKPepe commented Apr 20, 2020

Reverted as well.

@borkra
Copy link
Contributor

borkra commented Apr 20, 2020

just target build needs to depend on libiconv/host as well.
glib2 build some host tools in the process of target build so HOST link flag applies not only to host builds

nmeyerhans pushed a commit to nmeyerhans/packages that referenced this pull request May 4, 2020
It is not ready and there are some issues described in
openwrt#11442

This reverts commit b465ac3.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
farmergreg pushed a commit to farmergreg/packages that referenced this pull request Sep 8, 2020
It is not ready and there are some issues described in
openwrt#11442

This reverts commit b465ac3.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
farmergreg pushed a commit to farmergreg/packages that referenced this pull request Sep 8, 2020
It is not ready and there are some issues described in
openwrt#11442

This reverts commit b465ac3.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants