New avr-libc

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

New avr-libc

Bob von Knobloch-2
Hi,
I'm trying to update to avr-libc-2.0.0.
All (binutils, gcc & avr-libc) compiled and installed without error
messages.
When attempting to compile an existing project, the tool chain reports:

avr-gcc -g -Wall -Wno-main -Os -fno-inline -mmcu=atmega1284p
-DF_CPU=20000000 -DC_YEAR=2017 -fshort-enums -Wno-unused-function   -c
-o main.o main.c
avr-gcc -g -Wall -Wno-main -Os -fno-inline -mmcu=atmega1284p
-DF_CPU=20000000 -DC_YEAR=2017 -fshort-enums -Wno-unused-function
-Wl,-Map,main.map -o main.elf main.o
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/../../../../avr/bin/ld:
cannot find crtatmega1284p.o: No such file or directory
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/../../../../avr/bin/ld:
cannot find -latmega1284p
collect2: error: ld returned 1 exit status
Makefile:44: recipe for target 'main.elf' failed
make: *** [main.elf] Error 1


I notice that, under '/opt/avr-libc2.0.0-binutils2.9/avr/lib/avr51/
the 'crt' files appear to have different names (when compared to my
existing tool chain):
Old = crtatmega1284p.o
New = crtm1284p.o

Have I missed some parameter that the compilation of the linker needed
to be able find these files? Why are they renamed?

Regards,

Bob von Knobloch
--
The Sun is out, the sky is blue, it's time to drive the MR2.

_______________________________________________
AVR-chat mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-chat
Reply | Threaded
Open this post in threaded view
|

Re: New avr-libc

Erik Christiansen-2
On 26.07.17 15:26, Bob von Knobloch wrote:

> avr-gcc -g -Wall -Wno-main -Os -fno-inline -mmcu=atmega1284p
> -DF_CPU=20000000 -DC_YEAR=2017 -fshort-enums -Wno-unused-function   -c -o
> main.o main.c
> avr-gcc -g -Wall -Wno-main -Os -fno-inline -mmcu=atmega1284p
> -DF_CPU=20000000 -DC_YEAR=2017 -fshort-enums -Wno-unused-function
> -Wl,-Map,main.map -o main.elf main.o
> /opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/../../../../avr/bin/ld:
> cannot find crtatmega1284p.o: No such file or directory
> /opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/../../../../avr/bin/ld:
> cannot find -latmega1284p
> collect2: error: ld returned 1 exit status

Hi Bob,

Have you tried without the "-c", i.e. a single-step compile? If that
works, then avr-gcc is handing over some needed parameter to avr-ld.

But for diagnosis, what is listed after the linker script when you:

$ avr-gcc -mmcu=atmega1284p -Wl,--verbose | more

I have (rather dated now):

attempt to open
/usr/lib/gcc/avr/4.7.2/../../../avr/lib/avr51/crtm1284p.o succeeded
/usr/lib/gcc/avr/4.7.2/../../../avr/lib/avr51/crtm1284p.o
attempt to open /usr/lib/gcc/avr/4.7.2/avr51/libgcc.so failed
attempt to open /usr/lib/gcc/avr/4.7.2/avr51/libgcc.a succeeded
(/usr/lib/gcc/avr/4.7.2/avr51/libgcc.a)_exit.o
attempt to open /usr/lib/gcc/avr/4.7.2/avr51/libc.so failed
attempt to open /usr/lib/gcc/avr/4.7.2/avr51/libc.a failed
attempt to open /usr/lib/gcc/avr/4.7.2/../../../avr/lib/avr51/libc.so failed
attempt to open /usr/lib/gcc/avr/4.7.2/../../../avr/lib/avr51/libc.a succeeded
attempt to open /usr/lib/gcc/avr/4.7.2/avr51/libgcc.so failed
attempt to open /usr/lib/gcc/avr/4.7.2/avr51/libgcc.a succeeded

If it's not looking where yours are, then I'd first ask whether binutils
was built before gcc, to make them available.

> Makefile:44: recipe for target 'main.elf' failed
> make: *** [main.elf] Error 1
>
> I notice that, under '/opt/avr-libc2.0.0-binutils2.9/avr/lib/avr51/
> the 'crt' files appear to have different names (when compared to my existing
> tool chain):
> Old = crtatmega1284p.o
> New = crtm1284p.o
>
> Have I missed some parameter that the compilation of the linker needed to be
> able find these files? Why are they renamed?

Dunno. You're not by any chance invoking the old avr-gcc (with old names
and library paths)? It is not at all difficult to have the old executable
not only still lying about, but first in $PATH, if the new is not
installed over it.

Erik


_______________________________________________
AVR-chat mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-chat
Reply | Threaded
Open this post in threaded view
|

Re: New avr-libc

Bob von Knobloch-2
On 01/08/17 11:40, Erik Christiansen wrote:
> Hi Bob,
>
> Have you tried without the "-c", i.e. a single-step compile? If that
> works, then avr-gcc is handing over some needed parameter to avr-ld.

Hi Erik,
Same output without "-c"

> But for diagnosis, what is listed after the linker script when you:
>
> $ avr-gcc -mmcu=atmega1284p -Wl,--verbose | more

attempt to open crtatmega1284p.o failed
attempt to open
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/avr51/libgcc.so failed
attempt to open
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/avr51/libgcc.a succeeded
attempt to open
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/avr51/libm.so failed
attempt to open
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/avr51/libm.a failed
attempt to open
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/../../../../avr/lib/avr51/libm.so
failed
attempt to open
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/../../../../avr/lib/avr51/libm.a
succeeded
attempt to open
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/avr51/libc.so failed
attempt to open
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/avr51/libc.a failed
attempt to open
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/../../../../avr/lib/avr51/libc.so
failed
attempt to open
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/../../../../avr/lib/avr51/libc.a
succeeded
attempt to open
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/avr51/libatmega1284p.so
failed
attempt to open
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/avr51/libatmega1284p.a
failed
attempt to open
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/../../../../avr/lib/avr51/libatmega1284p.so
failed
attempt to open
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/../../../../avr/lib/avr51/libatmega1284p.a
failed
attempt to open
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/libatmega1284p.so failed
attempt to open
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/libatmega1284p.a failed
attempt to open
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/../../../../avr/lib/libatmega1284p.so
failed
attempt to open
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/../../../../avr/lib/libatmega1284p.a
failed
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/../../../../avr/bin/ld:
cannot find crtatmega1284p.o: No such file or directory
/opt/avr-libc2.0.0-binutils2.9/lib64/gcc/avr/5.4.0/../../../../avr/bin/ld:
cannot find -latmega1284p
collect2: error: ld returned 1 exit status
>
> If it's not looking where yours are, then I'd first ask whether binutils
> was built before gcc, to make them available.

It was (I built the whole toolchain new - binutils first - no errors
issued during the build).

>>
>> I notice that, under '/opt/avr-libc2.0.0-binutils2.9/avr/lib/avr51/
>> the 'crt' files appear to have different names (when compared to my existing
>> tool chain):
>> Old = crtatmega1284p.o
>> New = crtm1284p.o
>>
>> Have I missed some parameter that the compilation of the linker needed to be
>> able find these files? Why are they renamed?
>
> Dunno. You're not by any chance invoking the old avr-gcc (with old names
> and library paths)? It is not at all difficult to have the old executable
> not only still lying about, but first in $PATH, if the new is not
> installed over it.

No, totally separate directory trees for the old & new versions.
Just 1 symlink to change from old to new.

Thanks for the advice.
How's it going on the farm down under?

Bob
--
The Sun is out, the sky is blue, it's time to drive the MR2.

_______________________________________________
AVR-chat mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-chat
Reply | Threaded
Open this post in threaded view
|

Re: New avr-libc

Erik Christiansen-2
On 01.08.17 14:09, Bob von Knobloch wrote:

> > Hi Bob,
> >
> > Have you tried without the "-c", i.e. a single-step compile? If that
> > works, then avr-gcc is handing over some needed parameter to avr-ld.
>
> Hi Erik,
> Same output without "-c"
>
> > But for diagnosis, what is listed after the linker script when you:
> >
> > $ avr-gcc -mmcu=atmega1284p -Wl,--verbose | more
>
> attempt to open crtatmega1284p.o failed
... (lots more failures elided)

That's not looking good at all. Now we have two simple generic compiler
tests that avr-gcc is failing for the atmega1284p. To confirm that it is
avr-gcc asking for a non-existent crt file, and not a path issue, I'd
try the following, which on my older version gives:

$ locate crtm1284 crtatmega1284
/usr/lib/avr/lib/avr5/crtm1284p.o
/usr/lib/avr/lib/avr51/crtm1284p.o

> Thanks for the advice.
> How's it going on the farm down under?

Since tales of wombats digging under the concrete slab in the cowshed,
and bumping around under the house floorboards at night are not entirely
on-topic, I'll save them for an off-list reply.

Erik

_______________________________________________
AVR-chat mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-chat
Reply | Threaded
Open this post in threaded view
|

Re: New avr-libc

Bob von Knobloch-2
On 02/08/17 13:30, Erik Christiansen wrote:

> That's not looking good at all. Now we have two simple generic compiler
> tests that avr-gcc is failing for the atmega1284p. To confirm that it is
> avr-gcc asking for a non-existent crt file, and not a path issue, I'd
> try the following, which on my older version gives:
>
> $ locate crtm1284 crtatmega1284
> /usr/lib/avr/lib/avr5/crtm1284p.o
> /usr/lib/avr/lib/avr51/crtm1284p.o

locate crtm1284 crtatmega1284
/opt/avr-libc2.0.0-binutils2.9/avr/lib/avr51/crtm1284.o
/opt/avr-libc2.0.0-binutils2.9/avr/lib/avr51/crtm1284p.o
/opt/avr-libc2.0.0-binutils2.9/avr/lib/avr51/crtm1284rfr2.o

/opt/avr8-gnu-toolchain-linux_x86_64/avr/lib/avr51/crtatmega1284.o
/opt/avr8-gnu-toolchain-linux_x86_64/avr/lib/avr51/crtatmega1284p.o
/opt/avr8-gnu-toolchain-linux_x86_64/avr/lib/avr51/crtatmega1284rfr2.o

Where
/opt/avr8-gnu-toolchain-linux_x86_64/... is my existing (working) toolchain
/opt/avr-libc2.0.0-binutils2.9/... is the new (borked?) toolchain

So, it looks like it won't find these files. I'm curious that your
'locate' above found the same names as this new version and that my
'working' version does not have the same filenames.
Hmmm.. food for thought.

Please mail me off-list if you would like to (I think you have my e-mail).

Cheers

Bob
--
The Sun is out, the sky is blue, it's time to drive the MR2.

_______________________________________________
AVR-chat mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-chat