bugThe FreeType Project - Bugs: bug #47660, Regression: CMake build fail on...

 
 

bug #47660: Regression: CMake build fail on Windows

Submitted by:  Ebrahim Byagowi <ebraminio>
Submitted on:  Sun 10 Apr 2016 11:56:02 PM UTC  
 
Severity: 3 - NormalItem Group: None
Status: InvalidPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Mon 18 Apr 2016 05:54:51 AM UTC, comment #8:

Good that you found a solution, thus I'm closing the report.

As mentioned earlier, it is beyond FreeType to ensure the correct working of cmake modules, and it would need more investigation on your side why the library detection code fails. In most cases, automatic recognition of installed libraries is what the user wants...

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Sat 16 Apr 2016 10:05:35 AM UTC, comment #7:

Thank you, "-DWITH_ZLIB=OFF -DWITH_PNG=OFF -DWITH_BZIP2=OFF" made the build possible again, perhaps there should be some other solution also to make that work just like before.

Github is very handy for doing git operations like "blame" and "history" and sharing line range links and a Github respository/mirror can be configured to not have bug tracker. Only if a maintainer request for a mirror, Github itself will sync the mirror with the repository and no additional server job would be needed but if I want to setup one I should setup a sync daemon somewhere and that mirror badge won't be put. Also a Github, specially an official one, makes using freetype as a git submodule easier to handle for other Github hosted projects. I hope these would be enough reasons to request that mirror from Github but no issue if not.

Ebrahim Byagowi <ebraminio>
Tue 12 Apr 2016 09:25:11 AM UTC, comment #6:

This `BEFORE' is essential, as far as I can see, so that the configured header files are used instead of the default ones.

I strongly recommend not peeking with a stick into the dark by wildly guessing a solution using cut and paste but to find out why `FindPNG.cmake' and `FindZLIB.cmake' don't work as expected for you. AFAIK, they should work on Windows also. So the next step would be to look at cmake's and the compiler's debugging output, checking the computed paths and command line options, etc., etc.

BTW, have you tried

cmake ... -DWITH_ZLIB=OFF -DWITH_PNG=OFF ...

to disable those two libraries?

There certainly might be bugs in FreeType's `CMakeLists.txt' file, and it would be great to find a workable solution.

You are free to set up a FreeType mirror on github – I won't do it, since I don't see a benefit. In particular, people would probably start to report FreeType issues on github, meaning that I have to take care of two bug trackers, which is both confusing and more work.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Mon 11 Apr 2016 05:32:37 PM UTC, comment #5:

And just that "BEFORE" on the line is making issue!

Ebrahim Byagowi <ebraminio>
Mon 11 Apr 2016 05:05:37 PM UTC, comment #4:

Interesting, if I just comment this line:

include_directories(BEFORE "${PROJECT_BINARY_DIR}/include")

I am able to compile freetype from master without any issue

Ebrahim Byagowi <ebraminio>
Mon 11 Apr 2016 04:47:09 PM UTC, comment #3:

The current build error message is consistent after this https://github.com/aseprite/freetype2/commit/52c9b1aaf39c784 and if I copy content of https://raw.githubusercontent.com/aseprite/freetype2/22479ca825804c66168beba6f685f67508da4a60/CMakeLists.txt manually to the master rev of the repo freetype will be compiled without libpng and zlib.

> Note that my cmake knowledge is very limited since I don't use it; essentially, it's contributed stuff...


So I see also I can fix it :)

BTW is it possible to setup a mirror for freetype on GitHub? I contanted Github https://help.github.com/articles/about-github-mirrors/ before for that and they said something like a maintainer of project should contact them. The final result would be something like https://github.com/android/platform_build which decently mentions the original repository address.

Ebrahim Byagowi <ebraminio>
Mon 11 Apr 2016 04:12:19 PM UTC, comment #2:

No. The point is being able to compile freetype without zlib and libpng as it was just before the mentioned change.

Ebrahim Byagowi <ebraminio>
Mon 11 Apr 2016 06:02:06 AM UTC, comment #1:

Do you have zlib and libpng installed? Have you checked the library paths created by cmake? Essentially, FreeType's `CMakeLists.txt' file relies on the library detection support that directly comes with cmake (e.g., file `FindPNG.cmake') – in other words, any failure here isn't the fault of FreeType.

Or maybe you previously have both zlib and libpng disabled in the FreeType configuration?

Note that my cmake knowledge is very limited since I don't use it; essentially, it's contributed stuff...

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Sun 10 Apr 2016 11:56:02 PM UTC, original submission:

I am unable to compile freetype on Visual Studio as it gives errors like this: https://i.imgur.com/41mEYmE.png It fails to detect zlib and libpng are absent but this was just used to work before. I realized freetype before VER-2-6-1 (Ver-2-6) was working without issue and with more bisecting reached to this https://github.com/aseprite/freetype2/commit/97b757de4b which have a bit different compile error message than VER-2-6-1.

Ebrahim Byagowi <ebraminio>

 

(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 ebraminio (Submitted the item)
  • -unavailable- added by ebraminio
  •  

    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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 18 Apr 2016 05:54:51 AM UTCwlStatusNeed Info=>Invalid
      Open/ClosedOpen=>Closed
    Mon 11 Apr 2016 06:02:06 AM UTCwlStatusNone=>Need Info
      Assigned toNone=>wl
    Sun 10 Apr 2016 11:56:02 PM UTCebraminioCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1