View previous topic :: View next topic |
Author |
Message |
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30909 Location: here
|
Posted: Fri Oct 27, 2017 1:50 pm Post subject: |
|
|
Can help?
Code: | $ ldd dhcpcd-qt | grep -i qt
libQt5Widgets.so.5 => /usr/lib64/libQt5Widgets.so.5 (0x00007f5568e7b000)
libQt5Gui.so.5 => /usr/lib64/libQt5Gui.so.5 (0x00007f55689c9000)
libQt5Core.so.5 => /usr/lib64/libQt5Core.so.5 (0x00007f5568533000) |
Code: | $ equery b /usr/lib64/libQt5Widgets.so.5
* Searching for /usr/lib64/libQt5Widgets.so.5 ...
dev-qt/qtwidgets-5.9.2 (/usr/lib64/libQt5Widgets.so.5.9.2)
dev-qt/qtwidgets-5.9.2 (/usr/lib64/libQt5Widgets.so.5 -> libQt5Widgets.so.5.9.2)
$ equery b /usr/lib64/libQt5Gui.so.5
* Searching for /usr/lib64/libQt5Gui.so.5 ...
dev-qt/qtgui-5.9.2 (/usr/lib64/libQt5Gui.so.5 -> libQt5Gui.so.5.9.2)
dev-qt/qtgui-5.9.2 (/usr/lib64/libQt5Gui.so.5.9.2)
$ equery b /usr/lib64/libQt5Core.so.5
* Searching for /usr/lib64/libQt5Core.so.5 ...
dev-qt/qtcore-5.9.2 (/usr/lib64/libQt5Core.so.5 -> libQt5Core.so.5.9.2)
dev-qt/qtcore-5.9.2 (/usr/lib64/libQt5Core.so.5.9.2) |
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Fri Oct 27, 2017 2:58 pm Post subject: |
|
|
fedeliallalinea wrote: | Can help? |
Thanks for your help. Just added qtgui, qtcore and qtwidgets, see https://github.com/gentoo/gentoo/compare/master...charIes17:dhcpcd-ui#diff-9dfb4ad0513d7a4d04a7eb30eef96320R40 But dhcpcd-qt is not being built: /var/tmp/portage/net-misc/dhcpcd-ui-9999/image/: | /var/tmp/portage/net-misc/dhcpcd-ui-9999/image/
└── usr
├── bin
│ ├── dhcpcd-curses
│ └── dhcpcd-online
├── lib
│ └── systemd
│ └── system
│ └── dhcpcd-wait-online.service
└── share
└── man
└── man8
├── dhcpcd-curses.8.bz2
└── dhcpcd-online.8.bz2
|
|
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30909 Location: here
|
Posted: Fri Oct 27, 2017 3:20 pm Post subject: |
|
|
You need also add sys-libs/ncurses[tinfo] as dependency (for curses ui).
I have another erro when compiling package:
Code: | cc -Wl,-O1 -Wl,--as-needed -L../libdhcpcd -o dhcpcd-curses dhcpcd-curses.o eloop.o -Wl,--as-needed -Wl,-Bstatic -ldhcpcd -Wl,-Bdynamic -lcurses
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: dhcpcd-curses.o: undefined reference to symbol 'curs_set'
/lib64/libtinfo.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status |
This because in configure LIB_CURSES variable -ltinfo is missing.
dhcpcd-ui-tinfo.patch: | diff -Naru dhcpcd-ui-9999.orig/configure dhcpcd-ui-9999/configure
--- dhcpcd-ui-9999.orig/configure 2017-10-27 17:19:40.180468580 +0200
+++ dhcpcd-ui-9999/configure 2017-10-27 17:20:19.070469111 +0200
@@ -469,7 +469,7 @@
}
EOF
if $XCC _curses.c -o _curses -lcurses 2>&3; then
- LIB_CURSES=-lcurses
+ LIB_CURSES="-lcurses -ltinfo"
fi
rm -f _curses.c _curses
fi |
EDIT: Not sure if tinfo use flag in ncurses is required but in my system with it enabled I have the error _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30909 Location: here
|
Posted: Fri Oct 27, 2017 3:33 pm Post subject: |
|
|
charles17 wrote: | But dhcpcd-qt is not being built: |
Strange in my system is installed (use flag are USE="-gtk -libnotify qt5")
/var/tmp/portage/net-misc/dhcpcd-ui-9999/image/: | $ tree /var/tmp/portage/net-misc/dhcpcd-ui-9999/image/
/var/tmp/portage/net-misc/dhcpcd-ui-9999/image/
├── etc
│ └── xdg
│ └── autostart
│ └── dhcpcd-qt.desktop
└── usr
├── bin
│ ├── dhcpcd-curses
│ ├── dhcpcd-online
│ └── dhcpcd-qt
├── lib
│ └── systemd
│ └── system
│ └── dhcpcd-wait-online.service
└── share
└── man
└── man8
├── dhcpcd-curses.8.bz2
├── dhcpcd-online.8.bz2
└── dhcpcd-qt.8.bz2
|
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Sat Oct 28, 2017 8:51 am Post subject: |
|
|
fedeliallalinea wrote: | charles17 wrote: | But dhcpcd-qt is not being built: |
Strange in my system is installed (use flag are USE="-gtk -libnotify qt5") |
Yep, forgot to set qt5. Thanks for your attention.
Still need to care for the icons: dhcpcd-qt: | dhcpcd-qt
Cannot open file '/usr/share/dhcpcd/icons/hicolor/scalable/status/network-offline.svg', because: No such file or directory
Cannot open file '/usr/share/dhcpcd/icons/hicolor/scalable/status/network-offline.svg', because: No such file or directory
Connecting ...
Status changed to opened
Connected to dhcpcd-6.11.3
Status changed to connected
wlp3s0: Associated with
wlp3s0: Configured 192.168.178.23/24
wwp0s29u1u6i6: Link is up, configuring |
|
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30909 Location: here
|
Posted: Sat Oct 28, 2017 4:04 pm Post subject: |
|
|
Remember to check if tinfo is enable in ncurses (and also add it as dependency) and add -ltinfo to LDFLAGS. I think that this must be checked in configure. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Sun Oct 29, 2017 7:07 am Post subject: |
|
|
fedeliallalinea wrote: | You need also add sys-libs/ncurses[tinfo] as dependency (for curses ui).
I have another erro when compiling package:
Code: | cc -Wl,-O1 -Wl,--as-needed -L../libdhcpcd -o dhcpcd-curses dhcpcd-curses.o eloop.o -Wl,--as-needed -Wl,-Bstatic -ldhcpcd -Wl,-Bdynamic -lcurses
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: dhcpcd-curses.o: undefined reference to symbol 'curs_set'
/lib64/libtinfo.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status |
This because in configure LIB_CURSES variable -ltinfo is missing.
dhcpcd-ui-tinfo.patch: | diff -Naru dhcpcd-ui-9999.orig/configure dhcpcd-ui-9999/configure
--- dhcpcd-ui-9999.orig/configure 2017-10-27 17:19:40.180468580 +0200
+++ dhcpcd-ui-9999/configure 2017-10-27 17:20:19.070469111 +0200
@@ -469,7 +469,7 @@
}
EOF
if $XCC _curses.c -o _curses -lcurses 2>&3; then
- LIB_CURSES=-lcurses
+ LIB_CURSES="-lcurses -ltinfo"
fi
rm -f _curses.c _curses
fi |
|
Shouldn't that patch go upstream? Or is it just only for Gentoo? |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30909 Location: here
|
Posted: Sun Oct 29, 2017 7:38 am Post subject: |
|
|
charles17 wrote: | Shouldn't that patch go upstream? Or is it just only for Gentoo? |
Yes but this patch is only a workaround that only work on a system with ncurses[tinfo] but fails in other case.
The correct way is that configure check if tinfo is present and only in this case add -ltinfo, but I've not idea how to do. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30909 Location: here
|
Posted: Sun Oct 29, 2017 4:19 pm Post subject: |
|
|
UberLord wrote: | Why should I even know about tinfo? dhcpcd-curses only makes curses calls.
On NetBSD, curses and terminfo are separate libraries and it works fine. Maybe fix ncurses? |
Probably you right and problem is related to this tracker.
A good patch for gentoo can be
Code: | diff -Naru dhcpcd-ui-9999.orig/configure dhcpcd-ui-9999/configure
--- dhcpcd-ui-9999.orig/configure 2017-10-27 17:19:40.180468580 +0200
+++ dhcpcd-ui-9999/configure 2017-10-27 17:20:19.070469111 +0200
@@ -469,7 +469,7 @@
}
EOF
if $XCC _curses.c -o _curses -lcurses 2>&3; then
- LIB_CURSES=-lcurses
+ LIB_CURSES=`pkg-config --libs ncurses`
fi
rm -f _curses.c _curses
fi |
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30909 Location: here
|
Posted: Sun Oct 29, 2017 5:41 pm Post subject: |
|
|
Only live because version 0.7.5-r1 didn't ncurses ui. You can also resolve problem adding src_prepare function in ebuild
Code: | # Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit qmake-utils systemd
DESCRIPTION="Desktop notification and configuration for dhcpcd"
HOMEPAGE="https://roy.marples.name/projects/dhcpcd-ui"
if [[ ${PV} == *9999* ]]; then
EGIT_REPO_URI="https://github.com/rsmarples/dhcpcd-ui"
inherit git-r3
KEYWORDS=""
else
SRC_URI="https://roy.marples.name/downloads/${PN%-ui}/${P}.tar.bz2"
KEYWORDS="amd64 x86"
fi
LICENSE="BSD-2"
SLOT="0"
IUSE="debug gtk gtk3 libnotify qt5"
REQUIRED_USE="
?? ( gtk gtk3 qt5 )
libnotify? ( || ( gtk gtk3 ) )"
DEPEND="
virtual/libintl
gtk? (
dev-libs/glib:2
x11-libs/gdk-pixbuf:2
x11-libs/gtk+:2
)
gtk3? (
dev-libs/glib:2
x11-libs/gdk-pixbuf:2
x11-libs/gtk+:3
)
qt5? (
dev-qt/qtgui:5
dev-qt/qtcore:5
dev-qt/qtwidgets:5
)
libnotify? ( x11-libs/libnotify )
sys-libs/ncurses:0"
RDEPEND="${DEPEND}
>=net-misc/dhcpcd-6.4.4"
src_prepare() {
default
# patch for ncurses[tinfo] see #457530
sed -i 's/LIB_CURSES=-lcurses/LIB_CURSES=`pkg-config --libs ncurses`/' "${S}/configure" || die "sed failed"
}
src_configure() {
local myeconfargs=(
$(use_enable debug)
$(usex gtk '--with-gtk=gtk+-2.0 --with-icons' '')
$(usex gtk3 '--with-gtk=gtk+-3.0 --with-icons' '')
$(usex qt5 '--with-qt --with-icons' '--without-qt')
$(use_enable libnotify notification)
$(use gtk || use gtk3 || echo '--without-icons --without-gtk')
$(use gtk || use gtk3 || use qt5 || echo '--without-icons')
)
econf "${myeconfargs[@]}"
}
src_install() {
emake DESTDIR="${D}" INSTALL_ROOT="${D}" install
systemd_dounit src/dhcpcd-online/dhcpcd-wait-online.service
} |
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
|