mail archive of the rauc mailing list
 help / color / mirror / Atom feed
From: Simon Ruetzler <sruetzler@arigo-software.de>
To: rauc@pengutronix.de
Subject: [RAUC] cross compiling for the target fails
Date: Wed, 16 Sep 2020 13:25:22 +0200	[thread overview]
Message-ID: <a8d2f8a9-caa2-29a3-2896-f2e7ae2627e9@arigo-software.de> (raw)

Hello,
I'm trying to cross compile rauc.io for my target.

What I do:
Include the path to the compiler to the PATH variable.

./autogen.sh
./configure --host=arm-linux-gnueabihf --with-sysroot=PATH_TO_MY_SYSROOT
make

There are 2 problems:
1. sysroot is ignored:
-------------------------------------
./include/bundle.h:3:25: fatal error: openssl/cms.h: No such file or 
directory
  #include <openssl/cms.h>
-------------------------------------
There is no -I entry in the compiler call to my sysroot

2. Headers are searched on the host
-------------------------------------
/usr/include/x86_64-linux-gnu/sys/cdefs.h:467:49: error: missing binary 
operator before token "("
  #if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5)
-------------------------------------
There is an entry -I/usr/include/x86_64-linux-gnu in the compiler call.

This is the first compiler call: (printed with make -n)
-------------------------------------
echo "  CC      " src/librauc_la-bootchooser.lo;/bin/bash ./libtool 
--silent --tag=CC   --mode=compile arm-linux-gnueabihf-gcc -std=gnu99 
-DHAVE_CONFIG_H -I.  -I./include -include ./config.h 
-DG_LOG_DOMAIN=\"rauc\" -fdata-sections -ffunction-sections 
-fno-strict-aliasing -Wall -Wextra -Wundef -Wnested-externs 
-Wwrite-strings -Wpointer-arith -Wmissing-declarations 
-Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls 
-Wno-unused-parameter -Wno-missing-field-initializers 
-Wdeclaration-after-statement -Wformat=2 -Wold-style-definition 
-Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare 
-Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute 
-Wmissing-noreturn -Winit-self -Wmissing-include-dirs 
-Wunused-but-set-variable -Warray-bounds -Wimplicit-function-declaration 
-Wreturn-type -Wswitch-enum -Wswitch-default -Wno-error=unused-parameter 
-Wno-error=missing-field-initializers -pthread 
-I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include 
-I/usr/include/x86_64-linux-gnu  -g -MT src/librauc_la-bootchooser.lo 
-MD -MP -MF src/.deps/librauc_la-bootchooser.Tpo -c -o 
src/librauc_la-bootchooser.lo `test -f 'src/bootchooser.c' || echo 
'./'`src/bootchooser.c
-------------------------------------

If I remove the entry -I/usr/include/x86_64-linux-gnu and add the enty 
-IPATH_TO_MY_SYSROOT/usr/include at least this command succeeded.

I'm using the source code tags with v1.4

According to the documentation rauc.io can be cross compiled.
What I'm doing wrong?
Thanks.

Regards Simon


_______________________________________________
RAUC mailing list

                 reply	other threads:[~2020-09-16 11:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=a8d2f8a9-caa2-29a3-2896-f2e7ae2627e9@arigo-software.de \
    --to=sruetzler@arigo-software.de \
    --cc=rauc@pengutronix.de \
    /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