RPI3 can't build kernel-toolchain

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

RPI3 can't build kernel-toolchain

bob prohaska
On a Pi3 running r328935 trying to build sources at 329171 a
make -j2 kernel-toolchain fails with
/usr/bin/ld: error: duplicate symbol:
>>> defined at ASTImporter.o:() in archive /usr/obj/usr/src/arm64.aarch64/tmp/obj-tools/lib/clang/libclang/libclang.a

Tried updating the source tree and didn't seen any relevant changes,
no luck using the -DNO_CLEAN option. The machine can't seem to get
very far with j > 2, so cleaning will slow things by days.

I'll try cleaning by degrees, but am unclear on the order. Is the sequence
from least-to-most-thorough something like:

make clean
make cleandir
2nd make cleandir
rm -rf /usr/obj/usr/

The make logfile is at
http://www.zefox.net/~fbsd/rpi3/crashes/20180212/toolchain.log

Thanks for reading, and any guidance!

bob prohaska


_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: RPI3 can't build kernel-toolchain

bob prohaska
On Mon, Feb 12, 2018 at 10:32:56AM -0800, bob prohaska wrote:
> On a Pi3 running r328935 trying to build sources at 329171 a
> make -j2 kernel-toolchain fails with
> /usr/bin/ld: error: duplicate symbol:
> >>> defined at ASTImporter.o:() in archive /usr/obj/usr/src/arm64.aarch64/tmp/obj-tools/lib/clang/libclang/libclang.a
>

Updating sources eventually allowed make kernel-toolchain to build without
errors. However, make buildkernel still stops, reporting

In file included from /usr/src/sys/crypto/armv8/armv8_crypto_wrap.c:46:
/usr/obj/usr/src/arm64.aarch64/tmp/usr/lib/clang/6.0.0/include/arm_neon.h:31:10: fatal error: 'stdint.h' file not found
#include <stdint.h>
         ^~~~~~~~~~
1 error generated.
*** [armv8_crypto_wrap.o] Error code 1

This seems rather odd, since find reports files with that name in
several locations within /usr/src:

root@www:/usr/src # find . -name stdint.h -depth -print
./sys/sys/stdint.h
./sys/contrib/zstd/lib/freebsd/stdint.h
./contrib/llvm/tools/clang/lib/Headers/stdint.h
./contrib/libc++/include/stdint.h
./contrib/libstdc++/include/tr1/stdint.h

To the best of my ability the source tree is unmolested, svnlite info reports:
root@www:/usr/src # svnlite status .
?       buildkernel.log
?       buildscript
?       installscript
?       kernelscript
?       toolchain.log
?       toolchainscript
root@www:/usr/src #

The source tree is presently at r329360.

Thanks for reading, and any help!

bob prohaska

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: RPI3 can't build kernel-toolchain

freebsd-arm mailing list

On 2018-Feb-15, at 10:03 PM, bob prohaska <[hidden email]> wrote:

> On Mon, Feb 12, 2018 at 10:32:56AM -0800, bob prohaska wrote:
>> On a Pi3 running r328935 trying to build sources at 329171 a
>> make -j2 kernel-toolchain fails with
>> /usr/bin/ld: error: duplicate symbol:
>>>>> defined at ASTImporter.o:() in archive /usr/obj/usr/src/arm64.aarch64/tmp/obj-tools/lib/clang/libclang/libclang.a
>>
>
> Updating sources eventually allowed make kernel-toolchain to build without
> errors. However, make buildkernel still stops, reporting
>
> In file included from /usr/src/sys/crypto/armv8/armv8_crypto_wrap.c:46:
> /usr/obj/usr/src/arm64.aarch64/tmp/usr/lib/clang/6.0.0/include/arm_neon.h:31:10: fatal error: 'stdint.h' file not found
> #include <stdint.h>
>         ^~~~~~~~~~
> 1 error generated.
> *** [armv8_crypto_wrap.o] Error code 1
>
> This seems rather odd, since find reports files with that name in
> several locations within /usr/src:
>
> root@www:/usr/src # find . -name stdint.h -depth -print
> ./sys/sys/stdint.h
> ./sys/contrib/zstd/lib/freebsd/stdint.h
> ./contrib/llvm/tools/clang/lib/Headers/stdint.h
> ./contrib/libc++/include/stdint.h
> ./contrib/libstdc++/include/tr1/stdint.h
>
> To the best of my ability the source tree is unmolested, svnlite info reports:
> root@www:/usr/src # svnlite status .
> ?       buildkernel.log
> ?       buildscript
> ?       installscript
> ?       kernelscript
> ?       toolchain.log
> ?       toolchainscript
> root@www:/usr/src #
>
> The source tree is presently at r329360.

See FreeBSD bugzilla 220125:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220125 <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220125>

You can hand patch the tree (similar to comment 3 but for
the clang version in use). Later comments have notes about
various places the file might go.

If you can get buildworld to work, it will put stdint.h in the right place.
The places that you list are not the places the compiles actively look in.

See comment 9 for the difference between buildworld and
kernel-toolchain for where the file is placed.

kernel-toolchain does not do the right thing for arm_neon.h to work;
arm-neon.h presumes that header, which is not normally part of a FreeBSD
kernel build. Your report tells me that this is currently unresolved.

===
Mark Millard
marklmi at yahoo.com
( markmi at dsl-only.net is
going away in 2018-Feb, late)

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: RPI3 can't build kernel-toolchain

bob prohaska
On Fri, Feb 16, 2018 at 06:19:15AM -0800, Mark Millard wrote:

>
> On 2018-Feb-15, at 10:03 PM, bob prohaska <[hidden email]> wrote:
>
> > On Mon, Feb 12, 2018 at 10:32:56AM -0800, bob prohaska wrote:
> >
> > Updating sources eventually allowed make kernel-toolchain to build without
> > errors. However, make buildkernel still stops, reporting
> >
> > In file included from /usr/src/sys/crypto/armv8/armv8_crypto_wrap.c:46:
> > /usr/obj/usr/src/arm64.aarch64/tmp/usr/lib/clang/6.0.0/include/arm_neon.h:31:10: fatal error: 'stdint.h' file not found
> > #include <stdint.h>
> >         ^~~~~~~~~~
> > 1 error generated.
> > *** [armv8_crypto_wrap.o] Error code 1
> >
>
> See FreeBSD bugzilla 220125:
>
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220125 <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220125>
>
> You can hand patch the tree (similar to comment 3 but for
> the clang version in use). Later comments have notes about
> various places the file might go.
>
Running
cp ./contrib/llvm/tools/clang/lib/Headers/stdint.h /usr/lib/clang/6.0.0/include
didn't solve the problem.

Using
cp /usr/lib/include/stdint.h /usr/obj/usr/src/arm64.aarch64/tmp/usr/include/
does seem to be working. Since this is a self-hosted compile there's hope the
resulting kernel will be more stable  than r328935.

Am I correct in thinking that arm does not correctly recognize when it's
self-hosting? Doubtless I'm being naive, but shouldn't that be a fairly
straightforward determination? Armv7 gave hints of the same problem, asking
that TARGET_ARCH be set in a self-hosting buildworld. That's seemingly fixed,
now.

Thanks very much!

bob prohaska

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: RPI3 can't build kernel-toolchain

freebsd-arm mailing list


On 2018-Feb-16, at 9:09 AM, bob prohaska <[hidden email]> wrote:

> On Fri, Feb 16, 2018 at 06:19:15AM -0800, Mark Millard wrote:
>>
>> On 2018-Feb-15, at 10:03 PM, bob prohaska <[hidden email]> wrote:
>>
>>> On Mon, Feb 12, 2018 at 10:32:56AM -0800, bob prohaska wrote:
>>>
>>> Updating sources eventually allowed make kernel-toolchain to build without
>>> errors. However, make buildkernel still stops, reporting
>>>
>>> In file included from /usr/src/sys/crypto/armv8/armv8_crypto_wrap.c:46:
>>> /usr/obj/usr/src/arm64.aarch64/tmp/usr/lib/clang/6.0.0/include/arm_neon.h:31:10: fatal error: 'stdint.h' file not found
>>> #include <stdint.h>
>>>        ^~~~~~~~~~
>>> 1 error generated.
>>> *** [armv8_crypto_wrap.o] Error code 1
>>>
>>
>> See FreeBSD bugzilla 220125:
>>
>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220125 <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220125>
>>
>> You can hand patch the tree (similar to comment 3 but for
>> the clang version in use). Later comments have notes about
>> various places the file might go.
>>
> Running
> cp ./contrib/llvm/tools/clang/lib/Headers/stdint.h /usr/lib/clang/6.0.0/include
> didn't solve the problem.
>
> Using
> cp /usr/lib/include/stdint.h /usr/obj/usr/src/arm64.aarch64/tmp/usr/include/
> does seem to be working. Since this is a self-hosted compile there's hope the
> resulting kernel will be more stable  than r328935.
>
> Am I correct in thinking that arm does not correctly recognize when it's
> self-hosting? Doubtless I'm being naive, but shouldn't that be a fairly
> straightforward determination? Armv7 gave hints of the same problem, asking
> that TARGET_ARCH be set in a self-hosting buildworld. That's seemingly fixed,
> now.

amd64 -> aarch64 cross-builds using kernel-toolchain also failed
the same way for buildkernel. In order to cross-build I used
buildworld instead (after the build failed the other way).

(My FreeBSD time is greatly limited compared to when I was doing
that. So I've not synchronized in some time and do not directly
know the current status. It has been even longer since I've done
a self-hosted build for armv7, aarch64, powerpc, or powerpc64.)

===
Mark Millard
marklmi at yahoo.com
( markmi at dsl-only.net is
going away in 2018-Feb, late)

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"