View previous topic :: View next topic |
Author |
Message |
kindofblue n00b
Joined: 13 Apr 2009 Posts: 34 Location: Montreal, Canada
|
Posted: Wed Sep 10, 2014 12:28 pm Post subject: Cannot build cross compiler for ARMv7a with crossdev |
|
|
Hello everybody,
I saw a related post (https://forums.gentoo.org/viewtopic-t-994722-highlight-arm.html) but in this case the user was able to build the cross compiler but not able to build a package with it.
I'm using the following command to build the compiler:
Code: | crossdev --ov-output /usr/local/portage --stable --target armv7a-hardfloat-linux-gnueabi |
The build fails at stage 1 at install time:
Code: | >>> Installing (1 of 1) cross-armv7a-hardfloat-linux-gnueabi/gcc-4.8.2-r3
* This package will overwrite one or more files that may belong to other
* packages (see list below). You can use a command such as `portageq
* owners / <filename>` to identify the installed package that owns a
* file. If portageq reports that only one package owns a file then do
* NOT file a bug report. A bug report is only useful if it identifies at
* least two or more packages that are known to install the same file(s).
* If a collision occurs and you can not explain where the file came from
* then you should simply ignore the collision since there is not enough
* information to determine if a real problem exists. Please do NOT file
* a bug report at http://bugs.gentoo.org unless you report exactly which
* two packages install the same file(s). Once again, please do NOT file
* a bug report unless you have completely understood the above message.
*
* Detected file collision(s):
*
* /etc/env.d/gcc/x86_64-pc-linux-gnu-4.8.2
* /usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/c89
* /usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/c99
* /usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/locale/fr/LC_MESSAGES/cpplib.mo
...
* Searching all installed packages for file collisions...
*
* Press Ctrl-C to Stop
*
* sys-devel/gcc-4.8.2-r2:4.8::gentoo
* /etc/env.d/gcc/x86_64-pc-linux-gnu-4.8.2
* /usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/c89
* /usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/c99
...
* Package 'cross-armv7a-hardfloat-linux-gnueabi/gcc-4.8.2-r3' NOT merged
* due to file collisions. If necessary, refer to your elog messages for
* the whole content of the above message.
>>> Failed to install cross-armv7a-hardfloat-linux-gnueabi/gcc-4.8.2-r3
|
I guess I could specify a different version of gcc with the --gcc option, but I'm afraid I would also have to set the version of the other components of the toolchain (binutils, libc, etc) and I don't know what they are.
Thanks in advance. _________________ "Keep it simple: as simple as possible, but no simpler" - Einstein |
|
Back to top |
|
|
cwr Veteran
Joined: 17 Dec 2005 Posts: 1969
|
Posted: Tue Sep 16, 2014 4:21 pm Post subject: |
|
|
I built an ARM crossdev for the BBB a while ago, and my notes say:
This works, but a number of the EXTRA_ECONF flags may not be necessary.
Code: |
USE="-fortran" crossdev -v -S --g 4.7.2 -t armv7-none-linux-gnueabi --env \
'EXTRA_ECONF="--with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float-abi=hard \
libc_cv_forced_unwind=yes libc_cv_ctors_header=yes libc_cv_c_cleanup=yes"'
|
Crossdev built using binutils-2.22-r1, glibc-2.15-r3 and linux-headers-3.7
This was on a 32-bit machine; I'm not sure how well crossdev behaves with 64-bit
machines or multilib.
Will |
|
Back to top |
|
|
kindofblue n00b
Joined: 13 Apr 2009 Posts: 34 Location: Montreal, Canada
|
Posted: Fri Sep 19, 2014 12:53 am Post subject: |
|
|
Ok thanks. I'm not sure all those options will make a difference since the failure is at install time in my case.
Anyway I started to look at yocto. I'll get back to crossdev if I can't make it work with yocto.
Thanks again. _________________ "Keep it simple: as simple as possible, but no simpler" - Einstein |
|
Back to top |
|
|
cwr Veteran
Joined: 17 Dec 2005 Posts: 1969
|
Posted: Sat Sep 20, 2014 11:45 am Post subject: |
|
|
Err, crossdev both builds and installs the compiler and libraries. You end up with eg: /usr/bin/arm-gcc and the libraries somewhere under /lib/arm, as I recall.
Will |
|
Back to top |
|
|
kindofblue n00b
Joined: 13 Apr 2009 Posts: 34 Location: Montreal, Canada
|
Posted: Sat Sep 20, 2014 12:49 pm Post subject: |
|
|
The architecture directories get created properly. What fails to install because of collisions, if you look at my original message, is shared stuff, for example in /usr/share. _________________ "Keep it simple: as simple as possible, but no simpler" - Einstein |
|
Back to top |
|
|
cwr Veteran
Joined: 17 Dec 2005 Posts: 1969
|
Posted: Sun Sep 21, 2014 12:33 pm Post subject: |
|
|
Sorry, I missed a trick; I thought that was just a file permissions problem. In fact, as you say, crossdev is trying to overwrite the current compiler. At a guess, multilib related; it might be worth trying earlier/later versions of crossdev, if you can't get yocto to work. Crossdev seems to change a lot between releases.
Will |
|
Back to top |
|
|
|