Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] eiwd - iwd without dbus
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3640

PostPosted: Wed Mar 11, 2020 4:55 pm    Post subject: [SOLVED] eiwd - iwd without dbus Reply with quote

Has someone tried building net-wireless/iwd without dbus?
There is a bunch of dependencies:
Code:
$ emerge -pvt iwd

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild  N     ] net-wireless/iwd-1.4::gentoo  USE="client crda monitor -ofono -wired" CPU_FLAGS_X86="aes ssse3" 812 KiB
[ebuild  N     ]  sys-apps/dbus-1.12.16::gentoo  USE="X -debug -doc -elogind (-selinux) -static-libs -systemd -test -user-session" ABI_X86="(64) -32 (-x32)" 2,045 KiB
[ebuild  NS    ]   app-text/docbook-xml-dtd-4.4-r3:4.4::gentoo [4.1.2-r7:4.1.2::gentoo, 4.2-r3:4.2::gentoo, 4.3-r2:4.3::gentoo] 94 KiB
[ebuild  N     ]   acct-user/messagebus-0::gentoo  0 KiB
[ebuild  N     ]    acct-group/messagebus-0::gentoo  0 KiB
[ebuild  N     ]  net-wireless/wireless-regdb-20190603::gentoo  23 KiB
[ebuild  N     ]  dev-libs/ell-0.27::gentoo  USE="-glib -pie" ABI_X86="(64) -32 (-x32)" 464 KiB

Total: 7 packages (6 new, 1 in new slot), Size of downloads: 3,436 KiB

Searching the internet I found https://github.com/dylanaraps/eiwd but no ebuild yet :-(

Could start with something like this?
eiwd-1.5.4.ebuild:
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
MY_PV=$(ver_rs 2 '-')

DESCRIPTION="iwd without dbus"
HOMEPAGE="https://github.com/dylanaraps/eiwd"
SRC_URI="https://github.com/dylanaraps/eiwd/archive/$MY_PV.tar.gz -> ${P}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND=""

S="${WORKDIR}/${PN}-${MY_PV}"


Last edited by charles17 on Sun Mar 29, 2020 6:17 am; edited 3 times in total
Back to top
View user's profile Send private message
GDH-gentoo
l33t
l33t


Joined: 20 Jul 2019
Posts: 711
Location: South America

PostPosted: Wed Mar 11, 2020 9:50 pm    Post subject: Re: net-wireless/iwd without dbus Reply with quote

charles17 wrote:
Has someone tried building net-wireless/iwd without dbus?
D-Bus is a hard dependency; iwd exposes D-Bus interfaces (net.connman.iwd.*). As far as I can tell, only the pkg-config .pc file from sys-apps/dbus is needed at compile-time; D-Bus client functionality is actually implemented using dev-libs/ell. At runtime, though, programs will try to connect to the dbus-daemon process that implements the system-wide message bus, and fail if it isn't there.

charles17 wrote:
Searching the internet I found https://github.com/dylanaraps/eiwd but no ebuild yet :(
Judging by the description, eiwd is essentially iwd with a compile-time option to remove D-Bus client code. So you could probably make an ebuild for it by slightly modifying one of the net-wireless/iwd ones.

eiwd's README wrote:
All that has changed in the iwd code is the insertion of ifdefs to block away dbus code when desired.
I don't know how much functionality is lost without the D-Bus interfaces, though.

Last edited by GDH-gentoo on Wed Mar 11, 2020 10:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3640

PostPosted: Wed Mar 11, 2020 10:28 pm    Post subject: Re: net-wireless/iwd without dbus Reply with quote

GDH-gentoo wrote:
... At runtime, though, programs will try to connect to the dbus-daemon process ...

Which are those programs that will try to? On a system where net-wireless/iwd is the only package using dbus, what is the benefit of dbus-daemon?
Back to top
View user's profile Send private message
GDH-gentoo
l33t
l33t


Joined: 20 Jul 2019
Posts: 711
Location: South America

PostPosted: Thu Mar 12, 2020 1:42 am    Post subject: Re: net-wireless/iwd without dbus Reply with quote

charles17 wrote:
GDH-gentoo wrote:
... At runtime, though, programs will try to connect to the dbus-daemon process ...

Which are those programs that will try to?
At least iwd, iwctl, ead, hwsim and iwd's ofono plugin. iwctl seems to talk to iwd via D-Bus.

In fact, it seems that eiwd's configure script will arrange not to install iwctl, ead and hwsim if D-Bus is disabled, and iwmon won't be installed either, although I can't figure out the relationship between iwmon and D-Bus from a quick look.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3640

PostPosted: Mon Mar 16, 2020 12:16 pm    Post subject: Re: net-wireless/iwd without dbus Reply with quote

GDH-gentoo wrote:
In fact, it seems that eiwd's configure script ...

That's strange. In README it says
https://github.com/dylanaraps/eiwd/blob/master/README wrote:
BUILDING WITHOUT DBUS

./configure \
--prefix=/usr \
--localstatedir=/var \
--disable-dbus

make
make DESTDIR="BLA BLA" install

But a configure is not available in the sources. What am I missing?
Back to top
View user's profile Send private message
GDH-gentoo
l33t
l33t


Joined: 20 Jul 2019
Posts: 711
Location: South America

PostPosted: Mon Mar 16, 2020 12:35 pm    Post subject: Re: net-wireless/iwd without dbus Reply with quote

charles17 wrote:
But a configure is not available in the sources. What am I missing?
What is available is configure.ac, which is processed by autoconf to generate the configure script. Software authors generally run autoconf when they make a release archive.

Files generated from other files are not generally included in Git repositories.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3640

PostPosted: Mon Mar 16, 2020 2:08 pm    Post subject: Reply with quote

Ok, let me try. With the first attempt
eiwd-1.5.4.ebuild:
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

MY_PV="$(ver_rs 2 '-')"
MY_P="${PN}-${MY_PV}"

DESCRIPTION="iwd without dbus"
HOMEPAGE="https://github.com/dylanaraps/eiwd"
SRC_URI="https://github.com/dylanaraps/eiwd/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND=""

S="${WORKDIR}/${MY_P}"

When I run ebuild eiwd-1.5.4.ebuild clean install it produces
Code:
$ tree /var/tmp/portage/net-wireless/eiwd-1.5.4/image
/var/tmp/portage/net-wireless/eiwd-1.5.4/image
└── usr
    └── share
        └── doc
            └── eiwd-1.5.4
                ├── AUTHORS.bz2
                ├── ChangeLog.bz2
                ├── README.bz2
                └── TODO.bz2

Comparing with available ebuilds from the tree I found eautoreconf from autotools and added
Code:
src_prepare() {
        default
        eautoreconf
}

This way, running ebuild eiwd-1.5.4.ebuild clean install again starts configuring but then stops with
Code:
checking for readline/readline.h... yes
checking D-Bus data directory... Package dbus-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `dbus-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'dbus-1' found
Package dbus-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `dbus-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'dbus-1' found
configure: error: D-Bus data directory is required

D-Bus is what I want to avoid, so adding
Code:
src_configure() {
        local myeconfargs=(
                --disable-dbus
        )
        econf "${myeconfargs[@]}"
}

With this added, running ebuild eiwd-1.5.4.ebuild clean install can finnish configuration and starts compilation.
This time it stops with cannot create directory ‘ell’: File exists
Code:
config.status: executing libtool commands

        iwd 1.5

>>> Source configured.
>>> Compiling source in /var/tmp/portage/net-wireless/eiwd-1.5.4/work/eiwd-1.5-4 ...
make -j8
/bin/mkdir -p ell
echo -n > ell/ell.h
/bin/mkdir -p src
/bin/mkdir: cannot create directory ‘ell’: File exists
make: *** [Makefile:3578: ell/internal] Error 1
make: *** Waiting for unfinished jobs....
./src/genbuiltin   > src/builtin.h
/bin/sh: ell/ell.h: No such file or directory
make: *** [Makefile:3586: ell/ell.h] Error 1

It turns out there is a
Code:
$ file /var/tmp/portage/net-wireless/eiwd-1.5.4/work/eiwd-1.5-4/ell
/var/tmp/portage/net-wireless/eiwd-1.5.4/work/eiwd-1.5-4/ell: broken symbolic link to ell-src/ell/

I remove it in src_prepare
Code:
src_prepare() {
    default
    rm -r ell
    eautoreconf
}

This runs somewhat further and stops with
Code:
        echo "#include <$f>" >> ell/ell.h ; \
done
make --no-print-directory all-am
make[1]: *** No rule to make target 'ell/util.c', needed by 'ell/util.lo'.  Stop.
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1430: all] Error 2

Ok, something with ell. There was something in the README. I will add --enable-external-ell
Code:
src_configure() {
        local myeconfargs=(
                --disable-dbus
                --enable-external-ell )

        econf "${myeconfargs[@]}"
}

This time it doesn't start compilation but stops while configuring
Code:
checking for rst2man... no
checking for rst2man.py... rst2man.py
checking for ell >= 0.28... no
configure: error: Embedded Linux library >= 0.28 is required

So I emerged dev-libs/ell-0.28 and tried again with ebuild eiwd-1.5.4.ebuild clean install
It runs compilation but then stops with bunch of undefined reference
Code:
libtool: link: x86_64-pc-linux-gnu-gcc -fvisibility=hidden -DUNITDIR=\"./unit/\" -DCERTDIR=\"./unit/\" -march=native -O2 -pipe -Wl,-O1 -o src/iwd src/main.o src/plugin.o src/netdev.o src/wiphy.o src/device.o src/station.o src/ie.o src/mpdu.o src/eapol.o src/eapolutil.o src/handshake.o src/scan.o src/common.o src/agent.o src/storage.o src/network.o src/wsc.o src/backtrace.o src/knownnetworks.o src/rfkill.o src/ft.o src/ap.o src/adhoc.o src/sae.o src/nl80211util.o src/nl80211cmd.o src/owe.o src/blacklist.o src/manager.o src/erp.o src/fils.o src/anqp.o src/anqputil.o src/netconfig.o src/resolve.o src/hotspot.o src/p2putil.o src/module.o src/rrm.o src/frame-xchg.o src/eap.o src/eap-wsc.o src/eap-md5.o src/eap-tls.o src/eap-ttls.o src/eap-mschapv2.o src/eap-sim.o src/eap-aka.o src/eap-peap.o src/eap-gtc.o src/eap-pwd.o src/util.o src/crypto.o src/wscutil.o src/simutil.o src/simauth.o src/watchlist.o src/eap-tls-common.o src/mschaputil.o  -Wl,--as-needed -lell -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_set_mac_cb':
netdev.c:(.text+0x11f6): undefined reference to `l_rtnl_set_powered'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_check_set_mac':
netdev.c:(.text+0x1b15): undefined reference to `l_rtnl_set_mac'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_connect_ok':
netdev.c:(.text+0x334b): undefined reference to `l_rtnl_set_linkmode_and_operstate'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_set_iftype_cb':
netdev.c:(.text+0x38f3): undefined reference to `l_rtnl_set_powered'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_initial_down_cb':
netdev.c:(.text+0x3fbe): undefined reference to `l_rtnl_set_powered'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_getlink_cb':
netdev.c:(.text+0x472d): undefined reference to `l_rtnl_set_powered'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_set_powered':
netdev.c:(.text+0x6831): undefined reference to `l_rtnl_set_powered'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_set_iftype':
netdev.c:(.text+0x74f7): undefined reference to `l_rtnl_set_powered'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_initial_up_cb':
netdev.c:(.text+0x7749): undefined reference to `l_rtnl_set_linkmode_and_operstate'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_shutdown_one':
netdev.c:(.text+0x4506): undefined reference to `l_rtnl_set_powered'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netconfig.o: in function `netconfig_uninstall_address':
netconfig.c:(.text+0x3f3): undefined reference to `l_rtnl_ifaddr4_delete'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: netconfig.c:(.text+0x465): undefined reference to `l_rtnl_ifaddr6_delete'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netconfig.o: in function `netconfig_init':
netconfig.c:(.text+0x5eb): undefined reference to `l_rtnl_ifaddr4_dump'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: netconfig.c:(.text+0x631): undefined reference to `l_rtnl_ifaddr6_dump'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netconfig.o: in function `netconfig_ipv4_ifaddr_add_cmd_cb':
netconfig.c:(.text+0xb62): undefined reference to `l_rtnl_route4_add_connected'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: netconfig.c:(.text+0xbdb): undefined reference to `l_rtnl_route4_add_gateway'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netconfig.o: in function `netconfig_install_address':
netconfig.c:(.text+0x100b): undefined reference to `l_rtnl_ifaddr4_add'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: netconfig.c:(.text+0x1085): undefined reference to `l_rtnl_ifaddr6_add'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netconfig.o: in function `netconfig_ifaddr_ipv6_notify':
netconfig.c:(.text+0x1520): undefined reference to `l_rtnl_ifaddr6_extract'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: netconfig.c:(.text+0x15a3): undefined reference to `l_rtnl_ifaddr6_extract'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netconfig.o: in function `netconfig_ifaddr_notify':
netconfig.c:(.text+0x1752): undefined reference to `l_rtnl_ifaddr4_extract'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: netconfig.c:(.text+0x17e2): undefined reference to `l_rtnl_ifaddr4_extract'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netconfig.o: in function `netconfig_ipv6_ifaddr_add_cmd_cb':
netconfig.c:(.text+0x1a49): undefined reference to `l_rtnl_route6_add_gateway'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netconfig.o: in function `netconfig_reset':
netconfig.c:(.text+0x1d91): undefined reference to `l_rtnl_route6_delete_gateway'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/frame-xchg.o: in function `frame_watch_group_io_write':
frame-xchg.c:(.text+0xa4): undefined reference to `l_genl_msg_to_data'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/frame-xchg.o: in function `frame_watch_group_io_read':
frame-xchg.c:(.text+0x8c4): undefined reference to `l_genl_msg_new_from_data'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:1844: src/iwd] Error 1
make: *** [Makefile:1430: all] Error 2

I don't yet uderstand what this tries telling me. It all resolves to
Code:
$ ls -l /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld
lrwxrwxrwx 1 root root 47 Mar  1 17:05 /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld -> /usr/x86_64-pc-linux-gnu/binutils-bin/2.33.1/ld

How could I understand what's wrong here?
Back to top
View user's profile Send private message
GDH-gentoo
l33t
l33t


Joined: 20 Jul 2019
Posts: 711
Location: South America

PostPosted: Mon Mar 16, 2020 4:42 pm    Post subject: Reply with quote

charles17 wrote:
Code:
[...]
checking for ell >= 0.28... no
configure: error: Embedded Linux library >= 0.28 is required

So I emerged dev-libs/ell-0.28 and tried again with ebuild eiwd-1.5.4.ebuild clean install
It runs compilation but then stops with bunch of undefined reference
The downloaded code seems to require functions introduced to dev-libs/ell after version 0.28, that haven't made it to a new (numbered) release yet:

Commit log

See those commits labeled "rtnl:" and "genl:" after the 0.28 tag? I wonder if some versions of net-wireless/iwd have the same problem. If they don't, you might want to try earlier versions of eiwd.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6921

PostPosted: Mon Mar 16, 2020 5:26 pm    Post subject: Reply with quote

Is there something special iwd does that makes it worth all this hassle instead of simply using wpa_supplicant?
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3640

PostPosted: Mon Mar 16, 2020 5:43 pm    Post subject: Reply with quote

GDH-gentoo wrote:
The downloaded code seems to require functions introduced to dev-libs/ell after version 0.28, that haven't made it to a new (numbered) release yet:

Commit log

I saw that upstream saying »ell-src @ 07b7923 iwd: new submodule layout«. But instead of investing time for working with EGIT_COMMIT just decided to try with sys-dev/ell-0.28
Thanks to your hint I replaced dev-libs/ell-0.28 with 9999 and the next ebuild eiwd-1.5.4.ebuild clean install again could finish configuration and started compilation:
Code:
config.status: executing libtool commands

    iwd 1.5

>>> Source configured.
>>> Compiling source in /var/tmp/portage/net-wireless/eiwd-1.5.4/work/eiwd-1.5-4 ...
make -j8
/bin/mkdir -p src
./src/genbuiltin   > src/builtin.h
make --no-print-directory all-am
/bin/mkdir -p src/ && rst2man.py --strict --no-raw --no-generator --no-datestamp src/iwd.rst src/iwd.8
/bin/mkdir -p src/ && rst2man.py --strict --no-raw --no-generator --no-datestamp src/iwd.debug.rst src/iwd.debug.7
/bin/mkdir -p src/ && rst2man.py --strict --no-raw --no-generator --no-datestamp src/iwd.config.rst src/iwd.config.5
/bin/mkdir -p src/ && rst2man.py --strict --no-raw --no-generator --no-datestamp src/iwd.network.rst src/iwd.network.5
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.     -fvisibility=hidden -DUNITDIR=\""./unit/"\" -DCERTDIR=\""./unit/"\"   -march=native -O2 -pipe -c -o src/main.o src/main.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.     -fvisibility=hidden -DUNITDIR=\""./unit/"\" -DCERTDIR=\""./unit/"\"   -march=native -O2 -pipe -c -o src/plugin.o src/plugin.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.     -fvisibility=hidden -DUNITDIR=\""./unit/"\" -DCERTDIR=\""./unit/"\"   -march=native -O2 -pipe -c -o src/netdev.o src/netdev.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.     -fvisibility=hidden -DUNITDIR=\""./unit/"\" -DCERTDIR=\""./unit/"\"   -march=native -O2 -pipe -c -o src/wiphy.o src/wiphy.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.     -fvisibility=hidden -DUNITDIR=\""./unit/"\" -DCERTDIR=\""./unit/"\"   -march=native -O2 -pipe -c -o src/device.o src/device.c
src/netdev.c: In function 'netdev_check_set_mac':
src/netdev.c:4163:24: warning: passing argument 5 of 'l_rtnl_set_mac' from incompatible pointer type [-Wincompatible-pointer-types]
 4163 |     netdev_set_mac_cb, netdev, NULL);
      |                        ^~~~~~
      |                        |
      |                        struct netdev *
In file included from /usr/include/ell/ell.h:55,
                 from src/netdev.c:40:
/usr/include/ell/rtnl.h:42:31: note: expected 'l_netlink_command_func_t' {aka 'void (*)(int,  short unsigned int,  const void *, unsigned int,  void *)'} but argument is of type 'struct netdev *'
   42 |      l_netlink_command_func_t cb,
      |      ~~~~~~~~~~~~~~~~~~~~~~~~~^~
src/netdev.c:4162:3: error: too few arguments to function 'l_rtnl_set_mac'
 4162 |   l_rtnl_set_mac(rtnl, netdev->index, netdev->set_mac_once,
      |   ^~~~~~~~~~~~~~
In file included from /usr/include/ell/ell.h:55,
                 from src/netdev.c:40:
/usr/include/ell/rtnl.h:39:10: note: declared here
   39 | uint32_t l_rtnl_set_mac(struct l_netlink *rtnl, int ifindex,
      |          ^~~~~~~~~~~~~~
make[1]: *** [Makefile:2190: src/netdev.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1430: all] Error 2


GDH-gentoo wrote:
See those commits labeled "rtnl:" and "genl:" after the 0.28 tag? I wonder if some versions of net-wireless/iwd have the same problem. If they don't, you might want to try earlier versions of eiwd.

I'm not in a hurry, I want to learn how to do it. Next to find seems what's wrong with l_rtnl_set_mac
Could there already some missing kernel options be involved? I haven't yet fixed all those 10 options that iwd would require:
Code:
$ ebuild /var/db/repos/gentoo/net-wireless/iwd/iwd-1.5.ebuild prepare
 * iwd-1.5.tar.xz BLAKE2B SHA512 size ;-) ...                                                                                                                                                                                                                                                                           [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                                                                                                                                                                                    [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                                                                                                                                                                                   [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                                                                                                                                                                                  [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     4.19.97-gentoo
 * Checking for suitable kernel configuration options...
 *   CONFIG_CRYPTO_MD4:  is not set when it should be.
 *   CONFIG_CRYPTO_SHA512:  is not set when it should be.
 *   CONFIG_CRYPTO_USER_API_HASH:  is not set when it should be.
 *   CONFIG_CRYPTO_USER_API_SKCIPHER:    is not set when it should be.
 *   REGULATORY DOMAIN PROBLEM: please enable CFG80211_CRDA_SUPPORT for proper regulatory domain support
 *   CRYPTO_DES3_EDE_X86_64: enable for increased performance
 *   CRYPTO_AES_NI_INTEL: enable for increased performance
 *   CRYPTO_SHA1_SSSE3: enable for increased performance
 *   CRYPTO_SHA256_SSSE3: enable for increased performance
 *   CRYPTO_SHA512_SSSE3: enable for increased performance
 * Please check to make sure these options are set correctly.
 * Failure to do so may cause unexpected problems.
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     4.19.97-gentoo
>>> Unpacking source...
>>> Unpacking iwd-1.5.tar.xz to /var/tmp/portage/net-wireless/iwd-1.5/work
>>> Source unpacked in /var/tmp/portage/net-wireless/iwd-1.5/work
>>> Preparing source in /var/tmp/portage/net-wireless/iwd-1.5/work/iwd-1.5 ...
>>> Source prepared.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3640

PostPosted: Mon Mar 16, 2020 5:50 pm    Post subject: Reply with quote

Ant P. wrote:
Is there something special iwd does that makes it worth all this hassle instead of simply using wpa_supplicant?

It's quite new ...
https://wiki.gentoo.org/wiki/Iwd :
Potential benefits of iwd include:

    simplification of network management
    faster network discovery
    fast and reliable roaming
    using less system resources
    using features offered by the linux kernel
    support for enterprise security methods like EAP
    support for kernel asymetric key rings and trusted platform modules (TPM)
    support for multiple clients

But I it depends on D-Bus which I want to avoid. So I am trying with eiwd
Back to top
View user's profile Send private message
GDH-gentoo
l33t
l33t


Joined: 20 Jul 2019
Posts: 711
Location: South America

PostPosted: Mon Mar 16, 2020 8:58 pm    Post subject: Re: net-wireless/iwd without dbus Reply with quote

charles17 wrote:
Code:
src/netdev.c: In function 'netdev_check_set_mac':
src/netdev.c:4163:24: warning: passing argument 5 of 'l_rtnl_set_mac' from incompatible pointer type [-Wincompatible-pointer-types]
 4163 |     netdev_set_mac_cb, netdev, NULL);
      |                        ^~~~~~
      |                        |
      |                        struct netdev *
In file included from /usr/include/ell/ell.h:55,
                 from src/netdev.c:40:
/usr/include/ell/rtnl.h:42:31: note: expected 'l_netlink_command_func_t' {aka 'void (*)(int,  short unsigned int,  const void *, unsigned int,  void *)'} but argument is of type 'struct netdev *'
   42 |      l_netlink_command_func_t cb,
      |      ~~~~~~~~~~~~~~~~~~~~~~~~~^~
src/netdev.c:4162:3: error: too few arguments to function 'l_rtnl_set_mac'
 4162 |   l_rtnl_set_mac(rtnl, netdev->index, netdev->set_mac_once,
      |   ^~~~~~~~~~~~~~
API change. l_rtnl_set_mac() gained an extra parameter. You need this fix , which was committed after the release of eiwd 1.5-4. You probably can do that as a patch that the ebuild can apply.

GDH-gentoo wrote:
[...] and iwmon won't be installed either, although I can't figure out the relationship between iwmon and D-Bus from a quick look.
Aaaand there is none, so they fixed that too, also after the release of 1.5-4. You might want that one as well.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3640

PostPosted: Thu Mar 19, 2020 7:53 am    Post subject: Re: net-wireless/iwd without dbus Reply with quote

GDH-gentoo wrote:
API change. l_rtnl_set_mac() gained an extra parameter. You need this fix , which was committed after the release of eiwd 1.5-4. You probably can do that as a patch that the ebuild can apply.

Thanks for checking all this.
Regarding the »gained an extra parameter« I spent much time with external-ell (patching dev-libs/ell-0.28 to that commit) - no luck.
But I can use this patch also for the bundled ell. So I downloaded it (slightly renamed) to the filesdir and masked the --enable-external-ell with a USE flag. The other patch listed in PATCHES is »You need this fix «.
Then I replaced those single patches with one up-to-final patch for bundled ell and another up-to-final patch for eiwd itself.
eiwd-1.5.4.ebuild:
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit autotools

MY_PV="$(ver_rs 2 '-')"
MY_P="${PN}-${MY_PV}"

DESCRIPTION="iwd without dbus"
HOMEPAGE="https://github.com/dylanaraps/eiwd"
SRC_URI="https://github.com/dylanaraps/eiwd/releases/download/${MY_PV}/${MY_P}.tar.xz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="system-ell"

COMMON_DEPEND="system-ell? ( ~dev-libs/ell-0.28 )"
DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND=""

S="${WORKDIR}/${MY_P}"

PATCHES=(
#   "${FILESDIR}/1.5.4-ell-baae4021.patch"
    "${FILESDIR}/1.5.4-ell-from-07b7923-to-b7f6e7b5.patch"
#   "${FILESDIR}/1.5.4-421af060f8846129db7d1d195665d72bf3d6ab6e.patch"
    "${FILESDIR}/1.5.4-from-b160b43-to-758aaa0.patch"
)

src_prepare() {
    default
    eautoreconf
}

src_configure() {
    local myeconfargs=(
        --sysconfdir="${EPREFIX}"/etc/iwd --localstatedir="${EPREFIX}"/var
        --disable-dbus
        $(use_enable system-ell external-ell)
    )
    econf "${myeconfargs[@]}"
}

src_install() {
    default
    keepdir /var/lib/iwd
}

And this compiles with no errors, another ebuild eiwd-1.5.4.ebuild clean install resulting in:
Code:
$ tree /var/tmp/portage/net-wireless/eiwd-1.5.4/image/
/var/tmp/portage/net-wireless/eiwd-1.5.4/image/
├── usr
│   ├── bin
│   │   ├── iwd_passphrase
│   │   └── iwmon
│   ├── libexec
│   │   └── iwd
│   └── share
│       ├── doc
│       │   └── eiwd-1.5.4
│       │       ├── AUTHORS.bz2
│       │       ├── ChangeLog.bz2
│       │       ├── README.bz2
│       │       └── TODO.bz2
│       └── man
│           ├── man1
│           │   └── iwmon.1.bz2
│           ├── man5
│           │   ├── iwd.config.5.bz2
│           │   └── iwd.network.5.bz2
│           ├── man7
│           │   └── iwd.debug.7.bz2
│           └── man8
│               └── iwd.8.bz2
└── var
    └── lib
        └── iwd

Another question: On net-wireless/iwd I can see append-cflags "-fsigned-char". What's this good for? Would I need to add it too?
Back to top
View user's profile Send private message
GDH-gentoo
l33t
l33t


Joined: 20 Jul 2019
Posts: 711
Location: South America

PostPosted: Thu Mar 19, 2020 2:07 pm    Post subject: Re: net-wireless/iwd without dbus Reply with quote

charles17 wrote:
eiwd-1.5.4.ebuild:
COMMON_DEPEND="system-ell? ( ~dev-libs/ell-0.28 )"
DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND=""
You are not assigning COMMON_DEPEND to anything...

charles17 wrote:
Another question: On net-wireless/iwd I can see append-cflags "-fsigned-char". What's this good for? Would I need to add it too?
C language rules are that type char has the same signedness, size, representation and alignment requirements as either signed char or unsigned char, and that choice is implementation-defined, i.e. up to each implementation, but documented. GCC's -fsigned-char option makes char like signed char.

Because they pretty much share the same code, the ebuild for eiwd should probably do almost everything that the one for iwd does. That also means the same pkg_pretend() for testing kernel features, the same dependencies except sys-apps/dbus and maybe virtual/pkgconfig, and the same OpenRC service script (files/iwd.initd-r1).
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3640

PostPosted: Mon Mar 23, 2020 5:12 pm    Post subject: Re: net-wireless/iwd without dbus Reply with quote

GDH-gentoo wrote:
charles17 wrote:
eiwd-1.5.4.ebuild:
COMMON_DEPEND="system-ell? ( ~dev-libs/ell-0.28 )"
DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND=""
You are not assigning COMMON_DEPEND to anything...

Beginner's mistakes ... Thanks for reading so carefully.


GDH-gentoo wrote:
charles17 wrote:
Another question: On net-wireless/iwd I can see append-cflags "-fsigned-char". What's this good for? Would I need to add it too?
C language rules are that type char has the same signedness, size, representation and alignment requirements as either signed char or unsigned char, and that choice is implementation-defined, i.e. up to each implementation, but documented. GCC's -fsigned-char option makes char like signed char.

No clue about C language rules. I need to find some simplified test cases to learn. For the moment I just keep it without fully understanding the background.


GDH-gentoo wrote:
Because they pretty much share the same code, the ebuild for eiwd should probably do almost everything that the one for iwd does. That also means the same pkg_pretend() for testing kernel features, the same dependencies except sys-apps/dbus and maybe virtual/pkgconfig, and the same OpenRC service script (files/iwd.initd-r1).

Agreed. But I won't blindly copy it here without testing. Will do that step by step.


Yesterday upstream released version 1.5-5, so I can skip the patches (and also eautoreconf) I applied to 1.5-4.
eiwd-1.5.5.ebuild:
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit flag-o-matic

MY_PV="$(ver_rs 2 '-')"
MY_P="${PN}-${MY_PV}"

DESCRIPTION="iwd without dbus"
HOMEPAGE="https://github.com/dylanaraps/eiwd"
SRC_URI="https://github.com/dylanaraps/eiwd/releases/download/${MY_PV}/${MY_P}.tar.xz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="system-ell"

COMMON_DEPEND="system-ell? ( ~dev-libs/ell-0.28 )"
RDEPEND="${COMMON_DEPEND}
    net-wireless/wireless-regdb"
DEPEND="${COMMON_DEPEND}
    virtual/pkgconfig"

S="${WORKDIR}/${MY_P}"

src_configure() {
    append-cflags "-fsigned-char"
    local myeconfargs=(
        --sysconfdir="${EPREFIX}"/etc/iwd --localstatedir="${EPREFIX}"/var
        --disable-dbus
        $(use_enable system-ell external-ell)
    )
    econf "${myeconfargs[@]}"
}

src_install() {
    default
    keepdir /var/lib/iwd
}


Version 1.5-5 compiles without problems as long I stay with bundled ell. But once I try with external-ell then it again runs into errors.
Code:
COMMON_DEPEND="system-ell? ( ~dev-libs/ell-9999 )"

Code:
c/netconfig.o src/resolve.o src/hotspot.o src/p2putil.o src/module.o src/rrm.o src/frame-xchg.o src/eap.o src/eap-wsc.o src/eap-md5.o src/eap-tls.o src/eap-ttls.o src/eap-mschapv2.o src/eap-sim.o src/eap-aka.o src/eap-peap.o src/eap-gtc.o src/eap-pwd.o src/util.o src/crypto.o src/wscutil.o src/simutil.o src/simauth.o src/watchlist.o src/eap-tls-common.o src/mschaputil.o    -lell -ldl -ldl
libtool: link: x86_64-pc-linux-gnu-gcc -fvisibility=hidden -DUNITDIR=\"./unit/\" -DCERTDIR=\"./unit/\" -march=native -O2 -pipe -fsigned-char -Wl,-O1 -Wl,--as-needed -o tools/probe-req tools/probe-req.o src/mpdu.o src/ie.o src/nl80211util.o src/util.o src/common.o  -lell -ldl
libtool: link: x86_64-pc-linux-gnu-gcc -fvisibility=hidden -DUNITDIR=\"./unit/\" -DCERTDIR=\"./unit/\" -march=native -O2 -pipe -fsigned-char -Wl,-O1 -Wl,--as-needed -o src/iwd src/main.o src/plugin.o src/netdev.o src/wiphy.o src/device.o src/station.o src/ie.o src/mpdu.o src/eapol.o src/eapolutil.o src/handshake.o src/scan.o src/common.o src/agent.o src/storage.o src/network.o src/wsc.o src/backtrace.o src/knownnetworks.o src/rfkill.o src/ft.o src/ap.o src/adhoc.o src/sae.o src/nl80211util.o src/nl80211cmd.o src/owe.o src/blacklist.o src/manager.o src/erp.o src/fils.o src/anqp.o src/anqputil.o src/netconfig.o src/resolve.o src/hotspot.o src/p2putil.o src/module.o src/rrm.o src/frame-xchg.o src/eap.o src/eap-wsc.o src/eap-md5.o src/eap-tls.o src/eap-ttls.o src/eap-mschapv2.o src/eap-sim.o src/eap-aka.o src/eap-peap.o src/eap-gtc.o src/eap-pwd.o src/util.o src/crypto.o src/wscutil.o src/simutil.o src/simauth.o src/watchlist.o src/eap-tls-common.o src/mschaputil.o  -lell -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_check_set_mac':
netdev.c:(.text+0x126b): undefined reference to `l_rtnl_set_mac'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_connect_ok':
netdev.c:(.text+0x34a9): undefined reference to `l_rtnl_set_linkmode_and_operstate'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_initial_down_cb':
netdev.c:(.text+0x3a5c): undefined reference to `l_rtnl_set_powered'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_set_iftype_cb':
netdev.c:(.text+0x3d31): undefined reference to `l_rtnl_set_powered'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_mac_power_down_cb':
netdev.c:(.text+0x47df): undefined reference to `l_rtnl_set_mac'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_getlink_cb':
netdev.c:(.text+0x4bfb): undefined reference to `l_rtnl_set_powered'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_connect_common':
netdev.c:(.text+0x5611): undefined reference to `l_rtnl_set_powered'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_set_powered':
netdev.c:(.text+0x6dff): undefined reference to `l_rtnl_set_powered'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_set_iftype':
netdev.c:(.text+0x7ad1): undefined reference to `l_rtnl_set_powered'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_initial_up_cb':
netdev.c:(.text+0x7d27): undefined reference to `l_rtnl_set_linkmode_and_operstate'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netdev.o: in function `netdev_shutdown_one':
netdev.c:(.text+0x49be): undefined reference to `l_rtnl_set_powered'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netconfig.o: in function `netconfig_uninstall_address':
netconfig.c:(.text+0x3f1): undefined reference to `l_rtnl_ifaddr4_delete'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: netconfig.c:(.text+0x463): undefined reference to `l_rtnl_ifaddr6_delete'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netconfig.o: in function `netconfig_init':
netconfig.c:(.text+0x5e9): undefined reference to `l_rtnl_ifaddr4_dump'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: netconfig.c:(.text+0x62d): undefined reference to `l_rtnl_ifaddr6_dump'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netconfig.o: in function `netconfig_ipv4_ifaddr_add_cmd_cb':
netconfig.c:(.text+0xb60): undefined reference to `l_rtnl_route4_add_connected'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: netconfig.c:(.text+0xbd7): undefined reference to `l_rtnl_route4_add_gateway'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netconfig.o: in function `netconfig_install_address':
netconfig.c:(.text+0x1009): undefined reference to `l_rtnl_ifaddr4_add'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: netconfig.c:(.text+0x1083): undefined reference to `l_rtnl_ifaddr6_add'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netconfig.o: in function `netconfig_ifaddr_ipv6_notify':
netconfig.c:(.text+0x151e): undefined reference to `l_rtnl_ifaddr6_extract'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: netconfig.c:(.text+0x15a1): undefined reference to `l_rtnl_ifaddr6_extract'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netconfig.o: in function `netconfig_ifaddr_notify':
netconfig.c:(.text+0x1743): undefined reference to `l_rtnl_ifaddr4_extract'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: netconfig.c:(.text+0x17c8): undefined reference to `l_rtnl_ifaddr4_extract'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netconfig.o: in function `netconfig_ipv6_ifaddr_add_cmd_cb':
netconfig.c:(.text+0x1a27): undefined reference to `l_rtnl_route6_add_gateway'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/netconfig.o: in function `netconfig_reset':
netconfig.c:(.text+0x1d6f): undefined reference to `l_rtnl_route6_delete_gateway'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:1861: src/iwd] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1447: all] Error 2

Could you point me to the snippet telling what's wrong?
Back to top
View user's profile Send private message
GDH-gentoo
l33t
l33t


Joined: 20 Jul 2019
Posts: 711
Location: South America

PostPosted: Mon Mar 23, 2020 8:18 pm    Post subject: Re: net-wireless/iwd without dbus Reply with quote

charles17 wrote:
GDH-gentoo wrote:
C language rules are that type char has the same signedness, size, representation and alignment requirements as either signed char or unsigned char, and that choice is implementation-defined, i.e. up to each implementation, but documented. GCC's -fsigned-char option makes char like signed char.

No clue about C language rules. I need to find some simplified test cases to learn. For the moment I just keep it without fully understanding the background.
dev-libs/ell has that because of bug #662694, and net-wireless/iwd has that because of this. I see you added it to your ebuild, I would have done the same just in case.

charles17 wrote:
Version 1.5-5 compiles without problems as long I stay with bundled ell. But once I try with external-ell then it again runs into errors.
[...]
Could you point me to the snippet telling what's wrong?
It is failing again because the installed library is missing functions introduced in later commits to the Git repository. If you really have dev-libs/ell-9999 installed, maybe you could try installing it again. I believe that each time you do that, the ebuild pulls the latest code from the repository (unless you have EGIT_COMMIT set or something like that), so it should get all missing functions, but I have never used live ebuilds.

By the way:

GDH-gentoo wrote:
That also means [...] the same dependencies except sys-apps/dbus and maybe virtual/pkgconfig
virtual/pkgconfig is needed if you set the system-ell USE flag (so that it can find the external ell), so it is OK that you kept it in DEPEND.

Last edited by GDH-gentoo on Tue Mar 24, 2020 2:21 am; edited 1 time in total
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3640

PostPosted: Mon Mar 23, 2020 10:44 pm    Post subject: Re: net-wireless/iwd without dbus Reply with quote

GDH-gentoo wrote:

charles17 wrote:
Version 1.5-5 compiles without problems as long I stay with bundled ell. But once I try with external-ell then it again runs into errors.
[...]
Could you point me to the snippet telling what's wrong?
It is failing again because the installed library is missing functions introduced in later commits to the Git repository. If you really have dev-libs/ell-9999 installed, maybe you could try installing it again. I believe that each time you do that, the ebuild pulls the latest code from the repository (unless you have EGIT_COMMIT set or something like that), so it should get all missing functions, but I have never used live ebuilds.


Might there be something wrong with dev-libs/ell::gentoo or with virtual/pkgconfig (installed is dev-util/pkgconfig)? Or does pkgconfig need one more eclass inherited?

Just found a difference in the output lines containing netdev.o
Quote:
$ USE=system-ell ebuild eiwd-1.5.5.ebuild clean install | grep netdev.o
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -fvisibility=hidden -DUNITDIR=\""./unit/"\" -DCERTDIR=\""./unit/"\" -march=native -O2 -pipe -fsigned-char -c -o src/netdev.o src/netdev.c
/bin/sh ./libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -fvisibility=hidden -DUNITDIR=\""./unit/"\" -DCERTDIR=\""./unit/"\" -march=native -O2 -pipe -fsigned-char -Wl,-O1 -Wl,--as-needed -o src/iwd src/main.o src/plugin.o src/netdev.o src/wiphy.o src/device.o src/station.o src/ie.o src/mpdu.o src/eapol.o src/eapolutil.o src/handshake.o src/scan.o src/common.o src/agent.o src/storage.o src/network.o src/wsc.o src/backtrace.o src/knownnetworks.o src/rfkill.o src/ft.o src/ap.o src/adhoc.o src/sae.o src/nl80211util.o src/nl80211cmd.o src/owe.o src/blacklist.o src/manager.o src/erp.o src/fils.o src/anqp.o src/anqputil.o src/netconfig.o src/resolve.o src/hotspot.o src/p2putil.o src/module.o src/rrm.o src/frame-xchg.o src/eap.o src/eap-wsc.o src/eap-md5.o src/eap-tls.o src/eap-ttls.o src/eap-mschapv2.o src/eap-sim.o src/eap-aka.o src/eap-peap.o src/eap-gtc.o src/eap-pwd.o src/util.o src/crypto.o src/wscutil.o src/simutil.o src/simauth.o src/watchlist.o src/eap-tls-common.o src/mschaputil.o -lell -ldl -ldl
libtool: link: x86_64-pc-linux-gnu-gcc -fvisibility=hidden -DUNITDIR=\"./unit/\" -DCERTDIR=\"./unit/\" -march=native -O2 -pipe -fsigned-char -Wl,-O1 -o src/iwd src/main.o src/plugin.o src/netdev.o src/wiphy.o src/device.o src/station.o src/ie.o src/mpdu.o src/eapol.o src/eapolutil.o src/handshake.o src/scan.o src/common.o src/agent.o src/storage.o src/network.o src/wsc.o src/backtrace.o src/knownnetworks.o src/rfkill.o src/ft.o src/ap.o src/adhoc.o src/sae.o src/nl80211util.o src/nl80211cmd.o src/owe.o src/blacklist.o src/manager.o src/erp.o src/fils.o src/anqp.o src/anqputil.o src/netconfig.o src/resolve.o src/hotspot.o src/p2putil.o src/module.o src/rrm.o src/frame-xchg.o src/eap.o src/eap-wsc.o src/eap-md5.o src/eap-tls.o src/eap-ttls.o src/eap-mschapv2.o src/eap-sim.o src/eap-aka.o src/eap-peap.o src/eap-gtc.o src/eap-pwd.o src/util.o src/crypto.o src/wscutil.o src/simutil.o src/simauth.o src/watchlist.o src/eap-tls-common.o src/mschaputil.o -Wl,--as-needed -lell -ldl

Quote:
$ ebuild eiwd-1.5.5.ebuild clean install | grep netdev.o
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -fvisibility=hidden -DUNITDIR=\""./unit/"\" -DCERTDIR=\""./unit/"\" -march=native -O2 -pipe -fsigned-char -c -o src/netdev.o src/netdev.c
/bin/sh ./libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -fvisibility=hidden -DUNITDIR=\""./unit/"\" -DCERTDIR=\""./unit/"\" -march=native -O2 -pipe -fsigned-char -Wl,-O1 -Wl,--as-needed -o src/iwd src/main.o src/plugin.o src/netdev.o src/wiphy.o src/device.o src/station.o src/ie.o src/mpdu.o src/eapol.o src/eapolutil.o src/handshake.o src/scan.o src/common.o src/agent.o src/storage.o src/network.o src/wsc.o src/backtrace.o src/knownnetworks.o src/rfkill.o src/ft.o src/ap.o src/adhoc.o src/sae.o src/nl80211util.o src/nl80211cmd.o src/owe.o src/blacklist.o src/manager.o src/erp.o src/fils.o src/anqp.o src/anqputil.o src/netconfig.o src/resolve.o src/hotspot.o src/p2putil.o src/module.o src/rrm.o src/frame-xchg.o src/eap.o src/eap-wsc.o src/eap-md5.o src/eap-tls.o src/eap-ttls.o src/eap-mschapv2.o src/eap-sim.o src/eap-aka.o src/eap-peap.o src/eap-gtc.o src/eap-pwd.o src/util.o src/crypto.o src/wscutil.o src/simutil.o src/simauth.o src/watchlist.o src/eap-tls-common.o src/mschaputil.o ell/libell-internal.la -ldl
libtool: link: x86_64-pc-linux-gnu-gcc -fvisibility=hidden -DUNITDIR=\"./unit/\" -DCERTDIR=\"./unit/\" -march=native -O2 -pipe -fsigned-char -Wl,-O1 -o src/iwd src/main.o src/plugin.o src/netdev.o src/wiphy.o src/device.o src/station.o src/ie.o src/mpdu.o src/eapol.o src/eapolutil.o src/handshake.o src/scan.o src/common.o src/agent.o src/storage.o src/network.o src/wsc.o src/backtrace.o src/knownnetworks.o src/rfkill.o src/ft.o src/ap.o src/adhoc.o src/sae.o src/nl80211util.o src/nl80211cmd.o src/owe.o src/blacklist.o src/manager.o src/erp.o src/fils.o src/anqp.o src/anqputil.o src/netconfig.o src/resolve.o src/hotspot.o src/p2putil.o src/module.o src/rrm.o src/frame-xchg.o src/eap.o src/eap-wsc.o src/eap-md5.o src/eap-tls.o src/eap-ttls.o src/eap-mschapv2.o src/eap-sim.o src/eap-aka.o src/eap-peap.o src/eap-gtc.o src/eap-pwd.o src/util.o src/crypto.o src/wscutil.o src/simutil.o src/simauth.o src/watchlist.o src/eap-tls-common.o src/mschaputil.o -Wl,--as-needed ell/.libs/libell-internal.a -ldl

Not yet clear to me if this could explain the failing system-ell.
Back to top
View user's profile Send private message
GDH-gentoo
l33t
l33t


Joined: 20 Jul 2019
Posts: 711
Location: South America

PostPosted: Tue Mar 24, 2020 2:20 am    Post subject: Re: net-wireless/iwd without dbus Reply with quote

charles17 wrote:
It's exactly the same output, regardless if there is either of -0.28 or -9999 installed with or without the pie and glib USE flags.
* dev-libs/ell-0.28::gentoo
* dev-libs/ell-9999::gentoo

Might there be something wrong with dev-libs/ell::gentoo or with virtual/pkgconfig (installed is dev-util/pkgconfig)? Or does pkgconfig need one more eclass inherited?
OK, I installed dev-libs/ell-9999 and I think I know what the problem is:

/var/tmp/portage/dev-libs/ell-9999/temp/build.log
Code:
GIT update -->
   repository:               https://git.kernel.org/pub/scm/libs/ell/ell.git
   at the commit:            b7f6e7b5a742d5a5ee1376173641fa6406547685
[...]
libtool: link: x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC  ell/.libs/util.o ell/.libs/test.o ell/.libs/strv.o ell/.libs/utf8.o ell/.libs/queue.o ell/.libs/hashmap.o ell/.libs/string.o ell/.libs/settings.o ell/.libs/main.o ell/.libs/idle.o ell/.libs/signal.o ell/.libs/timeout.o ell/.libs/io.o ell/.libs/ringbuf.o ell/.libs/log.o ell/.libs/plugin.o ell/.libs/checksum.o ell/.libs/netlink.o ell/.libs/genl.o ell/.libs/rtnl.o ell/.libs/dbus.o ell/.libs/dbus-message.o ell/.libs/dbus-util.o ell/.libs/dbus-service.o ell/.libs/dbus-client.o ell/.libs/dbus-name-cache.o ell/.libs/dbus-filter.o ell/.libs/gvariant-util.o ell/.libs/siphash.o ell/.libs/hwdb.o ell/.libs/cipher.o ell/.libs/random.o ell/.libs/uintset.o ell/.libs/base64.o ell/.libs/pem.o ell/.libs/tls.o ell/.libs/tls-record.o ell/.libs/tls-extensions.o ell/.libs/tls-suites.o ell/.libs/uuid.o ell/.libs/key.o ell/.libs/pkcs5.o ell/.libs/file.o ell/.libs/dir.o ell/.libs/net.o ell/.libs/dhcp.o ell/.libs/dhcp-transport.o ell/.libs/dhcp-lease.o ell/.libs/cert.o ell/.libs/ecc-external.o ell/.libs/ecc.o ell/.libs/ecdh.o ell/.libs/time.o ell/.libs/gpio.o ell/.libs/path.o   -Wl,--as-needed  -O2 -Wl,--version-script=/var/tmp/portage/dev-libs/ell-9999/work/ell-9999/ell/ell.sym -Wl,-O1   -Wl,-soname -Wl,libell.so.0 -o ell/.libs/libell.so.0.0.2
So the ebuild really is pulling the latest code (commit b7f6e7b5a742d5a5ee1376173641fa6406547685 at the time I did the install), but there is a problem with the way the shared library, libell.so.0.0.2, is built, which is what eiwl links to when the system-ell USE flag is set. See that -Wl,--version-script=/var/tmp/portage/dev-libs/ell-9999/work/ell-9999/ell/ell.sym option? The referenced file tells the linker which symbols should be visible. If you look at upstream's ell.sym, you'll notice that all the l_rtnl_* symbols are all missing from the "global:" section.
Code:
$ nm /var/tmp/portage/dev-libs/ell-9999/work/ell-9999-abi_x86_64.amd64/ell/.libs/rtnl.o
[...]
0000000000000ba0 T l_rtnl_ifaddr4_add
0000000000000510 t l_rtnl_ifaddr4_change
0000000000000bd0 T l_rtnl_ifaddr4_delete
0000000000000b20 T l_rtnl_ifaddr4_dump
0000000000000a30 T l_rtnl_ifaddr4_extract
0000000000000ea0 T l_rtnl_ifaddr6_add
0000000000000250 t l_rtnl_ifaddr6_change
0000000000000ed0 T l_rtnl_ifaddr6_delete
0000000000000e20 T l_rtnl_ifaddr6_dump
0000000000000d10 T l_rtnl_ifaddr6_extract
0000000000000000 t l_rtnl_route4_add
0000000000000ca0 T l_rtnl_route4_add_connected
0000000000000ce0 T l_rtnl_route4_add_gateway
0000000000000c30 T l_rtnl_route4_dump
0000000000000c00 T l_rtnl_route4_extract
0000000000000fa0 T l_rtnl_route6_add_gateway
0000000000000360 t l_rtnl_route6_change
0000000000000fd0 T l_rtnl_route6_delete_gateway
0000000000000f30 T l_rtnl_route6_dump
0000000000000f00 T l_rtnl_route6_extract
0000000000000670 t l_rtnl_route_extract.constprop.0
0000000000000850 T l_rtnl_set_linkmode_and_operstate
00000000000008f0 T l_rtnl_set_mac
00000000000009a0 T l_rtnl_set_powered
[...]
All the 'T' symbols (global symbols in the ELF .text section) should be added to ell.sym (possibly via a patch) in order to be visible:
Code:
/* rtnl */
l_rtnl_ifaddr4_add;
l_rtnl_ifaddr4_delete;
l_rtnl_ifaddr4_dump;
l_rtnl_ifaddr4_extract;
l_rtnl_ifaddr6_add;
l_rtnl_ifaddr6_delete;
l_rtnl_ifaddr6_dump;
l_rtnl_ifaddr6_extract;
l_rtnl_route4_add_connected;
l_rtnl_route4_add_gateway;
l_rtnl_route4_dump;
l_rtnl_route4_extract;
l_rtnl_route6_add_gateway;
l_rtnl_route6_delete_gateway;
l_rtnl_route6_dump;
l_rtnl_route6_extract;
l_rtnl_set_linkmode_and_operstate;
l_rtnl_set_mac;
l_rtnl_set_powered;
I suppose that, unless those functions are not really intended to be private, they will probably be added by upstream at some point. But currently, they aren't there...

charles17 wrote:
Just found a difference in the output lines containing netdev.o
When the bundled ell is used by the build system, the static library, libell-internal.a, is linked to instead, which has all symbols visible, so the build succeeds.

Last edited by GDH-gentoo on Tue Mar 24, 2020 4:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3640

PostPosted: Tue Mar 24, 2020 11:38 am    Post subject: Re: net-wireless/iwd without dbus Reply with quote

Thanks for your help, GDH-gentoo

GDH-gentoo wrote:
All the 'T' symbols (global symbols in the ELF .text section) should be added to ell.sym (possibly via a patch) in order to be visible:
Code:
/* rtnl */
l_rtnl_ifaddr4_add;
l_rtnl_ifaddr4_delete;
l_rtnl_ifaddr4_dump;
l_rtnl_ifaddr4_extract;
l_rtnl_ifaddr6_add;
l_rtnl_ifaddr6_delete;
l_rtnl_ifaddr6_dump;
l_rtnl_ifaddr6_extract;
l_rtnl_route4_add_connected;
l_rtnl_route4_add_gateway;
l_rtnl_route4_dump;
l_rtnl_route4_extract;
l_rtnl_route6_add_gateway;
l_rtnl_route6_delete_gateway;
l_rtnl_route6_dump;
l_rtnl_route6_extract;
l_rtnl_set_linkmode_and_operstate;
l_rtnl_set_mac;
l_rtnl_set_powered;
I suppose that, unless those functions are not really intended to be private, they will probably be added by upstream at some point. But currently, they aren't there...

No luck.
Just dropped this patch into /etc/portage/patches/dev-libs/ell
rtnl_for_ell.sym.patch:
diff --git a/ell/ell.sym b/ell/ell.sym
index 0c83b87..aaeb8d5 100644
--- a/ell/ell.sym
+++ b/ell/ell.sym
@@ -20,6 +20,26 @@ global:
        l_util_hexdumpv;
        l_util_debug;
        l_util_get_debugfs_path;
+       /* rtnl */
+       l_rtnl_ifaddr4_add;
+       l_rtnl_ifaddr4_delete;
+       l_rtnl_ifaddr4_dump;
+       l_rtnl_ifaddr4_extract;
+       l_rtnl_ifaddr6_add;
+       l_rtnl_ifaddr6_delete;
+       l_rtnl_ifaddr6_dump;
+       l_rtnl_ifaddr6_extract;
+       l_rtnl_route4_add_connected;
+       l_rtnl_route4_add_gateway;
+       l_rtnl_route4_dump;
+       l_rtnl_route4_extract;
+       l_rtnl_route6_add_gateway;
+       l_rtnl_route6_delete_gateway;
+       l_rtnl_route6_dump;
+       l_rtnl_route6_extract;
+       l_rtnl_set_linkmode_and_operstate;
+       l_rtnl_set_mac;
+       l_rtnl_set_powered;
        /* test */
        l_test_init;
        l_test_run;

Running ebuild /var/db/repos/gentoo/dev-libs//ell/ell-9999.ebuild clean install, the patch gets applied and the package compiles, but libell.so.0.0.2 does not show any rtnl.
Code:
readelf -a /var/tmp/portage/dev-libs/ell-9999/image/usr/lib64/libell.so.0.0.2

But anyway, does it make sense at all to provide a system-ell while ell is a pure compile-time dependency?

GDH-gentoo wrote:

charles17 wrote:
Just found a difference in the output lines containing netdev.o
When the bundled ell is used by the build system, the static library, libell-internal.a, is linked to instead, which has all symbols visible, so the build succeeds.

I didn't know how to analyze the details. Now it's getting more clear.
Back to top
View user's profile Send private message
GDH-gentoo
l33t
l33t


Joined: 20 Jul 2019
Posts: 711
Location: South America

PostPosted: Tue Mar 24, 2020 5:42 pm    Post subject: Re: net-wireless/iwd without dbus Reply with quote

Whoops, on a closer look, more changes are needed.

/var/tmp/portage/dev-libs/ell-9999/temp/build.log
Code:
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/dev-libs/ell-9999/work/ell-9999 -fvisibility=hidden -DUNITDIR=\"/var/tmp/portage/dev-libs/ell-9999/work/ell-9999/unit/\" -DCERTDIR=\"./unit/\" -O2 -pipe -fsigned-char -c /var/tmp/portage/dev-libs/ell-9999/work/ell-9999/ell/rtnl.c  -fPIC -DPIC -o ell/.libs/rtnl.o
That -fvisibility=hidden marks symbols in the object file in a special way that prevents them from being visible:
Code:
$ objdump -t /var/tmp/portage/dev-libs/ell-9999/work/ell-9999-abi_x86_64.amd64/ell/.libs/rtnl.o | grep l_rtnl_set_mac
00000000000008f0 g     F .text   00000000000000b0 .hidden l_rtnl_set_mac

File ell/rtnl.c needs to have this added:
Code:
#include "private.h"

And LIB_EXPORT must be added to the declaration of each relevant l_rtnl_* function:
Code:
$ grep LIB_EXPORT /var/tmp/portage/dev-libs/ell-9999/work/ell-9999/ell/rtnl.c
LIB_EXPORT uint32_t l_rtnl_set_linkmode_and_operstate(struct l_netlink *rtnl, int ifindex,
LIB_EXPORT uint32_t l_rtnl_set_mac(struct l_netlink *rtnl, int ifindex,
LIB_EXPORT uint32_t l_rtnl_set_powered(struct l_netlink *rtnl, int ifindex, bool powered,
LIB_EXPORT void l_rtnl_ifaddr4_extract(const struct ifaddrmsg *ifa, int bytes,
LIB_EXPORT uint32_t l_rtnl_ifaddr4_dump(struct l_netlink *rtnl, l_netlink_command_func_t cb,
LIB_EXPORT uint32_t l_rtnl_ifaddr4_add(struct l_netlink *rtnl, int ifindex,
LIB_EXPORT uint32_t l_rtnl_ifaddr4_delete(struct l_netlink *rtnl, int ifindex,
LIB_EXPORT void l_rtnl_route4_extract(const struct rtmsg *rtmsg, uint32_t len,
LIB_EXPORT uint32_t l_rtnl_route4_dump(struct l_netlink *rtnl,
LIB_EXPORT uint32_t l_rtnl_route4_add_connected(struct l_netlink *rtnl, int ifindex,
LIB_EXPORT uint32_t l_rtnl_route4_add_gateway(struct l_netlink *rtnl, int ifindex,
LIB_EXPORT void l_rtnl_ifaddr6_extract(const struct ifaddrmsg *ifa, int len, char **ip)
LIB_EXPORT uint32_t l_rtnl_ifaddr6_dump(struct l_netlink *rtnl,
LIB_EXPORT uint32_t l_rtnl_ifaddr6_add(struct l_netlink *rtnl, int ifindex,
LIB_EXPORT uint32_t l_rtnl_ifaddr6_delete(struct l_netlink *rtnl, int ifindex,
LIB_EXPORT void l_rtnl_route6_extract(const struct rtmsg *rtmsg, uint32_t len,
LIB_EXPORT uint32_t l_rtnl_route6_dump(struct l_netlink *rtnl,
LIB_EXPORT uint32_t l_rtnl_route6_add_gateway(struct l_netlink *rtnl, int ifindex,
LIB_EXPORT uint32_t l_rtnl_route6_delete_gateway(struct l_netlink *rtnl, int ifindex,

LIB_EXPORT is defined in ell/private.h as a C macro that expands to a GCC incantation that makes the symbol visible:
Code:
$ grep LIB_EXPORT /var/tmp/portage/dev-libs/ell-9999/work/ell-9999/ell/private.h
#define LIB_EXPORT __attribute__ ((visibility("default")))

So you need to patch that file in addition to ell.sym:
Code:
$ objdump -t /var/tmp/portage/dev-libs/ell-9999/work/ell-9999-abi_x86_64.amd64/ell/.libs/rtnl.o | grep l_rtnl_set_mac
00000000000008f0 g     F .text   00000000000000b0 l_rtnl_set_mac

$ nm -D /var/tmp/portage/dev-libs/ell-9999/image/usr/lib64/libell.so.0.0.2 | grep l_rtnl
000000000001af60 T l_rtnl_ifaddr4_add
000000000001af90 T l_rtnl_ifaddr4_delete
000000000001aee0 T l_rtnl_ifaddr4_dump
000000000001adf0 T l_rtnl_ifaddr4_extract
000000000001b260 T l_rtnl_ifaddr6_add
000000000001b290 T l_rtnl_ifaddr6_delete
000000000001b1e0 T l_rtnl_ifaddr6_dump
000000000001b0d0 T l_rtnl_ifaddr6_extract
000000000001b060 T l_rtnl_route4_add_connected
000000000001b0a0 T l_rtnl_route4_add_gateway
000000000001aff0 T l_rtnl_route4_dump
000000000001afc0 T l_rtnl_route4_extract
000000000001b360 T l_rtnl_route6_add_gateway
000000000001b390 T l_rtnl_route6_delete_gateway
000000000001b2f0 T l_rtnl_route6_dump
000000000001b2c0 T l_rtnl_route6_extract
000000000001ac10 T l_rtnl_set_linkmode_and_operstate
000000000001acb0 T l_rtnl_set_mac
000000000001ad60 T l_rtnl_set_powered

Again, IF upstream really intends to make these functions part of ell's public API, I expect this to be added eventually.

charles17 wrote:
But anyway, does it make sense at all to provide a system-ell while ell is a pure compile-time dependency?
Packages that install shared libraries are both compile-time dependencies, because the (static) linker needs to see the library to create a dynamically linked executable, and runtime dependencies, because the dynamic linker (/lib64/ld-linux-x86-64.so.2 for the amd64 arch) needs to load the library.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3640

PostPosted: Tue Mar 24, 2020 9:23 pm    Post subject: Reply with quote

Thanks again for all your help.

I already assumed something in ell/rtnl.c to be done, but no idea about #include "private.h" and LIB_EXPORT or objdump.

At least I know how to create patches.
With this patch in /etc/portage/patches/dev-libs/ell/ and dev-libs/ell-9999 installed, the l_rtnl_* symbols turned visible.
nm -D /usr/lib64/libell.so.0.0.2 | grep l_rtnl:
000000000001af40 T l_rtnl_ifaddr4_add
000000000001af70 T l_rtnl_ifaddr4_delete
000000000001aec0 T l_rtnl_ifaddr4_dump
000000000001add0 T l_rtnl_ifaddr4_extract
000000000001b240 T l_rtnl_ifaddr6_add
000000000001b270 T l_rtnl_ifaddr6_delete
000000000001b1c0 T l_rtnl_ifaddr6_dump
000000000001b0b0 T l_rtnl_ifaddr6_extract
000000000001b040 T l_rtnl_route4_add_connected
000000000001b080 T l_rtnl_route4_add_gateway
000000000001afd0 T l_rtnl_route4_dump
000000000001afa0 T l_rtnl_route4_extract
000000000001b340 T l_rtnl_route6_add_gateway
000000000001b370 T l_rtnl_route6_delete_gateway
000000000001b2d0 T l_rtnl_route6_dump
000000000001b2a0 T l_rtnl_route6_extract
000000000001abe0 T l_rtnl_set_linkmode_and_operstate
000000000001ac80 T l_rtnl_set_mac
000000000001ad40 T l_rtnl_set_powered

And finally net-wireless/eiwd-1.5.5 with USE=system-ell can be emerged without errors


GDH-gentoo wrote:
Again, IF upstream really intends to make these functions part of ell's public API, I expect this to be added eventually.

They did, ell-0.30 is out.


GDH-gentoo wrote:
charles17 wrote:
But anyway, does it make sense at all to provide a system-ell while ell is a pure compile-time dependency?
Packages that install shared libraries are both compile-time dependencies, because the (static) linker needs to see the library to create a dynamically linked executable, and runtime dependencies, because the dynamic linker (/lib64/ld-linux-x86-64.so.2 for the amd64 arch) needs to load the library.

So, do you mean I should keep the system-ell dependency in COMMON_DEPEND?
Back to top
View user's profile Send private message
GDH-gentoo
l33t
l33t


Joined: 20 Jul 2019
Posts: 711
Location: South America

PostPosted: Wed Mar 25, 2020 6:49 pm    Post subject: Reply with quote

charles17 wrote:
And finally net-wireless/eiwd-1.5.5 with USE=system-ell can be emerged without errors
:thumbs up:

charles17 wrote:
GDH-gentoo wrote:
Again, IF upstream really intends to make these functions part of ell's public API, I expect this to be added eventually.

They did, ell-0.30 is out.
LOL, and the two preceding commits apply the changes discussed in this thread.

charles17 wrote:
So, do you mean I should keep the system-ell dependency in COMMON_DEPEND?
You can specify system-ell? ( >=dev-libs/ell-0.30 ) in COMMON_DEPEND, i.e. as a USE-conditional dependency.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3640

PostPosted: Thu Mar 26, 2020 4:58 pm    Post subject: Reply with quote

GDH-gentoo wrote:
You can specify system-ell? ( >=dev-libs/ell-0.30 ) in COMMON_DEPEND, i.e. as a USE-conditional dependency.

I also put !net-wireless/iwd to avoid trouble with iwd.

eiwd-1.6.1.ebuild:
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit flag-o-matic

MY_PV="$(ver_rs 2 '-')"
MY_P="${PN}-${MY_PV}"

DESCRIPTION="iwd without dbus"
HOMEPAGE="https://github.com/dylanaraps/eiwd"
SRC_URI="https://github.com/dylanaraps/eiwd/releases/download/${MY_PV}/${MY_P}.tar.xz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+system-ell"

COMMON_DEPEND="system-ell? ( >=dev-libs/ell-0.30 )"
RDEPEND="${COMMON_DEPEND}
    !net-wireless/iwd
    net-wireless/wireless-regdb"
DEPEND="${COMMON_DEPEND}
    virtual/pkgconfig"

S="${WORKDIR}/${MY_P}"

src_configure() {
    append-cflags "-fsigned-char"
    local myeconfargs=(
        --sysconfdir="${EPREFIX}"/etc/iwd --localstatedir="${EPREFIX}"/var
        --disable-dbus
        $(use_enable system-ell external-ell)
    )
    econf "${myeconfargs[@]}"
}

src_install() {
    default
    keepdir /var/lib/iwd

Still I have to add the initd file and to work through the pkg_pretend() stuff from the iwd-1.6 ebuild.

I am not really clear about the relation of net-wireless/crda and the kernel's CONFIG_CFG80211_CRDA_SUPPORT (support CRDA) option.

CONFIG_CFG80211_CRDA_SUPPORT (support CRDA):
You should enable this option unless you know for sure you have no
need for it, for example when using internal regdb (above) or the
database loaded as a firmware file.
     
If unsure, say Y

»Database loaded as a firmware file« is net-wireless/wireless-regdb. But what is »internal regdb«?
Back to top
View user's profile Send private message
GDH-gentoo
l33t
l33t


Joined: 20 Jul 2019
Posts: 711
Location: South America

PostPosted: Thu Mar 26, 2020 6:10 pm    Post subject: Reply with quote

charles17 wrote:
I also put !net-wireless/iwd to avoid trouble with iwd.
Yeah, that's OK.

charles17 wrote:
I am not really clear about the relation of net-wireless/crda and the kernel's CONFIG_CFG80211_CRDA_SUPPORT (support CRDA) option.
Ant P. posted this about CRDA. But you might want to do what net-wireless/iwd-1.6 does with the crda USE flag, except that you could write IUSE=crda instead of IUSE=+crda so that it is unset by default.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3640

PostPosted: Tue Apr 07, 2020 1:47 pm    Post subject: Reply with quote

I will mark this topic [SOLVED] for now and will proceed once I have it installed for testing on a separate system.
Meanwhile eiwd has become availabe in the GURU repository.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum