* [Buildroot] scons and check
@ 2015-05-27 15:03 Sylvain Raybaud
2015-05-27 15:41 ` Samuel Martin
2015-05-28 7:47 ` Peter Bouda
0 siblings, 2 replies; 7+ messages in thread
From: Sylvain Raybaud @ 2015-05-27 15:03 UTC (permalink / raw)
To: buildroot
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
I'm trying to create a package for Galera, a library needed by mariadb
galera cluster. It builds with scons. Galera depends on check so I
created a package for this library too, which seems to build and
install correctly.
A few packages in buildroot already use scons (exfat, exfat-utils,
benejson, gpsd). Their build commands look like this:
FOO_SCONS_ENV = $(TARGET_CONFIGURE_OPTS)
FOO_SCONS_OPTS = "prefix=/usr"
define FOO_BUILD_CMDS
cd $(@D) && \
$(FOO_SCONS_ENV) \
CROSS=$(TARGET_CROSS) \
$(SCONS) $(FOO_SCONS_OPTS)
endef
So I wrote my .mk file the same way. However scons does not seem to
find the Check library. Building galera fails with:
Checking for C header file check.h... no
Error: check header file not found or not usable
and corresponding config.log shows a "check.h: file not found" error.
Now the disturbing thing is that it only happens when I build on a
system on which check is not installed system-wise. If the build host
has check installed, galera builds. Does this mean that scons uses
host haeders instead of those provided by buildroot packages? Any idea
how to make it behave properly?
Cheers,
- --
Sylvain Raybaud
www.green-communications.fr
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBAgAGBQJVZdykAAoJEEkkwl4JtJ9yhFQP/1Tz1R+MTfKofn6mR5cRHhsQ
v9vZubtiWsbJ5iIBHWOiY6axhRxeizlmXy1MdCtJ6V6vWpo4IQsAOi1T5iDYsNvc
F6q1JUJWLxF3cpeqDULbjdySyJL2193SNvakf5yVCpJH2/ZF0r1UYXZz6aNPkfZv
ADz0dPc2XaZRFuinW24NbZyz6//HLTl9C0U006PzZO3ztCTA3jv09gGW4WSyX5Mn
yEN+WsQ3pjRIJwhrHKjA9/4Dtk7HIG1p6ln2swiiMYxZarIQik70aRIFHchwDS9J
sLrLVSLQHvY8OR0pnmdIoY1RBBAC2sUlbSh57Fb+bJEI0vommRgkZjPP6my4WW7F
SMtaAwzuXNDN/XYb5JoCfJVjyByV/0OLPxWGHFZ77W32xQ59n5jDi10RHL85wnvP
kmgJ7LSvvwgfMioBo8QC/t0zI9kvU0emq136khuROMKRbFAKnAZqRr97OCJ3s5Uz
qjAW2iY5MufgNWdyQG+M5plnt+3hqgFAKJwQwgyuyeVPgHI0N1ZZ6wQYff3LV4xm
QWULAwVyiyNgqRb45OfP7JWqCFhoP8gQiWCYMVlRmTEfY/lLMxd20AK8qz1v4uTA
p4t9n6ql6dXloeWcw2dlxQVS6ZHqK/6xxfh6d2RsnekN5OVjRvEE3KaKt/5ae3pa
F+NzawlBLBStsW73P6LZ
=twcI
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 7+ messages in thread* [Buildroot] scons and check
2015-05-27 15:03 [Buildroot] scons and check Sylvain Raybaud
@ 2015-05-27 15:41 ` Samuel Martin
2015-05-27 16:46 ` Sylvain Raybaud
2015-05-28 7:47 ` Peter Bouda
1 sibling, 1 reply; 7+ messages in thread
From: Samuel Martin @ 2015-05-27 15:41 UTC (permalink / raw)
To: buildroot
Hi Sylvain,
On Wed, May 27, 2015 at 5:03 PM, Sylvain Raybaud
<sylvain.raybaud@green-communications.fr> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi
>
> I'm trying to create a package for Galera, a library needed by mariadb
> galera cluster. It builds with scons. Galera depends on check so I
> created a package for this library too, which seems to build and
> install correctly.
>
> A few packages in buildroot already use scons (exfat, exfat-utils,
> benejson, gpsd). Their build commands look like this:
>
> FOO_SCONS_ENV = $(TARGET_CONFIGURE_OPTS)
> FOO_SCONS_OPTS = "prefix=/usr"
>
> define FOO_BUILD_CMDS
> cd $(@D) && \
> $(FOO_SCONS_ENV) \
> CROSS=$(TARGET_CROSS) \
> $(SCONS) $(FOO_SCONS_OPTS)
> endef
>
> So I wrote my .mk file the same way. However scons does not seem to
> find the Check library. Building galera fails with:
>
> Checking for C header file check.h... no
> Error: check header file not found or not usable
>
> and corresponding config.log shows a "check.h: file not found" error.
According to [1], you need to package check [2] in buildroot as well
>
> Now the disturbing thing is that it only happens when I build on a
> system on which check is not installed system-wise. If the build host
> has check installed, galera builds. Does this mean that scons uses
> host haeders instead of those provided by buildroot packages? Any idea
> how to make it behave properly?
It certainly means that galera will depend on host-check; I let you
check about the dependency on (target-) check.
[1] https://github.com/codership/galera/blob/3.x/README
[2] http://check.sourceforge.net/
Regards,
--
Samuel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] scons and check
2015-05-27 15:41 ` Samuel Martin
@ 2015-05-27 16:46 ` Sylvain Raybaud
2015-05-27 18:08 ` Thomas Petazzoni
0 siblings, 1 reply; 7+ messages in thread
From: Sylvain Raybaud @ 2015-05-27 16:46 UTC (permalink / raw)
To: buildroot
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Samuel
On 27/05/2015 17:41, Samuel Martin wrote:
> According to [1], you need to package check [2] in buildroot as
> well
>
Yes, I did that. Check is building and installing just fine in buildroot.
>>>
>>> Now the disturbing thing is that it only happens when I build
>>> on a system on which check is not installed system-wise. If the
>>> build host has check installed, galera builds. Does this mean
>>> that scons uses host haeders instead of those provided by
>>> buildroot packages? Any idea how to make it behave properly?
> It certainly means that galera will depend on host-check; I let
> you check about the dependency on (target-) check.
I made galera dependent on host-check. As a result check is built and
installed. The header is present in output/host/usr/include/check.h
and the .pc file in output/host/usr/lib/pkgconfig/check.pc.
Just to be sure I tried to also make it dependent on target check, it
didn't work either (check is installed on target but scons cannot find
it).
Cheers,
Sylvain
>
> [1] https://github.com/codership/galera/blob/3.x/README [2]
> http://check.sourceforge.net/
- --
Sylvain Raybaud
www.green-communications.fr
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBAgAGBQJVZfTtAAoJEEkkwl4JtJ9y6/wP/RRj5N5oPsfzP3tdi1fBceh6
SiyzeU4UkpW0UncJ7hAcIONA+cL3+hhxsBe3HKcyaOxyDWNw8Fo26H+Xht3AHQSf
ezQl0L6xwPDT/T8FLqmdnVmYFFzI/ueXZqb+BF8bSK32AaYBcqwRbXOGLUYlVduT
w+7aT5c6xd+j7qX9tm4iwJMdtHVAhZU1bfTl8xzQa0P6M++AJcqzOIMcE7/JKCc2
J/eDfVD7ejg+dhCSgyV0pRzx7grxtmv5lCTtnnXmKGwXuNbYt/YQ8voqXGVM7X/a
SM+8PHJOIL6MmrFkxI4xYMJ7aGlL7lIDbV8dJWLebMFF5RucQZAClhTfr0dzV82g
OSR0ZjFboezkUG0GtbB5dPUIXiCdtptGiiao7NxZxKTwN2mNfHWitOAojmQtZCpH
1J30KRrHqW/Yxpz7qi1pyF6V/H7SXa08XmtzReHXZDqnLelQJvhfm67Va5JUpV8o
pSmF/3uwpVW6Gni+F7/+N9Ko2pVTDQftKeyr3lYy/oYqNI74QYk5FVvoaPdvgt1e
u+6k54Qd1Q5gwFjkx2P+ogf5wC9NWI0beBUqd7uEh63RCOHbmO4M4/Jv3WYpGQRe
zq7zWEItIuRbRkAgyFVLHeqbQKhSG4sts1c9HFKPyknwGkuufFtZiiHLouGzc24B
XDq1vhD6wde2GW+fxmcd
=jHSY
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] scons and check
2015-05-27 16:46 ` Sylvain Raybaud
@ 2015-05-27 18:08 ` Thomas Petazzoni
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2015-05-27 18:08 UTC (permalink / raw)
To: buildroot
Dear Sylvain Raybaud,
On Wed, 27 May 2015 18:46:37 +0200, Sylvain Raybaud wrote:
> I made galera dependent on host-check. As a result check is built and
> installed. The header is present in output/host/usr/include/check.h
> and the .pc file in output/host/usr/lib/pkgconfig/check.pc.
>
> Just to be sure I tried to also make it dependent on target check, it
> didn't work either (check is installed on target but scons cannot find
> it).
Well, the fact that it doesn't find it may also be due to the
SConstruct not doing the right thing. So make sure to really understand
how "check" is used by galera, and only that will allow you to know if
a host "check" or target "check" package is needed.
Installing a host-check just because it makes things "work" might be a
mistake.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] scons and check
2015-05-27 15:03 [Buildroot] scons and check Sylvain Raybaud
2015-05-27 15:41 ` Samuel Martin
@ 2015-05-28 7:47 ` Peter Bouda
2015-05-28 10:55 ` Sylvain Raybaud
1 sibling, 1 reply; 7+ messages in thread
From: Peter Bouda @ 2015-05-28 7:47 UTC (permalink / raw)
To: buildroot
Hi Sylvain,
Am Mittwoch 27 Mai 2015, 17:03:00 schrieb Sylvain Raybaud:
>
> A few packages in buildroot already use scons (exfat, exfat-utils,
> benejson, gpsd). Their build commands look like this:
>
> FOO_SCONS_ENV = $(TARGET_CONFIGURE_OPTS)
> FOO_SCONS_OPTS = "prefix=/usr"
>
> define FOO_BUILD_CMDS
> cd $(@D) && \
> $(FOO_SCONS_ENV) \
> CROSS=$(TARGET_CROSS) \
> $(SCONS) $(FOO_SCONS_OPTS)
> endef
>
I had a similar problem recently, I had to change my SConstruct file, so that
the CROSS variable is actually used in the target build process. The lines I
added are:
if 'CROSS' in os.environ:
cross = os.environ['CROSS']
env.Append(CROSS = cross)
env.Replace(CC = cross + 'gcc')
env.Replace(CXX = cross + 'g++')
env.Replace(LD = cross + 'ld')
Best,
Peter
--
http://www.peterbouda.eu
^ permalink raw reply [flat|nested] 7+ messages in thread* [Buildroot] scons and check
2015-05-28 7:47 ` Peter Bouda
@ 2015-05-28 10:55 ` Sylvain Raybaud
2015-05-28 12:07 ` Sylvain Raybaud
0 siblings, 1 reply; 7+ messages in thread
From: Sylvain Raybaud @ 2015-05-28 10:55 UTC (permalink / raw)
To: buildroot
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 28/05/2015 09:47, Peter Bouda wrote:
> Hi Sylvain,
>
> Am Mittwoch 27 Mai 2015, 17:03:00 schrieb Sylvain Raybaud:
>>
>> A few packages in buildroot already use scons (exfat,
>> exfat-utils, benejson, gpsd). Their build commands look like
>> this:
>>
>> FOO_SCONS_ENV = $(TARGET_CONFIGURE_OPTS) FOO_SCONS_OPTS =
>> "prefix=/usr"
>>
>> define FOO_BUILD_CMDS cd $(@D) && \ $(FOO_SCONS_ENV) \
>> CROSS=$(TARGET_CROSS) \ $(SCONS) $(FOO_SCONS_OPTS) endef
>>
>
> I had a similar problem recently, I had to change my SConstruct
> file, so that the CROSS variable is actually used in the target
> build process. The lines I added are:
>
> if 'CROSS' in os.environ: cross = os.environ['CROSS']
> env.Append(CROSS = cross) env.Replace(CC = cross + 'gcc')
> env.Replace(CXX = cross + 'g++') env.Replace(LD = cross + 'ld')
>
> Best, Peter
>
>
Hi
Thank you very much. I think with this I fixed a number of other
problems I had not yet spotted. Scons was indeed looking for things in
the wrong place. However it still cannot find check :) But I think the
SConstruct should be fixed so I'll dig deeper and let you know.
Cheers,
- --
Sylvain Raybaud
www.green-communications.fr
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBAgAGBQJVZvQXAAoJEEkkwl4JtJ9yWRgP/0Z2NxC9z4gKuheX/l/zqhHS
cOhiXt7MMBC4Ae+OoGVTZ9gyvhsV3zEaTwwoWWtCfDOn4C9dfA8McUv9x2UaRW3Y
RfoegRbvD+AF69iduTKcZHqgTNFXxJNkha+VJXng86UN156qsszZh2A2u/y6atG7
B06bveL6rfTo1cJeFDOG7YsKltInS1BfcG4TOZtaf7g9iBuvhLArNXHUbJ4kICEp
B7GESI0c1R2Ja8fVYCvuulPrAa7OAjBC5nMmwubnCVtuMQdIdM2gLjZtoi1roluk
uvSLOIW+kdSjxCEEi4jrbFQIjXcKJ7Yfb0Z2J4zXPiXFwk9m3Vxk2KDCHgtLBbG+
IiL6gHwVSW3tVkZu6qulcQaeB/Al9uroceh2sKgqAP5C5YAji9PKgV3OnFQwEPrJ
UQv/pq/x67FuzU6ccr93BCwn8DGzt3MPj4yGyzzLww3S4V/4BXwMeUADtANgpQ5a
40Nsc6E6FQgS015vf2L7X5FUXiX9Hjetv0F/cF12vDSQMkbydcwEuaf9Q7HTcjc4
/dS5V1n4ZrrbE66VqOozcxQlWGZD/Aboe+Ci+paQIBifJjfqhVb2lO5MPClcd9wh
mNZNfszptCsOOlDVHJOgLL9bM2nRgRij5NJXki4WQlM3gIr8PXUJg9uKi84ovwuQ
sFk2POh4nXCyu4DsfJMT
=cXgN
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] scons and check
2015-05-28 10:55 ` Sylvain Raybaud
@ 2015-05-28 12:07 ` Sylvain Raybaud
0 siblings, 0 replies; 7+ messages in thread
From: Sylvain Raybaud @ 2015-05-28 12:07 UTC (permalink / raw)
To: buildroot
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
I had to fix more things in SConstruct file and pass the proper
extra_sysroot argument to scons but I think I got it working. Thanks
again. I'll submit a bunch of patches for adding check, galera and
mariadb probably next week. Hopefully.
Cheers,
Sylvain
On 28/05/2015 12:55, Sylvain Raybaud wrote:
> On 28/05/2015 09:47, Peter Bouda wrote:
>> Hi Sylvain,
>
>> Am Mittwoch 27 Mai 2015, 17:03:00 schrieb Sylvain Raybaud:
>>>
>>> A few packages in buildroot already use scons (exfat,
>>> exfat-utils, benejson, gpsd). Their build commands look like
>>> this:
>>>
>>> FOO_SCONS_ENV = $(TARGET_CONFIGURE_OPTS) FOO_SCONS_OPTS =
>>> "prefix=/usr"
>>>
>>> define FOO_BUILD_CMDS cd $(@D) && \ $(FOO_SCONS_ENV) \
>>> CROSS=$(TARGET_CROSS) \ $(SCONS) $(FOO_SCONS_OPTS) endef
>>>
>
>> I had a similar problem recently, I had to change my SConstruct
>> file, so that the CROSS variable is actually used in the target
>> build process. The lines I added are:
>
>> if 'CROSS' in os.environ: cross = os.environ['CROSS']
>> env.Append(CROSS = cross) env.Replace(CC = cross + 'gcc')
>> env.Replace(CXX = cross + 'g++') env.Replace(LD = cross + 'ld')
>
>> Best, Peter
>
>
>
> Hi
>
> Thank you very much. I think with this I fixed a number of other
> problems I had not yet spotted. Scons was indeed looking for things
> in the wrong place. However it still cannot find check :) But I
> think the SConstruct should be fixed so I'll dig deeper and let you
> know.
>
> Cheers,
>
> _______________________________________________ buildroot mailing
> list buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
- --
Sylvain Raybaud
www.green-communications.fr
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBAgAGBQJVZwUPAAoJEEkkwl4JtJ9ybpYP/RWqEI7Xm7usznKbZMcNQUAR
Hg/KDg9CKEAFzxnyQBWsELu2s/+jz6iosCj6OW78C/hyU8cbAg2mpZ5MUCWidq70
BJyxhuphTUFOnenmwwpKZo2URtrF2oo26a+ofZqHTj+swzHL0WtHO0Bwb81NRiHu
9qPHj4wKxVhscNklqmMG+bl6GqbrHoTgX9ztueJ1kE2AEvz/kpQvB7puJJpvR8Iv
wUDF1NNunWc/xreSgbNqTHNTRHZ+tuEVfd+uegnzaVgys/9dDyXJxWDzgzcgi7nr
gySft4KQ0MX3DJeBGMv527iRkCvVnPWll5dkvHNFcpbxQ8p0YJ1m3NOSAZ9nIzaJ
Y4SuSXZM2Is9pCuAsoHqvoe2rkgdxqScYtq2uNfpxksS2HdxJIFDjczKsUz8a22T
6PznRP+wP/Atr73EeJ2hs9r7ee/URB16fL9sjtoiJf9PwuHzxh7WX3VnBN4/LtKR
esD0pKceyEy+FQMP2ES4ax348qib0F5dxVf6PY05pQKDqi6pU/n1dBftG0JceqNc
/O9fvWuxseZTfFt0s0BGDq7C/U2ZEjKQah8vKKS1o+3yHNO9gtyVqZUFdqFhkMsJ
f45aywJwc/iYNUjgQAIO3NydD2vU+wFUBfVXnxawucA6EvhdmFR9NEXUU3c9YK4H
d7ATcMb1lYa6kVLJn/ja
=YTjt
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-05-28 12:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-27 15:03 [Buildroot] scons and check Sylvain Raybaud
2015-05-27 15:41 ` Samuel Martin
2015-05-27 16:46 ` Sylvain Raybaud
2015-05-27 18:08 ` Thomas Petazzoni
2015-05-28 7:47 ` Peter Bouda
2015-05-28 10:55 ` Sylvain Raybaud
2015-05-28 12:07 ` Sylvain Raybaud
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox