Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 596940

Summary: =kde-apps/cantor-16.04.3[R]: build fails with /bin/sh set to dash
Product: Gentoo Linux Reporter: Kai Damm <cepheus11>
Component: Current packagesAssignee: Gentoo KDE team <kde>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 526268    
Attachments: emerge --info
failed build log (dash)
successful build log (bash)
cantor-dash.patch

Description Kai Damm 2016-10-12 11:40:18 UTC
Created attachment 449982 [details]
emerge --info

cmake cannot find R includes when /bin/sh is not bash. The failing command from build.log:

cd /var/portagetmp/portage/kde-apps/cantor-16.04.3/work/cantor-16.04.3_build/src/backends/R/rserver && /usr/bin/x86_64-pc-linux-gnu-g++ ... -I"/var/portagetmp/portage/kde-apps/cantor-16.04.3/work/cantor-16.04.3/src/backends/R/rserver/-n /usr/lib64/R/include" ... -o CMakeFiles/cantor_rserver.dir/rserver.cpp.o -c /var/portagetmp/portage/kde-apps/cantor-16.04.3/work/cantor-16.04.3/src/backends/R/rserver/rserver.cpp
In file included from /var/portagetmp/portage/kde-apps/cantor-16.04.3/work/cantor-16.04.3/src/backends/R/rserver/rserver.cpp:28:0:
/var/portagetmp/portage/kde-apps/cantor-16.04.3/work/cantor-16.04.3/src/backends/R/rserver/rcallbacks.h:28:15: fatal error: R.h: No such file or directory

There are two include dirs, separated by "-n", in one quoted -I argument. This is not the case if bash had been the target of the /bin/sh link while the make files were generated.
Comment 1 Kai Damm 2016-10-12 11:41:14 UTC
Created attachment 449984 [details]
failed build log (dash)
Comment 2 Kai Damm 2016-10-12 11:42:21 UTC
Created attachment 449988 [details]
successful build log (bash)
Comment 3 Michael Palimaka (kensington) gentoo-dev 2016-10-21 16:34:48 UTC
Created attachment 450930 [details, diff]
cantor-dash.patch

cmake/FindR.cmake calls "echo -n", but POSIX echo does not take any arguments.

Could you test the attached patch?
Comment 4 Kai Damm 2017-02-07 13:20:02 UTC
Patch works fine, thanks.
Comment 5 Andreas Sturmlechner gentoo-dev 2017-02-11 23:37:21 UTC
Thanks, fixed in 9be309db2b2c026522ff84601e8cef1c8a1eb9d3
Comment 6 Jarek Rymut 2017-04-28 20:08:55 UTC
Sorry to write about resolved bug, but someone upstream was interested: https://bugs.kde.org/show_bug.cgi?id=365897
Maybe it will be fixed there soon.