Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFconv.cpp fails looking for ancient (not in tarball) expat/xmlparse/xmlparse.h #29

Open
nieder opened this issue Jan 8, 2022 · 1 comment

Comments

@nieder
Copy link

nieder commented Jan 8, 2022

On macOS 10.14.6 with expat-2.4.1 installed locally:

g++ -DHAVE_CONFIG_H -I. -I..  -I../source/Public-headers -DXML_DTD  -I/sw/include -std=c++11 -g -O2 -DNDEBUG -MT ../SFconv/sfconv-SFconv.o -MD -MP -MF ../SFconv/.deps/sfconv-SFconv.Tpo -c -o ../SFconv/sfconv-SFconv.o `test -f '../SFconv/SFconv.cpp' || echo './'`../SFconv/SFconv.cpp
../SFconv/SFconv.cpp:49:10: fatal error: 'expat/xmlparse/xmlparse.h' file not found
#include "expat/xmlparse/xmlparse.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

In SFconv.cpp, the choice between ancient expat/xmlparse/xmlparse.h and current expat.h is set by HAVE_LIBEXPAT, and that's defined in config.h: #define HAVE_LIBEXPAT 1

The problem is config.h is only included in SFconv.cpp in certain cases:

teckit/SFconv/SFconv.cpp

Lines 35 to 40 in eda0d44

#endif
#ifndef platformUTF16
#include "config.h"
#if WORDS_BIGENDIAN
#define platformUTF16 kForm_UTF16BE

It should be included much earlier like in source/Engine.cpp

Also, expat/xmlparse/xmlparse.h is not included in the tarball if anyone was trying to build without system-expat.

@adamjstewart
Copy link

Encountered the same issue on macOS 12.4 (Apple M1 Pro) with teckit 2.5.11 and expat 2.4.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants