Skip to contentSkip to conversation

new package not built, AR prefix not passed to make

Buildroot Émeric Vigier 4 participants 9 messages Apr 3, 2014 – Apr 4, 2014 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hi Builders,

I am facing two basic issues after adding a new library to buildroot:

1. "make" does not build it
---------------------------
What I did can be summed up in these files:

  $ grep company package/Config.in 
  source "package/company/Config.in"
  $ cat package/company/libfpga/Config.in 
  config BR2_PACKAGE_COMPANY_LIBFPGA
	bool "libfpga"
	select BR2_TOOLCHAIN_USES_GLIBC
	help
	  library providing access to FPGA functions
  $ cat package/company/company.mk 
  include $(sort $(wildcard package/company/*/*.mk))
  $ cat package/company/libfpga/libfpga.mk
  ################################################################################
  #
  # libfpga
  #
  ################################################################################
  LIBFPGA_VERSION = 1.0
  LIBFPGA_SOURCE = libfpga-$(LIBFPGA_VERSION).tar.gz
  LIBFPGA_SITE = $(TOPDIR)/../libfpga/
  LIBFPGA_SITE_METHOD = local

LIBFPGA_INSTALL_STAGING = YES

  # defaults to YES
  LIBFPGA_INSTALL_TARGET = YES
  LIBFPGA_DEPENDENCIES = glibc
  #LIBFPGA_CONFIG_SCRIPTS = 
  define LIBFPGA_BUILD_CMDS
      $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) all
  endef
  $(eval $(generic-package))
  $ grep COMPANY .config
  BR2_PACKAGE_COMPANY=y
  BR2_PACKAGE_COMPANY_LIBFPGA=y
  $ make
  (no luck)

Does anyone see what I am missing here?

2. AR cross-prefix is not passed by buildroot to make
-----------------------------------------------------
I can build my package manually though:

  $ make libfpga
Quoted 1 line
Quoted 1 line
Quoted 1 line

libfpga 1.0 Syncing from source dir /home/evigier/buildroot-2013.11/../libfpga/

rsync -au --exclude .svn --exclude .git --exclude .hg --exclude .bzr --exclude CVS /home/evigier/buildroot-2013.11/../libfpga// /home/evigier/buildroot-2013.11/output/build/libfpga-1.0

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

libfpga 1.0 Configuring
libfpga 1.0 Building

/usr/bin/make -j5 CC="/home/evigier/buildroot-2013.11/output/host/usr/bin/powerpc-buildroot-linux-gnu-gcc" LD="/home/evigier/buildroot-2013.11/output/host/usr/bin/powerpc-buildroot-linux-gnu-ld" -C /home/evigier/buildroot-2013.11/output/build/libfpga-1.0 all make[1]: Entering directory `/home/evigier/buildroot-2013.11/output/build/libfpga-1.0'
ar rcs libfpga.a fpga.o
/home/evigier/buildroot-2013.11/output/host/usr/bin/powerpc-buildroot-linux-gnu-gcc -shared -o libfpga.so fpga.o
make[1]: Leaving directory `/home/evigier/buildroot-2013.11/output/build/libfpga-1.0'

Why is AR prefix not passed to make here? Is this related to the generic-package?

Thanks,
Emeric

#2 lore raw
Quoted 2 lines

Why is AR prefix not passed to make here? Is this related to the generic-package?

I believe I found part of my answer on gnu.org libc manual:
You may need to set AR to cross-compiling versions of ar if the native tools are not configured to work with object files for the target you configured for.

$ ar --help
[...]
ar: supported targets: elf64-x86-64 elf32-i386 elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex

So I guess buildroot makes such a sanity check, right?

#3 lore raw
Quoted 7 lines · ?meric Vigier
Quoted 2 lines

Why is AR prefix not passed to make here? Is this related to the generic-package?

I believe I found part of my answer on gnu.org libc manual:
You may need to set AR to cross-compiling versions of ar if the native tools are not configured to work with object files for the target you configured for.

Quoted 5 lines
$ ar --help
[...]
ar: supported targets: elf64-x86-64 elf32-i386 elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex

So I guess buildroot makes such a sanity check, right?

You just need to use $(TARGET_AR) the same way you're using $(TARGET_CC) and others.
Snip:

define LIBFPGA_BUILD_CMDS

        $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" \
        AR="$(TARGET_AR)" -C $(@D) all

endef

Or better still what usually works...

        $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)

Regards.

#4 lore raw

----- Mail original -----

Quoted 25 lines · ?meric Vigier
Quoted 10 lines
Quoted 3 lines

Why is AR prefix not passed to make here? Is this related to the generic-package?

I believe I found part of my answer on gnu.org libc manual:
You may need to set AR to cross-compiling versions of ar if the native tools
are not configured to work with object files for the target you configured for.

Quoted 8 lines
$ ar --help
[...]
ar: supported targets: elf64-x86-64 elf32-i386 elf32-x86-64
a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om elf64-k1om
elf64-little elf64-big elf32-little elf32-big plugin srec
symbolsrec verilog tekhex binary ihex

So I guess buildroot makes such a sanity check, right?

You just need to use $(TARGET_AR) the same way you're using $(TARGET_CC)
and others.
Snip:

Quoted 4 lines

define LIBFPGA_BUILD_CMDS

        $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" \
        AR="$(TARGET_AR)" -C $(@D) all

endef

Stupid me, thanks!

Quoted 7 lines

Or better still what usually works...

        $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)

Regards.

#5 lore raw
In reply to Émeric Vigier

Hi Emeric,

Quoted 11 lines · ?meric Vigier

Hi Builders,

I am facing two basic issues after adding a new library to buildroot:

1. "make" does not build it
---------------------------
What I did can be summed up in these files:

  $ grep company package/Config.in
  source "package/company/Config.in"
Quoted 7 lines
  $ cat package/company/libfpga/Config.in
  config BR2_PACKAGE_COMPANY_LIBFPGA
        bool "libfpga"
        select BR2_TOOLCHAIN_USES_GLIBC
        help
          library providing access to FPGA functions

Don't you also need a package/company/Config.in then, with the following content :

menu "Company-specific packages"
source "package/company/libfpga/Config.in"
endmenu

?

Quoted 59 lines
  $ cat package/company/company.mk
  include $(sort $(wildcard package/company/*/*.mk))
  $ cat package/company/libfpga/libfpga.mk
  ################################################################################
  #
  # libfpga
  #
  ################################################################################
  LIBFPGA_VERSION = 1.0
  LIBFPGA_SOURCE = libfpga-$(LIBFPGA_VERSION).tar.gz
  LIBFPGA_SITE = $(TOPDIR)/../libfpga/
  LIBFPGA_SITE_METHOD = local

LIBFPGA_INSTALL_STAGING = YES

  # defaults to YES
  LIBFPGA_INSTALL_TARGET = YES
  LIBFPGA_DEPENDENCIES = glibc
  #LIBFPGA_CONFIG_SCRIPTS =
  define LIBFPGA_BUILD_CMDS
      $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) all
  endef
  $(eval $(generic-package))
  $ grep COMPANY .config
  BR2_PACKAGE_COMPANY=y
  BR2_PACKAGE_COMPANY_LIBFPGA=y
  $ make
  (no luck)

Does anyone see what I am missing here?

2. AR cross-prefix is not passed by buildroot to make
-----------------------------------------------------
I can build my package manually though:

  $ make libfpga
Quoted 1 line
Quoted 1 line
Quoted 1 line

libfpga 1.0 Syncing from source dir /home/evigier/buildroot-2013.11/../libfpga/

rsync -au --exclude .svn --exclude .git --exclude .hg --exclude .bzr --exclude CVS /home/evigier/buildroot-2013.11/../libfpga// /home/evigier/buildroot-2013.11/output/build/libfpga-1.0

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

libfpga 1.0 Configuring
libfpga 1.0 Building

/usr/bin/make -j5 CC="/home/evigier/buildroot-2013.11/output/host/usr/bin/powerpc-buildroot-linux-gnu-gcc" LD="/home/evigier/buildroot-2013.11/output/host/usr/bin/powerpc-buildroot-linux-gnu-ld" -C /home/evigier/buildroot-2013.11/output/build/libfpga-1.0 all make[1]: Entering directory `/home/evigier/buildroot-2013.11/output/build/libfpga-1.0'
ar rcs libfpga.a fpga.o
/home/evigier/buildroot-2013.11/output/host/usr/bin/powerpc-buildroot-linux-gnu-gcc -shared -o libfpga.so fpga.o
make[1]: Leaving directory `/home/evigier/buildroot-2013.11/output/build/libfpga-1.0'

Why is AR prefix not passed to make here? Is this related to the generic-package?

Thanks,
Emeric
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#6 lore raw

Hi Lionel,

----- Mail original -----

Quoted 24 lines

Hi Emeric,

Quoted 12 lines · ?meric Vigier

Hi Builders,

I am facing two basic issues after adding a new library to buildroot:

1. "make" does not build it
---------------------------
What I did can be summed up in these files:

  $ grep company package/Config.in
  source "package/company/Config.in"
Quoted 7 lines
  $ cat package/company/libfpga/Config.in
  config BR2_PACKAGE_COMPANY_LIBFPGA
        bool "libfpga"
        select BR2_TOOLCHAIN_USES_GLIBC
        help
          library providing access to FPGA functions
Quoted 8 lines

Don't you also need a package/company/Config.in then, with the following content :

menu "Company-specific packages"
source "package/company/libfpga/Config.in"
endmenu

?

I forgot to dump it in my email, but I wrote it as follows:

  $ cat package/company/Config.in 
  menuconfig BR2_PACKAGE_COMPANY
	bool "Company Library and embedded tools"
	help
	  Company Library and embedded tools

if BR2_PACKAGE_COMPANY
source "package/company/libfpga/Config.in"
endif # BR2_PACKAGE_COMPANY

I also tried with your syntax, no luck.
My Config.in are sane I believe. I can see all the required options in menuconfig And they end up in .config correctly.

Regards,
Emeric

#8 lore raw
In reply to Émeric Vigier

On 03/04/14 17:32, ?meric Vigier wrote:
[snip]

Quoted 2 lines
  $ cat package/company/libfpga/Config.in 
  config BR2_PACKAGE_COMPANY_LIBFPGA

Either the symbol should be BR2_PACKAGE_LIBFPGA, or the directory should
be package/company/company-libfpga (and the .mk file package/company/company-libfpga/company-libfpga.mk).

Regards,
Arnout

[snip]

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#7 lore raw
In reply to Émeric Vigier
Quoted 48 lines · ?meric Vigier

Hi Lionel,

----- Mail original -----

Quoted 24 lines

Hi Emeric,

Quoted 12 lines · ?meric Vigier

Hi Builders,

I am facing two basic issues after adding a new library to buildroot:

1. "make" does not build it
---------------------------
What I did can be summed up in these files:

  $ grep company package/Config.in
  source "package/company/Config.in"
Quoted 7 lines
  $ cat package/company/libfpga/Config.in
  config BR2_PACKAGE_COMPANY_LIBFPGA
        bool "libfpga"
        select BR2_TOOLCHAIN_USES_GLIBC
        help
          library providing access to FPGA functions
Quoted 8 lines

Don't you also need a package/company/Config.in then, with the following content :

menu "Company-specific packages"
source "package/company/libfpga/Config.in"
endmenu

?

I forgot to dump it in my email, but I wrote it as follows:

  $ cat package/company/Config.in
  menuconfig BR2_PACKAGE_COMPANY
        bool "Company Library and embedded tools"
        help
          Company Library and embedded tools

if BR2_PACKAGE_COMPANY
source "package/company/libfpga/Config.in"
endif # BR2_PACKAGE_COMPANY

Quoted 6 lines

I also tried with your syntax, no luck.
My Config.in are sane I believe. I can see all the required options in menuconfig And they end up in .config correctly.

Regards,
Emeric

You may also want to check if the libfpga buld folder already exists, and stamps in it, in doubt you can try

rm -r output/build/libfpga-1.0

Cheers

#9 lore raw
In reply to Arnout Vandecappelle

----- Mail original -----

Quoted 7 lines

De: "Arnout Vandecappelle" <[email protected]>
?: "?meric Vigier" <[email protected]>, buildroot at busybox.net Envoy?: Vendredi 4 Avril 2014 01:30:09
Objet: Re: [Buildroot] new package not built, AR prefix not passed to make

On 03/04/14 17:32, ?meric Vigier wrote:
[snip]

Quoted 7 lines
Quoted 2 lines
  $ cat package/company/libfpga/Config.in
  config BR2_PACKAGE_COMPANY_LIBFPGA

Either the symbol should be BR2_PACKAGE_LIBFPGA, or the directory should
be package/company/company-libfpga (and the .mk file package/company/company-libfpga/company-libfpga.mk).

This is it, thanks!

Quoted 3 lines

Regards,
Arnout