public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* using unifdef
@ 2020-07-28 14:39 sven.schultschik
  2020-07-28 15:26 ` Baurzhan Ismagulov
  2020-07-28 16:01 ` Henning Schild
  0 siblings, 2 replies; 5+ messages in thread
From: sven.schultschik @ 2020-07-28 14:39 UTC (permalink / raw)
  To: isar-users


[-- Attachment #1.1.1: Type: text/plain, Size: 1636 bytes --]

Hi all,

 

no idea if this is the right place to ask this.

 

I currently writing a recipe to create a “-dev” package to a library we are
creating/using.

 

The recipe has the build dependency “unifdef”

 <https://packages.debian.org/stable/devel/unifdef>
https://packages.debian.org/stable/devel/unifdef

 

The package is available as .deb but requires cpp-8 arm64, der container hat
aber bereits cpp-8 amd64. See screenshot

I wrote the recipe and dependencies as usual, never had such an error. 

To understand and fix this issue a deeper knowledge of the build system is
needed.

 

Thank you

 



 

Mit freundlichen Grüßen
Sven Angelo Schultschik

Siemens AG
Digital Industries
Process Automation
Software House Khe
DI PA CI R&D 2
Östliche Rheinbrückenstr. 50
76187 Karlsruhe, Deutschland
Tel.: +49 721 595-2827
 <mailto:sven.schultschik@siemens.com> mailto:sven.schultschik@siemens.com
 <https://siemens.com/ingenuityforlife> www.siemens.com/ingenuityforlife

Siemens Aktiengesellschaft: Vorsitzender des Aufsichtsrats: Jim Hagemann
Snabe; Vorstand: Joe Kaeser, Vorsitzender; Roland Busch, Klaus Helmrich,
Cedrik Neike, Ralf P. Thomas; Sitz der Gesellschaft: Berlin und München,
Deutschland; Registergericht: Berlin Charlottenburg, HRB 12300, München, HRB
6684; WEEE-Reg.-Nr. DE 23691322

Wichtiger Hinweis: Diese E-Mail und etwaige Anlagen enthalten
firmenvertrauliche Informationen. Sollten Sie diese E-Mail irrtümlich
erhalten haben, benachrichtigen Sie uns bitte durch Antwort-Mail und löschen
Sie diese E-Mail nebst Anlagen von Ihrem System. Vielen Dank.


[-- Attachment #1.1.2: Type: text/html, Size: 5147 bytes --]

[-- Attachment #1.2: image001.png --]
[-- Type: image/png, Size: 1166248 bytes --]

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 12204 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: using unifdef
  2020-07-28 14:39 using unifdef sven.schultschik
@ 2020-07-28 15:26 ` Baurzhan Ismagulov
  2020-07-28 16:01 ` Henning Schild
  1 sibling, 0 replies; 5+ messages in thread
From: Baurzhan Ismagulov @ 2020-07-28 15:26 UTC (permalink / raw)
  To: isar-users

Hello Sven,

On Tue, Jul 28, 2020 at 02:39:25PM +0000, sven.schultschik@siemens.com wrote:
> I currently writing a recipe to create a “-dev” package to a library we are
> creating/using.
...
> The package is available as .deb but requires cpp-8 arm64, der container hat
> aber bereits cpp-8 amd64. See screenshot

How can this be reproduced with stock Isar? Perhaps you could share a minimal
diff that results in the problem.

With kind regards,
Baurzhan.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: using unifdef
  2020-07-28 14:39 using unifdef sven.schultschik
  2020-07-28 15:26 ` Baurzhan Ismagulov
@ 2020-07-28 16:01 ` Henning Schild
  2020-07-28 16:09   ` Baurzhan Ismagulov
  2020-07-29  7:23   ` AW: " sven.schultschik
  1 sibling, 2 replies; 5+ messages in thread
From: Henning Schild @ 2020-07-28 16:01 UTC (permalink / raw)
  To: [ext] sven.schultschik@siemens.com; +Cc: isar-users

[-- Attachment #1: Type: text/plain, Size: 2964 bytes --]

On Tue, 28 Jul 2020 14:39:25 +0000
"[ext] sven.schultschik@siemens.com" <sven.schultschik@siemens.com>
wrote:

> Hi all,
> 
>  
> 
> no idea if this is the right place to ask this.

Maybe, but as already mentioned ... it might be hard to answer without
the code.

>  
> 
> I currently writing a recipe to create a “-dev” package to a library
> we are creating/using.
> 
>  
> 
> The recipe has the build dependency “unifdef”
> 
>  <https://packages.debian.org/stable/devel/unifdef>
> https://packages.debian.org/stable/devel/unifdef
> 
>  
> 
> The package is available as .deb but requires cpp-8 arm64, der
> container hat aber bereits cpp-8 amd64. See screenshot

The "container" ... so i guess you are using kas-isar. In fact that
does not need a compiler since the real compiler used is the one from
the buildchroot.

The fact that you have an issue between amd64 and arm64 makes me guess
you are using ISAR_CROSS_COMPILE and your target machine is arm64 while
your host is amd64.

With ISAR_CROSS_COMPILE you will be running the compiler in
buildchroot-host and that is also where build-deps get installed. There
also is buildchroot-target where "native" compilation is done, for
things that do not work "cross".

I suggest you disable ISAR_CROSS_COMPILE for that one recipe and see
how far you get.
The cross feature is hard to get right for chains of dependent
packages, they all need to be cross for everything to work. So another
solution could be to rebuild unifdef in isar and build it cross as
well. But that might just get you to the next package and at the end
you have many recipes to maintain.

Henning

> I wrote the recipe and dependencies as usual, never had such an
> error. 
> 
> To understand and fix this issue a deeper knowledge of the build
> system is needed.
> 
>  
> 
> Thank you
> 
>  
> 
> 
> 
>  
> 
> Mit freundlichen Grüßen
> Sven Angelo Schultschik
> 
> Siemens AG
> Digital Industries
> Process Automation
> Software House Khe
> DI PA CI R&D 2
> Östliche Rheinbrückenstr. 50
> 76187 Karlsruhe, Deutschland
> Tel.: +49 721 595-2827
>  <mailto:sven.schultschik@siemens.com>
> mailto:sven.schultschik@siemens.com
> <https://siemens.com/ingenuityforlife>
> www.siemens.com/ingenuityforlife
> 
> Siemens Aktiengesellschaft: Vorsitzender des Aufsichtsrats: Jim
> Hagemann Snabe; Vorstand: Joe Kaeser, Vorsitzender; Roland Busch,
> Klaus Helmrich, Cedrik Neike, Ralf P. Thomas; Sitz der Gesellschaft:
> Berlin und München, Deutschland; Registergericht: Berlin
> Charlottenburg, HRB 12300, München, HRB 6684; WEEE-Reg.-Nr. DE
> 23691322
> 
> Wichtiger Hinweis: Diese E-Mail und etwaige Anlagen enthalten
> firmenvertrauliche Informationen. Sollten Sie diese E-Mail irrtümlich
> erhalten haben, benachrichtigen Sie uns bitte durch Antwort-Mail und
> löschen Sie diese E-Mail nebst Anlagen von Ihrem System. Vielen Dank.
> 


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 6552 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: using unifdef
  2020-07-28 16:01 ` Henning Schild
@ 2020-07-28 16:09   ` Baurzhan Ismagulov
  2020-07-29  7:23   ` AW: " sven.schultschik
  1 sibling, 0 replies; 5+ messages in thread
From: Baurzhan Ismagulov @ 2020-07-28 16:09 UTC (permalink / raw)
  To: isar-users

On Tue, Jul 28, 2020 at 06:01:27PM +0200, Henning Schild wrote:
> I suggest you disable ISAR_CROSS_COMPILE for that one recipe and see
> how far you get.

Thanks for the analysis, sounds plausible.


> The cross feature is hard to get right for chains of dependent
> packages, they all need to be cross for everything to work. So another
> solution could be to rebuild unifdef in isar and build it cross as
> well. But that might just get you to the next package and at the end
> you have many recipes to maintain.

Without seeing the code, my expectation would be that given the right
Build-Depends, the rest should be handled by multiarch (i.e., apt-get
build-deps should work out of the box). Are there issues in the practice? In
particular, I don't see why one should need to rebuild unifdef, and how that
solves the problem.


With kind regards,
Baurzhan.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* AW: using unifdef
  2020-07-28 16:01 ` Henning Schild
  2020-07-28 16:09   ` Baurzhan Ismagulov
@ 2020-07-29  7:23   ` sven.schultschik
  1 sibling, 0 replies; 5+ messages in thread
From: sven.schultschik @ 2020-07-29  7:23 UTC (permalink / raw)
  To: henning.schild; +Cc: isar-users

[-- Attachment #1: Type: text/plain, Size: 4113 bytes --]

Hi Henning,

good explenation.

I heard about cross and native compile, but didn't investigate how to use one or the other. I was happy to have a working recipe and copied it since ^^

For this recipe the cross can be disabled, because I just want to remove some ifdefs, put the header files in a .deb package and use this package to be installed into other kas containers as build dependency.

require lib-base.inc

inherit dpkg

PACKAGE_NAME = "lib-dev"

BUILD_DEPENDS += " unifdef "

SRC_URI += " file://lib.install \
            "

do_prepare_build_append() {
    ## copy out-of-tree source files
    cp ${WORKDIR}/lib-dev.install ${S}/debian/

    mkdir  ${WORKDIR}/unifdef
}

do_runbuild() {
    unifdef -d -iU__UBOOT__ -o unifdef/header1.h header1.h
    unifdef -d -iUUNCOMMON -iU__UBOOT__ -o unifdef/header2.h csrp/header2.h
}

Regards 
Sven


-----Ursprüngliche Nachricht-----
Von: Henning Schild <henning.schild@siemens.com> 
Gesendet: Dienstag, 28. Juli 2020 18:01
An: Schultschik, Sven (DI PA CI R&D 2) <sven.schultschik@siemens.com>
Cc: isar-users@googlegroups.com
Betreff: Re: using unifdef

On Tue, 28 Jul 2020 14:39:25 +0000
"[ext] sven.schultschik@siemens.com" <sven.schultschik@siemens.com>
wrote:

> Hi all,
> 
>  
> 
> no idea if this is the right place to ask this.

Maybe, but as already mentioned ... it might be hard to answer without
the code.

>  
> 
> I currently writing a recipe to create a “-dev” package to a library
> we are creating/using.
> 
>  
> 
> The recipe has the build dependency “unifdef”
> 
>  <https://packages.debian.org/stable/devel/unifdef>
> https://packages.debian.org/stable/devel/unifdef
> 
>  
> 
> The package is available as .deb but requires cpp-8 arm64, der
> container hat aber bereits cpp-8 amd64. See screenshot

The "container" ... so i guess you are using kas-isar. In fact that
does not need a compiler since the real compiler used is the one from
the buildchroot.

The fact that you have an issue between amd64 and arm64 makes me guess
you are using ISAR_CROSS_COMPILE and your target machine is arm64 while
your host is amd64.

With ISAR_CROSS_COMPILE you will be running the compiler in
buildchroot-host and that is also where build-deps get installed. There
also is buildchroot-target where "native" compilation is done, for
things that do not work "cross".

I suggest you disable ISAR_CROSS_COMPILE for that one recipe and see
how far you get.
The cross feature is hard to get right for chains of dependent
packages, they all need to be cross for everything to work. So another
solution could be to rebuild unifdef in isar and build it cross as
well. But that might just get you to the next package and at the end
you have many recipes to maintain.

Henning

> I wrote the recipe and dependencies as usual, never had such an
> error. 
> 
> To understand and fix this issue a deeper knowledge of the build
> system is needed.
> 
>  
> 
> Thank you
> 
>  
> 
> 
> 
>  
> 
> Mit freundlichen Grüßen
> Sven Angelo Schultschik
> 
> Siemens AG
> Digital Industries
> Process Automation
> Software House Khe
> DI PA CI R&D 2
> Östliche Rheinbrückenstr. 50
> 76187 Karlsruhe, Deutschland
> Tel.: +49 721 595-2827
>  <mailto:sven.schultschik@siemens.com>
> mailto:sven.schultschik@siemens.com
> <https://siemens.com/ingenuityforlife>
> www.siemens.com/ingenuityforlife
> 
> Siemens Aktiengesellschaft: Vorsitzender des Aufsichtsrats: Jim
> Hagemann Snabe; Vorstand: Joe Kaeser, Vorsitzender; Roland Busch,
> Klaus Helmrich, Cedrik Neike, Ralf P. Thomas; Sitz der Gesellschaft:
> Berlin und München, Deutschland; Registergericht: Berlin
> Charlottenburg, HRB 12300, München, HRB 6684; WEEE-Reg.-Nr. DE
> 23691322
> 
> Wichtiger Hinweis: Diese E-Mail und etwaige Anlagen enthalten
> firmenvertrauliche Informationen. Sollten Sie diese E-Mail irrtümlich
> erhalten haben, benachrichtigen Sie uns bitte durch Antwort-Mail und
> löschen Sie diese E-Mail nebst Anlagen von Ihrem System. Vielen Dank.
> 


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 12204 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-29  7:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28 14:39 using unifdef sven.schultschik
2020-07-28 15:26 ` Baurzhan Ismagulov
2020-07-28 16:01 ` Henning Schild
2020-07-28 16:09   ` Baurzhan Ismagulov
2020-07-29  7:23   ` AW: " sven.schultschik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox