public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* Help with crosstool-NG
@ 2014-05-26 13:34 Viktor Semykin
  2014-05-26 18:54 ` Viktor Semykin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Viktor Semykin @ 2014-05-26 13:34 UTC (permalink / raw)
  To: crossgcc

Hi.

I'm trying to build cross toolchain based on old (heavily patched for my 
board) linux kernel 2.6.9, new gnu toolchain and uclibc. I now made 
progress to 'Installing final compiler' step, which gets failed.
As far as I can tell from logs, stage 2 compiler fails to create 
executables with uClibc (because cannot find uClibc_main symbol, because 
doesn't link with libc.a but links with crt1.o).

Could you please help me find mistake in my configs? I assume I 
misconfigured uClibc but I cannot understand what's wrong.

crosstool config: https://app.box.com/s/qtonpmja47zrjx495uuv
uclibc config: https://app.box.com/s/nioiy53xx2mi20ti9dk6
build.log: https://app.box.com/s/3dyxiaqixjq8drlpun2s

-- 
best, Viktor.

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: Help with crosstool-NG
  2014-05-26 13:34 Help with crosstool-NG Viktor Semykin
@ 2014-05-26 18:54 ` Viktor Semykin
  2014-05-27 19:07   ` Bryan Hundven
  2014-05-27 19:18 ` Yann E. MORIN
  2014-05-29  0:11 ` Anthony Foiani
  2 siblings, 1 reply; 7+ messages in thread
From: Viktor Semykin @ 2014-05-26 18:54 UTC (permalink / raw)
  To: crossgcc

This is part of libatomic/config.log that I find helpful:

> configure:3477: checking for C compiler default output file name
> configure:3499: /media/storage/269/ct/.build/powerpc-unknown-linux-uclibc/build/build-cc-final/./gcc/xgcc -B/media/storage/269/ct/.build/powerpc-unknown-linux-uclibc/build/build-cc-final/./gcc/ -B/home/thesame/x-tools/powerpc-unknown-linux-uclibc/powerpc-unknown-linux-uclibc/bin/ -B/home/thesame/x-tools/powerpc-unknown-linux-uclibc/powerpc-unknown-linux-uclibc/lib/ -isystem /home/thesame/x-tools/powerpc-unknown-linux-uclibc/powerpc-unknown-linux-uclibc/include -isystem /home/thesame/x-tools/powerpc-unknown-linux-uclibc/powerpc-unknown-linux-uclibc/sys-include    -g -Os   conftest.c  >&5
> /home/thesame/x-tools/powerpc-unknown-linux-uclibc/powerpc-unknown-linux-uclibc/sysroot/usr/lib/crt1.o: In function `_start':
> (.text+0x44): undefined reference to `__uClibc_main'


On 26/05/14 16:33, Viktor Semykin wrote:
> Hi.
>
> I'm trying to build cross toolchain based on old (heavily patched for my
> board) linux kernel 2.6.9, new gnu toolchain and uclibc. I now made
> progress to 'Installing final compiler' step, which gets failed.
> As far as I can tell from logs, stage 2 compiler fails to create
> executables with uClibc (because cannot find uClibc_main symbol, because
> doesn't link with libc.a but links with crt1.o).
>
> Could you please help me find mistake in my configs? I assume I
> misconfigured uClibc but I cannot understand what's wrong.
>
> crosstool config: https://app.box.com/s/qtonpmja47zrjx495uuv
> uclibc config: https://app.box.com/s/nioiy53xx2mi20ti9dk6
> build.log: https://app.box.com/s/3dyxiaqixjq8drlpun2s
>

-- 
best, Viktor.

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: Help with crosstool-NG
  2014-05-26 18:54 ` Viktor Semykin
@ 2014-05-27 19:07   ` Bryan Hundven
  2014-05-27 19:29     ` Yann E. MORIN
  0 siblings, 1 reply; 7+ messages in thread
From: Bryan Hundven @ 2014-05-27 19:07 UTC (permalink / raw)
  To: Viktor Semykin; +Cc: crossgcc maillist

Viktor,

On Mon, May 26, 2014 at 11:53 AM, Viktor Semykin <thesame.ml@gmail.com> wrote:
> This is part of libatomic/config.log that I find helpful:
>
>> configure:3477: checking for C compiler default output file name
>> configure:3499:
>> /media/storage/269/ct/.build/powerpc-unknown-linux-uclibc/build/build-cc-final/./gcc/xgcc
>> -B/media/storage/269/ct/.build/powerpc-unknown-linux-uclibc/build/build-cc-final/./gcc/
>> -B/home/thesame/x-tools/powerpc-unknown-linux-uclibc/powerpc-unknown-linux-uclibc/bin/
>> -B/home/thesame/x-tools/powerpc-unknown-linux-uclibc/powerpc-unknown-linux-uclibc/lib/
>> -isystem
>> /home/thesame/x-tools/powerpc-unknown-linux-uclibc/powerpc-unknown-linux-uclibc/include
>> -isystem
>> /home/thesame/x-tools/powerpc-unknown-linux-uclibc/powerpc-unknown-linux-uclibc/sys-include
>> -g -Os   conftest.c  >&5
>>
>> /home/thesame/x-tools/powerpc-unknown-linux-uclibc/powerpc-unknown-linux-uclibc/sysroot/usr/lib/crt1.o:
>> In function `_start':
>> (.text+0x44): undefined reference to `__uClibc_main'

It would seem to me that uClibc is not being linked into gcc.

>
>
> On 26/05/14 16:33, Viktor Semykin wrote:
>>
>> Hi.
>>
>> I'm trying to build cross toolchain based on old (heavily patched for my
>> board) linux kernel 2.6.9, new gnu toolchain and uclibc. I now made
>> progress to 'Installing final compiler' step, which gets failed.
>> As far as I can tell from logs, stage 2 compiler fails to create
>> executables with uClibc (because cannot find uClibc_main symbol, because
>> doesn't link with libc.a but links with crt1.o).
>>
>> Could you please help me find mistake in my configs? I assume I
>> misconfigured uClibc but I cannot understand what's wrong.
>>
>> crosstool config: https://app.box.com/s/qtonpmja47zrjx495uuv
>> uclibc config: https://app.box.com/s/nioiy53xx2mi20ti9dk6
>> build.log: https://app.box.com/s/3dyxiaqixjq8drlpun2s
>>
>
> --
> best, Viktor.

I would assume that since buildroot switched from uClibc to glibc as
the default, because of the lack of maintenance going into it, it
would be wise to look at using newlib or another libc.

http://elinux.org/Buildroot:DeveloperDaysFOSDEM2014#How_to_handle_the_uClibc_problem
http://lists.busybox.net/pipermail/buildroot/2014-February/089789.html
(Thanks to Yann for digging these links up for me!)

But, I'm guessing that since uClibc has been less interesting to the
developers of crosstool-ng, that it has not gotten attention to keep
it working.

I'm sure that after I send this email, someone will be working on a patch...

>.>

<.<

Cheers,

-Bryan

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: Help with crosstool-NG
  2014-05-26 13:34 Help with crosstool-NG Viktor Semykin
  2014-05-26 18:54 ` Viktor Semykin
@ 2014-05-27 19:18 ` Yann E. MORIN
  2014-05-27 20:17   ` Viktor Semykin
  2014-05-29  0:11 ` Anthony Foiani
  2 siblings, 1 reply; 7+ messages in thread
From: Yann E. MORIN @ 2014-05-27 19:18 UTC (permalink / raw)
  To: Viktor Semykin; +Cc: crossgcc

Viktor, All,

On 2014-05-26 16:33 +0300, Viktor Semykin spake thusly:
> I'm trying to build cross toolchain based on old (heavily patched for my
> board) linux kernel 2.6.9, new gnu toolchain and uclibc. I now made progress

How did you manage to get kernel headers from 2.6.9?

Exporting kernel headers was only addeed in 2.6.10-something, and only
became really possible starting with 2.6.18. So it was not posible to
get kernel headers from 2.6.9. In those times, the kernel headers were
maintained (with some difficulty) in a separate package, named
linux-libc-headers, and that is not supported in crosstool-NG.

> to 'Installing final compiler' step, which gets failed.
> As far as I can tell from logs, stage 2 compiler fails to create executables
> with uClibc (because cannot find uClibc_main symbol, because doesn't link
> with libc.a but links with crt1.o).

You disabled shared library support in uClibc. not sure how that plays
with building gcc.

I know Buildroot has an option to 'prefer' static libs, but IIRC, they
still build a shared-enabled uClibc, and just use the static one. I'd
have to check to be sure.

> Could you please help me find mistake in my configs? I assume I
> misconfigured uClibc but I cannot understand what's wrong.

Please test by enabling shared library support, and retest to see if it
works that way.

Note that if you realy, really want to build static-only, a lot of
packages will fail to build without patching.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: Help with crosstool-NG
  2014-05-27 19:07   ` Bryan Hundven
@ 2014-05-27 19:29     ` Yann E. MORIN
  0 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2014-05-27 19:29 UTC (permalink / raw)
  To: Bryan Hundven; +Cc: Viktor Semykin, crossgcc maillist

Bryan, Viktor, All,

On 2014-05-27 12:07 -0700, Bryan Hundven spake thusly:
> I would assume that since buildroot switched from uClibc to glibc as
> the default,

No, we did not switch yet. We are considering switching, but not for a
moment yet. Maybe the next release in August, or in November.

> But, I'm guessing that since uClibc has been less interesting to the
> developers of crosstool-ng, that it has not gotten attention to keep
> it working.

As long as the samples still work for me, I don't do much about uClibc,
indeed.

> I'm sure that after I send this email, someone will be working on a patch...

-# HAVE_SHARED is not set
+HAVE_SHARED=y

Is that OK for you? :-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: Help with crosstool-NG
  2014-05-27 19:18 ` Yann E. MORIN
@ 2014-05-27 20:17   ` Viktor Semykin
  0 siblings, 0 replies; 7+ messages in thread
From: Viktor Semykin @ 2014-05-27 20:17 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

On 27/05/14 22:17, Yann E. MORIN wrote:
> How did you manage to get kernel headers from 2.6.9?

CT_OBSOLETE + CT_KERNEL_LINUX_USE_CUSTOM_HEADERS + 
CT_KERNEL_LINUX_CUSTOM_PATH

Another trick is 2.6.9 ARCH is "ppc" not "powerpc", but crosstool-ng 
does good so far, I was afraid this would be an insurmountable obstacle.

> You disabled shared library support in uClibc. not sure how that plays
> with building gcc.
>
> I know Buildroot has an option to 'prefer' static libs, but IIRC, they
> still build a shared-enabled uClibc, and just use the static one. I'd
> have to check to be sure.
>
> Please test by enabling shared library support, and retest to see if it
> works that way.
>
> Note that if you realy, really want to build static-only, a lot of
> packages will fail to build without patching.

I'm now testing with static/shared related options, but seems that gcc 
version matters too. I think 4.8.1 is too modern for uClibc, without 
extra patches at least.

-- 
best, Viktor.

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: Help with crosstool-NG
  2014-05-26 13:34 Help with crosstool-NG Viktor Semykin
  2014-05-26 18:54 ` Viktor Semykin
  2014-05-27 19:18 ` Yann E. MORIN
@ 2014-05-29  0:11 ` Anthony Foiani
  2 siblings, 0 replies; 7+ messages in thread
From: Anthony Foiani @ 2014-05-29  0:11 UTC (permalink / raw)
  To: Viktor Semykin; +Cc: crossgcc maillist

Viktor --

On Mon, May 26, 2014 at 6:33 AM, Viktor Semykin <thesame.ml@gmail.com> wrote:
> I'm trying to build cross toolchain based on old (heavily patched for my
> board) linux kernel 2.6.9, new gnu toolchain and uclibc. I now made progress
> to 'Installing final compiler' step, which gets failed.

For whatever it's worth, my previous project (2009-2013) started with
a patched 2.6.27 kernel and not great support from the board
manufacturer.

To preserve my own sanity, I actually forward-ported their changes
(which wasn't too hard, since their changes were actually mostly a
cut-and-paste of a reference design).  When I finally shipped it in
late 2013, it was running 3.9.7+patches.

Just a reminder that, at some point, there might be easier paths.  :(

Good luck!

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

end of thread, other threads:[~2014-05-29  0:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-26 13:34 Help with crosstool-NG Viktor Semykin
2014-05-26 18:54 ` Viktor Semykin
2014-05-27 19:07   ` Bryan Hundven
2014-05-27 19:29     ` Yann E. MORIN
2014-05-27 19:18 ` Yann E. MORIN
2014-05-27 20:17   ` Viktor Semykin
2014-05-29  0:11 ` Anthony Foiani

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).