public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* Build error for moxiebox architecture
@ 2023-08-13  0:27 Chris Packham
  2023-08-14 10:24 ` Torbjorn SVENSSON
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Packham @ 2023-08-13  0:27 UTC (permalink / raw)
  To: Newlib

Hi All,

I'm getting the next crosstool-ng release together and one build
failure we're having is for the moxiebox architecture:

moxie-unknown-moxiebox/lib/libc.a(libc_a-closer.o): in function `_close_r':
moxie-unknown-moxiebox/src/newlib/newlib/libc/reent/closer.c:47:
undefined reference to `_close'

and similar for _lseek, _read, _write and _sbrk

We're currently using the 4.3.0.20230120 snapshot which fails. The
older 4.2.0.20211231 succeeds (as an aside is there a convenient way
to map those snapshot versions to particular tags in the newlib-cygwin
git repo?).

Does that failure ring any bells for anyone?

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

* Re: Build error for moxiebox architecture
  2023-08-13  0:27 Build error for moxiebox architecture Chris Packham
@ 2023-08-14 10:24 ` Torbjorn SVENSSON
  2023-09-19  8:04   ` Chris Packham
  0 siblings, 1 reply; 4+ messages in thread
From: Torbjorn SVENSSON @ 2023-08-14 10:24 UTC (permalink / raw)
  To: newlib

Hello,

On 2023-08-13 02:27, Chris Packham wrote:
> Hi All,
> 
> I'm getting the next crosstool-ng release together and one build
> failure we're having is for the moxiebox architecture:
> 
> moxie-unknown-moxiebox/lib/libc.a(libc_a-closer.o): in function `_close_r':
> moxie-unknown-moxiebox/src/newlib/newlib/libc/reent/closer.c:47:
> undefined reference to `_close'
> 
> and similar for _lseek, _read, _write and _sbrk

As you do not include the link line, I'm assuming that you are not using 
anything out of the ordinary. In this case, maybe you should give 
--specs=nosys.specs a go and see if it helps.
Regardless if it helps or not, it will likely only provide you with 
stubs that you need to override in you application to get something working.

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

* Re: Build error for moxiebox architecture
  2023-08-14 10:24 ` Torbjorn SVENSSON
@ 2023-09-19  8:04   ` Chris Packham
  2023-09-20 18:24     ` Torbjorn SVENSSON
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Packham @ 2023-09-19  8:04 UTC (permalink / raw)
  To: Torbjorn SVENSSON; +Cc: newlib

On Mon, Aug 14, 2023 at 10:24 PM Torbjorn SVENSSON
<torbjorn.svensson@foss.st.com> wrote:
>
> Hello,
>
> On 2023-08-13 02:27, Chris Packham wrote:
> > Hi All,
> >
> > I'm getting the next crosstool-ng release together and one build
> > failure we're having is for the moxiebox architecture:
> >
> > moxie-unknown-moxiebox/lib/libc.a(libc_a-closer.o): in function `_close_r':
> > moxie-unknown-moxiebox/src/newlib/newlib/libc/reent/closer.c:47:
> > undefined reference to `_close'
> >
> > and similar for _lseek, _read, _write and _sbrk
>
> As you do not include the link line, I'm assuming that you are not using
> anything out of the ordinary. In this case, maybe you should give
> --specs=nosys.specs a go and see if it helps.
> Regardless if it helps or not, it will likely only provide you with
> stubs that you need to override in you application to get something working.

Yeah sorry. I'll get things in an issue for ct-ng so we have a proper
record to refer back to.

One thing I have found is that things work fine with 4.2.0.20211231
but fail with 4.3.0.20230120 (or the tip of main). I did see the
recent commit 55485616b ("Bring back libsim.a for riscv") and I note
the moxiebox definition of _close() is in libsim.a so this made me
wonder if whatever issue was affecting riscv was related to the moxie
failure. But I also note that there has been a bit of a change in some
Makefiles as per commit 66dfedc28 ("libgloss: merge bfin into
top-level Makefile").

So as a first step maybe I need to do a similar conversion. It looks
like those conversions involve some code changes and then the result
of running automake but I'm not sure what parts are manual and what
parts are from running automake. Any pointers on doing this for
another architecture.

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

* Re: Build error for moxiebox architecture
  2023-09-19  8:04   ` Chris Packham
@ 2023-09-20 18:24     ` Torbjorn SVENSSON
  0 siblings, 0 replies; 4+ messages in thread
From: Torbjorn SVENSSON @ 2023-09-20 18:24 UTC (permalink / raw)
  To: Chris Packham; +Cc: newlib



On 2023-09-19 10:04, Chris Packham wrote:
> On Mon, Aug 14, 2023 at 10:24 PM Torbjorn SVENSSON
> <torbjorn.svensson@foss.st.com> wrote:
>>
>> Hello,
>>
>> On 2023-08-13 02:27, Chris Packham wrote:
>>> Hi All,
>>>
>>> I'm getting the next crosstool-ng release together and one build
>>> failure we're having is for the moxiebox architecture:
>>>
>>> moxie-unknown-moxiebox/lib/libc.a(libc_a-closer.o): in function `_close_r':
>>> moxie-unknown-moxiebox/src/newlib/newlib/libc/reent/closer.c:47:
>>> undefined reference to `_close'
>>>
>>> and similar for _lseek, _read, _write and _sbrk
>>
>> As you do not include the link line, I'm assuming that you are not using
>> anything out of the ordinary. In this case, maybe you should give
>> --specs=nosys.specs a go and see if it helps.
>> Regardless if it helps or not, it will likely only provide you with
>> stubs that you need to override in you application to get something working.
> 
> Yeah sorry. I'll get things in an issue for ct-ng so we have a proper
> record to refer back to.
> 
> One thing I have found is that things work fine with 4.2.0.20211231
> but fail with 4.3.0.20230120 (or the tip of main). I did see the
> recent commit 55485616b ("Bring back libsim.a for riscv") and I note
> the moxiebox definition of _close() is in libsim.a so this made me
> wonder if whatever issue was affecting riscv was related to the moxie
> failure. But I also note that there has been a bit of a change in some
> Makefiles as per commit 66dfedc28 ("libgloss: merge bfin into
> top-level Makefile").

I think you should not link with libsim.a when you are not using a 
simulator.

> 
> So as a first step maybe I need to do a similar conversion. It looks
> like those conversions involve some code changes and then the result
> of running automake but I'm not sure what parts are manual and what
> parts are from running automake. Any pointers on doing this for
> another architecture.

Sorry, but I can't help you on that.

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

end of thread, other threads:[~2023-09-20 18:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-13  0:27 Build error for moxiebox architecture Chris Packham
2023-08-14 10:24 ` Torbjorn SVENSSON
2023-09-19  8:04   ` Chris Packham
2023-09-20 18:24     ` Torbjorn SVENSSON

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).