uclibc/arm: don't install ldd.host and ldconfig.host if !HAVE_SHARED
PATCH 1/1 uclibc/arm: don't install ldd.host and ldconfig.host if !HAVE_SHARED
ldd.host and ldconfig.host will be built only when HAVE_SHARED=y.
This fixes below build error when
# BR2_BFIN_FLAT is not set
# ARCH_HAS_MMU is not set
UCLIBC_FORMAT_FLAT=y
make[1]: Leaving directory `/opt/test/buildroot/buildroot/output/build/uclibc-0.9.33.2'/usr/bin/install -D -m 0755 /opt/test/buildroot/buildroot/output/build/uclibc-0.9.33.2/utils/ldd.host /opt/test/buildroot/buildroot/output/host/usr/bin/ldd /usr/bin/install: cannot stat '/opt/test/buildroot/buildroot/output/build/uclibc-0.9.33.2/utils/ldd.host': No such file or directory
make: *** [/opt/test/buildroot/buildroot/output/build/uclibc-0.9.33.2/.stamp_staging_installed] Error 1
--- package/uclibc/uclibc.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
package/uclibc/uclibc.mk +6 -4
@@ -514,10 +514,12 @@ endef # For FLAT binfmts (static) there are no host utils ifeq ($(BR2_BINFMT_FLAT),) define UCLIBC_INSTALL_UTILS_STAGING - $(INSTALL) -D -m 0755 $(@D)/utils/ldd.host $(HOST_DIR)/usr/bin/ldd - ln -sf ldd $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldd - $(INSTALL) -D -m 0755 $(@D)/utils/ldconfig.host $(HOST_DIR)/usr/bin/ldconfig - ln -sf ldconfig $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldconfig + if grep -q HAVE_SHARED=y $(@D)/.config; then \ + $(INSTALL) -D -m 0755 $(@D)/utils/ldd.host $(HOST_DIR)/usr/bin/ldd; \ + ln -sf ldd $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldd; \ + $(INSTALL) -D -m 0755 $(@D)/utils/ldconfig.host $(HOST_DIR)/usr/bin/ldconfig; \ + ln -sf ldconfig $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldconfig; \ + fi endef endif
Signature · 1 line
1.8.1.2
PATCH 1/1 uclibc/arm: don't install ldd.host and ldconfig.host if !HAVE_SHARED
Dear Axel Lin,
Quoted 11 lines · Axel Lin
ldd.host and ldconfig.host will be built only when HAVE_SHARED=y.
This fixes below build error when
#BR2_BFIN_FLATis not set
#ARCH_HAS_MMUis not set
UCLIBC_FORMAT_FLAT=ymake[1]: Leaving directory `/opt/test/buildroot/buildroot/output/build/uclibc-0.9.33.2'
/usr/bin/install-D -m 0755/opt/test/buildroot/buildroot/output/build/uclibc-0.9.33.2/utils/ldd.host/opt/test/buildroot/buildroot/output/host/usr/bin/ldd/usr/bin/install: cannot stat '/opt/test/buildroot/buildroot/output/build/uclibc-0.9.33.2/utils/ldd.host': No such file or directory
make: *** [/opt/test/buildroot/buildroot/output/build/uclibc-0.9.33.2/.stamp_staging_installed] Error 1
Which Buildroot configuration triggers this?
package/uclibc/uclibc.mk endef · line 522
Quoted 6 lines
package/uclibc/uclibc.mk +6
-0+ if grep -q HAVE_SHARED=y $(@D)/.config; then \ + $(INSTALL) -D -m 0755 $(@D)/utils/ldd.host $(HOST_DIR)/usr/bin/ldd; \ + ln -sf ldd $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldd; \ + $(INSTALL) -D -m 0755 $(@D)/utils/ldconfig.host $(HOST_DIR)/usr/bin/ldconfig; \ + ln -sf ldconfig $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldconfig; \ + fi
I'd prefer not to grep into the uClibc configuration, and instead find out which Buildroot configuration triggers this problem and find a proper solution to it.
Thanks,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 uclibc/arm: don't install ldd.host and ldconfig.host if !HAVE_SHARED
2013/7/29 Thomas Petazzoni <[email protected]>:
Quoted 10 lines
Dear Axel Lin,
Quoted 7 lines · Axel Lin
ldd.host and ldconfig.host will be built only when HAVE_SHARED=y.
This fixes below build error when
#BR2_BFIN_FLATis not set
#ARCH_HAS_MMUis not set
UCLIBC_FORMAT_FLAT=y
Quoted 6 lines
Quoted 4 lines
make[1]: Leaving directory `/opt/test/buildroot/buildroot/output/build/uclibc-0.9.33.2'
/usr/bin/install-D -m 0755/opt/test/buildroot/buildroot/output/build/uclibc-0.9.33.2/utils/ldd.host/opt/test/buildroot/buildroot/output/host/usr/bin/ldd/usr/bin/install: cannot stat '/opt/test/buildroot/buildroot/output/build/uclibc-0.9.33.2/utils/ldd.host': No such file or directory
make: *** [/opt/test/buildroot/buildroot/output/build/uclibc-0.9.33.2/.stamp_staging_installed] Error 1Which Buildroot configuration triggers this?
Hi Thomas,
Below is my settings.
I'm pretty new in using buildroot, below is my settings. I hope my description here is clear.
$ make menuconfig
mainly with below settings:
ARM, arm7tdmi, uClibc,BR2_USE_MMU is not set
$ make uclibc-menuconfig
ARCH_HAS_MMU is not set
UCLIBC_FORMAT_FLAT=y
ARCH_HAS_NO_SHARED=y
When ARCH_HAS_NO_SHARED=y, HAVE_SHARED is automatically set to "not set".
Then I got the build error.
I think the root cause is because ldd.host and ldconfig.host will only be built when HAVE_SHARED=y.
However, in package/uclibc/uclibc.mk, it always install ldd.host and ldconfig.host if $(BR2_BINFMT_FLAT) is not set.
Quoted 21 lines
package/uclibc/uclibc.mk endef · line 522
Quoted 8 lines
package/uclibc/uclibc.mk +6
-0+ if grep -q HAVE_SHARED=y $(@D)/.config; then \ + $(INSTALL) -D -m 0755 $(@D)/utils/ldd.host $(HOST_DIR)/usr/bin/ldd; \ + ln -sf ldd $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldd; \ + $(INSTALL) -D -m 0755 $(@D)/utils/ldconfig.host $(HOST_DIR)/usr/bin/ldconfig; \ + ln -sf ldconfig $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldconfig; \ + fiI'd prefer not to grep into the uClibc configuration, and instead find out which Buildroot configuration triggers this problem and find a proper solution to it.
Thanks,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
PATCH 1/1 uclibc/arm: don't install ldd.host and ldconfig.host if !HAVE_SHARED
Dear Axel Lin,
Quoted 10 lines · Axel Lin
Below is my settings.
I'm pretty new in using buildroot, below is my settings. I hope my description here is clear.$ make menuconfigmainly with below settings:
ARM, arm7tdmi, uClibc,BR2_USE_MMUis not set
Quoted 6 lines
$ make uclibc-menuconfig
ARCH_HAS_MMUis not set
UCLIBC_FORMAT_FLAT=y
ARCH_HAS_NO_SHARED=y
When ARCH_HAS_NO_SHARED=y,HAVE_SHAREDis automatically set to "not set".
As soon as you customize the uClibc configuration with uclibc-menuconfig, then we cannot support all the possible build failures that you will get.
So the solution to this problem is to improve the ARM noMMU support in Buildroot, making sure that:
1/ The uClibc configuration is automatically adjusted appropriately.
2/ The uClibc tools are not installed.
Quoted 2 lines
However, in
package/uclibc/uclibc.mk, it always install ldd.host and ldconfig.host if $(BR2_BINFMT_FLAT) is not set.
BR2_BINFMT_FLAT should be set when ARM noMMU is used, because I don't think ELF binaries are supported on ARM noMMU.
I know Gustavo is working on improving the ARM noMMU, hopefully he will post patches soon.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 uclibc/arm: don't install ldd.host and ldconfig.host if !HAVE_SHARED
2013/7/29 Thomas Petazzoni <[email protected]>:
Quoted 30 lines
Dear Axel Lin,
Quoted 10 lines · Axel Lin
Below is my settings.
I'm pretty new in using buildroot, below is my settings. I hope my description here is clear.$ make menuconfigmainly with below settings:
ARM, arm7tdmi, uClibc,BR2_USE_MMUis not setQuoted 6 lines
$ make uclibc-menuconfig
ARCH_HAS_MMUis not set
UCLIBC_FORMAT_FLAT=y
ARCH_HAS_NO_SHARED=y
When ARCH_HAS_NO_SHARED=y,HAVE_SHAREDis automatically set to "not set".As soon as you customize the uClibc configuration with uclibc-menuconfig, then we cannot support all the possible build failures that you will get.
So the solution to this problem is to improve the ARM noMMU support in Buildroot, making sure that:
1/ The uClibc configuration is automatically adjusted appropriately.
Quoted 8 lines
2/ The uClibc tools are not installed.
Quoted 2 lines
However, in
package/uclibc/uclibc.mk, it always install ldd.host and ldconfig.host if $(BR2_BINFMT_FLAT) is not set.
BR2_BINFMT_FLATshould be set when ARM noMMU is used, because I don't think ELF binaries are supported on ARM noMMU.
May I ask why config BR2_BINFMT_FLAT depends on BR2_bfin || BR2_m68k I ask this becuase I'm going to build for arm7tdmi which is noMMU. And config BR2_BINFMT_FLAT is invisible now due to the dependency.
Quoted 3 lines
I know Gustavo is working on improving the ARM noMMU, hopefully he will post patches soon.
Good to know this.
And thanks for your reply.
Regards,
Axel
PATCH 1/1 uclibc/arm: don't install ldd.host and ldconfig.host if !HAVE_SHARED
Dear Axel Lin,
Quoted 5 lines · Axel Lin
Quoted 2 lines
BR2_BINFMT_FLATshould be set when ARM noMMU is used, because I don't think ELF binaries are supported on ARM noMMU.May I ask why config
BR2_BINFMT_FLATdepends onBR2_bfin||BR2_m68kI ask this becuase I'm going to build for arm7tdmi which is noMMU. And configBR2_BINFMT_FLATis invisible now due to the dependency.
That's because nobody ever worked on ARM noMMU support in Buildroot, so things need to be fixed.
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 uclibc/arm: don't install ldd.host and ldconfig.host if !HAVE_SHARED
In reply to Thomas PetazzoniQuoted 5 lines
BR2_BINFMT_FLATshould be set when ARM noMMU is used, because I don't think ELF binaries are supported on ARM noMMU.I know Gustavo is working on improving the ARM noMMU, hopefully he will post patches soon.
Hi,
I'm still not able to build a FLAT executable.
Just to let you know If there is patch for supporting noMMU available on the maillist,
I'm happy to test it.
Or is there other projects support building applications for noMMU? I tried uClinux-dist but got build error. ( And uClinux-dist seems does not update for a long time.)
Thanks,
Axel