Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 588388 - net-misc/networkmanager-openvpn-1.2.2 fails to build: 'gio/gio.h: No such file or directory'
Summary: net-misc/networkmanager-openvpn-1.2.2 fails to build: 'gio/gio.h: No such fil...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Steev Klimaszewski (RETIRED)
URL: https://bugzilla.gnome.org/show_bug.c...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-09 04:19 UTC by Alan Neilan
Modified: 2016-09-08 23:06 UTC (History)
13 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge_info.txt,7.07 KB, text/plain)
2016-07-09 04:19 UTC, Alan Neilan
Details
build.log (build.log,13.62 KB, text/x-log)
2016-07-09 04:20 UTC, Alan Neilan
Details
networkmanager-openvpn-1.2.4-fix-undefined-reference-to-dlclose.patch (networkmanager-openvpn-1.2.4-fix-undefined-reference-to-dlclose.patch,1.00 KB, patch)
2016-08-12 08:55 UTC, Dennis Schridde
Details | Diff
networkmanager-openvpn-1.2.4-fix-undefined-reference-to-dlclose.patch (networkmanager-openvpn-1.2.4-fix-undefined-reference-to-dlclose.patch,904 bytes, patch)
2016-08-12 19:52 UTC, Dennis Schridde
Details | Diff
networkmanager-openvpn-1.2.4-fix-undefined-reference-to-dlclose.patch (networkmanager-openvpn-1.2.4-fix-undefined-reference-to-dlclose.patch,3.07 KB, patch)
2016-08-16 08:46 UTC, Dennis Schridde
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Neilan 2016-07-09 04:19:25 UTC
Created attachment 440102 [details]
emerge --info

networkmanager-openvpn fails to build 

In file included from nm-default.h:41:0,
                 from nm-shared-utils.c:22:
nm-glib.h:24:21: fatal error: gio/gio.h: No such file or directory
compilation terminated.
make[2]: *** [Makefile:481: libnm_openvpn_shared_la-nm-shared-utils.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from nm-default.h:41:0,
                 from utils.c:27:
nm-glib.h:24:21: fatal error: gio/gio.h: No such file or directory
compilation terminated.
make[2]: *** [Makefile:488: libnm_openvpn_shared_la-utils.lo] Error 1
make[2]: Leaving directory '/var/tmp/portage/net-misc/networkmanager-openvpn-1.2.2/work/NetworkManager-openvpn-1.2.2/shared'
make[1]: *** [Makefile:563: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/net-misc/networkmanager-openvpn-1.2.2/work/NetworkManager-openvpn-1.2.2'
make: *** [Makefile:432: all] Error 2
Comment 1 Alan Neilan 2016-07-09 04:20:17 UTC
Created attachment 440104 [details]
build.log
Comment 2 Pacho Ramos gentoo-dev 2016-07-09 18:51:52 UTC
Don't you have /usr/include/glib-2.0/gio/gio.h in your system?
Comment 3 shinydoofy 2016-07-09 20:39:59 UTC
Same error here. I do have /usr/include/glib-2.0/gio/gio.h on my system, but compiling with MAKEOPTS="-j1" shows that the error comes from the following call where the appropriate include directive is missing:

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DNM_OPENVPN_OLD -I../shared -O2 -march=native -pipe -c nm-shared-utils.c  -fPIC -DPIC -o .libs/libnm_openvpn_shared_la-nm-shared-utils.o
In file included from nm-default.h:41:0,
                 from nm-shared-utils.c:22:
nm-glib.h:24:21: fatal error: gio/gio.h: No such file or directory
Comment 4 Egor Y. Egorov 2016-07-18 07:49:38 UTC
In my system exixst file /usr/include/glib-2.0/gio/gio.h
but built failed with

                 from utils.c:27:
nm-glib.h:24:21: fatal error: gio/gio.h: No such file or directory
 #include <gio/gio.h>
                     ^
Comment 5 Egor Y. Egorov 2016-07-18 08:34:23 UTC
I can build with:


CFLAGS="-march=native -pipe -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libnm -I/usr/include/libnm-glib" emerge -av1 net-misc/networkmanager-openvpn
Comment 6 Bob Wya 2016-07-18 22:31:13 UTC
(In reply to Egor Y. Egorov from comment #5)
> I can build with: ...

Thanks Egor, was wracking my brains over this one!"!!

I'm using:
echo 'CFLAGS="${CFLAGS} -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libnm -I/usr/include/libnm-glib"' >/etc/portage/env/net-misc/networkmanager-openvpn

Builds and install fine now!!
Comment 7 Dennis Schridde 2016-07-27 07:02:19 UTC
Is anyone working on this or was networkmanager-openvpn abandoned and needs to go to maintainer-needed@g.o?
Comment 8 Pacho Ramos gentoo-dev 2016-07-30 20:21:36 UTC
The package is maintained, but the problem is that something is different in your systems as we cannot reproduce this build issue
Comment 9 Dennis Schridde 2016-07-30 20:42:04 UTC
Quick guess: Does this file look the same on your system?
```
# cat /usr/lib64/pkgconfig/gio-2.0.pc
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib64
includedir=${prefix}/include

giomoduledir=${libdir}/gio/modules
glib_compile_schemas=glib-compile-schemas
glib_compile_resources=glib-compile-resources
gdbus_codegen=gdbus-codegen

Name: GIO
Description: glib I/O library
Version: 2.48.1
Requires: glib-2.0 gobject-2.0
Requires.private: gmodule-no-export-2.0
Libs: -L${libdir} -lgio-2.0
Libs.private: -lz -lresolv    
Cflags:
# q file -v /usr/lib64/pkgconfig/gio-2.0.pc
dev-libs/glib-2.48.1 (/usr/lib64/pkgconfig/gio-2.0.pc)
```
Comment 10 Dennis Schridde 2016-07-30 20:46:21 UTC
(In reply to Dennis Schridde from comment #9)
> Quick guess: Does this file look the same on your system?
> ```
> # cat /usr/lib64/pkgconfig/gio-2.0.pc
> prefix=/usr
> exec_prefix=${prefix}
> libdir=/usr/lib64
> includedir=${prefix}/include
> 
> giomoduledir=${libdir}/gio/modules
> glib_compile_schemas=glib-compile-schemas
> glib_compile_resources=glib-compile-resources
> gdbus_codegen=gdbus-codegen
> 
> Name: GIO
> Description: glib I/O library
> Version: 2.48.1
> Requires: glib-2.0 gobject-2.0
> Requires.private: gmodule-no-export-2.0
> Libs: -L${libdir} -lgio-2.0
> Libs.private: -lz -lresolv    
> Cflags:
> # q file -v /usr/lib64/pkgconfig/gio-2.0.pc
> dev-libs/glib-2.48.1 (/usr/lib64/pkgconfig/gio-2.0.pc)
> ```

```
# q list -e glib | grep gio/gio.h\$
/usr/include/glib-2.0/gio/gio.h
# cat file -v /usr/lib64/pkgconfig/glib-2.0.pc
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib64
includedir=${prefix}/include

glib_genmarshal=glib-genmarshal
gobject_query=gobject-query
glib_mkenums=glib-mkenums

Name: GLib
Description: C Utility Library
Version: 2.48.1
Requires.private: libpcre
Libs: -L${libdir} -lglib-2.0 
Libs.private: -pthread  -lpcre    
Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include 
```

Guessing further: NetworkManager uses `pkg-config --cflags gio-2.0`, but not `pkg-config --cflags glib-2.0` and thus misses to add the /usr/include/glib-2.0 directory to the include path.
Comment 11 shinydoofy 2016-07-30 20:52:57 UTC
(In reply to Dennis Schridde from comment #9)
> Quick guess: Does this file look the same on your system?
It does for me, yes.

(In reply to Dennis Schridde from comment #10)
Same for glib-2.0.pc.
Comment 12 Denis Sokolovsky 2016-08-09 10:10:49 UTC
AFAIR "Requires" keyword instruct pkg-config to include corresponding packages flags to output. So when one request cflags for gio-2.0 pkg-config should also include cflags for glib-2.0 and gobject-2.0. On my system "pkg-config --cflags gio-2.0" outputs "-pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include". Still I can't compile networkmanager-openvpn without env hack.

Another observation. If we will take a look into build.log (especially with -j1) we can found that at the beginning cflags added as expected:

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/include/libnm -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2 -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_2 -I../shared -O2 -pipe -march=ivybridge -c utils.c  -fPIC -DPIC -o .libs/libnm_vpn_plugin_openvpn_shared_la-utils.o

but then cflags suddenly disappear (and looks like always on libnm_openvpn_shared_la-utils.o compilation):

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DNM_OPENVPN_OLD -I../shared -O2 -pipe -march=ivybridge -c utils.c  -fPIC -DPIC -o .libs/libnm_openvpn_shared_la-utils.o
Comment 13 Dennis Schridde 2016-08-12 08:19:13 UTC
This issue is fixed in net-misc/networkmanager-openvpn-1.2.4.

Please adjust the summary of this bug accordingly: "net-misc/networkmanager-openvpn-1.2.2 fails to build: ..."
Comment 14 Dennis Schridde 2016-08-12 08:55:57 UTC
Created attachment 443144 [details, diff]
networkmanager-openvpn-1.2.4-fix-undefined-reference-to-dlclose.patch

There is another bug related to underlinking the test binaries (libdl.so is not linked against). Attached patch fixes this. Issue was reported upstream.

See-Also: https://bugzilla.gnome.org/show_bug.cgi?id=769783
Comment 15 Dennis Schridde 2016-08-12 09:01:23 UTC
(In reply to Dennis Schridde from comment #14)
> Created attachment 443144 [details, diff] [details, diff]
> networkmanager-openvpn-1.2.4-fix-undefined-reference-to-dlclose.patch
> 
> There is another bug related to underlinking the test binaries (libdl.so is
> not linked against). Attached patch fixes this. Issue was reported upstream.
> 
> See-Also: https://bugzilla.gnome.org/show_bug.cgi?id=769783

This patch requires one to run eautoreconf in src_prepare(), as it modifies configure.ac.
Comment 16 Dennis Schridde 2016-08-12 19:52:33 UTC
Created attachment 443164 [details, diff]
networkmanager-openvpn-1.2.4-fix-undefined-reference-to-dlclose.patch

Patch fixing the underlying issue of the linking error. For a build.log please see https://bugzilla.gnome.org/show_bug.cgi?id=769783
Comment 17 Dennis Schridde 2016-08-16 08:46:43 UTC
Created attachment 443464 [details, diff]
networkmanager-openvpn-1.2.4-fix-undefined-reference-to-dlclose.patch

This is upstream's patch (220b38717f8d0fc16c8b9d68cfd6e5b5751e4669 [1] + 8d76aebe99b1b9c67adab4922c0c33edb1f89b7f [2]), which applies to 1.2.4 and fixes the issue.

[1]: https://git.gnome.org/browse/network-manager-openvpn/commit/?id=220b38717f8d0fc16c8b9d68cfd6e5b5751e4669
[2]: https://git.gnome.org/browse/network-manager-openvpn/commit/?id=8d76aebe99b1b9c67adab4922c0c33edb1f89b7f
Comment 18 Marcin Sporysz 2016-08-22 16:56:16 UTC
For me this bug emerges when I add "-gtk" USE flag. With gtk enabled it's building okay.
Comment 19 Gilles Dartiguelongue (RETIRED) gentoo-dev 2016-09-08 23:06:45 UTC
Just pushed 1.2.4 to tree with upstream patches. Thanks for reporting.