nm-l2tp / NetworkManager-l2tp

L2TP and L2TP/IPsec support for NetworkManager
GNU General Public License v2.0
486 stars 83 forks source link

1.20.4: configure fails with missing `gtk+-3.0` when is running in build env with gtk4 only #187

Closed kloczek closed 1 year ago

kloczek commented 2 years ago

Yeah looks like it is the same issue like in https://gitlab.gnome.org/GNOME/NetworkManager-pptp/-/issues/6

+ ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --disable-silent-rules --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --runstatedir=/run --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --disable-static --with-dist-version=1.20.4-2.fc35 --with-gtk4 --with-pppd-plugin-dir=/usr/lib64/pppd/2.4.9
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
checking for x86_64-redhat-linux-gnu-gcc... /usr/bin/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether /usr/bin/gcc accepts -g... yes
checking for /usr/bin/gcc option to enable C11 features... none needed
checking whether /usr/bin/gcc understands -c and -o together... yes
checking dependency style of /usr/bin/gcc... none
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for wchar.h... yes
checking for minix/config.h... no
checking for sys/time.h... yes
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
checking for x86_64-redhat-linux-gnu-gcc-ar... /usr/bin/gcc-ar
checking for x86_64-redhat-linux-gnu-gcc-ranlib... /usr/bin/gcc-ranlib
checking build system type... x86_64-redhat-linux-gnu
checking host system type... x86_64-redhat-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by /usr/bin/gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/gcc-nm
checking the name lister (/usr/bin/gcc-nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-redhat-linux-gnu file names to x86_64-redhat-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-redhat-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for x86_64-redhat-linux-gnu-file... no
checking for file... file
checking for x86_64-redhat-linux-gnu-objdump... no
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for x86_64-redhat-linux-gnu-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for x86_64-redhat-linux-gnu-ar... (cached) /usr/bin/gcc-ar
checking for archiver @FILE support... @
checking for x86_64-redhat-linux-gnu-strip... no
checking for strip... strip
checking for x86_64-redhat-linux-gnu-ranlib... (cached) /usr/bin/gcc-ranlib
checking command to parse /usr/bin/gcc-nm output from /usr/bin/gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for x86_64-redhat-linux-gnu-mt... no
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if /usr/bin/gcc supports -fno-rtti -fno-exceptions... no
checking for /usr/bin/gcc option to produce PIC... -fPIC -DPIC
checking if /usr/bin/gcc PIC flag -fPIC -DPIC works... yes
checking if /usr/bin/gcc static flag -static works... no
checking if /usr/bin/gcc supports -c -o file.o... yes
checking if /usr/bin/gcc supports -c -o file.o... (cached) yes
checking whether the /usr/bin/gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for x86_64-redhat-linux-gnu-gcc... (cached) /usr/bin/gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether /usr/bin/gcc accepts -g... (cached) yes
checking for /usr/bin/gcc option to enable C11 features... (cached) none needed
checking whether /usr/bin/gcc understands -c and -o together... (cached) yes
checking dependency style of /usr/bin/gcc... (cached) none
checking for glib-compile-resources... /usr/bin/glib-compile-resources
checking for file... yes
checking for find... yes
checking for egrep... (cached) /usr/bin/grep -E
checking for fcntl.h... yes
checking for paths.h... yes
checking for sys/ioctl.h... yes
checking for sys/time.h... (cached) yes
checking for syslog.h... yes
checking for unistd.h... (cached) yes
checking for pppd/pppd.h... yes
checking whether EAP-TLS patch has been applied to pppd... checking how to run the C preprocessor... /usr/bin/gcc -E
yes
checking for mode_t... yes
checking for pid_t... yes
checking whether /usr/bin/gcc needs -traditional... no
checking for working memcmp... yes
checking for select... yes
checking for socket... yes
checking for uname... yes
checking for library containing dlopen... none required
checking for x86_64-redhat-linux-gnu-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for OPENSSL... yes
checking for NSS... yes
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for ld... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking for shared library run path origin... done
checking 32-bit host C ABI... no
checking for ELF binary format... yes
checking for the common suffixes of directories in the library search path... lib,lib,lib64
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyPreferredLanguages... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking for GLIB... yes
checking for GTK... no
configure: error: Package requirements (gtk+-3.0 >= 3.16) were not met:

Package 'gtk+-3.0', required by 'virtual:world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
dkosovic commented 2 years ago

Thanks for the NetworkManager-pptp issue link. For consistency, I'll wait and do whatever NetworkManager-pptp does for the fix.

dkosovic commented 2 years ago

I suspect they are taking their time with the upstream NetworkManager VPN clients to build in a gtk4 only build env because almost all Linux distros still ship with the gtk3 based nm-connection-editor which is part of the network-manager-applet source :

The non-libnma parts of network-manager-applet (i.e. applet and editor) have not been ported to gtk4. I guess once nm-connection-editor has been ported to gtk4, they'll update the NetworkManager VPN clients to allow building in a gtk4 only build env.

I'm still keeping an eye out on the upstream NetworkManager VPN clients, once any of them support a gtk4 only build env, I'll do the same as whatever they do.

kloczek commented 1 year ago

Any update? 🤔

dkosovic commented 1 year ago

I haven't seen any upstream changes yet.

dkosovic commented 1 year ago

I noticed the corresponding NetworkManager-pptp issue #6 was closed with the following message :

This works as intended -- the gtk3 build is enabled by default.

You need to pass --without-gnome to configure to disable it.

in the configure.ac code I see:

if test x"$with_gnome" != xno; then
    PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.16)
    GTK_CFLAGS="$GTK_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_16"
    GTK_CFLAGS="$GTK_CFLAGS -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_16"

    PKG_CHECK_MODULES(LIBNMA, libnma >= 1.8.0)
    PKG_CHECK_MODULES(LIBSECRET, libsecret-1 >= 0.18)
fi

if test x"$with_gtk4" != xno; then
    PKG_CHECK_MODULES(GTK4, gtk4 >= 4.0)
    GTK4_CFLAGS="$GTK4_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_4_0"
    GTK4_CFLAGS="$GTK4_CFLAGS -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_4_0"
    PKG_CHECK_MODULES(LIBNMA_GTK4, libnma-gtk4 >= 1.8.33)
fi

I suspect the PKG_CHECK_MODULES(LIBSECRET, libsecret-1 >= 0.18) package check should still be performed when --without-gnome and --with-gtk4 are used.

dkosovic commented 1 year ago

I'll close this as the corresponding NetworkManager-pptp issue #6 was closed.

Would have preferred that they were more consistent in the naming of the flags between gtk3 and gtk4, but will stick to whatever upstream NetworkManager project does.