Problem with X11

1,880 views
Skip to first unread message

Alida Chevalier

unread,
Feb 11, 2015, 3:07:32 AM2/11/15
to fave-...@googlegroups.com
Hello everyone,

Sorry if this is a silly question... I'm installing FAVE on a new iMAC with Yosemite. I have installed XQuartz and XCode and I'm struggling to get HTK to work. I've changed 'labid' to 'labpr' in the HRec.c file. I can find Xlib.h on my hard drive, but it isn't found when I  'make all', and I have no idea how to fix it:

Administrators-iMac:htk admin$ make all

(cd HTKLib && /Applications/Xcode.app/Contents/Developer/usr/bin/make HTKLib.a) \

  || case "" in *k*) fail=yes;; *) exit 1;; esac;

gcc  -ansi -g -O2 -DNO_AUDIO -D'ARCH="darwin"' -I/usr/include/malloc -Wall -Wno-switch -g -O2 -I. -DPHNALG   -c -o HGraf.o HGraf.c

HGraf.c:73:10: fatal error: 'X11/Xlib.h' file not found

#include <X11/Xlib.h>      /* the X11 stuff makes string.h also available */

         ^

1 error generated.

make[1]: *** [HGraf.o] Error 1

make: *** [HTKLib/HTKLib.a] Error 1

Administrators-iMac:htk admin$ 

Danielle Turton

unread,
Feb 11, 2015, 6:52:46 AM2/11/15
to fave-...@googlegroups.com
Hi Alida, 

I had this problem recently and solved it with the help of the link at the bottom.  I entered this in terminal:

ln -s /opt/X11/include/X11 /usr/local/include/X11 
and it sorted things out for me.  

I got it from the second answer here http://stackoverflow.com/questions/11465258/xlib-h-not-found-when-building-graphviz-on-mac-os-x-10-8-mountain-lion

The other answers suggest to do what is in the FAVE instructions, but I had trouble with this on Mavericks.

Danielle

Keelan Evanini

unread,
Feb 11, 2015, 7:00:18 AM2/11/15
to fave-...@googlegroups.com
Hi Alida,

Another solution it to just disable the HTK graphical tools that use X11, since these are not required for FAVE-align.  You can do this by using the following two arguments to configure before you run 'make all':

$ configure --without-x --disable-hslab

--Keelan

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.
To post to this group, send email to fave-...@googlegroups.com.
Visit this group at http://groups.google.com/group/fave-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/fave-users/192e16c2-4b76-4b61-9cb9-20793307bb9f%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Josef Fruehwald

unread,
Feb 11, 2015, 7:28:55 AM2/11/15
to fave-...@googlegroups.com
I'm going to be updating the install instructions on the github wiki to include both these options to eliminate X11 dependencies and to eliminate needing to fix the labpr bug (thanks to Kyle Gorman for that one).

-Joe

Alida Chevalier

unread,
Feb 12, 2015, 1:47:53 AM2/12/15
to fave-...@googlegroups.com

Thanks very much everyone! Keelan's advice did the trick :)

All the best!

Alida





For more options, visit https://groups.google.com/d/optout.



--
Alida Chevalier
Researcher: Linguistics
School of African and Gender Studies, Anthropology and Linguistics
University of Cape Town
021 650 5907

Alida Chevalier

unread,
Mar 9, 2015, 7:42:48 AM3/9/15
to fave-...@googlegroups.com
Hello everyone,

I'm sorry it seems like I have some sort of problem each time I try to install FAVE on a different computer. Again the problem is with X11.
Here is what I typed into terminal:

cd ~/Downloads/htk

./configure --without-x --disable-hslab

make all.

And then I get this error:

strarr.c:21:10: fatal error: 'malloc.h' file not found

I tried this code too (from the wiki), and still malloc.h is not found:
export CPPFLAGS=-UPHNALG
./configure --without-x --disable-hslab
make all
sudo make install

Hopefully this is the last time I install FAVE :)

Alida


To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at http://groups.google.com/group/fave-users.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at http://groups.google.com/group/fave-users.

Josef Fruehwald

unread,
Mar 9, 2015, 9:15:07 AM3/9/15
to fave-...@googlegroups.com
Hi Alida,

Is it a Mac you're installing this on? If so, make sure that you've got commandline tools installed. OSX 10.10 (Yosemite) seems to come with some necessary command line tools pre-installed, but not all of them. Try running:

xcode-select --install
and going through the installation from there. Hopefully that'll do the trick.

-Joe


To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at http://groups.google.com/group/fave-users.

Alida Chevalier

unread,
Mar 9, 2015, 9:54:20 AM3/9/15
to fave-...@googlegroups.com
Hi Joe,

Yes is it - Yosemite. I ran the code you suggest below and that solved the first problem. Now there's another problem:

cd ~/Downloads/htk

export CPPFLAGS=-UPHNALG

./configure --without-x --disable-hslab --prefix=/usr

make all


I'm really sorry to need so much hand-holding!

Alida


To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.
To post to this group, send email to fave-...@googlegroups.com.
Visit this group at http://groups.google.com/group/fave-users.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.
To post to this group, send email to fave-...@googlegroups.com.
Visit this group at http://groups.google.com/group/fave-users.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.
To post to this group, send email to fave-...@googlegroups.com.
Visit this group at http://groups.google.com/group/fave-users.



--
Alida Chevalier
Researcher: Linguistics
School of African and Gender Studies, Anthropology and Linguistics
University of Cape Town
021 650 5907

Josef Fruehwald

unread,
Mar 9, 2015, 10:18:44 AM3/9/15
to fave-...@googlegroups.com
I can replicate this. The problem is that some stuff is still left over from the last time you ran `make all`. Try running:

make clean

and then running the main chunk again.

export CPPFLAGS=-UPHNALG
./configure --without-x --disable-hslab --prefix=/usr
make all
sudo make install

-Joe

Alida Chevalier

unread,
Mar 10, 2015, 3:06:07 AM3/10/15
to fave-...@googlegroups.com
Worked like a charm. Thanks very much Joe!
A



For more options, visit https://groups.google.com/d/optout.

Lanlan Li

unread,
May 4, 2015, 4:32:16 PM5/4/15
to fave-...@googlegroups.com
Hi Joe,

I am sorry, I have the same problem could not be fixed. I tried "make clean" and the main chunk, but every time when I run "make all", it keeps noticing "strarr.c:21:10: fatal error: 'malloc.h' file not found
#include <malloc.h>"  
Could you help me fix this? 
Thank you!

Lanlan

Ed King

unread,
Mar 5, 2016, 6:01:35 PM3/5/16
to FAVE (Force Alignment and Vowel Extraction) Users Group
Hi all,

I had the same issue as Lanlan on OS X Yosemite, even after running `make clean'. It looks like newer versions of Xcode place malloc.h in several different locations, none of which are in the default include path. You can add the appropriate path with the following:

export CPPFLAGS="-UPHNALG -I/usr/include/malloc/"

./configure --without-x --disable-hslab
make all
sudo make install
and just to keep my afternoon's worth of effort all in one place, I was also repeatedly seeing:

gcc  -Wall -Wno-switch -g -O2 -I.    -c -o esignal.o esignal.c

esignal.c:974:29: error: use of undeclared identifier 'ARCH'

   if (strcmp(architecture, ARCH) == 0)    /* native architecture */

                            ^

esignal.c:1184:25: error: use of undeclared identifier 'ARCH'

         architecture = ARCH;

                        ^

2 errors generated.  



I solved this by adding a CFLAG that (specifically for OS X) would force it to be "darwin":

export CPPFLAGS="-UPHNALG -I/usr/include/malloc/"

export CFLAGS='-DARCH=\"darwin\"'

./configure --without-x --disable-hslab
make all
sudo make install


These solutions are based on (and are a very slightly simplified version of) tips from Will Styler at http://linguisticmystic.com/2014/02/12/penn-forced-aligner-on-mac-os-x/


Hope this can help someone in the future.

Ed

George Bailey

unread,
Feb 5, 2019, 5:23:01 AM2/5/19
to FAVE (Force Alignment and Vowel Extraction) Users Group
Hi all,

I know this thread is a few years old now but I'm leaving this here in case anyone finds it useful.

I've been attempting to install FAVE on a new Mac running Mojave and kept running into trouble at the HTK stage - even when following all the instructions in this thread, I still kept getting this error message: strarr.c:21:10: fatal error: 'malloc.h' file not found. I got it working in the end by manually going into the strarr.c file (inside the HTKLib folder) and editing line 21 to replace:
#include <malloc.h>
with:
#include <stdlib.h>

This was based on a semi-relevant thread here: https://stackoverflow.com/questions/5929787/include-malloc-h-xcode

Anyway, it seems to be working now so maybe it'll be useful for some poor soul who ends up in a similar position 5 years from now.

-G

Derek Denis

unread,
Apr 2, 2019, 12:58:56 PM4/2/19
to FAVE (Force Alignment and Vowel Extraction) Users Group
Thanks George. We were those poor souls, not 5 years but 2 months later!
Reply all
Reply to author
Forward
0 new messages