Score:0

"/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file or directory" when compiling HTK

cn flag

I'm trying to compile the HTK library, but run into issues:

$ make all
(cd HTKLib && make HTKLib.a) \
  || case "" in *k*) fail=yes;; *) exit 1;; esac;
make[1]: Entering directory '/home/<path_removed_for_privacy>/htk/HTKLib'
gcc  -m32 -ansi -D_SVID_SOURCE -DOSS_AUDIO -D'ARCH="x86_64"' -Wall -Wno-switch -g -O2 -I. -DPHNALG -UPHNALG  -c -o HGraf.null.o HGraf.null.c
In file included from HShell.h:40,
                 from HGraf.null.c:25:
/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file or directory
   27 | #include <bits/libc-header-start.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Running dpkg -S libc-header-start.h tells me:

libc6-dev:amd64: /usr/include/x86_64-linux-gnu/bits/libc-header-start.h

Ok. /usr/include/bits should be a symlink to /usr/include/x86_64-linux-gnu/bits, but running dpkg -S /usr/include/bits gives me:

dpkg-query: no path found matching pattern /usr/include/bits

I have researched this error, and from what I can understand I ought to install gcc-multilib to resolve it. But I run into problems with this too:

The following packages have unmet dependencies:
 gcc-multilib : Depends: gcc-9-multilib (>= 9.3.0-3~) but it is not going to be installed

Trying to install gcc-9-multilib gives further and further dependency problems. Researching this, I found this thread, where they solved the gcc-multilib issue, but unfortunately it doesn't work for me. I get the same dependency issues as in the original post. Their solution was to downgrade libc6-dev running "sudo apt install libc6-dev=2.31-0ubuntu9.2". When I do this, it says:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libc6-dev is already the newest version (2.31-0ubuntu9.2).
libc6-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

So I already have the version that resolved their problem, but my problem remains.

Any suggestions on how to resolve this, and most of all get the HTK library running would be very appreciated.

EDIT:
As requested in the comments: apt policy gcc gcc-multilib gcc-9-multilib:

gcc:
  Installed: 4:9.3.0-1ubuntu2
  Candidate: 4:9.3.0-1ubuntu2
  Version table:
 *** 4:9.3.0-1ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status
gcc-multilib:
  Installed: (none)
  Candidate: 4:9.3.0-1ubuntu2
  Version table:
     4:9.3.0-1ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
gcc-9-multilib:
  Installed: (none)
  Candidate: 9.3.0-17ubuntu1~20.04
  Version table:
     9.3.0-17ubuntu1~20.04 500
        500 http://archive.ubuntu.com/ubuntu focal-security/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
     9.3.0-10ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
hr flag
Please include the output of `apt policy gcc gcc-multilib gcc-9-multilib`
Rerun avatar
cn flag
Thanks, I've updated the original post.
hr flag
Thanks - tbh I can't see why gcc-multilib won't install. However I'm curious why it is attempting to build a 32-bit version in the first place?
Knud Larsen avatar
by flag
HTK is 32bit only? `./configure` will create a Makefile with `CFLAGS = $(CPPFLAGS) -m32 ...` ...... Example htk : `htk-tools_3.4.1-ubuntu14_i386.deb` (Feb 28 2018) https://drive.google.com/file/d/1Di29AvqoRBEJ4haW2nusPT1wMPkE14B1/view?usp=sharing ... Installs OK into a clean Ubuntu 20.04, with all the i386 dependencies ( `sudo gdebi htk-tools_3.4.1-ubuntu14_i386.deb` ).
Knud Larsen avatar
by flag
It appears that somebody found a solution for 64bit https://www.linuxquestions.org/questions/tags/htk/ → https://www.linuxquestions.org/questions/linux-software-2/configure-error-c-compiler-cannot-create-executables-4175557896/page2.html , post #23 ...... Simply delete `-m32` flags in relevant `Makefile.in`s (Makefiles) or in `configure` .... and `export CC=gcc-4.8 && ./configure && make all`
Rerun avatar
cn flag
Thank you so much, Knud! The second suggestion is far better than downgrading to 32 bits. Removing the -m32 flags (albeit using my default gcc (9.3.1)) resolved the installation errors. The library seems quite buggy in general though, with heaps of warnings; I'll need to look into if they cause problems.
Score:0
kw flag

i came across this and it worked

https://wiki.crowncloud.net/?How_to_Install_GCC_on_Debian_11

after installing the gcc, go to terminal and type

gcc filename.c ./a.out

Artur Meinild avatar
vn flag
This does not provide an answer to the question. Once you have sufficient [reputation](https://askubuntu.com/help/whats-reputation) you will be able to [comment on any post](https://askubuntu.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/1272644)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.