You are not logged in.

#1 2020-12-04 12:45:58

Wild Penguin
Member
Registered: 2015-03-19
Posts: 347

[SOLVED] /bin in PATH breaks cmake / boost?

For some reason, quite recently, many packages in AUR started to fail with errors like this:

-- Configuring done
CMake Error in src/CMakeLists.txt:
  Imported target "Boost::system" includes non-existent path

    "/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in src/CMakeLists.txt:
  Imported target "Boost::system" includes non-existent path

    "/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



-- Generating done

(the above error is from configure phase of e4rat, but there are many packages which fail similarly; possibly all packages which use Boost?)

I.e. the INCLUDE directories variables are being set erroneously, possibly some prefix variable is not set / left empty (but I'm guessing here  - I'm not familiar enough with cmake or boost to understand what is actually going on).

I've noticed that having /bin in PATH is the trigger for the problem. Removing it from the PATH allows the said packages to pass configure phase correctly, so I know a workaround, but IMHO that is not a solution (and I need to remember to do it each and every time I upgrade these packages - it's a minor annoyance, but an annoyance still...)

Hence, in this situation I know something fails, but I'm not sure what part is in the wrong and where to report this. More specifically, I have these questions:

  1. Why does /bin in PATH cause failure; should one not have /bin in PATH?

  2. If it should not cause failure, any ideas how to determine, which piece of software is causing the failure? Boost, cmake or some other? I.e. Where to report?

  3. If /bin should not be in path, any idea how to determine where / who is setting it (erroneously)? I know it is not set in .bashrc nor .bash_profile. But it is set by something if I start a bash session from my GUI (sddm->KDE Plasma->Konsole->bash). It is not there if I login via VC (no GUI).

I've tried to grep /etc - but I have no idea where else to look for where PATH (adding /bin to it) is being set... (I guess I should look into sddm / KDE Plasma / Konsole and start grepping their files also outside /etc?)

External links:
Possibly/very likely related: https://bbs.archlinux.org/viewtopic.php?id=258714
(I've also replied there, despite the OP setting the thread as SOLVED - which it, IMHO, is not, it's only worked around)
EDIT: Oops: Only now I noticed eschwartz's reply!


A bug report: https://bugs.archlinux.org/task/64132

Last edited by Wild Penguin (2020-12-04 13:41:51)

Offline

#2 2020-12-04 12:58:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] /bin in PATH breaks cmake / boost?

Wild Penguin wrote:

Why does /bin in PATH cause failure; should one not have /bin in PATH?

For the first part, I think eschwartz hit it on the head: cmake is dumb.  For the second, there are are two ways to answer: one should be able to add other locations to their PATH as they see fit without causing problems; but on an arch system adding /bin to PATH makes absolutely not sense at all, so on an arch system it should not be there.

So you have a problem because of both cmake being dumb, and something else (perhaps a DM) being ridiculously dumb.

Check your DM configs, and xsession, and related files in your home directory.  Or get a list of candidate PIDs:

find /proc -name environ -exec grep 'PATH=.*:/bin' '{}' \+ 2>/dev/null

Last edited by Trilby (2020-12-04 13:13:20)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2020-12-04 13:41:38

Wild Penguin
Member
Registered: 2015-03-19
Posts: 347

Re: [SOLVED] /bin in PATH breaks cmake / boost?

Trilby, thank you for your answer!

I went trough my troubleshooting setps once again, and noticed there's a DefaultPath configuration in /etc/sddm.conf (I somehow missed it before despite grepping efforts). I should probably add that (IIRC) this configuration file has been created by KDE Plasma, since I've set up autologin via it's settings interface (but I could misremember, as this is one of those cases of "set-once-and-forget" ...).

Anyways, it (generated by KDE/Plasma, I presume) included /bin:/usr/bin . From 'man sddm.conf':

       DefaultPath=
              Default path to set after successfully logging in.  This is also where SDDM looks for programs.  Default value is "/usr/local/bin:/usr/bin:/bin".

In my case, a good solution is to just remove the DefaultPath from the configuration file. That way I get a sensible PATH variable (which does not contain /bin at all, despite the man page letting one presume otherwise; but the manpage is ambivalent on whether the default is a hard-coded one in the binary or just the default in the configuration file sddm ships with). However, my guess is that if /bin is after /usr/bin (in Arch), cmake should behave... (so the default should work).

Any case, marking as [SOLVED] (for now... one could still argue cmake should be adjusted? Or Plasma/sddm configuration generation?).

Last edited by Wild Penguin (2020-12-04 13:50:48)

Offline

#4 2020-12-04 14:05:39

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] /bin in PATH breaks cmake / boost?

Ah, no, none of that is the default that is package in the arch package:
https://github.com/archlinux/svntogit-p … GBUILD#L50


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2020-12-04 15:35:27

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,939

Re: [SOLVED] /bin in PATH breaks cmake / boost?

Looks like that was added in december 2017[1] , maybe Wild Penguin setup things before that ?

[1]
https://github.com/archlinux/svntogit-p … 5eb9b7203a

Last edited by Lone_Wolf (2020-12-04 15:35:53)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2020-12-04 15:39:07

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] /bin in PATH breaks cmake / boost?

No, apparently in 2017, it changed from being empty to being filled with a reasonable default (before that change the upstream provided value was still removed).  Neither the state before nor after this change would allow any upstream inclusion of /bin to remain.

Last edited by Trilby (2020-12-04 15:39:28)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2020-12-04 15:39:12

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,085

Re: [SOLVED] /bin in PATH breaks cmake / boost?

That diff shows that before that, DefaultPath was set to empty, so it's not really applicable.

Offline

#8 2020-12-08 12:16:58

flying sheep
Member
Registered: 2012-02-29
Posts: 93

Re: [SOLVED] /bin in PATH breaks cmake / boost?

Hi, I’m the maintainer of rstudio-desktop. For that package, there’s more problems that look similar, however fixing the PATH alone doesn’t help.

At runtime, it still fails with:

Qt WebEngine resources not found at /share/qt/resources. Trying parent directory...
Qt WebEngine resources not found at /share/qt. Trying application directory...
Qt WebEngine resources not found at /usr/lib/qt/libexec. Trying fallback directory... The application MAY NOT work.

Last edited by flying sheep (2020-12-08 12:27:16)

Offline

#9 2020-12-08 12:52:14

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,939

Re: [SOLVED] /bin in PATH breaks cmake / boost?

flying sheep, your PKGBUILD has

-DCMAKE_INSTALL_PREFIX=/usr/lib/rstudio

Normally that's set to /usr .

https://wiki.archlinux.org/index.php/CM … guidelines was added to wiki in april this year, have you looked at it?

Last edited by Lone_Wolf (2020-12-08 14:43:07)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#10 2020-12-08 14:38:02

Wild Penguin
Member
Registered: 2015-03-19
Posts: 347

Re: [SOLVED] /bin in PATH breaks cmake / boost?

(referring to Lone_Wolf's and Trillby's discussion):

It seems that /etc/sddm.conf is (re-)created every time I change login manager settings via KDE/Plasma. My hunch is that at some point, KDE/Plasma was in error and set that option. I know I certainly didn't do it manually. I've also re-set the settings (after posting this thread) via KDE/Plasma and currently it creates sensible configuration files.

I could have looked at the time stamp of the file to see when it was created, but it didn't occur to me before I reset the settings. It could have given a hint towards what/who (which version of KDE/Plasma, if any) had created that file. But, it would have been only an interesting detail to know ;-).

Last edited by Wild Penguin (2020-12-08 18:15:31)

Offline

#11 2020-12-08 15:43:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] /bin in PATH breaks cmake / boost?

Are you running KDE as root?  If not, no changes you make in it's settings could edit that file.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#12 2020-12-08 15:48:58

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,218

Re: [SOLVED] /bin in PATH breaks cmake / boost?

The dialog in question will use polkit for permissions for writing the file (... it needs to, SDDM does run before the user session), so this could indeed be related.

Last edited by V1del (2020-12-08 15:50:38)

Offline

#13 2020-12-08 18:15:34

Wild Penguin
Member
Registered: 2015-03-19
Posts: 347

Re: [SOLVED] /bin in PATH breaks cmake / boost?

No, I do not run KDE as root!

This kind of feature(s) (making system configuration via GUI in places where a desktop-oriented user might want/need to) have been quite standard fare in KDE/Plasma, IIRC from KDE3 and onwards... don't know about technicalities (I believe polkit didn't even exist back in KDE3 days?). There used to be a thing called kdesu and later kdesudo - the latter perhaps still exist? (or is it vice versa?)

Another thing where it is used, are power management features (laptops).

Last edited by Wild Penguin (2020-12-08 18:16:38)

Offline

Board footer

Powered by FluxBB