Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Conky with USE=nvidia needs nvidia-settings compile-time
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
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Mon Feb 26, 2018 9:08 am    Post subject: Conky with USE=nvidia needs nvidia-settings compile-time Reply with quote

Hi all.

Building conky on Gentoo requires a few constants (i.e. NV_CTRL_*) from NVCtrl.h, a source file that's part of nvidia-settings. I was wondering if there's a way to build conky with USE=nvidia without installing nvidia-settings on my system permanently. That would imply downloading nvidia-settings sources, unpack in the build directory tree and build conky.

Don't Gentoo ebuild support run-time and compile-time dependencies? (Note that to me a compile-time dependency would mean: download the package source but just don't compile nor install the package, is that the same meaning with an ebuild?)

I'm a bit rusty on writing ebuilds, does anyone have a starting clue?

Thanks a lot in advance.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30909
Location: here

PostPosted: Mon Feb 26, 2018 9:52 am    Post subject: Reply with quote

nvidia-settings isn't strictly required for building conky with use flag nvidia.
If you look in ebuild there is line
Code:
nvidia? ( || ( x11-drivers/nvidia-drivers[tools,static-libs] media-video/nvidia-settings ) )

which means if nvidia use flag is set you need or x11-drivers/nvidia-drivers[tools,static-libs] or media-video/nvidia-settings then you can compile conky with only x11-drivers/nvidia-drivers
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Mon Feb 26, 2018 12:08 pm    Post subject: Reply with quote

Thanks fedeliallalinea. Things aren't as simple; nvidia-settings pulls down nvidia-drivers anyway. I've also just noticed that nvidia-settings is masked to the profit of nvidia-drivers with USE flag tools enabled:
Code:
The following mask changes are necessary to proceed:
 (see "package.unmask" in the portage(5) man page for more details)
# required by nvidia-settings (argument)
# /portage.d/portage/profiles/package.mask:
# Jeroen Roovers <jer@gentoo.org> (12 Jan 2017)
# Use x11-drivers/nvidia-drivers[tools] instead.

The purpose here is to not have nvidia-settings forcibly installed since conky can build without — it only requires a few C defines, which are located in just one header file. My question is about downloading "something" that would include that header file to compile conky. So in my mind it was just a matter of having nvidia-settings source (aka include) files on the system.

Am I making sense?
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30909
Location: here

PostPosted: Mon Feb 26, 2018 12:28 pm    Post subject: Reply with quote

What version of nvidia-drivers? Because in my system nvidia-settings is not required
Code:
$ USE="nvidia" emerge -pv conky
[ebuild   R    ] x11-drivers/nvidia-drivers-387.22:0/387::gentoo  USE="X acpi driver kms multilib static-libs* tools -compat -gtk3 -pax_kernel -uvm -wayland" ABI_X86="32 (64) (-x32)" 0 KiB
[ebuild   R    ] app-admin/conky-1.10.4::gentoo  USE="X iconv imlib iostats ipv6 lua-cairo lua-imlib ncurses nvidia* portmon pulseaudio truetype vim-syntax -apcupsd (-audacious) -cmus -curl -eve -hddtemp -ical -irc -lua-rsvg -math -moc -mpd -mysql -nano-syntax -rss -systemd -thinkpad -weather-metar -weather-xoap -webserver -wifi -xmms2" 0 KiB
$ eix nvidia-settings
* media-video/nvidia-settings
     Available versions:  [M]340.58 [M]~340.58-r1 [M]~355.11 [M]~358.16 {examples gtk3}
     Homepage:            http://www.nvidia.com/
     Description:         NVIDIA Linux X11 Settings Utility

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Mon Feb 26, 2018 1:58 pm    Post subject: Reply with quote

I recall from a (not so recent, I confess) emerge -p nvidia-settings, which pulled down the drivers. But that's not really the point. What I mean by 'not forcibly installed' is to be able to compile conky without the drivers [installed].
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!


Last edited by VinzC on Mon Feb 26, 2018 4:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30909
Location: here

PostPosted: Mon Feb 26, 2018 3:39 pm    Post subject: Reply with quote

Sorry for stupid question but why compile conky with nvidia use flag if you don't use nvidia-drivers?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Mon Feb 26, 2018 4:47 pm    Post subject: Reply with quote

fedeliallalinea wrote:
Sorry for stupid question but why compile conky with nvidia use flag if you don't use nvidia-drivers?

It's no stupid question at all :-) . Note that I have to make sure but imagine you have nouveau installed and you want conky to show the temperature of the GPU (or anything related to NVidia). In its current state, it forces the drivers not only to be downloaded (which is quite normal) but also installed. In fact conky doesn't need the proprietary drivers to be installed — that's what I need to check. I might be wrong though. And if I am... well, then this whole thread is already solved ;-) .
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30909
Location: here

PostPosted: Mon Feb 26, 2018 6:09 pm    Post subject: Reply with quote

Looking in the source code I see that code call XNVCTRLQueryTargetAttribute this code can work also without nvidia-drivers installed?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Thu Mar 01, 2018 11:12 am    Post subject: Reply with quote

Well, that might be but so far conky crashes in a segfault when I try to run it with my custom Lua contraption. I'm investigating the issue...
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Fri Mar 02, 2018 10:04 am    Post subject: Reply with quote

Just a quick update, I did solve the crash with conky and (I think) it's due to some specific code that I wrote for monitoring portage — this is completely off-topic I recon but I plan to pick the conky executable compiled on my Gentoo machine, which has the proprietary nvidia drivers installed and run it on my laptop, which sits on nouveau exclusively.

Stay tuned... ;-)
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
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