* Build Error on FreeBSD 12
@ 2019-10-30 18:41 Joel Sherrill
2019-10-30 19:13 ` Christian Biesinger via gdb
2019-11-08 17:20 ` John Baldwin
0 siblings, 2 replies; 5+ messages in thread
From: Joel Sherrill @ 2019-10-30 18:41 UTC (permalink / raw)
To: gdb
Hi
When building gdb 8.3 for *-rtems5 targets on FreeBSD 12, we are getting
undefined errors for libiconv symbols. The messages are like this:
================================
CXXLD gdb
charset.o: In function `convert_between_encodings(char const*, char const*,
unsigned char const*, unsigned int,
int, obstack*, transliterations)':
charset.c:(.text+0x251): undefined reference to `libiconv_open'
charset.c:(.text+0x2df): undefined reference to `libiconv'
charset.c:(.text+0x434): undefined reference to `libiconv_close'
charset.c:(.text+0x486): undefined reference to `libiconv_close'
charset.o: In function `wchar_iterator::wchar_iterator(unsigned char
const*, unsigned int, char const*, unsigned
int)':
charset.c:(.text+0x4f9): undefined reference to `libiconv_open'
================================
Q1: The compile line is shortened in the output so I can't tell what it is
linking command is really doing. What's the magic for having the full
command lines printed?
Q2: Does this sound familiar to anyone? We build fine on other OSes and
apparently this
doesn't happen on FreeBSD 11. Any hint is appreciated.
The config.log does show it found iconv().
Thanks.
--joel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Build Error on FreeBSD 12
2019-10-30 18:41 Build Error on FreeBSD 12 Joel Sherrill
@ 2019-10-30 19:13 ` Christian Biesinger via gdb
2019-11-08 17:20 ` John Baldwin
1 sibling, 0 replies; 5+ messages in thread
From: Christian Biesinger via gdb @ 2019-10-30 19:13 UTC (permalink / raw)
To: joel; +Cc: gdb
On Wed, Oct 30, 2019 at 1:42 PM Joel Sherrill <joel@rtems.org> wrote:
>
> Hi
>
> When building gdb 8.3 for *-rtems5 targets on FreeBSD 12, we are getting
> undefined errors for libiconv symbols. The messages are like this:
>
> ================================
> CXXLD gdb
> charset.o: In function `convert_between_encodings(char const*, char const*,
> unsigned char const*, unsigned int,
> int, obstack*, transliterations)':
> charset.c:(.text+0x251): undefined reference to `libiconv_open'
> charset.c:(.text+0x2df): undefined reference to `libiconv'
> charset.c:(.text+0x434): undefined reference to `libiconv_close'
> charset.c:(.text+0x486): undefined reference to `libiconv_close'
> charset.o: In function `wchar_iterator::wchar_iterator(unsigned char
> const*, unsigned int, char const*, unsigned
> int)':
> charset.c:(.text+0x4f9): undefined reference to `libiconv_open'
> ================================
>
> Q1: The compile line is shortened in the output so I can't tell what it is
> linking command is really doing. What's the magic for having the full
> command lines printed?
make V=1
>
> Q2: Does this sound familiar to anyone? We build fine on other OSes and
> apparently this
> doesn't happen on FreeBSD 11. Any hint is appreciated.
Unfortunately I don't know the answer to this question.
Christian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Build Error on FreeBSD 12
2019-10-30 18:41 Build Error on FreeBSD 12 Joel Sherrill
2019-10-30 19:13 ` Christian Biesinger via gdb
@ 2019-11-08 17:20 ` John Baldwin
2019-11-08 23:36 ` Joel Sherrill
1 sibling, 1 reply; 5+ messages in thread
From: John Baldwin @ 2019-11-08 17:20 UTC (permalink / raw)
To: joel, gdb
On 10/30/19 11:41 AM, Joel Sherrill wrote:
> Hi
>
> When building gdb 8.3 for *-rtems5 targets on FreeBSD 12, we are getting
> undefined errors for libiconv symbols. The messages are like this:
>
> ================================
> CXXLD gdb
> charset.o: In function `convert_between_encodings(char const*, char const*,
> unsigned char const*, unsigned int,
> int, obstack*, transliterations)':
> charset.c:(.text+0x251): undefined reference to `libiconv_open'
> charset.c:(.text+0x2df): undefined reference to `libiconv'
> charset.c:(.text+0x434): undefined reference to `libiconv_close'
> charset.c:(.text+0x486): undefined reference to `libiconv_close'
> charset.o: In function `wchar_iterator::wchar_iterator(unsigned char
> const*, unsigned int, char const*, unsigned
> int)':
> charset.c:(.text+0x4f9): undefined reference to `libiconv_open'
> ================================
>
> Q1: The compile line is shortened in the output so I can't tell what it is
> linking command is really doing. What's the magic for having the full
> command lines printed?
>
> Q2: Does this sound familiar to anyone? We build fine on other OSes and
> apparently this
> doesn't happen on FreeBSD 11. Any hint is appreciated.
>
> The config.log does show it found iconv().
Hmm, I haven't had a bare ./configure work on FreeBSD for quite some time
as it doesn't add the needed -L /usr/local/lib for libiconv even though
the configure scripts figure out that it needs -I /usr/local/include.
However, that was true for me on older releases, not just 12. The FreeBSD
port (and my own build scripts for doing gdb work) work around this by
defining LDFLAGS="-L /usr/local/lib" in the environment when invoking
./configure, e.g.:
env LDFLAGS="-L /usr/local/lib" ./configure
--
John Baldwin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Build Error on FreeBSD 12
2019-11-08 17:20 ` John Baldwin
@ 2019-11-08 23:36 ` Joel Sherrill
2019-11-09 0:10 ` John Baldwin
0 siblings, 1 reply; 5+ messages in thread
From: Joel Sherrill @ 2019-11-08 23:36 UTC (permalink / raw)
To: John Baldwin; +Cc: gdb
On Fri, Nov 8, 2019 at 11:20 AM John Baldwin <jhb@freebsd.org> wrote:
> On 10/30/19 11:41 AM, Joel Sherrill wrote:
> > Hi
> >
> > When building gdb 8.3 for *-rtems5 targets on FreeBSD 12, we are getting
> > undefined errors for libiconv symbols. The messages are like this:
> >
> > ================================
> > CXXLD gdb
> > charset.o: In function `convert_between_encodings(char const*, char
> const*,
> > unsigned char const*, unsigned int,
> > int, obstack*, transliterations)':
> > charset.c:(.text+0x251): undefined reference to `libiconv_open'
> > charset.c:(.text+0x2df): undefined reference to `libiconv'
> > charset.c:(.text+0x434): undefined reference to `libiconv_close'
> > charset.c:(.text+0x486): undefined reference to `libiconv_close'
> > charset.o: In function `wchar_iterator::wchar_iterator(unsigned char
> > const*, unsigned int, char const*, unsigned
> > int)':
> > charset.c:(.text+0x4f9): undefined reference to `libiconv_open'
> > ================================
> >
> > Q1: The compile line is shortened in the output so I can't tell what it
> is
> > linking command is really doing. What's the magic for having the full
> > command lines printed?
> >
> > Q2: Does this sound familiar to anyone? We build fine on other OSes and
> > apparently this
> > doesn't happen on FreeBSD 11. Any hint is appreciated.
> >
> > The config.log does show it found iconv().
>
> Hmm, I haven't had a bare ./configure work on FreeBSD for quite some time
> as it doesn't add the needed -L /usr/local/lib for libiconv even though
> the configure scripts figure out that it needs -I /usr/local/include.
> However, that was true for me on older releases, not just 12. The FreeBSD
> port (and my own build scripts for doing gdb work) work around this by
> defining LDFLAGS="-L /usr/local/lib" in the environment when invoking
> ./configure, e.g.:
>
> env LDFLAGS="-L /usr/local/lib" ./configure
>
Thanks. I can try that by hand next week.
Do you think this is a bug in the gdb configure magic?
I would really prefer to fix this properly.
--joel
RTEMS
>
> --
> John Baldwin
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Build Error on FreeBSD 12
2019-11-08 23:36 ` Joel Sherrill
@ 2019-11-09 0:10 ` John Baldwin
0 siblings, 0 replies; 5+ messages in thread
From: John Baldwin @ 2019-11-09 0:10 UTC (permalink / raw)
To: joel; +Cc: gdb
On 11/8/19 3:36 PM, Joel Sherrill wrote:
> On Fri, Nov 8, 2019 at 11:20 AM John Baldwin <jhb@freebsd.org> wrote:
>
>> On 10/30/19 11:41 AM, Joel Sherrill wrote:
>>> Hi
>>>
>>> When building gdb 8.3 for *-rtems5 targets on FreeBSD 12, we are getting
>>> undefined errors for libiconv symbols. The messages are like this:
>>>
>>> ================================
>>> CXXLD gdb
>>> charset.o: In function `convert_between_encodings(char const*, char
>> const*,
>>> unsigned char const*, unsigned int,
>>> int, obstack*, transliterations)':
>>> charset.c:(.text+0x251): undefined reference to `libiconv_open'
>>> charset.c:(.text+0x2df): undefined reference to `libiconv'
>>> charset.c:(.text+0x434): undefined reference to `libiconv_close'
>>> charset.c:(.text+0x486): undefined reference to `libiconv_close'
>>> charset.o: In function `wchar_iterator::wchar_iterator(unsigned char
>>> const*, unsigned int, char const*, unsigned
>>> int)':
>>> charset.c:(.text+0x4f9): undefined reference to `libiconv_open'
>>> ================================
>>>
>>> Q1: The compile line is shortened in the output so I can't tell what it
>> is
>>> linking command is really doing. What's the magic for having the full
>>> command lines printed?
>>>
>>> Q2: Does this sound familiar to anyone? We build fine on other OSes and
>>> apparently this
>>> doesn't happen on FreeBSD 11. Any hint is appreciated.
>>>
>>> The config.log does show it found iconv().
>>
>> Hmm, I haven't had a bare ./configure work on FreeBSD for quite some time
>> as it doesn't add the needed -L /usr/local/lib for libiconv even though
>> the configure scripts figure out that it needs -I /usr/local/include.
>> However, that was true for me on older releases, not just 12. The FreeBSD
>> port (and my own build scripts for doing gdb work) work around this by
>> defining LDFLAGS="-L /usr/local/lib" in the environment when invoking
>> ./configure, e.g.:
>>
>> env LDFLAGS="-L /usr/local/lib" ./configure
>>
>
> Thanks. I can try that by hand next week.
>
> Do you think this is a bug in the gdb configure magic?
>
> I would really prefer to fix this properly.
I do think it is a bug, per se, but I wasn't able to figure out it last time
that I looked at it. The m4 bits for iconv are also pulled from GCC, so any
fix needs to be looped back through GCC first I think and then pulled into
GDB.
--
John Baldwin
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-11-09 0:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-30 18:41 Build Error on FreeBSD 12 Joel Sherrill
2019-10-30 19:13 ` Christian Biesinger via gdb
2019-11-08 17:20 ` John Baldwin
2019-11-08 23:36 ` Joel Sherrill
2019-11-09 0:10 ` John Baldwin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox