diff mbox

[1/1] eudev: add cxx dependency

Message ID 1433616116-30527-1-git-send-email-tomasz.gorochowik@gmail.com
State Rejected
Headers show

Commit Message

Tomasz Gorochowik June 6, 2015, 6:41 p.m. UTC
Dynamic /dev management using eudev requires c++ support

Signed-off-by: Tomasz Gorochowik <tomasz.gorochowik@gmail.com>
---
 system/Config.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Yann E. MORIN June 6, 2015, 9:04 p.m. UTC | #1
Tomasz, All,

On 2015-06-06 20:41 +0200, Tomasz Gorochowik spake thusly:
> Dynamic /dev management using eudev requires c++ support

eudev is written entirely in C, not C++.

What is the problem yuou are trying to fix?

Regards,
Yann E. MORIN.

> Signed-off-by: Tomasz Gorochowik <tomasz.gorochowik@gmail.com>
> ---
>  system/Config.in | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/system/Config.in b/system/Config.in
> index 84cde94..9ef3897 100644
> --- a/system/Config.in
> +++ b/system/Config.in
> @@ -114,13 +114,14 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV
>  config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
>  	bool "Dynamic using eudev"
>  	depends on BR2_USE_WCHAR
> +	depends on BR2_TOOLCHAIN_BUILDROOT_CXX
>  	depends on !BR2_STATIC_LIBS
>  	depends on BR2_USE_MMU # eudev
>  	select BR2_PACKAGE_EUDEV
>  
> -comment "eudev needs a toolchain w/ wchar, dynamic library"
> +comment "eudev needs a toolchain w/ wchar, cxx, dynamic lib"
>  	depends on BR2_USE_MMU
> -	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
> +	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_BUILDROOT_CXX || BR2_STATIC_LIBS
>  
>  endchoice
>  
> -- 
> 2.4.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Tomasz Gorochowik June 6, 2015, 10:24 p.m. UTC | #2
Yann,

> eudev is written entirely in C, not C++.
>
> What is the problem yuou are trying to fix?

I might be misinterpreting something, but here's what I do.

Mininal config changes I make to reproduce the error:

Target architecture: ARM (little endian)
Architecture variant: cortex-A9
Toolchain -> Enable WCHAR support
Target -> /dev management: eudev

Builduing this config ends with an eudev error.
The interesting part of output/build/eudev-3.0/config.log:

configure:13481: checking how to run the C++ preprocessor
[...]
configure:13597: error: in `/tmp/buildroot/output/build/eudev-3.0':
configure:13599: error: C++ preprocessor "/lib/cpp" fails sanity check

This issue gets fixed if I enable BR2_TOOLCHAIN_BUILDROOT_CXX.

Please let me know if I'm missing something obvious, maybe some flag should be
set somewhere instead of enabling cxx support?

Regards,
Tomasz Gorochowik


2015-06-06 23:04 GMT+02:00 Yann E. MORIN <yann.morin.1998@free.fr>:
> Tomasz, All,
>
> On 2015-06-06 20:41 +0200, Tomasz Gorochowik spake thusly:
>> Dynamic /dev management using eudev requires c++ support
>

>
> Regards,
> Yann E. MORIN.
>
>> Signed-off-by: Tomasz Gorochowik <tomasz.gorochowik@gmail.com>
>> ---
>>  system/Config.in | 5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/system/Config.in b/system/Config.in
>> index 84cde94..9ef3897 100644
>> --- a/system/Config.in
>> +++ b/system/Config.in
>> @@ -114,13 +114,14 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV
>>  config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
>>       bool "Dynamic using eudev"
>>       depends on BR2_USE_WCHAR
>> +     depends on BR2_TOOLCHAIN_BUILDROOT_CXX
>>       depends on !BR2_STATIC_LIBS
>>       depends on BR2_USE_MMU # eudev
>>       select BR2_PACKAGE_EUDEV
>>
>> -comment "eudev needs a toolchain w/ wchar, dynamic library"
>> +comment "eudev needs a toolchain w/ wchar, cxx, dynamic lib"
>>       depends on BR2_USE_MMU
>> -     depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
>> +     depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_BUILDROOT_CXX || BR2_STATIC_LIBS
>>
>>  endchoice
>>
>> --
>> 2.4.2
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
Bernd Kuhls June 7, 2015, 11:17 a.m. UTC | #3
Tomasz Gorochowik <tomasz.gorochowik@gmail.com> 
wrote in news:CAJ4oOgypx858taa1cef4uivge-jyS07WZ=5R2=g-
w_MaVWjxMQ@mail.gmail.com:

> Mininal config changes I make to reproduce the error:
> 
> Target architecture: ARM (little endian)
> Architecture variant: cortex-A9
> Toolchain -> Enable WCHAR support
> Target -> /dev management: eudev

Hi,

building eudev with this defconfig, without c++, works:

BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y

Please post the content of your defconfig file:

make savedefconfig DEFCONFIG=some_defconfig

Regards, Bernd
Tomasz Gorochowik June 7, 2015, 1:13 p.m. UTC | #4
Hello,

thanks for your time.

I did a build on a different machine, with a different OS and it
indeed did work.

It turns out, that the eudev configure script was trying to execute
the /lib/cpp binary, which was not present in my system (Arch). For
some reason I thought it only executes the downloaded binaries while
builduing all of the packages.

Making a symlink to that path fixed the issue, so the patch I
submitted should clearly be ignored, as it is more of a uedev issue
than buildroot (for executing cpp with full path instead of looking
for it in the $PATH).

Once again - thanks for your time, and sorry for introducing the confusion.

Best regards,
Tom

2015-06-07 13:17 GMT+02:00 Bernd Kuhls <bernd.kuhls@t-online.de>:
> Tomasz Gorochowik <tomasz.gorochowik@gmail.com>
> wrote in news:CAJ4oOgypx858taa1cef4uivge-jyS07WZ=5R2=g-
> w_MaVWjxMQ@mail.gmail.com:
>
>> Mininal config changes I make to reproduce the error:
>>
>> Target architecture: ARM (little endian)
>> Architecture variant: cortex-A9
>> Toolchain -> Enable WCHAR support
>> Target -> /dev management: eudev
>
> Hi,
>
> building eudev with this defconfig, without c++, works:
>
> BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
> BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
>
> Please post the content of your defconfig file:
>
> make savedefconfig DEFCONFIG=some_defconfig
>
> Regards, Bernd
>
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Thomas Petazzoni June 8, 2015, 10:09 a.m. UTC | #5
Dear Tomasz Gorochowik,

On Sun, 7 Jun 2015 15:13:31 +0200, Tomasz Gorochowik wrote:

> I did a build on a different machine, with a different OS and it
> indeed did work.
> 
> It turns out, that the eudev configure script was trying to execute
> the /lib/cpp binary, which was not present in my system (Arch). For
> some reason I thought it only executes the downloaded binaries while
> builduing all of the packages.
> 
> Making a symlink to that path fixed the issue, so the patch I
> submitted should clearly be ignored, as it is more of a uedev issue
> than buildroot (for executing cpp with full path instead of looking
> for it in the $PATH).
> 
> Once again - thanks for your time, and sorry for introducing the confusion.

Even though your original patch is maybe not the correct solution, I
think there is still a problem. You shouldn't have to mess up things in
your system to get Buildroot to build eudev.

Best regards,

Thomas
diff mbox

Patch

diff --git a/system/Config.in b/system/Config.in
index 84cde94..9ef3897 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -114,13 +114,14 @@  config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV
 config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
 	bool "Dynamic using eudev"
 	depends on BR2_USE_WCHAR
+	depends on BR2_TOOLCHAIN_BUILDROOT_CXX
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_USE_MMU # eudev
 	select BR2_PACKAGE_EUDEV
 
-comment "eudev needs a toolchain w/ wchar, dynamic library"
+comment "eudev needs a toolchain w/ wchar, cxx, dynamic lib"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_BUILDROOT_CXX || BR2_STATIC_LIBS
 
 endchoice