[texworks] fontconfig issues

Stephen Moye sgmoye at me.com
Fri Sep 26 21:04:27 CEST 2008


On Sep 26, 2008, at 1:43 PM, Jonathan Kew wrote:

> On 26 Sep 2008, at 4:19 PM, Stephen Moye wrote:
>
>> This is what I'm getting from Xcode:
>>
>> ---------------------------
>>
>> Building target ???TeXworks??? of project ???TeXworks??? with  
>> configuration ???Debug??? ??? (4 errors, 1 warning)
>> 	    cd /Projects/texworks-app
>>  /Developer/usr/bin/g++-4.0 -o /Projects/texworks-app/obj/ 
>> TeXworks.build/Debug/TeXworks.build/Objects-normal/i386/TeXworks -L/ 
>> Projects/texworks-app/build/Debug -L/Library/Frameworks -L/usr/ 
>> local/lib -L/System/Library/Frameworks -F/Projects/texworks-app/ 
>> build/Debug -filelist /Projects/texworks-app/obj/TeXworks.build/ 
>> Debug/TeXworks.build/Objects-normal/i386/TeXworks.LinkFileList - 
>> lpoppler-qt4.3 -lhunspell-1.2.0.0.0 -framework QtXml -framework  
>> QtGui -framework Carbon -framework AppKit -framework QtCore - 
>> framework ApplicationServices -arch i386
>
> Apparently you're building an Intel application (-arch i386)...
>
>> -mmacosx-version-min=10.3 -headerpad_max_install_names -L/Library/ 
>> Frameworks -F/Library/Frameworks -L/usr/local/lib -lz -lm
>> ld: warning in /usr/local/lib/libhunspell-1.2.0.0.0.dylib, file is  
>> not of required architecture
>
> ...but the hunspell library you've got (did you build that from  
> source, too?) doesn't include Intel code.
>
> OK, now I start speculating: I think you're running on a PowerPC  
> Mac. However, the TeXworks project file (.pro) is set up to build  
> universal binaries by default, so Xcode will compile for both  
> architectures.
>
> But when you built hunspell, the configure process detected a PPC  
> machine and built a PPC library. So the TeXworks build fails when  
> trying to link the i386 version of the code.
>
> Solution? Two possibilities:
>
> (1) Edit TeXworks.pro and remove the line
>
>        CONFIG += x86 ppc
>
> and then re-run qmake to create a fresh Xcode project. Without that  
> CONFIG line, it will build a single-architecture app for your  
> platform, which is fine if you're not planning to share it with  
> other people on other kinds of machine.
>
> (2) Re-do your hunspell build, setting an appropriate environment  
> for the configure script so that it builds a Universal library. What  
> options would that require? Sorry, I don't remember offhand!  
> Something along the lines of
>
>    CC='gcc -arch ppc -arch i386' CXX='g++ -arch ppc -arch i386' ./ 
> configure
>
> might do it, but there may be additional variables you have to  
> adjust as well.

Good guesses! Of the two options that you recommend, my vote would be  
for the second, particularly as I work on both kinds of machines. I  
tried to recompile hunspell as you suggested, but got this:

---------------------

14:52 ~/<2>hunspell-1.2.7: ./configure CC='gcc -arch ppc -arch i386'  
CXX='g++ -arch ppc -arch i386' checking build system type... powerpc- 
apple-darwin9.5.0
checking host system type... powerpc-apple-darwin9.5.0
checking target system type... powerpc-apple-darwin9.5.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... checking for suffix of object  
files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ -arch ppc -arch i386 accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++ -arch ppc -arch i386... gcc
checking for gcc... gcc -arch ppc -arch i386
checking whether we are using the GNU C compiler... yes
checking whether gcc -arch ppc -arch i386 accepts -g... yes
checking for gcc -arch ppc -arch i386 option to accept ISO C89... none  
needed
checking dependency style of gcc -arch ppc -arch i386... gcc
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ld used by gcc -arch ppc -arch i386... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -p
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
14:52 ~/<2>hunspell-1.2.7:

--------------------

Obviously there is no /lib for cpp to be in, but I have been unable to  
get ./configure to look in /usr/bin which is where it is. So, again,  
you're right, there's another variable to be set. I tried all kinds of  
things after googling for the problem and nothing that I tried worked.  
I am hesitant to presume further on your good nature...

I am assembling all of this into a notes file to help any others who  
want to pick their way along this singularly thorny path.

Thanks again for all your assistance.

Stephen


More information about the texworks mailing list