xapp_init: bad substitution of mcookie path in startx
Hi,
The generated "startx" has the host path for mcookie:
----------
esac
authdisplay=${display:-:0}mcookie=/nous/BASYSTEMES/Buildroot/output.imx6neon/host/usr/bin/mcookie
if test x"$mcookie" = x; then
--------------------------
... and because of that, the X server does not start on target.
It should be "/usr/bin/mcookie"
Regards
Thierry
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thierry" == Thierry Bultel <[email protected]> writes:
Thierry> Hi,
Thierry> The generated "startx" has the host path for mcookie:
Thierry> ----------
Thierry> esac
Thierry> authdisplay=${display:-:0}
Thierry> mcookie=/nous/BASYSTEMES/Buildroot/output.imx6neon/host/usr/bin/mcookie
What buildroot version are you using? It seems to be correct here with current git:
grep bin/mcookie output/target/usr/bin/startx
mcookie=/usr/bin/mcookie
Signature · 1 line
Bye, Peter Korsgaard
Hi Peter,
I can reproduce it with the latest release:
thierry at thierry-desktop:/nous/BASYSTEMES/Buildroot2012.11/buildroot-2012.11$ cat output/target/usr/bin/startx | grep mcook
mcookie=`/nous/BASYSTEMES/Buildroot2012.11/buildroot-2012.11/output
However, an important clue is that is has work once.
My build from scratch was OK. Then I have changed my .config, adding some packages, and then it was broken.
I am trying to reverse it step by step to understand what has happened.
Regards
Thierry
Le 04/12/2012 20:37, Peter Korsgaard a ?crit :
Quoted 21 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thierry" == Thierry Bultel <[email protected]> writes:
Thierry> Hi,
Thierry> The generated "startx" has the host path for mcookie:Thierry> ----------
Thierry> esacThierry> authdisplay=${display:-:0}Thierry> mcookie=
/nous/BASYSTEMES/Buildroot/output.imx6neon/host/usr/bin/mcookieWhat buildroot version are you using? It seems to be correct here with current git:
grep bin/mcookie output/target/usr/bin/startx
mcookie=/usr/bin/mcookie
Hi,
Sorry for the long delay
The bug is reproducible with latest release,
and I finally found out why.
The issue is that in xapp_xinit, 'configure' checks for 'mcookie', and the first time, founds it ... on the host side, ie the "/usr/bin/mcookie" of Ubuntu for instance. This is the path that is substituted in startx.
When rebuilding the xapp_xinit package, "mcookie" has been built by buildroot, in the xorg_server package. Thus "configure" finds it in our build directory, ie output/host/usr/bin/mcookie, which is not a target path.
A quick fix (not meaning it is the cleanest way) is simply to add
XAPP_XINIT_CONF_OPT += MCOOKIE=/usr/bin/mcookie
in xapp_xinit.mk
Thierry
Le 04/12/2012 20:37, Peter Korsgaard a ?crit :
Quoted 21 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thierry" == Thierry Bultel <[email protected]> writes:
Thierry> Hi,
Thierry> The generated "startx" has the host path for mcookie:Thierry> ----------
Thierry> esacThierry> authdisplay=${display:-:0}Thierry> mcookie=
/nous/BASYSTEMES/Buildroot/output.imx6neon/host/usr/bin/mcookieWhat buildroot version are you using? It seems to be correct here with current git:
grep bin/mcookie output/target/usr/bin/startx
mcookie=/usr/bin/mcookie
Quoted 15 lines · Thierry Bultel
Hi,
Sorry for the long delay
The bug is reproducible with latest release,
and I finally found out why.The issue is that in
xapp_xinit, 'configure' checks for 'mcookie', and the first time, founds it ... on the host side, ie the "/usr/bin/mcookie" of Ubuntu for instance. This is the path that is substituted in startx.When rebuilding the
xapp_xinitpackage, "mcookie" has been built by buildroot, in thexorg_serverpackage. Thus "configure" finds it in our build directory, ie output/host/usr/bin/mcookie, which is not a target path.
Quoted 5 lines
A quick fix (not meaning it is the cleanest way) is simply to add
XAPP_XINIT_CONF_OPT+= MCOOKIE=/usr/bin/mcookiein xapp_xinit.mk
That's a perfectly clean solution - on condition that mcookie is indeed
installed on the target. I guess the option should therefore be in an
ifeq ($(BR2_PACKAGE_UTIL_LINUX),y)XAPP_XINIT_CONF_OPT += MCOOKIE=/usr/bin/mcookie
endif
Care to make a patch?
Regards,
Arnout
Quoted 2 lines
Thierry
[snip]
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
Dear Arnout Vandecappelle,
Quoted 8 lines · Arnout Vandecappelle
That's a perfectly clean solution - on condition that mcookie is indeed
installed on the target. I guess the option should therefore be in anifeq ($(BR2_PACKAGE_UTIL_LINUX),y)
XAPP_XINIT_CONF_OPT+= MCOOKIE=/usr/bin/mcookie
endifCare to make a patch?
We also have a mcookie package in package/x11r7/mcookie/. I guess the purpose was to avoid building the entire util-linux stuff just to get mcookie. Maybe we need to decide whether we want to use one mcookie solution (the standalone package) or the other (mcookie built as part of util-linux), and stick to it. No?
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
Quoted 11 lines · Thomas Petazzoni
Dear Arnout Vandecappelle,
Quoted 7 lines · Arnout Vandecappelle
That's a perfectly clean solution - on condition that mcookie is indeed
installed on the target. I guess the option should therefore be in anifeq ($(BR2_PACKAGE_UTIL_LINUX),y)
XAPP_XINIT_CONF_OPT+= MCOOKIE=/usr/bin/mcookie
endif
Quoted 7 lines
Quoted 1 line
Care to make a patch?
We also have a mcookie package in package/x11r7/mcookie/. I guess the purpose was to avoid building the entire util-linux stuff just to get mcookie. Maybe we need to decide whether we want to use one mcookie solution (the standalone package) or the other (mcookie built as part of util-linux), and stick to it. No?
That would indeed be better... In my allpackage build, the mcookie that
ends up in target/usr/bin is the one from util-linux...
Since mcookie is not in busybox, it does make sense to have a separate
source for it. However, it's only used by xserver and at that point the additional size of util-linux isn't really an issue anymore...
So I think we can safely remove mcookie.
Or leave things as is, even.
BTW, shouldn't xapp_xinit depend on XORG_SERVER? xinit tries to start
an X server... If xapp_xinit depens on XORG_SERVER then the condition I proposed is no longer necessary, because MCOOKIE will be selected.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle <[email protected]> writes:
Arnout> BTW, shouldn't xapp_xinit depend on XORG_SERVER? xinit tries Arnout> to start an X server... If xapp_xinit depens on XORG_SERVER Arnout> then the condition I proposed is no longer necessary, because Arnout> MCOOKIE will be selected.
That indeed seems sensible. Care to send a patch?
Signature · 1 line
Bye, Peter Korsgaard