View previous topic :: View next topic |
Author |
Message |
[n00b@localhost] Apprentice


Joined: 30 Aug 2004 Posts: 266 Location: London, UK
|
Posted: Wed Oct 14, 2015 11:47 am Post subject: /usr/include/bfd.h: No such file or directory |
|
|
I have started to get a bunch of packages fail to compile complaining about a missing bfd.h after I compiled a cross toolchain using crossdev.
bfd.h is installed by binutils in /usr/lib64/binutils/x86_64-pc-linux-gnu/${VERSION}/include and linked to /usr/include/bfd.h by binutils-config/eselect binutils. The link is not present and is not created by either binutils-config or eselect binutils.
I have searched the forums and the bug tracker and no-one seems to have had this problem. I think it may be related to #562460 but the patch in that bug does not fix this problem.
Code: | ~ # equery f binutils | grep bfd.h
/usr/lib64/binutils/armv6j-hardfloat-linux-gnueabi/2.25.1/include/include/bfd.h
/usr/lib64/binutils/x86_64-pc-linux-gnu/2.25.1/include/bfd.h
~ # eselect binutils list
[1] armv6j-hardfloat-linux-gnueabi-2.25.1 *
[2] x86_64-pc-linux-gnu-2.25.1 *
~ # eselect binutils set 2
* Switching to x86_64-pc-linux-gnu-2.25.1 ... [ ok ]
* Please remember to run:
* # . /etc/profile
~ # source /etc/profile
~ # ls -l /usr/include/bfd.h
ls: cannot access /usr/include/bfd.h: No such file or directory
|
On another box:
Code: | ~ # eselect binutils list
Installed binutils for target armv6j-hardfloat-linux-gnueabi
[1] 2.24 *
~ # ls -l /usr/include/bfd.h
lrwxrwxrwx 1 root root 67 Jul 31 04:21 /usr/include/bfd.h -> /usr/lib/binutils/armv6j-hardfloat-linux-gnueabi/2.24/include/bfd.h
|
|
|
Back to top |
|
 |
Keruskerfuerst Advocate


Joined: 01 Feb 2006 Posts: 2289 Location: near Augsburg, Germany
|
|
Back to top |
|
 |
[n00b@localhost] Apprentice


Joined: 30 Aug 2004 Posts: 266 Location: London, UK
|
Posted: Wed Oct 14, 2015 2:55 pm Post subject: |
|
|
Thanks, but you are misunderstanding the problem. I have the file. In fact, I have two versions of the file for two different toolchains.
The problem is that binutils-config should be creating a link to one of them at /usr/include/bfd.h but isn't. |
|
Back to top |
|
 |
Keruskerfuerst Advocate


Joined: 01 Feb 2006 Posts: 2289 Location: near Augsburg, Germany
|
Posted: Wed Oct 14, 2015 3:06 pm Post subject: |
|
|
Then you can create a link to one of the two packages bfd.h |
|
Back to top |
|
 |
[n00b@localhost] Apprentice


Joined: 30 Aug 2004 Posts: 266 Location: London, UK
|
Posted: Wed Oct 14, 2015 3:13 pm Post subject: |
|
|
Which one? binutils-config should be creating this link, but isn't. That is the problem.
I don't know how many other links it is choosing not to create (e.g. does it also create links to the corresponding libbfd.so in /usr/lib?). |
|
Back to top |
|
 |
avx Advocate


Joined: 21 Jun 2004 Posts: 2152
|
Posted: Fri Nov 06, 2015 11:26 am Post subject: |
|
|
A little late, but I also fall over this trying to merge sbsigntool and it not finding bfd.h, though equery f binutils says it's installed - just not linked. _________________ ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. |
|
Back to top |
|
 |
[n00b@localhost] Apprentice


Joined: 30 Aug 2004 Posts: 266 Location: London, UK
|
Posted: Fri Nov 06, 2015 11:46 am Post subject: |
|
|
I found another user with a similar problem and we were able to work out the problem ourselves.
/usr/include/bfd.h is installed by binutils-libs and managed with eselect-binutils:5 or later. The problem is that the split of binutils into binutils and binutils-libs has left some packages requiring functionality that was previously provided by binutils but has been moved into binutils-libs. The ebuilds for those packages needs to be updated to depend on binutils-libs. In the meantime, the problem can be solved by explicitly emerging binutils-libs. |
|
Back to top |
|
 |
avx Advocate


Joined: 21 Jun 2004 Posts: 2152
|
Posted: Fri Nov 06, 2015 11:48 am Post subject: |
|
|
Well if that wasn't a fast reply, thank you, gonna try that right now. In the meantime, is there already a bug open for this so I can report the sbsigntool ebuild?
Edit, that worked, thanks very much. _________________ ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. |
|
Back to top |
|
 |
[n00b@localhost] Apprentice


Joined: 30 Aug 2004 Posts: 266 Location: London, UK
|
Posted: Fri Nov 06, 2015 11:56 am Post subject: |
|
|
There are a couple I could find for other packages that are having the same problem (#562250 for dev-util/perf and #563976 for net-p2p/amule) but none for sbsigntool so you may want to report it.
AFAICT there should be multiple packages experiencing this problem and there should be a tracker bug for them so I put it down to me not being able to use the b.g.o search tool effectively or the problem being localised to my particular setup (which would not constitute a bug). I'm glad to hear someone else has experienced this problem and the solution also works for them!
(Automatic email notifications coinciding with my morning coffee break at work equals fast replies. ) |
|
Back to top |
|
 |
Cyker Veteran

Joined: 15 Jun 2006 Posts: 1746
|
Posted: Mon Mar 28, 2016 10:54 am Post subject: |
|
|
I just got bitten by a similar problem to this, but with
Code: | error while loading shared libraries: libbfd-2.25.1.so: cannot open shared object file: No such file or directory |
I suspect it was triggered by a recent update to binutils-config going from v4 to v5 as things were working alright before then!
So thank you for posting that you need sys-libs/binutils-libs to fix it; I didn't see a single thing in the binutils ChangeLogs about it being split and was stumped as to why the symlinks to the libs and includes had disappeared!
One query; Should I one-shot binutils-libs or explicitly add it to the world file?
I would have thought it's not the sort of thing that does in the world file, but it seems things are not depending on it still which is why this breakage is occurring, and given that, it would cause it to get removed next time I run --depclean, aye?
Thanks again for saving my desk from a lot of head banging  |
|
Back to top |
|
 |
lacimarsik n00b

Joined: 07 Apr 2016 Posts: 12
|
Posted: Thu Apr 07, 2016 1:33 pm Post subject: |
|
|
Also had this problem with app-crypt/sbsigntool package not depending on sys-libs/binutils-libs the fix was just recently pushed upstream https://bugs.gentoo.org/show_bug.cgi?id=575380
Last edited by lacimarsik on Sat Jun 04, 2016 1:05 pm; edited 1 time in total |
|
Back to top |
|
 |
steveL Watchman

Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Thu Apr 07, 2016 10:31 pm Post subject: |
|
|
(A bit late, but general advice.)
Cyker wrote: | One query; Should I one-shot binutils-libs or explicitly add it to the world file?
I would have thought it's not the sort of thing that does in the world file, but it seems things are not depending on it still which is why this breakage is occurring, and given that, it would cause it to get removed next time I run --depclean, aye? |
I'd use -1 first, then see what depclean is going to do, after you've got through world.
If it's going to remove it, cancel it, and use emerge -n binutils-libs to add it back to world without reinstalling (-n is short for: --noreplace.) |
|
Back to top |
|
 |
|