bugThe FreeType Project - Bugs: bug #49673, Failed to build freetype with...

 
 

bug #49673: Failed to build freetype with external zlib 1.2.8 using Visual Studio 2015.

Submitted by:  Xpol Wan <xpol>
Submitted on:  Wed 23 Nov 2016 06:38:15 AM UTC  
 
Severity: 3 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.7.1

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 01 Dec 2016 10:39:35 AM UTC, comment #1:

Should be fixed now in git. Please test.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Wed 23 Nov 2016 06:38:15 AM UTC, original submission:

When build freetype (2.6.5 and 2.7) using msvc 14 with external zlib 1.2.8 I got follow error:

ftgzip.c
zlib-1.2.8\zlib.h(86): error C2061: syntax error: identifier 'z_const'
zlib-1.2.8\zlib.h(94): error C2054: expected '(' to follow 'z_const'
zlib-1.2.8\zlib.h(94): error C2085: 'msg': not in formal parameter list
...
zlib-1.2.8\zlib.h(877): fatal error C1003: error count exceeds 100; stopping compilation

The error is because currently freetype keeps an own copy of zlib-1.1.4 under src\gzip.

When building src\gzip\ftgzip.c with FT_CONFIG_OPTION_SYSTEM_ZLIB defined, it use

#include <zlib.h>

That will find external zlib.h, but zlib.h itself has a line:

#include "zconf.h"

which turns out Visual Studio 2015 will find src\gzip\zconf.h since current compiled source file is under src\gzip.
This will generates lots of errors like above.

The workaround, IMHO, would be:

1. move all zlib files under src\gzip into src\gzip\zlib and
2. change according include statements in src\gzip\ftgzip.c.

Xpol Wan <xpol>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wl (Posted a comment)
  • -unavailable- added by xpol (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 01 Dec 2016 10:39:35 AM UTCwlStatusNone=>Fixed
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.7.1

    Back to the top


    Powered by Savane 3.1-cleanup1