Skip to contentSkip to conversation

Unable to build Buildroot

Buildroot Shérab 3 participants 7 messages Mar 8, 2018 – Mar 12, 2018

lore
Share & tools
lore

Shérab

author
#0 lore raw

Dear all,

I am not able to build Buildroot any longer, although it used to work and I can't remember of any change on the machine used tobuild.

Here is what happens just before the failure:

making all in debugfs
MK_CMDS debug_cmds.c
CC debugfs.c
CC util.c
CC ncheck.c
CC icheck.c
CC lsdel.c
CC ls.c
CC set_fields.c
CC dump.c
CC logdump.c
CC htree.c
CC unused.c
CC e2freefrag.o
CC filefrag.c
MK_CMDS extent_cmds.c
CC extent_inode.c
CC zap.c
CC create_inode.o
./../misc/create_inode.c: In function ?set_inode_xattr?:
./../misc/create_inode.c:140:9: warning: implicit declaration of function ?llistxattr?; did you mean ?lstat64?? [-Wimplicit-function-declaration]

  size = llistxattr(filename, NULL, 0);
         ^~~~~~~~~~
         lstat64
./../misc/create_inode.c:176:16: warning: implicit declaration of function ?lgetxattr?; did you mean ?getdate_r?? [-Wimplicit-function-declaration]
   value_size = lgetxattr(filename, name, NULL, 0);
                ^~~~~~~~~
                getdate_r
./../misc/create_inode.c: At top level:
./../misc/create_inode.c:399:18: error: conflicting types for ?copy_file_range?
 static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file,
                  ^~~~~~~~~~~~~~~
In file included from ./../misc/create_inode.c:19:0:
/usr/include/unistd.h:1110:9: note: previous declaration of ?copy_file_range? was here
 ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
         ^~~~~~~~~~~~~~~

Makefile:422?: la recette pour la cible ??create_inode.o?? a ?chou?e
make[5]: *** [create_inode.o] Erreur 1
make[5]: *** Attente des t?ches non termin?es....
Makefile:404?: la recette pour la cible ??all-progs-recursive?? a ?chou?e
make[4]: *** [all-progs-recursive] Erreur 1
Makefile:339?: la recette pour la cible ??all?? a ?chou?e
make[3]: *** [all] Erreur 2
package/pkg-generic.mk:247?: la recette pour la cible ??/home/shindere/src/brlpi/brlpi0w/build/host-e2fsprogs-1.43.7/.stamp_built?? a ?chou?e make[2]: *** [/home/shindere/src/brlpi/brlpi0w/build/host-e2fsprogs-1.43.7/.stamp_built] Erreur 2
Makefile:16?: la recette pour la cible ??_all?? a ?chou?e
make[1]: *** [_all] Erreur 2
make[1]?: on quitte le r?pertoire ??/home/shindere/src/brlpi/brlpi0w??
Makefile:4?: la recette pour la cible ??brlpi0w/images/sdcard.img?? a ?chou?e
make: *** [brlpi0w/images/sdcard.img] Erreur 2

Can somebody see what could be wrong, please?

Many thanksin advance,

Sh?rab.

#1 lore raw

Hi Sh?rab,

Quoted 39 lines · Sh?rab

Dear all,

I am not able to build Buildroot any longer, although it used to work and I can't remember of any change on the machine used tobuild.

Here is what happens just before the failure:

making all in debugfs
MK_CMDS debug_cmds.c
CC debugfs.c
CC util.c
CC ncheck.c
CC icheck.c
CC lsdel.c
CC ls.c
CC set_fields.c
CC dump.c
CC logdump.c
CC htree.c
CC unused.c
CC e2freefrag.o
CC filefrag.c
MK_CMDS extent_cmds.c
CC extent_inode.c
CC zap.c
CC create_inode.o
./../misc/create_inode.c: In function ?set_inode_xattr?:
./../misc/create_inode.c:140:9: warning: implicit declaration of function ?llistxattr?; did you mean ?lstat64?? [-Wimplicit-function-declaration]

  size = llistxattr(filename, NULL, 0);
         ^~~~~~~~~~
         lstat64
./../misc/create_inode.c:176:16: warning: implicit declaration of function ?lgetxattr?; did you mean ?getdate_r?? [-Wimplicit-function-declaration]
   value_size = lgetxattr(filename, name, NULL, 0);
                ^~~~~~~~~
                getdate_r
./../misc/create_inode.c: At top level:
./../misc/create_inode.c:399:18: error: conflicting types for ?copy_file_range?
 static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file,
                  ^~~~~~~~~~~~~~~
Quoted 3 lines

In file included from ./../misc/create_inode.c:19:0:
/usr/include/unistd.h:1110:9: note: previous declaration of ?copy_file_range? was here
ssize_t copy_file_range (int __infd, __off64_t *__pinoff,

Your host seems to have glibc 2.27 installed. In this version glibc added copy_file_range() which collides with a local definition of the same symbol in e2fsprogs. This issue is fixed in e2fsprogs commit 01551bdba1 (misc: rename copy_file_range to copy_file_chunk), which is included in version 1.43.8. The latest Buildroot release, 2018.02, has 1.43.9.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
author
#2 lore raw

Dear Baruch,

Many thanks for your prompt and helpful response!

Baruch Siach (2018/03/08 15:13 +0200):

Quoted 46 lines

Hi Sh?rab,

Quoted 39 lines · Sh?rab

Dear all,

I am not able to build Buildroot any longer, although it used to work and I can't remember of any change on the machine used tobuild.

Here is what happens just before the failure:

making all in debugfs
MK_CMDS debug_cmds.c
CC debugfs.c
CC util.c
CC ncheck.c
CC icheck.c
CC lsdel.c
CC ls.c
CC set_fields.c
CC dump.c
CC logdump.c
CC htree.c
CC unused.c
CC e2freefrag.o
CC filefrag.c
MK_CMDS extent_cmds.c
CC extent_inode.c
CC zap.c
CC create_inode.o
./../misc/create_inode.c: In function ?set_inode_xattr?:
./../misc/create_inode.c:140:9: warning: implicit declaration of function ?llistxattr?; did you mean ?lstat64?? [-Wimplicit-function-declaration]

  size = llistxattr(filename, NULL, 0);
         ^~~~~~~~~~
         lstat64
./../misc/create_inode.c:176:16: warning: implicit declaration of function ?lgetxattr?; did you mean ?getdate_r?? [-Wimplicit-function-declaration]
   value_size = lgetxattr(filename, name, NULL, 0);
                ^~~~~~~~~
                getdate_r
./../misc/create_inode.c: At top level:
./../misc/create_inode.c:399:18: error: conflicting types for ?copy_file_range?
 static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file,
                  ^~~~~~~~~~~~~~~
Quoted 3 lines

In file included from ./../misc/create_inode.c:19:0:
/usr/include/unistd.h:1110:9: note: previous declaration of ?copy_file_range? was here
ssize_t copy_file_range (int __infd, __off64_t *__pinoff,

Quoted 5 lines

Your host seems to have glibc 2.27 installed. In this version glibc added copy_file_range() which collides with a local definition of the same symbol in e2fsprogs. This issue is fixed in e2fsprogs commit 01551bdba1 (misc: rename copy_file_range to copy_file_chunk), which is included in version 1.43.8. The latest Buildroot release, 2018.02, has 1.43.9.

Okay thanks a lot!

I am facing another problemnow which may be slightly off-topic here but let me try.

The buildroot I am using is a submoduleof this repository:

https://github.com/mlang/brlpi

Although I did makeclean etc., the buildroot submodule was not updated and I was not able to find a way to ask git to update it through a submodule subcommand.

So I went to the buildroot subdirectory, did a git fetch and then checked out 2018.02, which worked.

But then when I tried to run make cleand and make again to rebuild my image,

quickly I got the following error message:

umask 0022 && make -C /home/shindere/src/brlpi/buildroot O=/home/shindere/src/brlpi/brlpi0w/. /home/shindere/src/brlpi/package/brltty/brltty.mk:104: *** Package
'brltty' defined a second time in
'/home/shindere/src/brlpi/package/brltty/'; previous definition was in 'package/brltty/'. Arr?t.

I'm sory but I have no idea how to deal with this. Any suggestion would be welcome.

Thanks,

Sh?rab.

Quoted 3 lines

baruch

#3 lore raw

Hello,

I add Mario Lang to CC.

On Fri, Mar 09, 2018 at 04:11 PM, Sh?rab wrote:

[snip]

Quoted 1 line

Baruch Siach (2018/03/08 15:13 +0200):

[snip]

Quoted 7 lines
Quoted 6 lines

Your host seems to have glibc 2.27 installed. In this version glibc added copy_file_range() which collides with a local definition of the same symbol in e2fsprogs. This issue is fixed in e2fsprogs commit 01551bdba1 (misc: rename copy_file_range to copy_file_chunk), which is included in version 1.43.8. The latest Buildroot release, 2018.02, has 1.43.9.

Quoted 8 lines

Okay thanks a lot!

I am facing another problemnow which may be slightly off-topic here but let me try.

The buildroot I am using is a submoduleof this repository:

https://github.com/mlang/brlpi

which is using a development version of Buildroot between 2017.11 and 2018.02:
2017.11-354-g85e08bf

Quoted 4 lines

Although I did makeclean etc., the buildroot submodule was not updated and I was not able to find a way to ask git to update it through a submodule subcommand.

It seems to me the Makefile for brlpi does the right thing for:
1) make clean
- deinit the submodule buildroot
- remove the Buildroot output dirs
2) make
- init/update the submodule buildroot
- configure the builds as out-of-tree
(http://nightly.buildroot.org/#_building_out_of_tree)
- call make inside the output dirs

But if it fails for you, you could create an "issue" in brlpi github page.

Quoted 3 lines

So I went to the buildroot subdirectory, did a git fetch and then checked out 2018.02, which worked.

So you are working to update the Buildroot version for a br2-external. It's possible you need to do other changes to the br2-external as well.

Quoted 10 lines

But then when I tried to run make cleand and make again to rebuild my image,

quickly I got the following error message:

umask 0022 && make -C /home/shindere/src/brlpi/buildroot O=/home/shindere/src/brlpi/brlpi0w/. /home/shindere/src/brlpi/package/brltty/brltty.mk:104: *** Package
'brltty' defined a second time in
'/home/shindere/src/brlpi/package/brltty/'; previous definition was in

This is the package defined by the br2-external.

Quoted 1 line

'package/brltty/'. Arr?t.

This is the package defined by Buildroot.
It was not there in commit 85e08bf, but it is there at 2018.02 as the patch sent by Mario adding the package was applied.

Quoted 3 lines

I'm sory but I have no idea how to deal with this. Any suggestion would be welcome.

Tips:
- read the br2-external section in the manual:
http://nightly.buildroot.org/#customize
- check the diff between the two brltty packages (the one from Buildroot and the one from br2-external);
- remove the package from br2-external and do a clean build to check. If is breaks, you probably will need more changes to the br2-external.

Regards,
Ricardo

author
#4 lore raw

Dear Ricardo,

Many thanks for your response!

I did not realise brltty got upstreamed, that was part of what I missed so many thanks for having made me aware of that.

Cheers,

Sh?rab.

author
#5 lore raw
In reply to Ricardo Martincoski

Dear Ricardo,

Many thanks for your response!

I did not realise brltty got upstreamed, that was part of what I missed so many thanks for having made me aware of that.

Cheers,

Sh?rab.

author
#6 lore raw

Dear all,

So, I updated the buildroot submodule properly and removed brltty as an external package.

I am now facing another compile problem, with qemu I think:

...

  CC      .../targetqga/channel-posix.o
  CC      .../targetqga/qapi-generated/qga-qapi-types.o
  CC      .../targetqga/qapi-generated/qga-qapi-visit.o
  CC      .../targetqga/qapi-generated/qga-qmp-marshal.o
  CC      .../targetutil/memfd.o
  CC      .../targetutil/path.o
util/memfd.c:40:12: error: static declaration of ?memfd_create? follows non-static declaration
 static int memfd_create(const char *name, unsigned int flags)
            ^~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/mman-linux.h:115:0,
                 from /usr/include/x86_64-linux-gnu/bits/mman.h:45,
                 from /usr/include/x86_64-linux-gnu/sys/mman.h:41,
                 from .../build/host-qemu-2.10.2/include/sysemu/os-posix.h:29,
                 from .../build/host-qemu-2.10.2/include/qemu/osdep.h:104,
                 from util/memfd.c:28:
/usr/include/x86_64-linux-gnu/bits/mman-shared.h:46:5: note: previous declaration of ?memfd_create? was here
 int memfd_create (const char *__name, unsigned int __flags) __THROW;
     ^~~~~~~~~~~~

.../build/host-qemu-2.10.2/rules.mak:66?: la recette pour la cible ??util/memfd.o?? a ?chou?e make[3]: *** [util/memfd.o] Erreur 1

I tried to disable the host qemu in make menuconfig but that was not possible.

I also discovered that the host qemu seems to be selected by emacs but I don't understand what's the linkbetween the two (emacs is provided in the br2-external tree).

Any hint?

Thanks,

Sh?rab.