Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Andreas Ziegler <br015@umbiko.net>
Cc: Herve Codina <herve.codina@bootlin.com>,
	Tim Hammer <Tim.Hammer@orolia.com>,
	Buildroot <buildroot@buildroot.org>
Subject: Re: [Buildroot] ulog compilation issue with buildroot 2022.02.2
Date: Sun, 5 Jun 2022 09:06:20 +0200	[thread overview]
Message-ID: <20220605090620.63a7375c@windsurf> (raw)
In-Reply-To: <190f6507af24e5ee5e8797fbfaa3b7e3@umbiko.net>

Hello Andreas,

On Sun, 05 Jun 2022 06:05:09 +0000
Andreas Ziegler <br015@umbiko.net> wrote:

> This is the environment when alchemy is called from Buildroot:
> 
> ALCHEMY_TARGET_ENV = \
> 	$(TARGET_MAKE_ENV) \
> 	ALCHEMY_HOME=$(ALCHEMY_HOME) \
> 	ALCHEMY_WORKSPACE_DIR="$(@D)" \
> 	ALCHEMY_TARGET_OUT=alchemy-out \
> 	PKGCONFIG_BIN=$(PKG_CONFIG_HOST_BINARY) \
> 	TARGET_OS=linux \
> 	TARGET_OS_FLAVOUR=buildroot \
> 	TARGET_CROSS="$(TARGET_CROSS)" \
> 	TARGET_ARCH=xxx \
> 	TARGET_GLOBAL_CXXFLAGS="$(TARGET_CXXFLAGS)" \
> 	TARGET_GLOBAL_LDFLAGS="$(TARGET_LDFLAGS)" \
> 	                       ^ LDFLAGS are usually empty
> 	TARGET_GLOBAL_FFLAGS="$(TARGET_FCFLAGS)" \
> 	TARGET_GLOBAL_FCFLAGS="$(TARGET_FCFLAGS)"
> 
> Alchemy adds more settings to LDFLAGS, this is the final content:
> 
> + TARGET_GLOBAL_LDFLAGS = -O2 -Wl,-O1 
> -Lalchemy-out/staging/lib/arm-linux-gnueabihf -Lalchemy-out/staging/lib 
> -Lalchemy-out/staging/usr/lib/arm-linux-gnueabihf 
> -Lalchemy-out/staging/usr/lib 
> -Wl,-rpath-link=alchemy-out/staging/lib/arm-linux-gnueabihf 
> -Wl,-rpath-link=alchemy-out/staging/lib 
> -Wl,-rpath-link=alchemy-out/staging/usr/lib/arm-linux-gnueabihf 
> -Wl,-rpath-link=alchemy-out/staging/usr/lib
> 
> Adding the Buildroot staging library path to LDFLAGS makes the build 
> succeed:
> 
> 	...
> 	TARGET_GLOBAL_LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \

Thanks for your investigation!

-L$(STAGING_DIR)/usr/lib should normally not be needed, because
$(STAGING_DIR)/usr/lib is in the default search path of the
cross-compiler, as the compiler has $(STAGING_DIR)/usr as its sysroot.

So from a cross-compiler perspective, -L$(STAGING_DIR)/usr/lib should
normally not be needed, and that's why it's not in $(TARGET_LDFLAGS).

Also, there is a curious thing in the report from Nicolas: the error
happens when systemd is enabled, but doesn't happen when systemd is
disabled.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-06-05  7:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2413.1654341347.130377.buildroot@buildroot.org>
2022-06-05  6:05 ` [Buildroot] ulog compilation issue with buildroot 2022.02.2 Andreas Ziegler
2022-06-05  7:06   ` Thomas Petazzoni via buildroot [this message]
2022-06-05 11:46     ` Andreas Ziegler
2022-06-05 14:01       ` Romain Naour
2022-06-06 14:27         ` Tim Hammer
2022-06-06 18:09           ` Arnout Vandecappelle
2022-06-07  7:28       ` Nicolas Carrier
2022-06-02 15:31 Nicolas Carrier
2022-06-03  9:09 ` Nicolas Carrier
2022-06-03  9:47   ` Thomas Petazzoni via buildroot
2022-06-03 10:44     ` Nicolas Carrier
2022-06-03 10:51       ` Nicolas Carrier
2022-06-03 12:53         ` Nicolas Carrier

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=20220605090620.63a7375c@windsurf \
    --to=buildroot@buildroot.org \
    --cc=Tim.Hammer@orolia.com \
    --cc=br015@umbiko.net \
    --cc=herve.codina@bootlin.com \
    --cc=thomas.petazzoni@bootlin.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