* [Buildroot] [Fwd: Re: Struggling with undefined reference to `__fgetc_unlocked']
@ 2007-08-23 16:43 Carmelo AMOROSO
2007-08-23 16:53 ` Thiago A. Corrêa
0 siblings, 1 reply; 9+ messages in thread
From: Carmelo AMOROSO @ 2007-08-23 16:43 UTC (permalink / raw)
To: buildroot
my reply below
-------- Original Message --------
Subject: Re: [Buildroot] Struggling with undefined reference to
`__fgetc_unlocked'
Date: Thu, 23 Aug 2007 18:42:31 +0200
From: Carmelo Amoroso <carmelo.amoroso@st.com>
Organization: STMicroelectronics
To: "Thiago A. Corr?a" <thiago.correa@gmail.com>
References:
<d6cda7730708230925x19bc0901v9a6dd1f18ee325ec@mail.gmail.com>
<46CDB759.709@st.com>
<d6cda7730708230939p7b126fe1mbe28768aa4413bb4@mail.gmail.com>
Thiago A. Corr?a wrote:
> Hi Carmelo,
>
> That command returned
> gentoo-vm buildroot # readelf -s /lib/libc.so.6 | grep fgetc_unlocked
> 1868: 0005e040 40 FUNC WEAK DEFAULT 11 fgetc_unlocked@@GLIBC_2.1
> gentoo-vm buildroot #
>
> I'm guessing the prepended underscores are due to mangling, but
> could be wrong.
>
Not, they are part of the symbol's name... you need to fix qtopia to
call the fgetc_unlocked.
Cheers
> On 8/23/07, Carmelo AMOROSO <carmelo.amoroso@st.com> wrote:
>
>> Thiago A. Corr?a wrote:
>>
>>> Hi,
>>>
>>> I'm struggling with qtopia. During the link of rcc (which is a host
>>> tool, natively compiled) I get:
>>>
>>> I googled for the error, but could only find ppl complaining about
>>> this when linking against uClibc, when this should be linking against
>>> the system glibc. Does anyone has an idea of what I could try?
>>>
>>> Regards,
>>> Thiago A. Correa
>>>
>>>
>> Which glibc version have you installed on your host?
>> For example, on my RHEL 3 there is glibc-2.3.4 which doesn't contain the
>> __fgetc_unlocked
>> symbol, while fgetc_unlocked (no underscore prepending)...
>> so just check your glibc by running 'readelf -s /lib/libc.so.6 | grep
>> fgetc_unlocked'
>> and see what it returns.
>>
>> Regards,
>> Carmelo
>>
>>
>>> _______________________________________________
>>> buildroot mailing list
>>> buildroot at uclibc.org
>>> http://busybox.net/mailman/listinfo/buildroot
>>>
>>>
>>>
>>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [Fwd: Re: Struggling with undefined reference to `__fgetc_unlocked']
2007-08-23 16:43 [Buildroot] [Fwd: Re: Struggling with undefined reference to `__fgetc_unlocked'] Carmelo AMOROSO
@ 2007-08-23 16:53 ` Thiago A. Corrêa
2007-08-23 16:57 ` Carmelo AMOROSO
0 siblings, 1 reply; 9+ messages in thread
From: Thiago A. Corrêa @ 2007-08-23 16:53 UTC (permalink / raw)
To: buildroot
That file actually calls fgetc, so I guess it's a dreadfull define :P
I suppose it is using uClibc headers instead of the native compiler ones.
On 8/23/07, Carmelo AMOROSO <carmelo.amoroso@st.com> wrote:
> my reply below
>
> -------- Original Message --------
> Subject: Re: [Buildroot] Struggling with undefined reference to
> `__fgetc_unlocked'
> Date: Thu, 23 Aug 2007 18:42:31 +0200
> From: Carmelo Amoroso <carmelo.amoroso@st.com>
> Organization: STMicroelectronics
> To: "Thiago A. Corr?a" <thiago.correa@gmail.com>
> References:
> <d6cda7730708230925x19bc0901v9a6dd1f18ee325ec@mail.gmail.com>
> <46CDB759.709@st.com>
> <d6cda7730708230939p7b126fe1mbe28768aa4413bb4@mail.gmail.com>
>
>
>
> Thiago A. Corr?a wrote:
> > Hi Carmelo,
> >
> > That command returned
> > gentoo-vm buildroot # readelf -s /lib/libc.so.6 | grep fgetc_unlocked
> > 1868: 0005e040 40 FUNC WEAK DEFAULT 11 fgetc_unlocked@@GLIBC_2.1
> > gentoo-vm buildroot #
> >
> > I'm guessing the prepended underscores are due to mangling, but
> > could be wrong.
> >
> Not, they are part of the symbol's name... you need to fix qtopia to
> call the fgetc_unlocked.
>
> Cheers
> > On 8/23/07, Carmelo AMOROSO <carmelo.amoroso@st.com> wrote:
> >
> >> Thiago A. Corr?a wrote:
> >>
> >>> Hi,
> >>>
> >>> I'm struggling with qtopia. During the link of rcc (which is a host
> >>> tool, natively compiled) I get:
> >>>
> >>> I googled for the error, but could only find ppl complaining about
> >>> this when linking against uClibc, when this should be linking against
> >>> the system glibc. Does anyone has an idea of what I could try?
> >>>
> >>> Regards,
> >>> Thiago A. Correa
> >>>
> >>>
> >> Which glibc version have you installed on your host?
> >> For example, on my RHEL 3 there is glibc-2.3.4 which doesn't contain the
> >> __fgetc_unlocked
> >> symbol, while fgetc_unlocked (no underscore prepending)...
> >> so just check your glibc by running 'readelf -s /lib/libc.so.6 | grep
> >> fgetc_unlocked'
> >> and see what it returns.
> >>
> >> Regards,
> >> Carmelo
> >>
> >>
> >>> _______________________________________________
> >>> buildroot mailing list
> >>> buildroot at uclibc.org
> >>> http://busybox.net/mailman/listinfo/buildroot
> >>>
> >>>
> >>>
> >>
>
>
>
> _______________________________________________
> buildroot mailing list
> buildroot at uclibc.org
> http://busybox.net/mailman/listinfo/buildroot
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [Fwd: Re: Struggling with undefined reference to `__fgetc_unlocked']
2007-08-23 16:53 ` Thiago A. Corrêa
@ 2007-08-23 16:57 ` Carmelo AMOROSO
2007-08-23 17:25 ` Thiago A. Corrêa
0 siblings, 1 reply; 9+ messages in thread
From: Carmelo AMOROSO @ 2007-08-23 16:57 UTC (permalink / raw)
To: buildroot
Thiago A. Corr?a wrote:
> That file actually calls fgetc, so I guess it's a dreadfull define :P
>
> I suppose it is using uClibc headers instead of the native compiler ones.
>
Run the compiler with -v to see which -I directives it is using... where
it is looking for C headers.
If you are using a plain g++ from the host, I don't think it's using
uClibc headers.
> On 8/23/07, Carmelo AMOROSO <carmelo.amoroso@st.com> wrote:
>
>> my reply below
>>
>> -------- Original Message --------
>> Subject: Re: [Buildroot] Struggling with undefined reference to
>> `__fgetc_unlocked'
>> Date: Thu, 23 Aug 2007 18:42:31 +0200
>> From: Carmelo Amoroso <carmelo.amoroso@st.com>
>> Organization: STMicroelectronics
>> To: "Thiago A. Corr?a" <thiago.correa@gmail.com>
>> References:
>> <d6cda7730708230925x19bc0901v9a6dd1f18ee325ec@mail.gmail.com>
>> <46CDB759.709@st.com>
>> <d6cda7730708230939p7b126fe1mbe28768aa4413bb4@mail.gmail.com>
>>
>>
>>
>> Thiago A. Corr?a wrote:
>>
>>> Hi Carmelo,
>>>
>>> That command returned
>>> gentoo-vm buildroot # readelf -s /lib/libc.so.6 | grep fgetc_unlocked
>>> 1868: 0005e040 40 FUNC WEAK DEFAULT 11 fgetc_unlocked@@GLIBC_2.1
>>> gentoo-vm buildroot #
>>>
>>> I'm guessing the prepended underscores are due to mangling, but
>>> could be wrong.
>>>
>>>
>> Not, they are part of the symbol's name... you need to fix qtopia to
>> call the fgetc_unlocked.
>>
>> Cheers
>>
>>> On 8/23/07, Carmelo AMOROSO <carmelo.amoroso@st.com> wrote:
>>>
>>>
>>>> Thiago A. Corr?a wrote:
>>>>
>>>>
>>>>> Hi,
>>>>>
>>>>> I'm struggling with qtopia. During the link of rcc (which is a host
>>>>> tool, natively compiled) I get:
>>>>>
>>>>> I googled for the error, but could only find ppl complaining about
>>>>> this when linking against uClibc, when this should be linking against
>>>>> the system glibc. Does anyone has an idea of what I could try?
>>>>>
>>>>> Regards,
>>>>> Thiago A. Correa
>>>>>
>>>>>
>>>>>
>>>> Which glibc version have you installed on your host?
>>>> For example, on my RHEL 3 there is glibc-2.3.4 which doesn't contain the
>>>> __fgetc_unlocked
>>>> symbol, while fgetc_unlocked (no underscore prepending)...
>>>> so just check your glibc by running 'readelf -s /lib/libc.so.6 | grep
>>>> fgetc_unlocked'
>>>> and see what it returns.
>>>>
>>>> Regards,
>>>> Carmelo
>>>>
>>>>
>>>>
>>>>> _______________________________________________
>>>>> buildroot mailing list
>>>>> buildroot at uclibc.org
>>>>> http://busybox.net/mailman/listinfo/buildroot
>>>>>
>>>>>
>>>>>
>>>>>
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot at uclibc.org
>> http://busybox.net/mailman/listinfo/buildroot
>>
>>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [Fwd: Re: Struggling with undefined reference to `__fgetc_unlocked']
2007-08-23 16:57 ` Carmelo AMOROSO
@ 2007-08-23 17:25 ` Thiago A. Corrêa
2007-08-23 20:18 ` Bernhard Fischer
0 siblings, 1 reply; 9+ messages in thread
From: Thiago A. Corrêa @ 2007-08-23 17:25 UTC (permalink / raw)
To: buildroot
Thanks for the help. It was indeed using the uClibc includes with the
CXXFLAGS/CFLAGS being set at the qtopia4.mk. I will send a patch as
soon as I confirm this is working. But at least so far compilation got
past rcc.
On 8/23/07, Carmelo AMOROSO <carmelo.amoroso@st.com> wrote:
> Thiago A. Corr?a wrote:
> > That file actually calls fgetc, so I guess it's a dreadfull define :P
> >
> > I suppose it is using uClibc headers instead of the native compiler ones.
> >
> Run the compiler with -v to see which -I directives it is using... where
> it is looking for C headers.
> If you are using a plain g++ from the host, I don't think it's using
> uClibc headers.
> > On 8/23/07, Carmelo AMOROSO <carmelo.amoroso@st.com> wrote:
> >
> >> my reply below
> >>
> >> -------- Original Message --------
> >> Subject: Re: [Buildroot] Struggling with undefined reference to
> >> `__fgetc_unlocked'
> >> Date: Thu, 23 Aug 2007 18:42:31 +0200
> >> From: Carmelo Amoroso <carmelo.amoroso@st.com>
> >> Organization: STMicroelectronics
> >> To: "Thiago A. Corr?a" <thiago.correa@gmail.com>
> >> References:
> >> <d6cda7730708230925x19bc0901v9a6dd1f18ee325ec@mail.gmail.com>
> >> <46CDB759.709@st.com>
> >> <d6cda7730708230939p7b126fe1mbe28768aa4413bb4@mail.gmail.com>
> >>
> >>
> >>
> >> Thiago A. Corr?a wrote:
> >>
> >>> Hi Carmelo,
> >>>
> >>> That command returned
> >>> gentoo-vm buildroot # readelf -s /lib/libc.so.6 | grep fgetc_unlocked
> >>> 1868: 0005e040 40 FUNC WEAK DEFAULT 11 fgetc_unlocked@@GLIBC_2.1
> >>> gentoo-vm buildroot #
> >>>
> >>> I'm guessing the prepended underscores are due to mangling, but
> >>> could be wrong.
> >>>
> >>>
> >> Not, they are part of the symbol's name... you need to fix qtopia to
> >> call the fgetc_unlocked.
> >>
> >> Cheers
> >>
> >>> On 8/23/07, Carmelo AMOROSO <carmelo.amoroso@st.com> wrote:
> >>>
> >>>
> >>>> Thiago A. Corr?a wrote:
> >>>>
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> I'm struggling with qtopia. During the link of rcc (which is a host
> >>>>> tool, natively compiled) I get:
> >>>>>
> >>>>> I googled for the error, but could only find ppl complaining about
> >>>>> this when linking against uClibc, when this should be linking against
> >>>>> the system glibc. Does anyone has an idea of what I could try?
> >>>>>
> >>>>> Regards,
> >>>>> Thiago A. Correa
> >>>>>
> >>>>>
> >>>>>
> >>>> Which glibc version have you installed on your host?
> >>>> For example, on my RHEL 3 there is glibc-2.3.4 which doesn't contain the
> >>>> __fgetc_unlocked
> >>>> symbol, while fgetc_unlocked (no underscore prepending)...
> >>>> so just check your glibc by running 'readelf -s /lib/libc.so.6 | grep
> >>>> fgetc_unlocked'
> >>>> and see what it returns.
> >>>>
> >>>> Regards,
> >>>> Carmelo
> >>>>
> >>>>
> >>>>
> >>>>> _______________________________________________
> >>>>> buildroot mailing list
> >>>>> buildroot at uclibc.org
> >>>>> http://busybox.net/mailman/listinfo/buildroot
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>
> >> _______________________________________________
> >> buildroot mailing list
> >> buildroot at uclibc.org
> >> http://busybox.net/mailman/listinfo/buildroot
> >>
> >>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [Fwd: Re: Struggling with undefined reference to `__fgetc_unlocked']
2007-08-23 17:25 ` Thiago A. Corrêa
@ 2007-08-23 20:18 ` Bernhard Fischer
2007-08-27 10:37 ` Hans-Christian Egtvedt
0 siblings, 1 reply; 9+ messages in thread
From: Bernhard Fischer @ 2007-08-23 20:18 UTC (permalink / raw)
To: buildroot
On Thu, Aug 23, 2007 at 06:25:59PM +0100, Thiago A. Corr?a wrote:
>Thanks for the help. It was indeed using the uClibc includes with the
>CXXFLAGS/CFLAGS being set at the qtopia4.mk. I will send a patch as
>soon as I confirm this is working. But at least so far compilation got
>past rcc.
There was talks about qtopia before. IIRC there is no need to compile it
for the host in the first place.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [Fwd: Re: Struggling with undefined reference to `__fgetc_unlocked']
2007-08-23 20:18 ` Bernhard Fischer
@ 2007-08-27 10:37 ` Hans-Christian Egtvedt
2007-08-27 13:33 ` Thiago A. Corrêa
0 siblings, 1 reply; 9+ messages in thread
From: Hans-Christian Egtvedt @ 2007-08-27 10:37 UTC (permalink / raw)
To: buildroot
On Thu, 2007-08-23 at 22:18 +0200, Bernhard Fischer wrote:
> On Thu, Aug 23, 2007 at 06:25:59PM +0100, Thiago A. Corr?a wrote:
> >Thanks for the help. It was indeed using the uClibc includes with the
> >CXXFLAGS/CFLAGS being set at the qtopia4.mk. I will send a patch as
> >soon as I confirm this is working. But at least so far compilation got
> >past rcc.
>
> There was talks about qtopia before. IIRC there is no need to compile it
> for the host in the first place.
Correct, only a two-stage build for the target is necessary. But Qtopia
compiles some tools with the host compiler (qmake, moc, rcc and uic).
Before the late fixes in Qtopia in Buildroot, some bad CFLAGS and
CXXFLAGS was set when configuring, causing the Qtopia build system to
use wrong headers (i.e. target headers when compiling the host tools).
AFAIK everything should be in order in latest SVN.
--
With kind regards,
Hans-Christian Egtvedt, Applications Engineer
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [Fwd: Re: Struggling with undefined reference to `__fgetc_unlocked']
2007-08-27 10:37 ` Hans-Christian Egtvedt
@ 2007-08-27 13:33 ` Thiago A. Corrêa
2007-08-27 13:48 ` Hans-Christian Egtvedt
0 siblings, 1 reply; 9+ messages in thread
From: Thiago A. Corrêa @ 2007-08-27 13:33 UTC (permalink / raw)
To: buildroot
Hi,
Good to see you around, hopefully we will see some patches closing
the gap between the svn and atmel buildroot :)
Actually current SVN is still unable to build qtopia. To be more
precise, current SVN fails building the toolchain now *sigh*. But
-r19700 (4 revisions ago) has the exact same problem, and qtopia4.mk
haven't been touched in the between. The patch I sent last night to
the list fixes the build. Also, on the AVR32, for some reason make
install doesn't copy over qatomic_avr32.h. The patch I sent also
addresses this, perhaps not in the best way possible, but I can't
figure out how to do it in a qtopia patch as there is no differences
between the avr32 and the arm as far as qt build system is concerned.
They are both in the appropriate folder names and .pri files.
Still on the Qtopia subject, one has to do LIBS -= -ldl in a
qtopia project to be able to link. Linker complains about undefined
symbols. This I have been trying to fix since friday with no success,
so I took the easy path in my project for now, not linking against
libdl.so
Cheers,
Thiago A. Correa
On 8/27/07, Hans-Christian Egtvedt <hcegtvedt@atmel.com> wrote:
>
> On Thu, 2007-08-23 at 22:18 +0200, Bernhard Fischer wrote:
> > On Thu, Aug 23, 2007 at 06:25:59PM +0100, Thiago A. Corr?a wrote:
> > >Thanks for the help. It was indeed using the uClibc includes with the
> > >CXXFLAGS/CFLAGS being set at the qtopia4.mk. I will send a patch as
> > >soon as I confirm this is working. But at least so far compilation got
> > >past rcc.
> >
> > There was talks about qtopia before. IIRC there is no need to compile it
> > for the host in the first place.
>
> Correct, only a two-stage build for the target is necessary. But Qtopia
> compiles some tools with the host compiler (qmake, moc, rcc and uic).
>
> Before the late fixes in Qtopia in Buildroot, some bad CFLAGS and
> CXXFLAGS was set when configuring, causing the Qtopia build system to
> use wrong headers (i.e. target headers when compiling the host tools).
>
> AFAIK everything should be in order in latest SVN.
>
> --
> With kind regards,
> Hans-Christian Egtvedt, Applications Engineer
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [Fwd: Re: Struggling with undefined reference to `__fgetc_unlocked']
2007-08-27 13:33 ` Thiago A. Corrêa
@ 2007-08-27 13:48 ` Hans-Christian Egtvedt
2007-08-27 15:50 ` Thiago A. Corrêa
0 siblings, 1 reply; 9+ messages in thread
From: Hans-Christian Egtvedt @ 2007-08-27 13:48 UTC (permalink / raw)
To: buildroot
On Mon, 2007-08-27 at 14:33 +0100, Thiago A. Corr?a wrote:
> Hi,
>
> Good to see you around, hopefully we will see some patches closing
> the gap between the svn and atmel buildroot :)
> Actually current SVN is still unable to build qtopia. To be more
> precise, current SVN fails building the toolchain now *sigh*. But
> -r19700 (4 revisions ago) has the exact same problem, and qtopia4.mk
> haven't been touched in the between. The patch I sent last night to
> the list fixes the build. Also, on the AVR32, for some reason make
> install doesn't copy over qatomic_avr32.h. The patch I sent also
> addresses this, perhaps not in the best way possible, but I can't
> figure out how to do it in a qtopia patch as there is no differences
> between the avr32 and the arm as far as qt build system is concerned.
> They are both in the appropriate folder names and .pri files.
I have a patch for the missing qatomic_avr32.h file, I think I posted it
to this list.
Anyway, I have attached it to this email as well.
> Still on the Qtopia subject, one has to do LIBS -= -ldl in a
> qtopia project to be able to link. Linker complains about undefined
> symbols. This I have been trying to fix since friday with no success,
> so I took the easy path in my project for now, not linking against
> libdl.so
Weird, I did not have to supply that on my workstation and test server.
(From a completely clean Ubuntu installation (without any AVR32 stuff)).
--
With kind regards,
Hans-Christian Egtvedt, Applications Engineer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qtopia-4.2.2-add-avr32-qatomic-header-to-header-list.patch
Type: text/x-patch
Size: 13026 bytes
Desc: not available
Url : http://busybox.net/lists/buildroot/attachments/20070827/4730c7d0/attachment-0001.bin
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [Fwd: Re: Struggling with undefined reference to `__fgetc_unlocked']
2007-08-27 13:48 ` Hans-Christian Egtvedt
@ 2007-08-27 15:50 ` Thiago A. Corrêa
0 siblings, 0 replies; 9+ messages in thread
From: Thiago A. Corrêa @ 2007-08-27 15:50 UTC (permalink / raw)
To: buildroot
> I have a patch for the missing qatomic_avr32.h file, I think I posted it
> to this list.
>
> Anyway, I have attached it to this email as well.
I can't belive I neglected that, I guess sleep deprivation does this :P
I haven't seen it on the list (I have joined about a week ago anyway),
but I did see it in the Atmel snapshot. I suppose it would be best to
append it to the patch file that adds avr32 support to qtopia.
Wonder if patch can patch a patch file :P
I will resubmit the qtopia patch I sent earlier.
>
> > Still on the Qtopia subject, one has to do LIBS -= -ldl in a
> > qtopia project to be able to link. Linker complains about undefined
> > symbols. This I have been trying to fix since friday with no success,
> > so I took the easy path in my project for now, not linking against
> > libdl.so
>
> Weird, I did not have to supply that on my workstation and test server.
> (From a completely clean Ubuntu installation (without any AVR32 stuff)).
>
> --
> With kind regards,
> Hans-Christian Egtvedt, Applications Engineer
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-08-27 15:50 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-23 16:43 [Buildroot] [Fwd: Re: Struggling with undefined reference to `__fgetc_unlocked'] Carmelo AMOROSO
2007-08-23 16:53 ` Thiago A. Corrêa
2007-08-23 16:57 ` Carmelo AMOROSO
2007-08-23 17:25 ` Thiago A. Corrêa
2007-08-23 20:18 ` Bernhard Fischer
2007-08-27 10:37 ` Hans-Christian Egtvedt
2007-08-27 13:33 ` Thiago A. Corrêa
2007-08-27 13:48 ` Hans-Christian Egtvedt
2007-08-27 15:50 ` Thiago A. Corrêa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox