From: Frederick Gotham <hidden> Date: 2020-01-06 16:21:59
The following header file:
#include <linux/list.h>
was added to the Github for the Linux kernel in May 2011. That was 9 years
ago.
So on my Buildroot setup, I navigate to this directory:
build/output/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/linux
And I check to see if "list.h" is in there. It's not there, and this is why I
am unable to build the latest version of Barebox.
Anyone got any idea why that header file isn't in there?
Frederick
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Date: 2020-01-06 20:33:17
Hello Frederick,
On Mon, 6 Jan 2020 16:21:59 -0000 (UTC)
Frederick Gotham [off-list ref] wrote:
The following header file:
#include <linux/list.h>
was added to the Github for the Linux kernel in May 2011. That was 9 years
ago.
This is an internal kernel header.
So on my Buildroot setup, I navigate to this directory:
build/output/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/linux
This only contains the kernel headers exposed to userspace, i.e the
UAPI (user-space API). There is absolutely no reason for list.h to be
in there.
And I check to see if "list.h" is in there. It's not there, and this is why I
am unable to build the latest version of Barebox.
Anyone got any idea why that header file isn't in there?
You need to give more details about the Barebox failure you're seeing:
which version you're trying to build, what is the build error. But the
error is clearly not due to <linux/list.h> being missing from the
compiler sysroot.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
From: Frederick Gotham <hidden> Date: 2020-01-07 08:28:39
Thomas Petazzoni wrote:
"You need to give more details about the Barebox failure you're seeing"
Here's the exact output:
quoted
quoted
barebox 2019.12.0 Configuring
barebox 2019.12.0 Building
/opt/src/build/output/host/bin/x86_64-buildroot-linux-gnu-gcc
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os
-o /opt/src/build/output/build/barebox-2019.12.0/bareboxenv
/opt/src/build/output/build/barebox-2019.12.0/scripts/bareboxenv.c
/opt/src/build/output/build/barebox-2019.12.0/scripts/bareboxenv.c:100:10:
fatal error: linux/list.h: No such file or directory
#include <linux/list.h>
^~~~~~~~~~~~~~
compilation terminated.
package/pkg-generic.mk:238: recipe for target
'/opt/src/build/output/build/barebox-2019.12.0/.stamp_built' failed
make: *** [/opt/src/build/output/build/barebox-2019.12.0/.stamp_built] Error 1
So if I then open up the file "bareboxenv.c", and navigate to line
#100, I see that it includes a load of headers. Here are the lines #93
- 122:
static char *concat_subpath_file(const char *path, const char *f)
{
if (f && DOT_OR_DOTDOT(f))
return NULL;
return concat_path_file(path, f);
}
#include <linux/list.h>
#include <linux/list_sort.h>
#include "../lib/list_sort.c"
#include "../lib/recursive_action.c"
#include "../include/envfs.h"
#include "../crypto/crc32.c"
#include "../lib/make_directory.c"
#include "../common/environment.c"
static void usage(char *prgname)
{
printf( "Usage : %s [OPTION] DIRECTORY FILE\n"
"Load a barebox environment sector into a directory or\n"
"save a directory into a barebox environment sector\n"
"\n"
"options:\n"
" -s save (directory -> environment sector)\n"
" -z force the built-in default environment at startup\n"
" -l load (environment sector -> directory)\n"
" -p <size> pad output file to given size\n"
" -v verbose\n",
prgname);
}
On 1/6/20, Thomas Petazzoni [off-list ref] wrote:
Hello Frederick,
On Mon, 6 Jan 2020 16:21:59 -0000 (UTC)
Frederick Gotham [off-list ref] wrote:
quoted
The following header file:
#include <linux/list.h>
was added to the Github for the Linux kernel in May 2011. That was 9 years
ago.
This is an internal kernel header.
quoted
So on my Buildroot setup, I navigate to this directory:
build/output/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/linux
This only contains the kernel headers exposed to userspace, i.e the
UAPI (user-space API). There is absolutely no reason for list.h to be
in there.
quoted
And I check to see if "list.h" is in there. It's not there, and this is
why I
am unable to build the latest version of Barebox.
Anyone got any idea why that header file isn't in there?
You need to give more details about the Barebox failure you're seeing:
which version you're trying to build, what is the build error. But the
error is clearly not due to <linux/list.h> being missing from the
compiler sysroot.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
From: Peter Seiderer <hidden> Date: 2020-01-07 09:39:59
Hello Frederick,
On Tue, 7 Jan 2020 08:28:39 +0000, Frederick Gotham [off-list ref] wrote:
Thomas Petazzoni wrote:
quoted
"You need to give more details about the Barebox failure you're seeing"
Here's the exact output:
quoted
quoted
quoted
barebox 2019.12.0 Configuring
barebox 2019.12.0 Building
/opt/src/build/output/host/bin/x86_64-buildroot-linux-gnu-gcc
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os
-o /opt/src/build/output/build/barebox-2019.12.0/bareboxenv
/opt/src/build/output/build/barebox-2019.12.0/scripts/bareboxenv.c
/opt/src/build/output/build/barebox-2019.12.0/scripts/bareboxenv.c:100:10:
fatal error: linux/list.h: No such file or directory
#include <linux/list.h>
^~~~~~~~~~~~~~
This include was introduced in barebox by commit 'recursive_action: add ACTION_SORT flag'
from 2019-01-08 ([1]), so maybe more a barebox than a buildroot question...
Maybe you can avoid the problem by changing the barebox version (by using a pre 2019-01-08
version), or by changing your barebox/buildroot config (disabling bareboxenv)?
Without reproducing the problem but looking at the commit you could try to change
the lines (totally untested)
#include <linux/list.h>
#include <linux/list_sort.h>
to (or similar)
#include <../include/linux/list.h>
#include <../include/linux/list_sort.h>
as the barebox sources carry a copy of the linux kernel include files...
Please provide your buildroot/barebox config file for further help and/or
report your problem upstream (barebox at lists.infradead.org, [2])
Regards,
Peter
[1] https://git.pengutronix.de/cgit/barebox/commit/?id=99c1263dce3902a8961bcdcac9398bce51fccd1b
[2] http://lists.infradead.org/mailman/listinfo/barebox
compilation terminated.
package/pkg-generic.mk:238: recipe for target
'/opt/src/build/output/build/barebox-2019.12.0/.stamp_built' failed
make: *** [/opt/src/build/output/build/barebox-2019.12.0/.stamp_built] Error 1
So if I then open up the file "bareboxenv.c", and navigate to line
#100, I see that it includes a load of headers. Here are the lines #93
- 122:
static char *concat_subpath_file(const char *path, const char *f)
{
if (f && DOT_OR_DOTDOT(f))
return NULL;
return concat_path_file(path, f);
}
#include <linux/list.h>
#include <linux/list_sort.h>
#include "../lib/list_sort.c"
#include "../lib/recursive_action.c"
#include "../include/envfs.h"
#include "../crypto/crc32.c"
#include "../lib/make_directory.c"
#include "../common/environment.c"
static void usage(char *prgname)
{
printf( "Usage : %s [OPTION] DIRECTORY FILE\n"
"Load a barebox environment sector into a directory or\n"
"save a directory into a barebox environment sector\n"
"\n"
"options:\n"
" -s save (directory -> environment sector)\n"
" -z force the built-in default environment at startup\n"
" -l load (environment sector -> directory)\n"
" -p <size> pad output file to given size\n"
" -v verbose\n",
prgname);
}
On 1/6/20, Thomas Petazzoni [off-list ref] wrote:
quoted
Hello Frederick,
On Mon, 6 Jan 2020 16:21:59 -0000 (UTC)
Frederick Gotham [off-list ref] wrote:
quoted
The following header file:
#include <linux/list.h>
was added to the Github for the Linux kernel in May 2011. That was 9 years
ago.
This is an internal kernel header.
quoted
So on my Buildroot setup, I navigate to this directory:
build/output/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/linux
This only contains the kernel headers exposed to userspace, i.e the
UAPI (user-space API). There is absolutely no reason for list.h to be
in there.
quoted
And I check to see if "list.h" is in there. It's not there, and this is
why I
am unable to build the latest version of Barebox.
Anyone got any idea why that header file isn't in there?
You need to give more details about the Barebox failure you're seeing:
which version you're trying to build, what is the build error. But the
error is clearly not due to <linux/list.h> being missing from the
compiler sysroot.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
From: Peter Seiderer <hidden> Date: 2020-01-07 17:30:55
Hello Frederick,
On Tue, 7 Jan 2020 10:39:59 +0100, Peter Seiderer [off-list ref] wrote:
Hello Frederick,
On Tue, 7 Jan 2020 08:28:39 +0000, Frederick Gotham [off-list ref] wrote:
quoted
Thomas Petazzoni wrote:
quoted
"You need to give more details about the Barebox failure you're seeing"
Here's the exact output:
quoted
quoted
quoted
barebox 2019.12.0 Configuring
barebox 2019.12.0 Building
/opt/src/build/output/host/bin/x86_64-buildroot-linux-gnu-gcc
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os
-o /opt/src/build/output/build/barebox-2019.12.0/bareboxenv
/opt/src/build/output/build/barebox-2019.12.0/scripts/bareboxenv.c
/opt/src/build/output/build/barebox-2019.12.0/scripts/bareboxenv.c:100:10:
fatal error: linux/list.h: No such file or directory
#include <linux/list.h>
^~~~~~~~~~~~~~
This include was introduced in barebox by commit 'recursive_action: add ACTION_SORT flag'
from 2019-01-08 ([1]), so maybe more a barebox than a buildroot question...
Maybe you can avoid the problem by changing the barebox version (by using a pre 2019-01-08
version), or by changing your barebox/buildroot config (disabling bareboxenv)?
Without reproducing the problem but looking at the commit you could try to change
the lines (totally untested)
#include <linux/list.h>
#include <linux/list_sort.h>
to (or similar)
#include <../include/linux/list.h>
#include <../include/linux/list_sort.h>
as the barebox sources carry a copy of the linux kernel include files...
Suggestion maybe nonsens as another copy of the linux kenrnel include files
(or part of) is stored in the barebox-2019.12.0/scripts/include/linux
directory...
Please provide your buildroot/barebox config file for further help and/or
report your problem upstream (barebox at lists.infradead.org, [2])
I can reproduce your problem using buildroot raspberrypi3_defconfig and
enabling barebox with the rpi_defconfig and BR2_TARGET_BAREBOX_BAREBOXENV
enabled...., disabling BR2_TARGET_BAREBOX_BAREBOXENV avoids the list.h/list_sort.h
problem....
But later the buildroot/barebox install step fails with:
quoted
quoted
barebox 2019.12.0 Installing to images directory
if test -n ""; then cp -L .../images ; elif test -h .../build/barebox-2019.12.0/barebox-flash-image ; then cp -L .../build/barebox-2019.12.0/barebox-flash-image .../images/barebox.bin ; else cp .../build/barebox-2019.12.0/barebox.bin .../images; fi
cp: cannot stat '.../build/barebox-2019.12.0/barebox-flash-image': No such file or directory
make[1]: *** [package/pkg-generic.mk:343: .../build/barebox-2019.12.0/.stamp_images_installed] Error 1
make: *** [Makefile:23: _all] Error 2
Regards,
Peter
compilation terminated.
package/pkg-generic.mk:238: recipe for target
'/opt/src/build/output/build/barebox-2019.12.0/.stamp_built' failed
make: *** [/opt/src/build/output/build/barebox-2019.12.0/.stamp_built] Error 1
So if I then open up the file "bareboxenv.c", and navigate to line
#100, I see that it includes a load of headers. Here are the lines #93
- 122:
static char *concat_subpath_file(const char *path, const char *f)
{
if (f && DOT_OR_DOTDOT(f))
return NULL;
return concat_path_file(path, f);
}
#include <linux/list.h>
#include <linux/list_sort.h>
#include "../lib/list_sort.c"
#include "../lib/recursive_action.c"
#include "../include/envfs.h"
#include "../crypto/crc32.c"
#include "../lib/make_directory.c"
#include "../common/environment.c"
static void usage(char *prgname)
{
printf( "Usage : %s [OPTION] DIRECTORY FILE\n"
"Load a barebox environment sector into a directory or\n"
"save a directory into a barebox environment sector\n"
"\n"
"options:\n"
" -s save (directory -> environment sector)\n"
" -z force the built-in default environment at startup\n"
" -l load (environment sector -> directory)\n"
" -p <size> pad output file to given size\n"
" -v verbose\n",
prgname);
}
On 1/6/20, Thomas Petazzoni [off-list ref] wrote:
quoted
Hello Frederick,
On Mon, 6 Jan 2020 16:21:59 -0000 (UTC)
Frederick Gotham [off-list ref] wrote:
quoted
The following header file:
#include <linux/list.h>
was added to the Github for the Linux kernel in May 2011. That was 9 years
ago.
This is an internal kernel header.
quoted
So on my Buildroot setup, I navigate to this directory:
build/output/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/linux
This only contains the kernel headers exposed to userspace, i.e the
UAPI (user-space API). There is absolutely no reason for list.h to be
in there.
quoted
And I check to see if "list.h" is in there. It's not there, and this is
why I
am unable to build the latest version of Barebox.
Anyone got any idea why that header file isn't in there?
You need to give more details about the Barebox failure you're seeing:
which version you're trying to build, what is the build error. But the
error is clearly not due to <linux/list.h> being missing from the
compiler sysroot.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
From: Peter Seiderer <hidden> Date: 2020-01-07 19:36:21
Hello Frederick,
On Tue, 7 Jan 2020 18:30:55 +0100, Peter Seiderer [off-list ref] wrote:
Hello Frederick,
On Tue, 7 Jan 2020 10:39:59 +0100, Peter Seiderer [off-list ref] wrote:
quoted
Hello Frederick,
On Tue, 7 Jan 2020 08:28:39 +0000, Frederick Gotham [off-list ref] wrote:
quoted
Thomas Petazzoni wrote:
quoted
"You need to give more details about the Barebox failure you're seeing"
Here's the exact output:
quoted
quoted
quoted
barebox 2019.12.0 Configuring
barebox 2019.12.0 Building
/opt/src/build/output/host/bin/x86_64-buildroot-linux-gnu-gcc
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os
-o /opt/src/build/output/build/barebox-2019.12.0/bareboxenv
/opt/src/build/output/build/barebox-2019.12.0/scripts/bareboxenv.c
/opt/src/build/output/build/barebox-2019.12.0/scripts/bareboxenv.c:100:10:
fatal error: linux/list.h: No such file or directory
#include <linux/list.h>
^~~~~~~~~~~~~~
This include was introduced in barebox by commit 'recursive_action: add ACTION_SORT flag'
from 2019-01-08 ([1]), so maybe more a barebox than a buildroot question...
Maybe you can avoid the problem by changing the barebox version (by using a pre 2019-01-08
version), or by changing your barebox/buildroot config (disabling bareboxenv)?
Without reproducing the problem but looking at the commit you could try to change
the lines (totally untested)
#include <linux/list.h>
#include <linux/list_sort.h>
to (or similar)
#include <../include/linux/list.h>
#include <../include/linux/list_sort.h>
as the barebox sources carry a copy of the linux kernel include files...
Suggestion maybe nonsens as another copy of the linux kenrnel include files
(or part of) is stored in the barebox-2019.12.0/scripts/include/linux
directory...
quoted
Please provide your buildroot/barebox config file for further help and/or
report your problem upstream (barebox at lists.infradead.org, [2])
I can reproduce your problem using buildroot raspberrypi3_defconfig and
enabling barebox with the rpi_defconfig and BR2_TARGET_BAREBOX_BAREBOXENV
enabled...., disabling BR2_TARGET_BAREBOX_BAREBOXENV avoids the list.h/list_sort.h
problem....
Can be fixed by (proper buildroot patch follows soon):
But later the buildroot/barebox install step fails with:
quoted
quoted
quoted
barebox 2019.12.0 Installing to images directory
if test -n ""; then cp -L .../images ; elif test -h .../build/barebox-2019.12.0/barebox-flash-image ; then cp -L .../build/barebox-2019.12.0/barebox-flash-image .../images/barebox.bin ; else cp .../build/barebox-2019.12.0/barebox.bin .../images; fi
cp: cannot stat '.../build/barebox-2019.12.0/barebox-flash-image': No such file or directory
make[1]: *** [package/pkg-generic.mk:343: .../build/barebox-2019.12.0/.stamp_images_installed] Error 1
make: *** [Makefile:23: _all] Error 2
My fault, can be fixed (for the rpi_defconfig case) by:
BR2_TARGET_BAREBOX_IMAGE_FILE="images/barebox-raspberry-pi-1.img images/barebox-raspberry-pi-2.img images/barebox-raspberry-pi-3.img"
Regards,
Peter
compilation terminated.
package/pkg-generic.mk:238: recipe for target
'/opt/src/build/output/build/barebox-2019.12.0/.stamp_built' failed
make: *** [/opt/src/build/output/build/barebox-2019.12.0/.stamp_built] Error 1
So if I then open up the file "bareboxenv.c", and navigate to line
#100, I see that it includes a load of headers. Here are the lines #93
- 122:
static char *concat_subpath_file(const char *path, const char *f)
{
if (f && DOT_OR_DOTDOT(f))
return NULL;
return concat_path_file(path, f);
}
#include <linux/list.h>
#include <linux/list_sort.h>
#include "../lib/list_sort.c"
#include "../lib/recursive_action.c"
#include "../include/envfs.h"
#include "../crypto/crc32.c"
#include "../lib/make_directory.c"
#include "../common/environment.c"
static void usage(char *prgname)
{
printf( "Usage : %s [OPTION] DIRECTORY FILE\n"
"Load a barebox environment sector into a directory or\n"
"save a directory into a barebox environment sector\n"
"\n"
"options:\n"
" -s save (directory -> environment sector)\n"
" -z force the built-in default environment at startup\n"
" -l load (environment sector -> directory)\n"
" -p <size> pad output file to given size\n"
" -v verbose\n",
prgname);
}
On 1/6/20, Thomas Petazzoni [off-list ref] wrote:
quoted
Hello Frederick,
On Mon, 6 Jan 2020 16:21:59 -0000 (UTC)
Frederick Gotham [off-list ref] wrote:
quoted
The following header file:
#include <linux/list.h>
was added to the Github for the Linux kernel in May 2011. That was 9 years
ago.
This is an internal kernel header.
quoted
So on my Buildroot setup, I navigate to this directory:
build/output/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/linux
This only contains the kernel headers exposed to userspace, i.e the
UAPI (user-space API). There is absolutely no reason for list.h to be
in there.
quoted
And I check to see if "list.h" is in there. It's not there, and this is
why I
am unable to build the latest version of Barebox.
Anyone got any idea why that header file isn't in there?
You need to give more details about the Barebox failure you're seeing:
which version you're trying to build, what is the build error. But the
error is clearly not due to <linux/list.h> being missing from the
compiler sysroot.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com