Re: Ping on ticket 4728 + patch

2022-10-28 Thread Alan Cudmore
On Fri, Oct 28, 2022 at 8:07 AM Sebastian Huber
 wrote:
>
> On 22/10/2022 17:36, Alan Cudmore wrote:
> > On Thu, Oct 20, 2022 at 11:23 PM Alan Cudmore  
> > wrote:
> >> On Thu, Oct 20, 2022 at 2:13 AM Sebastian Huber
> >>   wrote:
> >>>
> >>>
> >>> On 20/10/2022 03:48, Alan Cudmore wrote:
> >>>> On Wed, Oct 19, 2022 at 12:24 AM Sebastian Huber
> >>>>   wrote:
> >>>>> On 18/10/2022 21:02, Alan Cudmore wrote:
> >>>>>> *From: *Sebastian Huber<mailto:sebastian.hu...@embedded-brains.de>
> >>>>>> *Sent: *Tuesday, October 18, 2022 11:15 AM
> >>>>>> *To: *Alan Cudmore<mailto:alan.cudm...@gmail.com>;j...@rtems.org
> >>>>>> <mailto:j...@rtems.org>
> >>>>>> *Cc: *rtems-de...@rtems.org<mailto:devel@rtems.org>
> >>>>>> *Subject: *Re: Ping on ticket 4728 + patch
> >>>>>>
> >>>>>> On 18/10/2022 16:36, Alan Cudmore wrote:
> >>>>>>
> >>>>>>> On Tue, Oct 18, 2022 at 9:55 AM Joel Sherrill   
> >>>>>> wrote:
> >>>>>>
> >>>>>>>>
> >>>>>>
> >>>>>>>>
> >>>>>>
> >>>>>>>> On Tue, Oct 18, 2022 at 8:44 AM Alan
> >>>>>> Cudmore   wrote:
> >>>>>>
> >>>>>>>>> The log does have the error, and I get it when building by hand 
> >>>>>> too:
> >>>>>>
> >>>>>>>>> start.o: in function `.L0 ':
> >>>>>>
> >>>>>>>>>
> >>>>>> /home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x5c):
> >>>>>>
> >>>>>>>>> relocation truncated to fit: R_RISCV_GPREL_I against symbol
> >>>>>>
> >>>>>>>>> `bsp_section_bss_size' defined in*ABS*  section in
> >>>>>>
> >>>>>>>>>
> >>>>>> /home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/testsuites/samples/minimum.exe
> >>>>>>
> >>>>>>>>> collect2: error: ld returned 1 exit status
> >>>>>>
> >>>>>>>>
> >>>>>>
> >>>>>>>>
> >>>>>>
> >>>>>>>> Hmmm.. that's weird. You should never get a truncation error 
> >>>>>> linking
> >>>>>> minimum.exe.
> >>>>>>
> >>>>>>>> It should always fit within the BSP's memory and not have any 
> >>>>>> issues
> >>>>>> with branches
> >>>>>>
> >>>>>>>> or calls needing fixup.
> >>>>>>
> >>>>>>>>
> >>>>>>
> >>>>>>>> Unless the wrong type of branch/jump/call instruction is used at
> >>>>>> start.S:86, I have
> >>>>>>
> >>>>>>>> no idea.If it's a form that assumes a short distance to the
> >>>>>> destination but is going
> >>>>>>
> >>>>>>>> to a symbol outside start.S and thus could be further.
> >>>>>>
> >>>>>>> Also, 6 of the samples such as hello.exe link without error.
> >>>>>>
> >>>>>>> The rv32imafdc BSP variant does not have CPU_CFLAGS.
> >>>>>>
> >>>>>>> rv32imafd links fine and has specific CPU_CFLAGS, rv32imafdc does 
> >>>>>> not
> >>>>>>
> >>>>>>> have the flags.
> >>>>>>
> >>>>>>> (I'll research the gcc defaults and architecture differences 
> >>>>>> next..)
> >>>>>>
> >>>>>>>
> >>>>>>
> >>>>>>> I get a similar error on the frdme310arty BSP but only on a 
> >>>>>> specific
> >>>>>>
> >>>>>>> POSIX testsuite executable:
> >>>>>>
> >>>>>>&g

Re: Ping on ticket 4728 + patch

2022-10-28 Thread Sebastian Huber

On 22/10/2022 17:36, Alan Cudmore wrote:

On Thu, Oct 20, 2022 at 11:23 PM Alan Cudmore  wrote:

On Thu, Oct 20, 2022 at 2:13 AM Sebastian Huber
  wrote:



On 20/10/2022 03:48, Alan Cudmore wrote:

On Wed, Oct 19, 2022 at 12:24 AM Sebastian Huber
  wrote:

On 18/10/2022 21:02, Alan Cudmore wrote:

*From: *Sebastian Huber<mailto:sebastian.hu...@embedded-brains.de>
*Sent: *Tuesday, October 18, 2022 11:15 AM
*To: *Alan Cudmore<mailto:alan.cudm...@gmail.com>;j...@rtems.org
<mailto:j...@rtems.org>
*Cc: *rtems-de...@rtems.org<mailto:devel@rtems.org>
*Subject: *Re: Ping on ticket 4728 + patch

On 18/10/2022 16:36, Alan Cudmore wrote:

   > On Tue, Oct 18, 2022 at 9:55 AM Joel Sherrill   wrote:

   >>

   >>

   >> On Tue, Oct 18, 2022 at 8:44 AM Alan
Cudmore   wrote:

   >>> The log does have the error, and I get it when building by hand too:

   >>> start.o: in function `.L0 ':

   >>>
/home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x5c):

   >>> relocation truncated to fit: R_RISCV_GPREL_I against symbol

   >>> `bsp_section_bss_size' defined in*ABS*  section in

   >>>
/home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/testsuites/samples/minimum.exe

   >>> collect2: error: ld returned 1 exit status

   >>

   >>

   >> Hmmm.. that's weird. You should never get a truncation error linking
minimum.exe.

   >> It should always fit within the BSP's memory and not have any issues
with branches

   >> or calls needing fixup.

   >>

   >> Unless the wrong type of branch/jump/call instruction is used at
start.S:86, I have

   >> no idea.If it's a form that assumes a short distance to the
destination but is going

   >> to a symbol outside start.S and thus could be further.

   > Also, 6 of the samples such as hello.exe link without error.

   > The rv32imafdc BSP variant does not have CPU_CFLAGS.

   > rv32imafd links fine and has specific CPU_CFLAGS, rv32imafdc does not

   > have the flags.

   > (I'll research the gcc defaults and architecture differences next..)

   >

   > I get a similar error on the frdme310arty BSP but only on a specific

   > POSIX testsuite executable:

   >

   > start.o: in function `.L0 ':

   >

   >
/home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x28):

   > relocation truncated to fit: R_RISCV_GPREL_I against symbol

   > `bsp_section_bss_size' defined in*ABS*  section in

   >
/home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/testsuites/validation/ts-validation-io-kernel.exe

   >

   > collect2: error: ld returned 1 exit status

My off hand guess is that this is a tool chain issue on certain host

systems. For example, I never got this error on our OpenSUSE machines.

I can set up a OpenSUSE virtual machine and try it. I noticed the RSB
documentation does not have a set of packages for OpenSUSE – I could
send a docs patch after a successful build. What release do you use? Do
you have a list of packages to install?

We use openSUSE Leap 15.3 and 15.4. To get the packages maybe try this:

zypper in -t pattern devel_C_C++ devel_python3

I was able to set up an openSUSE Leap 15.4 (64 bit) VM and the above
packages worked for the RSB build.
Unfortunately, I still get the same link error for minimum.exe. Do you
think this is a linker error? Is it worth trying a Clang build?

I am not really sure what it its, since I never got this error on one of
our machines.

What happens if you compile the attached files with:

riscv-rtems6-gcc start.S abs.S -Wl,-gc-sections

This produces a.out without error. I can post the symbols or objdump
header info if that would help.
For the minimum.exe failure, I can add:
volatile int x = 0;
to the Init function and the error goes away.
I can also get the error to go away if I add RTEMS_POSIX_API=True to config.ini
I suspect that what I am doing is adding just enough code or data to
move the bss symbol close enough to the global pointer. I can try to
compare the map for minimum.exe for both the original and modified
version that does link. The original version will produce an
executable if I use -Wl,--noinhibit-exec

I have been looking for similar errors, and there are some interesting
bug reports and discussions for GNU ld on RISC-V such as this:
https://mail.gnu.org/archive/html/bug-binutils/2021-03/msg00164.html
But that discussion is over a year old.
I can eliminate both cases of the error that I see by adding
-Wl,--no-relax to the linker, which inhibits the linker based code
size optimization that is possibly causing this. The downside is that
the code size increases. minimum.exe code grows from 290431 to 292369
bytes for the rv32imafdc bsp variant.
Based on the binut

Re: Ping on ticket 4728 + patch

2022-10-22 Thread Alan Cudmore
On Thu, Oct 20, 2022 at 11:23 PM Alan Cudmore  wrote:
>
> On Thu, Oct 20, 2022 at 2:13 AM Sebastian Huber
>  wrote:
> >
> >
> >
> > On 20/10/2022 03:48, Alan Cudmore wrote:
> > > On Wed, Oct 19, 2022 at 12:24 AM Sebastian Huber
> > >  wrote:
> > >>
> > >> On 18/10/2022 21:02, Alan Cudmore wrote:
> > >>> *From: *Sebastian Huber <mailto:sebastian.hu...@embedded-brains.de>
> > >>> *Sent: *Tuesday, October 18, 2022 11:15 AM
> > >>> *To: *Alan Cudmore <mailto:alan.cudm...@gmail.com>; j...@rtems.org
> > >>> <mailto:j...@rtems.org>
> > >>> *Cc: *rtems-de...@rtems.org <mailto:devel@rtems.org>
> > >>> *Subject: *Re: Ping on ticket 4728 + patch
> > >>>
> > >>> On 18/10/2022 16:36, Alan Cudmore wrote:
> > >>>
> > >>>   > On Tue, Oct 18, 2022 at 9:55 AM Joel Sherrill  
> > >>> wrote:
> > >>>
> > >>>   >>
> > >>>
> > >>>   >>
> > >>>
> > >>>   >> On Tue, Oct 18, 2022 at 8:44 AM Alan
> > >>> Cudmore  wrote:
> > >>>
> > >>>   >>> The log does have the error, and I get it when building by hand 
> > >>> too:
> > >>>
> > >>>   >>> start.o: in function `.L0 ':
> > >>>
> > >>>   >>>
> > >>> /home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x5c):
> > >>>
> > >>>   >>> relocation truncated to fit: R_RISCV_GPREL_I against symbol
> > >>>
> > >>>   >>> `bsp_section_bss_size' defined in*ABS*  section in
> > >>>
> > >>>   >>>
> > >>> /home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/testsuites/samples/minimum.exe
> > >>>
> > >>>   >>> collect2: error: ld returned 1 exit status
> > >>>
> > >>>   >>
> > >>>
> > >>>   >>
> > >>>
> > >>>   >> Hmmm.. that's weird. You should never get a truncation error 
> > >>> linking
> > >>> minimum.exe.
> > >>>
> > >>>   >> It should always fit within the BSP's memory and not have any 
> > >>> issues
> > >>> with branches
> > >>>
> > >>>   >> or calls needing fixup.
> > >>>
> > >>>   >>
> > >>>
> > >>>   >> Unless the wrong type of branch/jump/call instruction is used at
> > >>> start.S:86, I have
> > >>>
> > >>>   >> no idea.If it's a form that assumes a short distance to the
> > >>> destination but is going
> > >>>
> > >>>   >> to a symbol outside start.S and thus could be further.
> > >>>
> > >>>   > Also, 6 of the samples such as hello.exe link without error.
> > >>>
> > >>>   > The rv32imafdc BSP variant does not have CPU_CFLAGS.
> > >>>
> > >>>   > rv32imafd links fine and has specific CPU_CFLAGS, rv32imafdc does 
> > >>> not
> > >>>
> > >>>   > have the flags.
> > >>>
> > >>>   > (I'll research the gcc defaults and architecture differences next..)
> > >>>
> > >>>   >
> > >>>
> > >>>   > I get a similar error on the frdme310arty BSP but only on a specific
> > >>>
> > >>>   > POSIX testsuite executable:
> > >>>
> > >>>   >
> > >>>
> > >>>   > start.o: in function `.L0 ':
> > >>>
> > >>>   >
> > >>>
> > >>>   >
> > >>> /home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x28):
> > >>>
> > >>>   > relocation truncated to fit: R_RISCV_GPREL_I against symbol
> > >>>
> > >>>   > `bsp_section_bss_size' defined in*ABS*  section in
> > >>>
> > >>>   >
> > >>> /home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/testsuites/validation/ts-validation-io-kernel.exe
> > >>>
> > >>>   

Re: Ping on ticket 4728 + patch

2022-10-20 Thread Alan Cudmore
On Thu, Oct 20, 2022 at 2:13 AM Sebastian Huber
 wrote:
>
>
>
> On 20/10/2022 03:48, Alan Cudmore wrote:
> > On Wed, Oct 19, 2022 at 12:24 AM Sebastian Huber
> >  wrote:
> >>
> >> On 18/10/2022 21:02, Alan Cudmore wrote:
> >>> *From: *Sebastian Huber <mailto:sebastian.hu...@embedded-brains.de>
> >>> *Sent: *Tuesday, October 18, 2022 11:15 AM
> >>> *To: *Alan Cudmore <mailto:alan.cudm...@gmail.com>; j...@rtems.org
> >>> <mailto:j...@rtems.org>
> >>> *Cc: *rtems-de...@rtems.org <mailto:devel@rtems.org>
> >>> *Subject: *Re: Ping on ticket 4728 + patch
> >>>
> >>> On 18/10/2022 16:36, Alan Cudmore wrote:
> >>>
> >>>   > On Tue, Oct 18, 2022 at 9:55 AM Joel Sherrill  wrote:
> >>>
> >>>   >>
> >>>
> >>>   >>
> >>>
> >>>   >> On Tue, Oct 18, 2022 at 8:44 AM Alan
> >>> Cudmore  wrote:
> >>>
> >>>   >>> The log does have the error, and I get it when building by hand too:
> >>>
> >>>   >>> start.o: in function `.L0 ':
> >>>
> >>>   >>>
> >>> /home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x5c):
> >>>
> >>>   >>> relocation truncated to fit: R_RISCV_GPREL_I against symbol
> >>>
> >>>   >>> `bsp_section_bss_size' defined in*ABS*  section in
> >>>
> >>>   >>>
> >>> /home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/testsuites/samples/minimum.exe
> >>>
> >>>   >>> collect2: error: ld returned 1 exit status
> >>>
> >>>   >>
> >>>
> >>>   >>
> >>>
> >>>   >> Hmmm.. that's weird. You should never get a truncation error linking
> >>> minimum.exe.
> >>>
> >>>   >> It should always fit within the BSP's memory and not have any issues
> >>> with branches
> >>>
> >>>   >> or calls needing fixup.
> >>>
> >>>   >>
> >>>
> >>>   >> Unless the wrong type of branch/jump/call instruction is used at
> >>> start.S:86, I have
> >>>
> >>>   >> no idea.If it's a form that assumes a short distance to the
> >>> destination but is going
> >>>
> >>>   >> to a symbol outside start.S and thus could be further.
> >>>
> >>>   > Also, 6 of the samples such as hello.exe link without error.
> >>>
> >>>   > The rv32imafdc BSP variant does not have CPU_CFLAGS.
> >>>
> >>>   > rv32imafd links fine and has specific CPU_CFLAGS, rv32imafdc does not
> >>>
> >>>   > have the flags.
> >>>
> >>>   > (I'll research the gcc defaults and architecture differences next..)
> >>>
> >>>   >
> >>>
> >>>   > I get a similar error on the frdme310arty BSP but only on a specific
> >>>
> >>>   > POSIX testsuite executable:
> >>>
> >>>   >
> >>>
> >>>   > start.o: in function `.L0 ':
> >>>
> >>>   >
> >>>
> >>>   >
> >>> /home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x28):
> >>>
> >>>   > relocation truncated to fit: R_RISCV_GPREL_I against symbol
> >>>
> >>>   > `bsp_section_bss_size' defined in*ABS*  section in
> >>>
> >>>   >
> >>> /home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/testsuites/validation/ts-validation-io-kernel.exe
> >>>
> >>>   >
> >>>
> >>>   > collect2: error: ld returned 1 exit status
> >>>
> >>> My off hand guess is that this is a tool chain issue on certain host
> >>>
> >>> systems. For example, I never got this error on our OpenSUSE machines.
> >>>
> >>> I can set up a OpenSUSE virtual machine and try it. I noticed the RSB
> >>> documentation does not have a set of packages for OpenSUSE – I could
> >>> send a docs patch after a successful build. What release do you use? Do
> >>> you have a list of packages to install?
> >&

Re: Ping on ticket 4728 + patch

2022-10-20 Thread Sebastian Huber



On 20/10/2022 03:48, Alan Cudmore wrote:

On Wed, Oct 19, 2022 at 12:24 AM Sebastian Huber
 wrote:


On 18/10/2022 21:02, Alan Cudmore wrote:

*From: *Sebastian Huber <mailto:sebastian.hu...@embedded-brains.de>
*Sent: *Tuesday, October 18, 2022 11:15 AM
*To: *Alan Cudmore <mailto:alan.cudm...@gmail.com>; j...@rtems.org
<mailto:j...@rtems.org>
*Cc: *rtems-de...@rtems.org <mailto:devel@rtems.org>
*Subject: *Re: Ping on ticket 4728 + patch

On 18/10/2022 16:36, Alan Cudmore wrote:

  > On Tue, Oct 18, 2022 at 9:55 AM Joel Sherrill  wrote:

  >>

  >>

  >> On Tue, Oct 18, 2022 at 8:44 AM Alan
Cudmore  wrote:

  >>> The log does have the error, and I get it when building by hand too:

  >>> start.o: in function `.L0 ':

  >>>
/home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x5c):

  >>> relocation truncated to fit: R_RISCV_GPREL_I against symbol

  >>> `bsp_section_bss_size' defined in*ABS*  section in

  >>>
/home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/testsuites/samples/minimum.exe

  >>> collect2: error: ld returned 1 exit status

  >>

  >>

  >> Hmmm.. that's weird. You should never get a truncation error linking
minimum.exe.

  >> It should always fit within the BSP's memory and not have any issues
with branches

  >> or calls needing fixup.

  >>

  >> Unless the wrong type of branch/jump/call instruction is used at
start.S:86, I have

  >> no idea.If it's a form that assumes a short distance to the
destination but is going

  >> to a symbol outside start.S and thus could be further.

  > Also, 6 of the samples such as hello.exe link without error.

  > The rv32imafdc BSP variant does not have CPU_CFLAGS.

  > rv32imafd links fine and has specific CPU_CFLAGS, rv32imafdc does not

  > have the flags.

  > (I'll research the gcc defaults and architecture differences next..)

  >

  > I get a similar error on the frdme310arty BSP but only on a specific

  > POSIX testsuite executable:

  >

  > start.o: in function `.L0 ':

  >

  >
/home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x28):

  > relocation truncated to fit: R_RISCV_GPREL_I against symbol

  > `bsp_section_bss_size' defined in*ABS*  section in

  >
/home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/testsuites/validation/ts-validation-io-kernel.exe

  >

  > collect2: error: ld returned 1 exit status

My off hand guess is that this is a tool chain issue on certain host

systems. For example, I never got this error on our OpenSUSE machines.

I can set up a OpenSUSE virtual machine and try it. I noticed the RSB
documentation does not have a set of packages for OpenSUSE – I could
send a docs patch after a successful build. What release do you use? Do
you have a list of packages to install?


We use openSUSE Leap 15.3 and 15.4. To get the packages maybe try this:

zypper in -t pattern devel_C_C++ devel_python3


I was able to set up an openSUSE Leap 15.4 (64 bit) VM and the above
packages worked for the RSB build.
Unfortunately, I still get the same link error for minimum.exe. Do you
think this is a linker error? Is it worth trying a Clang build?


I am not really sure what it its, since I never got this error on one of 
our machines.


What happens if you compile the attached files with:

riscv-rtems6-gcc start.S abs.S -Wl,-gc-sections

--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/.globl a
.globl b
.globl c
.globl d
.set a, 0x0001
.set b, 0x4001
.set c, 0x8001
.set d, 0xf001
.globl _start
_start:
la t0, a
la t0, b
la t0, c
la t0, d
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Ping on ticket 4728 + patch

2022-10-19 Thread Alan Cudmore
On Wed, Oct 19, 2022 at 12:24 AM Sebastian Huber
 wrote:
>
> On 18/10/2022 21:02, Alan Cudmore wrote:
> > *From: *Sebastian Huber <mailto:sebastian.hu...@embedded-brains.de>
> > *Sent: *Tuesday, October 18, 2022 11:15 AM
> > *To: *Alan Cudmore <mailto:alan.cudm...@gmail.com>; j...@rtems.org
> > <mailto:j...@rtems.org>
> > *Cc: *rtems-de...@rtems.org <mailto:devel@rtems.org>
> > *Subject: *Re: Ping on ticket 4728 + patch
> >
> > On 18/10/2022 16:36, Alan Cudmore wrote:
> >
> >  > On Tue, Oct 18, 2022 at 9:55 AM Joel Sherrill  wrote:
> >
> >  >>
> >
> >  >>
> >
> >  >> On Tue, Oct 18, 2022 at 8:44 AM Alan
> > Cudmore  wrote:
> >
> >  >>> The log does have the error, and I get it when building by hand too:
> >
> >  >>> start.o: in function `.L0 ':
> >
> >  >>>
> > /home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x5c):
> >
> >  >>> relocation truncated to fit: R_RISCV_GPREL_I against symbol
> >
> >  >>> `bsp_section_bss_size' defined in*ABS*  section in
> >
> >  >>>
> > /home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/testsuites/samples/minimum.exe
> >
> >  >>> collect2: error: ld returned 1 exit status
> >
> >  >>
> >
> >  >>
> >
> >  >> Hmmm.. that's weird. You should never get a truncation error linking
> > minimum.exe.
> >
> >  >> It should always fit within the BSP's memory and not have any issues
> > with branches
> >
> >  >> or calls needing fixup.
> >
> >  >>
> >
> >  >> Unless the wrong type of branch/jump/call instruction is used at
> > start.S:86, I have
> >
> >  >> no idea.If it's a form that assumes a short distance to the
> > destination but is going
> >
> >  >> to a symbol outside start.S and thus could be further.
> >
> >  > Also, 6 of the samples such as hello.exe link without error.
> >
> >  > The rv32imafdc BSP variant does not have CPU_CFLAGS.
> >
> >  > rv32imafd links fine and has specific CPU_CFLAGS, rv32imafdc does not
> >
> >  > have the flags.
> >
> >  > (I'll research the gcc defaults and architecture differences next..)
> >
> >  >
> >
> >  > I get a similar error on the frdme310arty BSP but only on a specific
> >
> >  > POSIX testsuite executable:
> >
> >  >
> >
> >  > start.o: in function `.L0 ':
> >
> >  >
> >
> >  >
> > /home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x28):
> >
> >  > relocation truncated to fit: R_RISCV_GPREL_I against symbol
> >
> >  > `bsp_section_bss_size' defined in*ABS*  section in
> >
> >  >
> > /home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/testsuites/validation/ts-validation-io-kernel.exe
> >
> >  >
> >
> >  > collect2: error: ld returned 1 exit status
> >
> > My off hand guess is that this is a tool chain issue on certain host
> >
> > systems. For example, I never got this error on our OpenSUSE machines.
> >
> > I can set up a OpenSUSE virtual machine and try it. I noticed the RSB
> > documentation does not have a set of packages for OpenSUSE – I could
> > send a docs patch after a successful build. What release do you use? Do
> > you have a list of packages to install?
>
> We use openSUSE Leap 15.3 and 15.4. To get the packages maybe try this:
>
> zypper in -t pattern devel_C_C++ devel_python3

I was able to set up an openSUSE Leap 15.4 (64 bit) VM and the above
packages worked for the RSB build.
Unfortunately, I still get the same link error for minimum.exe. Do you
think this is a linker error? Is it worth trying a Clang build?

>
> --
> embedded brains GmbH
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.hu...@embedded-brains.de
> phone: +49-89-18 94 741 - 16
> fax:   +49-89-18 94 741 - 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Ping on ticket 4728 + patch

2022-10-18 Thread Sebastian Huber

On 18/10/2022 21:02, Alan Cudmore wrote:

*From: *Sebastian Huber <mailto:sebastian.hu...@embedded-brains.de>
*Sent: *Tuesday, October 18, 2022 11:15 AM
*To: *Alan Cudmore <mailto:alan.cudm...@gmail.com>; j...@rtems.org 
<mailto:j...@rtems.org>

*Cc: *rtems-de...@rtems.org <mailto:devel@rtems.org>
*Subject: *Re: Ping on ticket 4728 + patch

On 18/10/2022 16:36, Alan Cudmore wrote:

 > On Tue, Oct 18, 2022 at 9:55 AM Joel Sherrill  wrote:

 >>

 >>

 >> On Tue, Oct 18, 2022 at 8:44 AM Alan 
Cudmore  wrote:


 >>> The log does have the error, and I get it when building by hand too:

 >>> start.o: in function `.L0 ':

 >>> 
/home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x5c):


 >>> relocation truncated to fit: R_RISCV_GPREL_I against symbol

 >>> `bsp_section_bss_size' defined in*ABS*  section in

 >>> 
/home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/testsuites/samples/minimum.exe


 >>> collect2: error: ld returned 1 exit status

 >>

 >>

 >> Hmmm.. that's weird. You should never get a truncation error linking 
minimum.exe.


 >> It should always fit within the BSP's memory and not have any issues 
with branches


 >> or calls needing fixup.

 >>

 >> Unless the wrong type of branch/jump/call instruction is used at 
start.S:86, I have


 >> no idea.If it's a form that assumes a short distance to the 
destination but is going


 >> to a symbol outside start.S and thus could be further.

 > Also, 6 of the samples such as hello.exe link without error.

 > The rv32imafdc BSP variant does not have CPU_CFLAGS.

 > rv32imafd links fine and has specific CPU_CFLAGS, rv32imafdc does not

 > have the flags.

 > (I'll research the gcc defaults and architecture differences next..)

 >

 > I get a similar error on the frdme310arty BSP but only on a specific

 > POSIX testsuite executable:

 >

 > start.o: in function `.L0 ':

 >

 > 
/home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x28):


 > relocation truncated to fit: R_RISCV_GPREL_I against symbol

 > `bsp_section_bss_size' defined in*ABS*  section in

 > 
/home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/testsuites/validation/ts-validation-io-kernel.exe


 >

 > collect2: error: ld returned 1 exit status

My off hand guess is that this is a tool chain issue on certain host

systems. For example, I never got this error on our OpenSUSE machines.

I can set up a OpenSUSE virtual machine and try it. I noticed the RSB 
documentation does not have a set of packages for OpenSUSE – I could 
send a docs patch after a successful build. What release do you use? Do 
you have a list of packages to install?


We use openSUSE Leap 15.3 and 15.4. To get the packages maybe try this:

zypper in -t pattern devel_C_C++ devel_python3

--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

RE: Ping on ticket 4728 + patch

2022-10-18 Thread Alan Cudmore
  From: Sebastian HuberSent: Tuesday, October 18, 2022 11:15 AMTo: Alan Cudmore; j...@rtems.orgCc: rtems-de...@rtems.orgSubject: Re: Ping on ticket 4728 + patch On 18/10/2022 16:36, Alan Cudmore wrote:> On Tue, Oct 18, 2022 at 9:55 AM Joel Sherrill  wrote:>> >> >> On Tue, Oct 18, 2022 at 8:44 AM Alan Cudmore  wrote:>>> The log does have the error, and I get it when building by hand too:>>> start.o: in function `.L0 ':>>> /home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x5c):>>> relocation truncated to fit: R_RISCV_GPREL_I against symbol>>> `bsp_section_bss_size' defined in*ABS*  section in>>> /home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/testsuites/samples/minimum.exe>>> collect2: error: ld returned 1 exit status>> >> >> Hmmm.. that's weird. You should never get a truncation error linking minimum.exe.>> It should always fit within the BSP's memory and not have any issues with branches>> or calls needing fixup.>> >> Unless the wrong type of branch/jump/call instruction is used at start.S:86, I have>> no idea.If it's a form that assumes a short distance to the destination but is going>> to a symbol outside start.S and thus could be further.> Also, 6 of the samples such as hello.exe link without error.> The rv32imafdc BSP variant does not have CPU_CFLAGS.> rv32imafd links fine and has specific CPU_CFLAGS, rv32imafdc does not> have the flags.> (I'll research the gcc defaults and architecture differences next..)> > I get a similar error on the frdme310arty BSP but only on a specific> POSIX testsuite executable:> > start.o: in function `.L0 ':> > /home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x28):> relocation truncated to fit: R_RISCV_GPREL_I against symbol> `bsp_section_bss_size' defined in*ABS*  section in> /home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/testsuites/validation/ts-validation-io-kernel.exe> > collect2: error: ld returned 1 exit status My off hand guess is that this is a tool chain issue on certain host systems. For example, I never got this error on our OpenSUSE machines. I can set up a OpenSUSE virtual machine and try it. I noticed the RSB documentation does not have a set of packages for OpenSUSE – I could send a docs patch after a successful build. What release do you use? Do you have a list of packages to install? Alan  -- embedded brains GmbHHerr Sebastian HUBERDornierstr. 482178 PuchheimGermanyemail: sebastian.hu...@embedded-brains.dephone: +49-89-18 94 741 - 16fax:   +49-89-18 94 741 - 08 Registergericht: Amtsgericht MünchenRegisternummer: HRB 157899Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas DörflerUnsere Datenschutzerklärung finden Sie hier:https://embedded-brains.de/datenschutzerklaerung/ 
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Ping on ticket 4728 + patch

2022-10-18 Thread Sebastian Huber

On 18/10/2022 16:36, Alan Cudmore wrote:

On Tue, Oct 18, 2022 at 9:55 AM Joel Sherrill  wrote:



On Tue, Oct 18, 2022 at 8:44 AM Alan Cudmore  wrote:

The log does have the error, and I get it when building by hand too:
start.o: in function `.L0 ':
/home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x5c):
relocation truncated to fit: R_RISCV_GPREL_I against symbol
`bsp_section_bss_size' defined in*ABS*  section in
/home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/testsuites/samples/minimum.exe
collect2: error: ld returned 1 exit status



Hmmm.. that's weird. You should never get a truncation error linking 
minimum.exe.
It should always fit within the BSP's memory and not have any issues with 
branches
or calls needing fixup.

Unless the wrong type of branch/jump/call instruction is used at start.S:86, I 
have
no idea.If it's a form that assumes a short distance to the destination but is 
going
to a symbol outside start.S and thus could be further.

Also, 6 of the samples such as hello.exe link without error.
The rv32imafdc BSP variant does not have CPU_CFLAGS.
rv32imafd links fine and has specific CPU_CFLAGS, rv32imafdc does not
have the flags.
(I'll research the gcc defaults and architecture differences next..)

I get a similar error on the frdme310arty BSP but only on a specific
POSIX testsuite executable:

start.o: in function `.L0 ':

/home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x28):
relocation truncated to fit: R_RISCV_GPREL_I against symbol
`bsp_section_bss_size' defined in*ABS*  section in
/home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/testsuites/validation/ts-validation-io-kernel.exe

collect2: error: ld returned 1 exit status


My off hand guess is that this is a tool chain issue on certain host 
systems. For example, I never got this error on our OpenSUSE machines.


--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Ping on ticket 4728 + patch

2022-10-18 Thread Alan Cudmore
On Tue, Oct 18, 2022 at 9:55 AM Joel Sherrill  wrote:
>
>
>
> On Tue, Oct 18, 2022 at 8:44 AM Alan Cudmore  wrote:
>>
>> The log does have the error, and I get it when building by hand too:
>> start.o: in function `.L0 ':
>> /home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x5c):
>> relocation truncated to fit: R_RISCV_GPREL_I against symbol
>> `bsp_section_bss_size' defined in *ABS* section in
>> /home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/testsuites/samples/minimum.exe
>> collect2: error: ld returned 1 exit status
>
>
>
> Hmmm.. that's weird. You should never get a truncation error linking 
> minimum.exe.
> It should always fit within the BSP's memory and not have any issues with 
> branches
> or calls needing fixup.
>
> Unless the wrong type of branch/jump/call instruction is used at start.S:86, 
> I have
> no idea.If it's a form that assumes a short distance to the destination but 
> is going
> to a symbol outside start.S and thus could be further.

Also, 6 of the samples such as hello.exe link without error.
The rv32imafdc BSP variant does not have CPU_CFLAGS.
rv32imafd links fine and has specific CPU_CFLAGS, rv32imafdc does not
have the flags.
(I'll research the gcc defaults and architecture differences next..)

I get a similar error on the frdme310arty BSP but only on a specific
POSIX testsuite executable:

start.o: in function `.L0 ':

/home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x28):
relocation truncated to fit: R_RISCV_GPREL_I against symbol
`bsp_section_bss_size' defined in *ABS* section in
/home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/testsuites/validation/ts-validation-io-kernel.exe

collect2: error: ld returned 1 exit status



>
> --joel
>
>>
>>
>> On Mon, Oct 17, 2022 at 10:43 PM Chris Johns  wrote:
>> >
>> > On 18/10/2022 1:13 pm, Joel Sherrill wrote:
>> > > On Sun, Oct 16, 2022 at 9:32 AM Alan Cudmore > > > > wrote:
>> > >
>> > > On Fri, Oct 14, 2022 at 9:19 AM Joel Sherrill > > > > wrote:
>> > > >
>> > > > Pushed. Thanks for pinging. It does help.
>> > > >
>> > > > Since you are looking at the riscv BSPs, could you look at the four
>> > > > BSP build failures reported here:
>> > > >
>> > > > https://lists.rtems.org/pipermail/build/2022-September/036496.html
>> > > 
>> > > >
>> > > > I think they are all variants so one fix (maybe repeated) should 
>> > > do it.
>> > > > The reported message isn't much help:
>> > > >
>> > > >1 smp riscv/rv32iac build:
>> > > >   configure: /home/tester/rtems-cron-6/rtems/waf configure\
>> > > >   --prefix=/home/tester/rtems-cron-6/tools/6/bsps 
>> > > --top=/home/tester\
>> > > >   /rtems-cron-6/rtems 
>> > > --rtems-config=config-riscv-rv32iac-smp.ini
>> > > >  error: ld/collect2:0 error: no error message found!
>> > > >
>> > >
>> > > I ran the bsp builder on the riscv BSPs with an updated toolchain and
>> > > latest rtems master. I was able to reproduce only one of the failures
>> > > with the rv32imafdc SMP configuration:
>> > > Failures:
>> > >1 smp riscv/rv32imafdc build:
>> > >   configure: /home/alan/rtems/test-build/rtems/waf configure\
>> > >   --prefix=/home/alan/rtems/test-build/bsps\
>> > >   --top=/home/alan/rtems/test-build/rtems 
>> > > --rtems-config=config-riscv-\
>> > >   rv32imafdc-smp.ini
>> > >  error: ld/collect2:0 error: no error message found!
>> > >
>> > > Average BSP Build Time: 0:00:26.253927
>> > > Total Time 1:04:45.581263
>> > > Passes: 147   Failures: 1
>> > >
>> > > This is the detail from the log:
>> > > [1424/1437] Compiling ../../../rtems/testsuites/samples/nsecs/init.c
>> > > start.o: in function `.L0 ':
>> > > 
>> > > /home/alan/rtems/test-build/rtems/build/riscv/rv32imafdc/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x5
>> > > c): relocation truncated to fit: R_RISCV_GPREL_I against symbol
>> > > `bsp_section_bss_size' defined in *ABS* section in /home/
>> > > 
>> > > alan/rtems/test-build/rtems/build/riscv/rv32imafdc/testsuites/samples/minimum.exe
>> > > collect2: error: ld returned 1 exit status
>> > >
>> > > This seems to be similar to the error I get when I try to build the
>> > > frdme310arty BSP with the testsuite and posix enabled:
>> > > [4152/4326] Compiling testsuites/validation/tr-sem-surrender.c
>> > > start.o: in function `.L0 ':
>> > > 
>> > > /home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_te
>> > > xt+0x28): relocation truncated to fit: R_RISCV_GPREL_I against symbol
>> > > 

Re: Ping on ticket 4728 + patch

2022-10-18 Thread Joel Sherrill
On Tue, Oct 18, 2022 at 8:44 AM Alan Cudmore  wrote:

> The log does have the error, and I get it when building by hand too:
> start.o: in function `.L0 ':
>
> /home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x5c):
> relocation truncated to fit: R_RISCV_GPREL_I against symbol
> `bsp_section_bss_size' defined in *ABS* section in
>
> /home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/testsuites/samples/minimum.exe
> collect2: error: ld returned 1 exit status
>


Hmmm.. that's weird. You should never get a truncation error linking
minimum.exe.
It should always fit within the BSP's memory and not have any issues with
branches
or calls needing fixup.

Unless the wrong type of branch/jump/call instruction is used at
start.S:86, I have
no idea.If it's a form that assumes a short distance to the destination but
is going
to a symbol outside start.S and thus could be further.

--joel


>
> On Mon, Oct 17, 2022 at 10:43 PM Chris Johns  wrote:
> >
> > On 18/10/2022 1:13 pm, Joel Sherrill wrote:
> > > On Sun, Oct 16, 2022 at 9:32 AM Alan Cudmore  > > > wrote:
> > >
> > > On Fri, Oct 14, 2022 at 9:19 AM Joel Sherrill  > > > wrote:
> > > >
> > > > Pushed. Thanks for pinging. It does help.
> > > >
> > > > Since you are looking at the riscv BSPs, could you look at the
> four
> > > > BSP build failures reported here:
> > > >
> > > >
> https://lists.rtems.org/pipermail/build/2022-September/036496.html
> > > <
> https://lists.rtems.org/pipermail/build/2022-September/036496.html>
> > > >
> > > > I think they are all variants so one fix (maybe repeated) should
> do it.
> > > > The reported message isn't much help:
> > > >
> > > >1 smp riscv/rv32iac build:
> > > >   configure: /home/tester/rtems-cron-6/rtems/waf configure\
> > > >   --prefix=/home/tester/rtems-cron-6/tools/6/bsps
> --top=/home/tester\
> > > >   /rtems-cron-6/rtems
> --rtems-config=config-riscv-rv32iac-smp.ini
> > > >  error: ld/collect2:0 error: no error message found!
> > > >
> > >
> > > I ran the bsp builder on the riscv BSPs with an updated toolchain
> and
> > > latest rtems master. I was able to reproduce only one of the
> failures
> > > with the rv32imafdc SMP configuration:
> > > Failures:
> > >1 smp riscv/rv32imafdc build:
> > >   configure: /home/alan/rtems/test-build/rtems/waf configure\
> > >   --prefix=/home/alan/rtems/test-build/bsps\
> > >   --top=/home/alan/rtems/test-build/rtems
> --rtems-config=config-riscv-\
> > >   rv32imafdc-smp.ini
> > >  error: ld/collect2:0 error: no error message found!
> > >
> > > Average BSP Build Time: 0:00:26.253927
> > > Total Time 1:04:45.581263
> > > Passes: 147   Failures: 1
> > >
> > > This is the detail from the log:
> > > [1424/1437] Compiling
> ../../../rtems/testsuites/samples/nsecs/init.c
> > > start.o: in function `.L0 ':
> > >
>  
> /home/alan/rtems/test-build/rtems/build/riscv/rv32imafdc/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x5
> > > c): relocation truncated to fit: R_RISCV_GPREL_I against symbol
> > > `bsp_section_bss_size' defined in *ABS* section in /home/
> > >
>  
> alan/rtems/test-build/rtems/build/riscv/rv32imafdc/testsuites/samples/minimum.exe
> > > collect2: error: ld returned 1 exit status
> > >
> > > This seems to be similar to the error I get when I try to build the
> > > frdme310arty BSP with the testsuite and posix enabled:
> > > [4152/4326] Compiling testsuites/validation/tr-sem-surrender.c
> > > start.o: in function `.L0 ':
> > >
>  
> /home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_te
> > > xt+0x28): relocation truncated to fit: R_RISCV_GPREL_I against
> symbol
> > > `bsp_section_bss_size' defined in *ABS* section in
> > >
>  
> /home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/testsuites/validation/ts-validation-io-kernel.exe
> > > collect2: error: ld returned 1 exit status
> > >
> > > I need to investigate this more.
> > >
> > >
> > > There are two issues.
> > >
> > > (1) The test in question does not fit on this target and needs to be
> disabled.
> > >
> > > (2) Somewhere there is parsing of this output which may be able to be
> more helpful.
> > >
> > > Chris... any pointers on (2)? Can the output of bsp builder be
> improved?
> >
> > 1) There should be a log of all the build details. Check in that for the
> error.
> >
> > 2) Can you build it by hand and see the error?
> >
> > Chris
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Ping on ticket 4728 + patch

2022-10-18 Thread Alan Cudmore
The log does have the error, and I get it when building by hand too:
start.o: in function `.L0 ':
/home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x5c):
relocation truncated to fit: R_RISCV_GPREL_I against symbol
`bsp_section_bss_size' defined in *ABS* section in
/home/alan/rtems/test-build/rtems-tmp/build/riscv/rv32imafdc/testsuites/samples/minimum.exe
collect2: error: ld returned 1 exit status

On Mon, Oct 17, 2022 at 10:43 PM Chris Johns  wrote:
>
> On 18/10/2022 1:13 pm, Joel Sherrill wrote:
> > On Sun, Oct 16, 2022 at 9:32 AM Alan Cudmore  > > wrote:
> >
> > On Fri, Oct 14, 2022 at 9:19 AM Joel Sherrill  > > wrote:
> > >
> > > Pushed. Thanks for pinging. It does help.
> > >
> > > Since you are looking at the riscv BSPs, could you look at the four
> > > BSP build failures reported here:
> > >
> > > https://lists.rtems.org/pipermail/build/2022-September/036496.html
> > 
> > >
> > > I think they are all variants so one fix (maybe repeated) should do 
> > it.
> > > The reported message isn't much help:
> > >
> > >1 smp riscv/rv32iac build:
> > >   configure: /home/tester/rtems-cron-6/rtems/waf configure\
> > >   --prefix=/home/tester/rtems-cron-6/tools/6/bsps 
> > --top=/home/tester\
> > >   /rtems-cron-6/rtems --rtems-config=config-riscv-rv32iac-smp.ini
> > >  error: ld/collect2:0 error: no error message found!
> > >
> >
> > I ran the bsp builder on the riscv BSPs with an updated toolchain and
> > latest rtems master. I was able to reproduce only one of the failures
> > with the rv32imafdc SMP configuration:
> > Failures:
> >1 smp riscv/rv32imafdc build:
> >   configure: /home/alan/rtems/test-build/rtems/waf configure\
> >   --prefix=/home/alan/rtems/test-build/bsps\
> >   --top=/home/alan/rtems/test-build/rtems 
> > --rtems-config=config-riscv-\
> >   rv32imafdc-smp.ini
> >  error: ld/collect2:0 error: no error message found!
> >
> > Average BSP Build Time: 0:00:26.253927
> > Total Time 1:04:45.581263
> > Passes: 147   Failures: 1
> >
> > This is the detail from the log:
> > [1424/1437] Compiling ../../../rtems/testsuites/samples/nsecs/init.c
> > start.o: in function `.L0 ':
> > 
> > /home/alan/rtems/test-build/rtems/build/riscv/rv32imafdc/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x5
> > c): relocation truncated to fit: R_RISCV_GPREL_I against symbol
> > `bsp_section_bss_size' defined in *ABS* section in /home/
> > 
> > alan/rtems/test-build/rtems/build/riscv/rv32imafdc/testsuites/samples/minimum.exe
> > collect2: error: ld returned 1 exit status
> >
> > This seems to be similar to the error I get when I try to build the
> > frdme310arty BSP with the testsuite and posix enabled:
> > [4152/4326] Compiling testsuites/validation/tr-sem-surrender.c
> > start.o: in function `.L0 ':
> > 
> > /home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_te
> > xt+0x28): relocation truncated to fit: R_RISCV_GPREL_I against symbol
> > `bsp_section_bss_size' defined in *ABS* section in
> > 
> > /home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/testsuites/validation/ts-validation-io-kernel.exe
> > collect2: error: ld returned 1 exit status
> >
> > I need to investigate this more.
> >
> >
> > There are two issues.
> >
> > (1) The test in question does not fit on this target and needs to be 
> > disabled.
> >
> > (2) Somewhere there is parsing of this output which may be able to be more 
> > helpful.
> >
> > Chris... any pointers on (2)? Can the output of bsp builder be improved?
>
> 1) There should be a log of all the build details. Check in that for the 
> error.
>
> 2) Can you build it by hand and see the error?
>
> Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: Ping on ticket 4728 + patch

2022-10-17 Thread Chris Johns
On 18/10/2022 1:13 pm, Joel Sherrill wrote:
> On Sun, Oct 16, 2022 at 9:32 AM Alan Cudmore  > wrote:
> 
> On Fri, Oct 14, 2022 at 9:19 AM Joel Sherrill  > wrote:
> >
> > Pushed. Thanks for pinging. It does help.
> >
> > Since you are looking at the riscv BSPs, could you look at the four
> > BSP build failures reported here:
> >
> > https://lists.rtems.org/pipermail/build/2022-September/036496.html
> 
> >
> > I think they are all variants so one fix (maybe repeated) should do it.
> > The reported message isn't much help:
> >
> >    1 smp riscv/rv32iac build:
> >       configure: /home/tester/rtems-cron-6/rtems/waf configure\
> >       --prefix=/home/tester/rtems-cron-6/tools/6/bsps 
> --top=/home/tester\
> >       /rtems-cron-6/rtems --rtems-config=config-riscv-rv32iac-smp.ini
> >      error: ld/collect2:0 error: no error message found!
> >
> 
> I ran the bsp builder on the riscv BSPs with an updated toolchain and
> latest rtems master. I was able to reproduce only one of the failures
> with the rv32imafdc SMP configuration:
> Failures:
>    1 smp riscv/rv32imafdc build:
>       configure: /home/alan/rtems/test-build/rtems/waf configure\
>       --prefix=/home/alan/rtems/test-build/bsps\
>       --top=/home/alan/rtems/test-build/rtems 
> --rtems-config=config-riscv-\
>       rv32imafdc-smp.ini
>      error: ld/collect2:0 error: no error message found!
> 
> Average BSP Build Time: 0:00:26.253927
> Total Time 1:04:45.581263
> Passes: 147   Failures: 1
> 
> This is the detail from the log:
> [1424/1437] Compiling ../../../rtems/testsuites/samples/nsecs/init.c
> start.o: in function `.L0 ':
> 
> /home/alan/rtems/test-build/rtems/build/riscv/rv32imafdc/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x5
> c): relocation truncated to fit: R_RISCV_GPREL_I against symbol
> `bsp_section_bss_size' defined in *ABS* section in /home/
> 
> alan/rtems/test-build/rtems/build/riscv/rv32imafdc/testsuites/samples/minimum.exe
> collect2: error: ld returned 1 exit status
> 
> This seems to be similar to the error I get when I try to build the
> frdme310arty BSP with the testsuite and posix enabled:
> [4152/4326] Compiling testsuites/validation/tr-sem-surrender.c
> start.o: in function `.L0 ':
> 
> /home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_te
> xt+0x28): relocation truncated to fit: R_RISCV_GPREL_I against symbol
> `bsp_section_bss_size' defined in *ABS* section in
> 
> /home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/testsuites/validation/ts-validation-io-kernel.exe
> collect2: error: ld returned 1 exit status
> 
> I need to investigate this more.
> 
> 
> There are two issues. 
> 
> (1) The test in question does not fit on this target and needs to be disabled.
> 
> (2) Somewhere there is parsing of this output which may be able to be more 
> helpful.
> 
> Chris... any pointers on (2)? Can the output of bsp builder be improved?

1) There should be a log of all the build details. Check in that for the error.

2) Can you build it by hand and see the error?

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Ping on ticket 4728 + patch

2022-10-17 Thread Joel Sherrill
On Sun, Oct 16, 2022 at 9:32 AM Alan Cudmore  wrote:

> On Fri, Oct 14, 2022 at 9:19 AM Joel Sherrill  wrote:
> >
> > Pushed. Thanks for pinging. It does help.
> >
> > Since you are looking at the riscv BSPs, could you look at the four
> > BSP build failures reported here:
> >
> > https://lists.rtems.org/pipermail/build/2022-September/036496.html
> >
> > I think they are all variants so one fix (maybe repeated) should do it.
> > The reported message isn't much help:
> >
> >1 smp riscv/rv32iac build:
> >   configure: /home/tester/rtems-cron-6/rtems/waf configure\
> >   --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
> >   /rtems-cron-6/rtems --rtems-config=config-riscv-rv32iac-smp.ini
> >  error: ld/collect2:0 error: no error message found!
> >
>
> I ran the bsp builder on the riscv BSPs with an updated toolchain and
> latest rtems master. I was able to reproduce only one of the failures
> with the rv32imafdc SMP configuration:
> Failures:
>1 smp riscv/rv32imafdc build:
>   configure: /home/alan/rtems/test-build/rtems/waf configure\
>   --prefix=/home/alan/rtems/test-build/bsps\
>   --top=/home/alan/rtems/test-build/rtems --rtems-config=config-riscv-\
>   rv32imafdc-smp.ini
>  error: ld/collect2:0 error: no error message found!
>
> Average BSP Build Time: 0:00:26.253927
> Total Time 1:04:45.581263
> Passes: 147   Failures: 1
>
> This is the detail from the log:
> [1424/1437] Compiling ../../../rtems/testsuites/samples/nsecs/init.c
> start.o: in function `.L0 ':
>
> /home/alan/rtems/test-build/rtems/build/riscv/rv32imafdc/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x5
> c): relocation truncated to fit: R_RISCV_GPREL_I against symbol
> `bsp_section_bss_size' defined in *ABS* section in /home/
>
> alan/rtems/test-build/rtems/build/riscv/rv32imafdc/testsuites/samples/minimum.exe
> collect2: error: ld returned 1 exit status
>
> This seems to be similar to the error I get when I try to build the
> frdme310arty BSP with the testsuite and posix enabled:
> [4152/4326] Compiling testsuites/validation/tr-sem-surrender.c
> start.o: in function `.L0 ':
>
> /home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_te
> xt+0x28): relocation truncated to fit: R_RISCV_GPREL_I against symbol
> `bsp_section_bss_size' defined in *ABS* section in
>
> /home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/testsuites/validation/ts-validation-io-kernel.exe
> collect2: error: ld returned 1 exit status
>
> I need to investigate this more.
>

There are two issues.

(1) The test in question does not fit on this target and needs to be
disabled.

(2) Somewhere there is parsing of this output which may be able to be more
helpful.

Chris... any pointers on (2)? Can the output of bsp builder be improved?

>
> > It might be nothing more than a test which doesn't fit in some section
> > but I have no idea beyond that they are all noted as SMP. Chris may be
> > helpful decoding the precise configuration.
> >
> > --joel
> >
> > On Thu, Oct 13, 2022 at 8:27 PM Alan Cudmore 
> wrote:
> >>
> >> Hi,
> >> Sorry, I did not set a message subject in my previous email.
> >>
> >> Ping on this patch. I built all of the riscv/riscv BSPs that use it.
> >> It works for the generic riscv/qemu BSP, the PolarFire BSP, and the
> >> RISC-V BSP I am working on where the macro failed.
> >> https://lists.rtems.org/pipermail/devel/2022-September/073390.html
> >>
> >> Thanks,
> >> Alan
> >> ___
> >> devel mailing list
> >> devel@rtems.org
> >> http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Ping on ticket 4728 + patch

2022-10-16 Thread Alan Cudmore
On Fri, Oct 14, 2022 at 9:19 AM Joel Sherrill  wrote:
>
> Pushed. Thanks for pinging. It does help.
>
> Since you are looking at the riscv BSPs, could you look at the four
> BSP build failures reported here:
>
> https://lists.rtems.org/pipermail/build/2022-September/036496.html
>
> I think they are all variants so one fix (maybe repeated) should do it.
> The reported message isn't much help:
>
>1 smp riscv/rv32iac build:
>   configure: /home/tester/rtems-cron-6/rtems/waf configure\
>   --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
>   /rtems-cron-6/rtems --rtems-config=config-riscv-rv32iac-smp.ini
>  error: ld/collect2:0 error: no error message found!
>

I ran the bsp builder on the riscv BSPs with an updated toolchain and
latest rtems master. I was able to reproduce only one of the failures
with the rv32imafdc SMP configuration:
Failures:
   1 smp riscv/rv32imafdc build:
  configure: /home/alan/rtems/test-build/rtems/waf configure\
  --prefix=/home/alan/rtems/test-build/bsps\
  --top=/home/alan/rtems/test-build/rtems --rtems-config=config-riscv-\
  rv32imafdc-smp.ini
 error: ld/collect2:0 error: no error message found!

Average BSP Build Time: 0:00:26.253927
Total Time 1:04:45.581263
Passes: 147   Failures: 1

This is the detail from the log:
[1424/1437] Compiling ../../../rtems/testsuites/samples/nsecs/init.c
start.o: in function `.L0 ':
/home/alan/rtems/test-build/rtems/build/riscv/rv32imafdc/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x5
c): relocation truncated to fit: R_RISCV_GPREL_I against symbol
`bsp_section_bss_size' defined in *ABS* section in /home/
alan/rtems/test-build/rtems/build/riscv/rv32imafdc/testsuites/samples/minimum.exe
collect2: error: ld returned 1 exit status

This seems to be similar to the error I get when I try to build the
frdme310arty BSP with the testsuite and posix enabled:
[4152/4326] Compiling testsuites/validation/tr-sem-surrender.c
start.o: in function `.L0 ':
/home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_te
xt+0x28): relocation truncated to fit: R_RISCV_GPREL_I against symbol
`bsp_section_bss_size' defined in *ABS* section in
/home/alan/rtems/test-build/rtems-tmp/build/riscv/frdme310arty/testsuites/validation/ts-validation-io-kernel.exe
collect2: error: ld returned 1 exit status

I need to investigate this more.

> It might be nothing more than a test which doesn't fit in some section
> but I have no idea beyond that they are all noted as SMP. Chris may be
> helpful decoding the precise configuration.
>
> --joel
>
> On Thu, Oct 13, 2022 at 8:27 PM Alan Cudmore  wrote:
>>
>> Hi,
>> Sorry, I did not set a message subject in my previous email.
>>
>> Ping on this patch. I built all of the riscv/riscv BSPs that use it.
>> It works for the generic riscv/qemu BSP, the PolarFire BSP, and the
>> RISC-V BSP I am working on where the macro failed.
>> https://lists.rtems.org/pipermail/devel/2022-September/073390.html
>>
>> Thanks,
>> Alan
>> ___
>> devel mailing list
>> devel@rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: Ping on ticket 4728 + patch

2022-10-14 Thread Alan Cudmore
I'll check it out - I will need to set up my host to duplicate the
same tester builds.
I also noticed a build failure in the frdme310arty BSP variant when
building all tests with POSIX enabled:

[4152/4326] Compiling testsuites/validation/tc-sem-flush.c
start.o: in function `.L0 ':
/home/alan/rtems/rtems-k210-port/rtems-clean/build/riscv/frdme310arty/../../../bsps/riscv/shared/start/start.S:86:(.bsp_start_text+0x28):
relocation truncated to fit: R_RISCV_GPREL_I against symbol
`bsp_section_bss_size' defined in *ABS* section in
/home/alan/rtems/rtems-k210-port/rtems-clean/build/riscv/frdme310arty/testsuites/validation/ts-validation-io-kernel.exe
collect2: error: ld returned 1 exit status

Waf: Leaving directory
`/home/alan/rtems/rtems-k210-port/rtems-clean/build/riscv/frdme310arty'
Build failed
 -> task in 'testsuites/validation/ts-validation-io-kernel.exe' failed
with exit status 1 (run with -v to display more information)

On Fri, Oct 14, 2022 at 9:19 AM Joel Sherrill  wrote:
>
> Pushed. Thanks for pinging. It does help.
>
> Since you are looking at the riscv BSPs, could you look at the four
> BSP build failures reported here:
>
> https://lists.rtems.org/pipermail/build/2022-September/036496.html
>
> I think they are all variants so one fix (maybe repeated) should do it.
> The reported message isn't much help:
>
>1 smp riscv/rv32iac build:
>   configure: /home/tester/rtems-cron-6/rtems/waf configure\
>   --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
>   /rtems-cron-6/rtems --rtems-config=config-riscv-rv32iac-smp.ini
>  error: ld/collect2:0 error: no error message found!
>
> It might be nothing more than a test which doesn't fit in some section
> but I have no idea beyond that they are all noted as SMP. Chris may be
> helpful decoding the precise configuration.
>
> --joel
>
> On Thu, Oct 13, 2022 at 8:27 PM Alan Cudmore  wrote:
>>
>> Hi,
>> Sorry, I did not set a message subject in my previous email.
>>
>> Ping on this patch. I built all of the riscv/riscv BSPs that use it.
>> It works for the generic riscv/qemu BSP, the PolarFire BSP, and the
>> RISC-V BSP I am working on where the macro failed.
>> https://lists.rtems.org/pipermail/devel/2022-September/073390.html
>>
>> Thanks,
>> Alan
>> ___
>> devel mailing list
>> devel@rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: Ping on ticket 4728 + patch

2022-10-14 Thread Joel Sherrill
Pushed. Thanks for pinging. It does help.

Since you are looking at the riscv BSPs, could you look at the four
BSP build failures reported here:

https://lists.rtems.org/pipermail/build/2022-September/036496.html

I think they are all variants so one fix (maybe repeated) should do it.
The reported message isn't much help:

   1 smp riscv/rv32iac build:
  configure: /home/tester/rtems-cron-6/rtems/waf configure\
  --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
  /rtems-cron-6/rtems --rtems-config=config-riscv-rv32iac-smp.ini
 error: ld/collect2:0 error: no error message found!

It might be nothing more than a test which doesn't fit in some section
but I have no idea beyond that they are all noted as SMP. Chris may be
helpful decoding the precise configuration.

--joel

On Thu, Oct 13, 2022 at 8:27 PM Alan Cudmore  wrote:

> Hi,
> Sorry, I did not set a message subject in my previous email.
>
> Ping on this patch. I built all of the riscv/riscv BSPs that use it.
> It works for the generic riscv/qemu BSP, the PolarFire BSP, and the
> RISC-V BSP I am working on where the macro failed.
> https://lists.rtems.org/pipermail/devel/2022-September/073390.html
>
> Thanks,
> Alan
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Ping on ticket 4728 + patch

2022-10-13 Thread Alan Cudmore
Hi,
Sorry, I did not set a message subject in my previous email.

Ping on this patch. I built all of the riscv/riscv BSPs that use it.
It works for the generic riscv/qemu BSP, the PolarFire BSP, and the
RISC-V BSP I am working on where the macro failed.
https://lists.rtems.org/pipermail/devel/2022-September/073390.html

Thanks,
Alan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel