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

Replacing config file with cmake for freetype v2.10.4 port update #14228

Closed

Conversation

HCLJason
Copy link
Contributor

Freetype 2.10.4 doesn't compile using emconfigure and emmake. I rebuilt the configuration using cmake instead based on issue 4 from the freetype port.

This needs to get edited and merged after the matching emscripten-ports/freetype PR gets merged.

Freetype doesn't compile using emconfigure and emmake. I rebuilt the configuration using cmake instead based on issue 4 from the freetype port.
@sbc100
Copy link
Collaborator

sbc100 commented May 19, 2021

If possible I would rather not increase our dependency on external tools like cmake and make. Currently only one port (harfbuzz) using an external build tool and that has caused us several issues over the last few months since sdl2_ttf started depending on it. Most of the problem stem from windows users not have the right tools installed.

Is there any fundamental reason we can't keep the old method?

@sbc100
Copy link
Collaborator

sbc100 commented May 19, 2021

By the way the existing method doesn't use emconfigure either.. it just builds the sources directly.

@HCLJason
Copy link
Contributor Author

When I updated this file to test the building v2.10.4 using the old method, there were 40k lines worth of compiler errors, mostly duplicates spread across files. One example file that covers most of them is below.

There's some discussion about cmake in the port's issues:
emscripten-ports/FreeType#4 (comment)

/local/emsdk/upstream/emscripten/cache/ports-builds/freetype/src/psaux/psobjs.c:347:27: error: use of undeclared identifier 'FT_ERR_PREFIXInvalid_File_Format'; did you mean 'FT_Err_Invalid_File_Format'?
FT_Error error = FT_ERR( Invalid_File_Format );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FT_Err_Invalid_File_Format
/local/emsdk/upstream/emscripten/cache/ports-builds/freetype/include/freetype/fttypes.h:599:22: note: expanded from macro 'FT_ERR'
#define FT_ERR( e ) FT_ERR_CAT( FT_ERR_PREFIX, e )
^
/local/emsdk/upstream/emscripten/cache/ports-builds/freetype/include/freetype/fttypes.h:595:30: note: expanded from macro 'FT_ERR_CAT'
#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y )
^
/local/emsdk/upstream/emscripten/cache/ports-builds/freetype/include/freetype/fttypes.h:594:30: note: expanded from macro 'FT_ERR_XCAT'
#define FT_ERR_XCAT( x, y ) x ## y
^
:73:1: note: expanded from here
FT_ERR_PREFIXInvalid_File_Format
^
/local/emsdk/upstream/emscripten/cache/ports-builds/freetype/include/freetype/fterrdef.h:65:3: note: 'FT_Err_Invalid_File_Format' declared here
FT_ERRORDEF_( Invalid_File_Format, 0x03,
^
/local/emsdk/upstream/emscripten/cache/ports-builds/freetype/include/freetype/fterrors.h:187:24: note: expanded from macro 'FT_ERRORDEF_'
FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s )
^
/local/emsdk/upstream/emscripten/cache/ports-builds/freetype/include/freetype/fttypes.h:595:30: note: expanded from macro 'FT_ERR_CAT'
#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y )
^
/local/emsdk/upstream/emscripten/cache/ports-builds/freetype/include/freetype/fttypes.h:594:30: note: expanded from macro 'FT_ERR_XCAT'
#define FT_ERR_XCAT( x, y ) x ## y

@sbc100
Copy link
Collaborator

sbc100 commented May 21, 2021

When I updated this file to test the building v2.10.4 using the old method, there were 40k lines worth of compiler errors, mostly duplicates spread across files. One example file that covers most of them is below.

There's some discussion about cmake in the port's issues:
emscripten-ports/FreeType#4 (comment)

/local/emsdk/upstream/emscripten/cache/ports-builds/freetype/src/psaux/psobjs.c:347:27: error: use of undeclared identifier 'FT_ERR_PREFIXInvalid_File_Format'; did you mean 'FT_Err_Invalid_File_Format'?
FT_Error error = FT_ERR( Invalid_File_Format );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FT_Err_Invalid_File_Format
/local/emsdk/upstream/emscripten/cache/ports-builds/freetype/include/freetype/fttypes.h:599:22: note: expanded from macro 'FT_ERR'
#define FT_ERR( e ) FT_ERR_CAT( FT_ERR_PREFIX, e )
^
/local/emsdk/upstream/emscripten/cache/ports-builds/freetype/include/freetype/fttypes.h:595:30: note: expanded from macro 'FT_ERR_CAT'
#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y )
^
/local/emsdk/upstream/emscripten/cache/ports-builds/freetype/include/freetype/fttypes.h:594:30: note: expanded from macro 'FT_ERR_XCAT'
#define FT_ERR_XCAT( x, y ) x ## y
^
:73:1: note: expanded from here
FT_ERR_PREFIXInvalid_File_Format
^
/local/emsdk/upstream/emscripten/cache/ports-builds/freetype/include/freetype/fterrdef.h:65:3: note: 'FT_Err_Invalid_File_Format' declared here
FT_ERRORDEF_( Invalid_File_Format, 0x03,
^
/local/emsdk/upstream/emscripten/cache/ports-builds/freetype/include/freetype/fterrors.h:187:24: note: expanded from macro 'FT_ERRORDEF_'
FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s )
^
/local/emsdk/upstream/emscripten/cache/ports-builds/freetype/include/freetype/fttypes.h:595:30: note: expanded from macro 'FT_ERR_CAT'
#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y )
^
/local/emsdk/upstream/emscripten/cache/ports-builds/freetype/include/freetype/fttypes.h:594:30: note: expanded from macro 'FT_ERR_XCAT'
#define FT_ERR_XCAT( x, y ) x ## y

I'm think you will need to figure out where those error are coming from. Switching to relying on cmake + the actual build tool (make on UNIX and mingw-make on windows) is probably not direction we want to go in here.. at least not lightly.

I still need to un-cmake this.
@stale
Copy link

stale bot commented Jun 12, 2022

This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant.

@stale stale bot added the wontfix label Jun 12, 2022
@stale stale bot closed this Jul 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants