public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "sven.schultschik@siemens.com" <sven.schultschik@siemens.com>
To: "henning.schild@siemens.com" <henning.schild@siemens.com>
Cc: "isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: AW: using unifdef
Date: Wed, 29 Jul 2020 07:23:04 +0000	[thread overview]
Message-ID: <VI1PR10MB3552AE33626E92EBFC66477790700@VI1PR10MB3552.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20200728180127.3b984ab0@md1za8fc.ad001.siemens.net>

[-- 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 --]

      parent reply	other threads:[~2020-07-29  7:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-28 14:39 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   ` sven.schultschik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=VI1PR10MB3552AE33626E92EBFC66477790700@VI1PR10MB3552.EURPRD10.PROD.OUTLOOK.COM \
    --to=sven.schultschik@siemens.com \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox