public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [BUG] sandbox: NO_SDL=1 gcc: error: arch/sandbox/cpu/sdl.o: No such file or directory
@ 2022-01-10 23:22 Heinrich Schuchardt
  2022-01-13 13:41 ` Simon Glass
  0 siblings, 1 reply; 8+ messages in thread
From: Heinrich Schuchardt @ 2022-01-10 23:22 UTC (permalink / raw)
  To: Simon Glass; +Cc: Milan P. Stanić, U-Boot Mailing List

Hello Simon,

compiling with SDL fails on Alpine Linux:
https://gitlab.alpinelinux.org/alpine/aports/-/issues/13411

So I tried NO_SDL:

make sandbox_defconfig NO_SDL=1
make menuconfig # CONFIG_ETH_SANDBOX_RAW=n
make -j4 NO_SDL=1

But I got an error
gcc: error: arch/sandbox/cpu/sdl.o: No such file or directory

Can't we make CONFIG_SANDBOX_SDL a Kconfig symbol to get rid of the
command line symbol?

We already have CONFIG_SANDBOX_VIDEO_SDL. Do we need two symbols?

Best regards

Heinrich


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [BUG] sandbox: NO_SDL=1 gcc: error: arch/sandbox/cpu/sdl.o: No such file or directory
  2022-01-10 23:22 [BUG] sandbox: NO_SDL=1 gcc: error: arch/sandbox/cpu/sdl.o: No such file or directory Heinrich Schuchardt
@ 2022-01-13 13:41 ` Simon Glass
  2022-01-13 18:07   ` Heinrich Schuchardt
  2022-01-15 18:47   ` Heinrich Schuchardt
  0 siblings, 2 replies; 8+ messages in thread
From: Simon Glass @ 2022-01-13 13:41 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: Milan P. Stanić, U-Boot Mailing List

Hi Heinrich,

On Mon, 10 Jan 2022 at 16:22, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> Hello Simon,
>
> compiling with SDL fails on Alpine Linux:
> https://gitlab.alpinelinux.org/alpine/aports/-/issues/13411
>
> So I tried NO_SDL:
>
> make sandbox_defconfig NO_SDL=1
> make menuconfig # CONFIG_ETH_SANDBOX_RAW=n
> make -j4 NO_SDL=1
>
> But I got an error
> gcc: error: arch/sandbox/cpu/sdl.o: No such file or directory

Do you need mrproper first? I don't hit that problem.

I see that I broke it...it needs a static inline for
sandbox_sdl_remove_display().

>
> Can't we make CONFIG_SANDBOX_SDL a Kconfig symbol to get rid of the
> command line symbol?
>
> We already have CONFIG_SANDBOX_VIDEO_SDL. Do we need two symbols?

You mean, manually change the defconfig file? I suppose we could do
that, but it is harder for people to do.

In any case, we should add this case to CI.

Regards,
Simon

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [BUG] sandbox: NO_SDL=1 gcc: error: arch/sandbox/cpu/sdl.o: No such file or directory
  2022-01-13 13:41 ` Simon Glass
@ 2022-01-13 18:07   ` Heinrich Schuchardt
  2022-01-13 18:09     ` Simon Glass
  2022-01-15 18:47   ` Heinrich Schuchardt
  1 sibling, 1 reply; 8+ messages in thread
From: Heinrich Schuchardt @ 2022-01-13 18:07 UTC (permalink / raw)
  To: Simon Glass; +Cc: Milan P. Stanić, U-Boot Mailing List

On 1/13/22 14:41, Simon Glass wrote:
> Hi Heinrich,
>
> On Mon, 10 Jan 2022 at 16:22, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>>
>> Hello Simon,
>>
>> compiling with SDL fails on Alpine Linux:
>> https://gitlab.alpinelinux.org/alpine/aports/-/issues/13411
>>
>> So I tried NO_SDL:
>>
>> make sandbox_defconfig NO_SDL=1
>> make menuconfig # CONFIG_ETH_SANDBOX_RAW=n
>> make -j4 NO_SDL=1
>>
>> But I got an error
>> gcc: error: arch/sandbox/cpu/sdl.o: No such file or directory
>
> Do you need mrproper first? I don't hit that problem.
>
> I see that I broke it...it needs a static inline for
> sandbox_sdl_remove_display().

I intend to set up a Dockerfile for Alpine Linux because also some other
problems arose due to musl used instead of glibc.

>
>>
>> Can't we make CONFIG_SANDBOX_SDL a Kconfig symbol to get rid of the
>> command line symbol?
>>
>> We already have CONFIG_SANDBOX_VIDEO_SDL. Do we need two symbols?
>
> You mean, manually change the defconfig file? I suppose we could do
> that, but it is harder for people to do.

You never suggested to replace .config by hundreds of environment
variables ;)

No, menuconfig is the better tool. People are used to it. You don't
expect them to know of environment variables hidden somewhere in the
documentation. Saving a new defconfig is easy. Environment variables
should only be used for variable file paths like the location of OpenSBI
or TF-A.

I anyway had to use menuconfig to disable raw ethernet because it is not
POSIX compatible.

Best regards

Heinrich

>
> In any case, we should add this case to CI.
>
> Regards,
> Simon


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [BUG] sandbox: NO_SDL=1 gcc: error: arch/sandbox/cpu/sdl.o: No such file or directory
  2022-01-13 18:07   ` Heinrich Schuchardt
@ 2022-01-13 18:09     ` Simon Glass
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Glass @ 2022-01-13 18:09 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: Milan P. Stanić, U-Boot Mailing List

Hi Heinrich,

On Thu, 13 Jan 2022 at 11:07, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> On 1/13/22 14:41, Simon Glass wrote:
> > Hi Heinrich,
> >
> > On Mon, 10 Jan 2022 at 16:22, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> >>
> >> Hello Simon,
> >>
> >> compiling with SDL fails on Alpine Linux:
> >> https://gitlab.alpinelinux.org/alpine/aports/-/issues/13411
> >>
> >> So I tried NO_SDL:
> >>
> >> make sandbox_defconfig NO_SDL=1
> >> make menuconfig # CONFIG_ETH_SANDBOX_RAW=n
> >> make -j4 NO_SDL=1
> >>
> >> But I got an error
> >> gcc: error: arch/sandbox/cpu/sdl.o: No such file or directory
> >
> > Do you need mrproper first? I don't hit that problem.
> >
> > I see that I broke it...it needs a static inline for
> > sandbox_sdl_remove_display().
>
> I intend to set up a Dockerfile for Alpine Linux because also some other
> problems arose due to musl used instead of glibc.
>
> >
> >>
> >> Can't we make CONFIG_SANDBOX_SDL a Kconfig symbol to get rid of the
> >> command line symbol?
> >>
> >> We already have CONFIG_SANDBOX_VIDEO_SDL. Do we need two symbols?
> >
> > You mean, manually change the defconfig file? I suppose we could do
> > that, but it is harder for people to do.
>
> You never suggested to replace .config by hundreds of environment
> variables ;)

Strawman alert! There is one variable. I'm going to ignore the rest of
your email.

- Simon

>
> No, menuconfig is the better tool. People are used to it. You don't
> expect them to know of environment variables hidden somewhere in the
> documentation. Saving a new defconfig is easy. Environment variables
> should only be used for variable file paths like the location of OpenSBI
> or TF-A.
>
> I anyway had to use menuconfig to disable raw ethernet because it is not
> POSIX compatible.
>
> Best regards
>
> Heinrich
>
> >
> > In any case, we should add this case to CI.
> >
> > Regards,
> > Simon
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [BUG] sandbox: NO_SDL=1 gcc: error: arch/sandbox/cpu/sdl.o: No such file or directory
  2022-01-13 13:41 ` Simon Glass
  2022-01-13 18:07   ` Heinrich Schuchardt
@ 2022-01-15 18:47   ` Heinrich Schuchardt
  2022-01-16 21:14     ` Milan P. Stanić
  1 sibling, 1 reply; 8+ messages in thread
From: Heinrich Schuchardt @ 2022-01-15 18:47 UTC (permalink / raw)
  To: Simon Glass, Heinrich Schuchardt
  Cc: Milan P. Stanić, U-Boot Mailing List

[-- Attachment #1: Type: text/plain, Size: 2718 bytes --]

On 1/13/22 14:41, Simon Glass wrote:
> Hi Heinrich,
>
> On Mon, 10 Jan 2022 at 16:22, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>>
>> Hello Simon,
>>
>> compiling with SDL fails on Alpine Linux:
>> https://gitlab.alpinelinux.org/alpine/aports/-/issues/13411
>>
>> So I tried NO_SDL:
>>
>> make sandbox_defconfig NO_SDL=1
>> make menuconfig # CONFIG_ETH_SANDBOX_RAW=n
>> make -j4 NO_SDL=1
>>
>> But I got an error
>> gcc: error: arch/sandbox/cpu/sdl.o: No such file or directory
>
> Do you need mrproper first? I don't hit that problem.

Please, build the appended Dockerfile ("sudo docker build -t .").

It gives me:

/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
/tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp8':
/home/uboot/u-boot/test/dm/video.c:357: undefined reference to
`sandbox_sdl_set_bpp'
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
/tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp16':
/home/uboot/u-boot/test/dm/video.c:378: undefined reference to
`sandbox_sdl_set_bpp'
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
/tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp24':
/home/uboot/u-boot/test/dm/video.c:401: undefined reference to
`sandbox_sdl_set_bpp'
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
/tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp24_32':
/home/uboot/u-boot/test/dm/video.c:424: undefined reference to
`sandbox_sdl_set_bpp'
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
/tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp32':
/home/uboot/u-boot/test/dm/video.c:445: undefined reference to
`sandbox_sdl_set_bpp'
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
/tmp/u-boot.eJeOKe.ltrans36.ltrans.o:/home/uboot/u-boot/test/dm/video.c:479:
more undefined references to `sandbox_sdl_set_bpp' follow
collect2: error: ld returned 1 exit status
make: *** [Makefile:1799: u-boot] Error 1

Best regards

Heinrich

>
> I see that I broke it...it needs a static inline for
> sandbox_sdl_remove_display().
>
>>
>> Can't we make CONFIG_SANDBOX_SDL a Kconfig symbol to get rid of the
>> command line symbol?
>>
>> We already have CONFIG_SANDBOX_VIDEO_SDL. Do we need two symbols?
>
> You mean, manually change the defconfig file? I suppose we could do
> that, but it is harder for people to do.
>
> In any case, we should add this case to CI.
>
> Regards,
> Simon

[-- Attachment #2: Dockerfile --]
[-- Type: text/plain, Size: 1027 bytes --]

# SPDX-License-Identifier: GPL-2.0+
# This Dockerfile is used to build an image containing basic stuff to be used
# to build U-Boot and run our test suites.

FROM alpine:3.15.0
MAINTAINER Heinrich Schuchardt <xypron.glpk@gmx.de>
LABEL Description=" This image is for building U-Boot inside a container"

# Install packages
RUN apk update
RUN apk add \
	alpine-sdk \
	bash \
	bc \
	bison \
	dtc \
	flex \
	git \
	linux-headers \
	ncurses-dev \
	openssl-dev \
	perl \
	python3 \
	py3-setuptools \
	python3-dev \
	sdl2-dev \
	sudo 

# Create our user/group
RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot
RUN adduser -D uboot
RUN addgroup uboot wheel
USER uboot:uboot
RUN bash
WORKDIR /home/uboot
RUN git clone https://source.denx.de/u-boot/u-boot.git
WORKDIR /home/uboot/u-boot
RUN make sandbox_defconfig NO_SDL=1
RUN sed -i 's/CONFIG_ETH_SANDBOX_RAW=y/# CONFIG_ETH_SANDBOX_RAW is not set/g' .config
RUN sed -i 's/CONFIG_VIDEO_SANDBOX_SDL=y/# CONFIG_VIDEO_SANDBOX_SDL is not set/g' .config
# RUN make -j$(nproc) NO_SDL=1

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [BUG] sandbox: NO_SDL=1 gcc: error: arch/sandbox/cpu/sdl.o: No such file or directory
  2022-01-15 18:47   ` Heinrich Schuchardt
@ 2022-01-16 21:14     ` Milan P. Stanić
  2022-01-16 22:41       ` Heinrich Schuchardt
  0 siblings, 1 reply; 8+ messages in thread
From: Milan P. Stanić @ 2022-01-16 21:14 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: Simon Glass, U-Boot Mailing List

On Sat, 2022-01-15 at 19:47, Heinrich Schuchardt wrote:
> On 1/13/22 14:41, Simon Glass wrote:
> > Hi Heinrich,
> > 
> > On Mon, 10 Jan 2022 at 16:22, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> > > 
> > > Hello Simon,
> > > 
> > > compiling with SDL fails on Alpine Linux:
> > > https://gitlab.alpinelinux.org/alpine/aports/-/issues/13411
> > > 
> > > So I tried NO_SDL:
> > > 
> > > make sandbox_defconfig NO_SDL=1
> > > make menuconfig # CONFIG_ETH_SANDBOX_RAW=n
> > > make -j4 NO_SDL=1
> > > 
> > > But I got an error
> > > gcc: error: arch/sandbox/cpu/sdl.o: No such file or directory
> > 
> > Do you need mrproper first? I don't hit that problem.
> 
> Please, build the appended Dockerfile ("sudo docker build -t .").

I run it on aarch64 (I don't have x86_64 machine for this) and I didn't got error.

here is the output of 'docker build .':
---------------------------------------
Step 12/16 : RUN git clone https://source.denx.de/u-boot/u-boot.git
 ---> Running in 4f89022fad97
Cloning into 'u-boot'...
Removing intermediate container 4f89022fad97
 ---> 8f4a64791065
Step 13/16 : WORKDIR /home/uboot/u-boot
 ---> Running in c88471d92078
Removing intermediate container c88471d92078
 ---> 361d0979bd27
Step 14/16 : RUN make sandbox_defconfig NO_SDL=1
 ---> Running in aad201f298b6
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  YACC    scripts/kconfig/zconf.tab.c
  LEX     scripts/kconfig/zconf.lex.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
Removing intermediate container aad201f298b6
 ---> bf5a898ae7f6
Step 15/16 : RUN sed -i 's/CONFIG_ETH_SANDBOX_RAW=y/# CONFIG_ETH_SANDBOX_RAW is not set/g' .config
 ---> Running in 50eb86bfd2aa
Removing intermediate container 50eb86bfd2aa
 ---> 0eb72e2956d1
Step 16/16 : RUN sed -i 's/CONFIG_VIDEO_SANDBOX_SDL=y/# CONFIG_VIDEO_SANDBOX_SDL is not set/g' .config
 ---> Running in 18bd37a4251f
Removing intermediate container 18bd37a4251f
 ---> 8b391226e895
Successfully built 8b391226e895
---------------------------------------

-- 
Best regards

> 
> It gives me:
> 
> /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
> /tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp8':
> /home/uboot/u-boot/test/dm/video.c:357: undefined reference to
> `sandbox_sdl_set_bpp'
> /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
> /tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp16':
> /home/uboot/u-boot/test/dm/video.c:378: undefined reference to
> `sandbox_sdl_set_bpp'
> /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
> /tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp24':
> /home/uboot/u-boot/test/dm/video.c:401: undefined reference to
> `sandbox_sdl_set_bpp'
> /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
> /tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp24_32':
> /home/uboot/u-boot/test/dm/video.c:424: undefined reference to
> `sandbox_sdl_set_bpp'
> /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
> /tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp32':
> /home/uboot/u-boot/test/dm/video.c:445: undefined reference to
> `sandbox_sdl_set_bpp'
> /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
> /tmp/u-boot.eJeOKe.ltrans36.ltrans.o:/home/uboot/u-boot/test/dm/video.c:479:
> more undefined references to `sandbox_sdl_set_bpp' follow
> collect2: error: ld returned 1 exit status
> make: *** [Makefile:1799: u-boot] Error 1
> 
> Best regards
> 
> Heinrich
> 
> > 
> > I see that I broke it...it needs a static inline for
> > sandbox_sdl_remove_display().
> > 
> > > 
> > > Can't we make CONFIG_SANDBOX_SDL a Kconfig symbol to get rid of the
> > > command line symbol?
> > > 
> > > We already have CONFIG_SANDBOX_VIDEO_SDL. Do we need two symbols?
> > 
> > You mean, manually change the defconfig file? I suppose we could do
> > that, but it is harder for people to do.
> > 
> > In any case, we should add this case to CI.
> > 
> > Regards,
> > Simon

> # SPDX-License-Identifier: GPL-2.0+
> # This Dockerfile is used to build an image containing basic stuff to be used
> # to build U-Boot and run our test suites.
> 
> FROM alpine:3.15.0
> MAINTAINER Heinrich Schuchardt <xypron.glpk@gmx.de>
> LABEL Description=" This image is for building U-Boot inside a container"
> 
> # Install packages
> RUN apk update
> RUN apk add \
> 	alpine-sdk \
> 	bash \
> 	bc \
> 	bison \
> 	dtc \
> 	flex \
> 	git \
> 	linux-headers \
> 	ncurses-dev \
> 	openssl-dev \
> 	perl \
> 	python3 \
> 	py3-setuptools \
> 	python3-dev \
> 	sdl2-dev \
> 	sudo 
> 
> # Create our user/group
> RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot
> RUN adduser -D uboot
> RUN addgroup uboot wheel
> USER uboot:uboot
> RUN bash
> WORKDIR /home/uboot
> RUN git clone https://source.denx.de/u-boot/u-boot.git
> WORKDIR /home/uboot/u-boot
> RUN make sandbox_defconfig NO_SDL=1
> RUN sed -i 's/CONFIG_ETH_SANDBOX_RAW=y/# CONFIG_ETH_SANDBOX_RAW is not set/g' .config
> RUN sed -i 's/CONFIG_VIDEO_SANDBOX_SDL=y/# CONFIG_VIDEO_SANDBOX_SDL is not set/g' .config
> # RUN make -j$(nproc) NO_SDL=1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [BUG] sandbox: NO_SDL=1 gcc: error: arch/sandbox/cpu/sdl.o: No such file or directory
  2022-01-16 21:14     ` Milan P. Stanić
@ 2022-01-16 22:41       ` Heinrich Schuchardt
  2022-01-16 23:11         ` Milan P. Stanić
  0 siblings, 1 reply; 8+ messages in thread
From: Heinrich Schuchardt @ 2022-01-16 22:41 UTC (permalink / raw)
  To: Milan P. Stanić, Heinrich Schuchardt
  Cc: Simon Glass, U-Boot Mailing List

On 1/16/22 22:14, Milan P. Stanić wrote:
> wrote:
>> On 1/13/22 14:41, Simon Glass wrote:
>>> Hi Heinrich,
>>>
>>> On Mon, 10 Jan 2022 at 16:22, Heinrich Schuchardt<xypron.glpk@gmx.de>  wrote:
>>>> Hello Simon,
>>>>
>>>> compiling with SDL fails on Alpine Linux:
>>>> https://gitlab.alpinelinux.org/alpine/aports/-/issues/13411
>>>>
>>>> So I tried NO_SDL:
>>>>
>>>> make sandbox_defconfig NO_SDL=1
>>>> make menuconfig # CONFIG_ETH_SANDBOX_RAW=n
>>>> make -j4 NO_SDL=1
>>>>
>>>> But I got an error
>>>> gcc: error: arch/sandbox/cpu/sdl.o: No such file or directory
>>> Do you need mrproper first? I don't hit that problem.
>> Please, build the appended Dockerfile ("sudo docker build -t .").
> I run it on aarch64 (I don't have x86_64 machine for this) and I didn't got error.
>
> here is the output of 'docker build .':
> ---------------------------------------
> Step 12/16 : RUN git clonehttps://source.denx.de/u-boot/u-boot.git
>   ---> Running in 4f89022fad97
> Cloning into 'u-boot'...
> Removing intermediate container 4f89022fad97
>   ---> 8f4a64791065
> Step 13/16 : WORKDIR /home/uboot/u-boot
>   ---> Running in c88471d92078
> Removing intermediate container c88471d92078
>   ---> 361d0979bd27
> Step 14/16 : RUN make sandbox_defconfig NO_SDL=1
>   ---> Running in aad201f298b6
>    HOSTCC  scripts/basic/fixdep
>    HOSTCC  scripts/kconfig/conf.o
>    YACC    scripts/kconfig/zconf.tab.c
>    LEX     scripts/kconfig/zconf.lex.c
>    HOSTCC  scripts/kconfig/zconf.tab.o
>    HOSTLD  scripts/kconfig/conf
> #
> # configuration written to .config
> #
> Removing intermediate container aad201f298b6
>   ---> bf5a898ae7f6
> Step 15/16 : RUN sed -i 's/CONFIG_ETH_SANDBOX_RAW=y/# CONFIG_ETH_SANDBOX_RAW is not set/g' .config
>   ---> Running in 50eb86bfd2aa
> Removing intermediate container 50eb86bfd2aa
>   ---> 0eb72e2956d1
> Step 16/16 : RUN sed -i 's/CONFIG_VIDEO_SANDBOX_SDL=y/# CONFIG_VIDEO_SANDBOX_SDL is not set/g' .config
>   ---> Running in 18bd37a4251f
> Removing intermediate container 18bd37a4251f
>   ---> 8b391226e895
> Successfully built 8b391226e895
> ---------------------------------------
>
> -- Best regards
>> It gives me:
>>
>> /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
>> /tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp8':
>> /home/uboot/u-boot/test/dm/video.c:357: undefined reference to
>> `sandbox_sdl_set_bpp'
>> /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
>> /tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp16':
>> /home/uboot/u-boot/test/dm/video.c:378: undefined reference to
>> `sandbox_sdl_set_bpp'
>> /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
>> /tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp24':
>> /home/uboot/u-boot/test/dm/video.c:401: undefined reference to
>> `sandbox_sdl_set_bpp'
>> /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
>> /tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp24_32':
>> /home/uboot/u-boot/test/dm/video.c:424: undefined reference to
>> `sandbox_sdl_set_bpp'
>> /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
>> /tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp32':
>> /home/uboot/u-boot/test/dm/video.c:445: undefined reference to
>> `sandbox_sdl_set_bpp'
>> /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
>> /tmp/u-boot.eJeOKe.ltrans36.ltrans.o:/home/uboot/u-boot/test/dm/video.c:479:
>> more undefined references to `sandbox_sdl_set_bpp' follow
>> collect2: error: ld returned 1 exit status
>> make: *** [Makefile:1799: u-boot] Error 1
>>
>> Best regards
>>
>> Heinrich
>>
>>> I see that I broke it...it needs a static inline for
>>> sandbox_sdl_remove_display().
>>>
>>>> Can't we make CONFIG_SANDBOX_SDL a Kconfig symbol to get rid of the
>>>> command line symbol?
>>>>
>>>> We already have CONFIG_SANDBOX_VIDEO_SDL. Do we need two symbols?
>>> You mean, manually change the defconfig file? I suppose we could do
>>> that, but it is harder for people to do.
>>>
>>> In any case, we should add this case to CI.
>>>
>>> Regards,
>>> Simon
>> # SPDX-License-Identifier: GPL-2.0+
>> # This Dockerfile is used to build an image containing basic stuff to be used
>> # to build U-Boot and run our test suites.
>>
>> FROMalpine:3.15.0
>> MAINTAINER Heinrich Schuchardt<xypron.glpk@gmx.de>
>> LABEL Description=" This image is for building U-Boot inside a container"
>>
>> # Install packages
>> RUN apk update
>> RUN apk add \
>> 	alpine-sdk \
>> 	bash \
>> 	bc \
>> 	bison \
>> 	dtc \
>> 	flex \
>> 	git \
>> 	linux-headers \
>> 	ncurses-dev \
>> 	openssl-dev \
>> 	perl \
>> 	python3 \
>> 	py3-setuptools \
>> 	python3-dev \
>> 	sdl2-dev \
>> 	sudo
>>
>> # Create our user/group
>> RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot
>> RUN adduser -D uboot
>> RUN addgroup uboot wheel
>> USERuboot:uboot
>> RUN bash
>> WORKDIR /home/uboot
>> RUN git clonehttps://source.denx.de/u-boot/u-boot.git
>> WORKDIR /home/uboot/u-boot
>> RUN make sandbox_defconfig NO_SDL=1
>> RUN sed -i 's/CONFIG_ETH_SANDBOX_RAW=y/# CONFIG_ETH_SANDBOX_RAW is not set/g' .config
>> RUN sed -i 's/CONFIG_VIDEO_SANDBOX_SDL=y/# CONFIG_VIDEO_SANDBOX_SDL is not set/g' .config
>> # RUN make -j$(nproc) NO_SDL=1

Did you uncomment this line? I somehow forgot to remove '# '.

Best regards

Heinrich

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [BUG] sandbox: NO_SDL=1 gcc: error: arch/sandbox/cpu/sdl.o: No such file or directory
  2022-01-16 22:41       ` Heinrich Schuchardt
@ 2022-01-16 23:11         ` Milan P. Stanić
  0 siblings, 0 replies; 8+ messages in thread
From: Milan P. Stanić @ 2022-01-16 23:11 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: Simon Glass, U-Boot Mailing List

On Sun, 2022-01-16 at 23:41, Heinrich Schuchardt wrote:
> On 1/16/22 22:14, Milan P. Stanić wrote:
> > wrote:
> > > On 1/13/22 14:41, Simon Glass wrote:
> > > > Hi Heinrich,
> > > > 
> > > > On Mon, 10 Jan 2022 at 16:22, Heinrich Schuchardt<xypron.glpk@gmx.de>  wrote:
> > > > > Hello Simon,
> > > > > 
> > > > > compiling with SDL fails on Alpine Linux:
> > > > > https://gitlab.alpinelinux.org/alpine/aports/-/issues/13411
> > > > > 
> > > > > So I tried NO_SDL:
> > > > > 
> > > > > make sandbox_defconfig NO_SDL=1
> > > > > make menuconfig # CONFIG_ETH_SANDBOX_RAW=n
> > > > > make -j4 NO_SDL=1
> > > > > 
> > > > > But I got an error
> > > > > gcc: error: arch/sandbox/cpu/sdl.o: No such file or directory
> > > > Do you need mrproper first? I don't hit that problem.
> > > Please, build the appended Dockerfile ("sudo docker build -t .").
> > I run it on aarch64 (I don't have x86_64 machine for this) and I didn't got error.
> > 
> > here is the output of 'docker build .':
> > ---------------------------------------
> > Step 12/16 : RUN git clonehttps://source.denx.de/u-boot/u-boot.git
> >   ---> Running in 4f89022fad97
> > Cloning into 'u-boot'...
> > Removing intermediate container 4f89022fad97
> >   ---> 8f4a64791065
> > Step 13/16 : WORKDIR /home/uboot/u-boot
> >   ---> Running in c88471d92078
> > Removing intermediate container c88471d92078
> >   ---> 361d0979bd27
> > Step 14/16 : RUN make sandbox_defconfig NO_SDL=1
> >   ---> Running in aad201f298b6
> >    HOSTCC  scripts/basic/fixdep
> >    HOSTCC  scripts/kconfig/conf.o
> >    YACC    scripts/kconfig/zconf.tab.c
> >    LEX     scripts/kconfig/zconf.lex.c
> >    HOSTCC  scripts/kconfig/zconf.tab.o
> >    HOSTLD  scripts/kconfig/conf
> > #
> > # configuration written to .config
> > #
> > Removing intermediate container aad201f298b6
> >   ---> bf5a898ae7f6
> > Step 15/16 : RUN sed -i 's/CONFIG_ETH_SANDBOX_RAW=y/# CONFIG_ETH_SANDBOX_RAW is not set/g' .config
> >   ---> Running in 50eb86bfd2aa
> > Removing intermediate container 50eb86bfd2aa
> >   ---> 0eb72e2956d1
> > Step 16/16 : RUN sed -i 's/CONFIG_VIDEO_SANDBOX_SDL=y/# CONFIG_VIDEO_SANDBOX_SDL is not set/g' .config
> >   ---> Running in 18bd37a4251f
> > Removing intermediate container 18bd37a4251f
> >   ---> 8b391226e895
> > Successfully built 8b391226e895
> > ---------------------------------------
> > 
> > -- Best regards
> > > It gives me:
> > > 
> > > /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
> > > /tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp8':
> > > /home/uboot/u-boot/test/dm/video.c:357: undefined reference to
> > > `sandbox_sdl_set_bpp'
> > > /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
> > > /tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp16':
> > > /home/uboot/u-boot/test/dm/video.c:378: undefined reference to
> > > `sandbox_sdl_set_bpp'
> > > /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
> > > /tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp24':
> > > /home/uboot/u-boot/test/dm/video.c:401: undefined reference to
> > > `sandbox_sdl_set_bpp'
> > > /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
> > > /tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp24_32':
> > > /home/uboot/u-boot/test/dm/video.c:424: undefined reference to
> > > `sandbox_sdl_set_bpp'
> > > /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
> > > /tmp/u-boot.eJeOKe.ltrans36.ltrans.o: in function `dm_test_video_bmp32':
> > > /home/uboot/u-boot/test/dm/video.c:445: undefined reference to
> > > `sandbox_sdl_set_bpp'
> > > /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld:
> > > /tmp/u-boot.eJeOKe.ltrans36.ltrans.o:/home/uboot/u-boot/test/dm/video.c:479:
> > > more undefined references to `sandbox_sdl_set_bpp' follow
> > > collect2: error: ld returned 1 exit status
> > > make: *** [Makefile:1799: u-boot] Error 1
> > > 
> > > Best regards
> > > 
> > > Heinrich
> > > 
> > > > I see that I broke it...it needs a static inline for
> > > > sandbox_sdl_remove_display().
> > > > 
> > > > > Can't we make CONFIG_SANDBOX_SDL a Kconfig symbol to get rid of the
> > > > > command line symbol?
> > > > > 
> > > > > We already have CONFIG_SANDBOX_VIDEO_SDL. Do we need two symbols?
> > > > You mean, manually change the defconfig file? I suppose we could do
> > > > that, but it is harder for people to do.
> > > > 
> > > > In any case, we should add this case to CI.
> > > > 
> > > > Regards,
> > > > Simon
> > > # SPDX-License-Identifier: GPL-2.0+
> > > # This Dockerfile is used to build an image containing basic stuff to be used
> > > # to build U-Boot and run our test suites.
> > > 
> > > FROMalpine:3.15.0
> > > MAINTAINER Heinrich Schuchardt<xypron.glpk@gmx.de>
> > > LABEL Description=" This image is for building U-Boot inside a container"
> > > 
> > > # Install packages
> > > RUN apk update
> > > RUN apk add \
> > > 	alpine-sdk \
> > > 	bash \
> > > 	bc \
> > > 	bison \
> > > 	dtc \
> > > 	flex \
> > > 	git \
> > > 	linux-headers \
> > > 	ncurses-dev \
> > > 	openssl-dev \
> > > 	perl \
> > > 	python3 \
> > > 	py3-setuptools \
> > > 	python3-dev \
> > > 	sdl2-dev \
> > > 	sudo
> > > 
> > > # Create our user/group
> > > RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot
> > > RUN adduser -D uboot
> > > RUN addgroup uboot wheel
> > > USERuboot:uboot
> > > RUN bash
> > > WORKDIR /home/uboot
> > > RUN git clonehttps://source.denx.de/u-boot/u-boot.git
> > > WORKDIR /home/uboot/u-boot
> > > RUN make sandbox_defconfig NO_SDL=1
> > > RUN sed -i 's/CONFIG_ETH_SANDBOX_RAW=y/# CONFIG_ETH_SANDBOX_RAW is not set/g' .config
> > > RUN sed -i 's/CONFIG_VIDEO_SANDBOX_SDL=y/# CONFIG_VIDEO_SANDBOX_SDL is not set/g' .config
> > > # RUN make -j$(nproc) NO_SDL=1
> 
> Did you uncomment this line? I somehow forgot to remove '# '.

Ah, I didn't noticed this in previous run.

Removing comment and run again I got same error as you.

-- 
Best regards

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-01-16 23:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-10 23:22 [BUG] sandbox: NO_SDL=1 gcc: error: arch/sandbox/cpu/sdl.o: No such file or directory Heinrich Schuchardt
2022-01-13 13:41 ` Simon Glass
2022-01-13 18:07   ` Heinrich Schuchardt
2022-01-13 18:09     ` Simon Glass
2022-01-15 18:47   ` Heinrich Schuchardt
2022-01-16 21:14     ` Milan P. Stanić
2022-01-16 22:41       ` Heinrich Schuchardt
2022-01-16 23:11         ` Milan P. Stanić

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox