bugThe FreeType Project - Bugs: bug #54048, Add support for IOS_PLATFORM...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #54048: Add support for IOS_PLATFORM SIMULATOR64

Submitter:  Steve Robinson <ssrobins>
Submitted:  Sun 03 Jun 2018 06:17:04 PM UTC
   
 
Severity:  3 - Normal Item Group:  Hack required
Status:  Fixed Privacy:  Public
Assigned to:  morksig Open/Closed:  Closed
Planned Release:  None

Sun 10 Jun 2018 12:30:15 PM UTC, comment #5: 

Alright. Pushed to master.

Nikolaus Waxweiler <morksig>
Group Member
Sat 09 Jun 2018 05:55:56 PM UTC, comment #4: 

I provided the github link to the iOS toolchain I use in the original submission.  Looking at the comments at the top, it looks like it's been passed around quite a bit.  The particular repo I use is being maintained, has its own travis-ci that runs builds with the toolchain, and they even merged one of my pull requests recently.

Steve Robinson <ssrobins>
Sat 09 Jun 2018 01:46:46 PM UTC, comment #3: 

Specifically, I'd like to get rid of the one shipping with FreeType if there are more comprehensive and actually tested alternatives out there.

Nikolaus Waxweiler <morksig>
Group Member
Sat 09 Jun 2018 11:47:25 AM UTC, comment #2: 

Interesting, is there some sort of popular iOS CMake toolchain file? One ships in builds/cmake/iOS.cmake but I don't know how useful it is.

Nikolaus Waxweiler <morksig>
Group Member
Sun 03 Jun 2018 06:54:04 PM UTC, comment #1: 

Nikolaus, please have a look.

Werner LEMBERG <wl>
Group administrator
Sun 03 Jun 2018 06:17:04 PM UTC, original submission:  

When building a program that uses freetype 2.9.1 for the iOS simulator, I get the following linker error:

Undefined symbols for architecture i386:
  "_BZ2_bzDecompress", referenced from:
      _ft_bzip2_file_fill_output in libfreetyped.a(ftbzip2.o)
  "_BZ2_bzDecompressInit", referenced from:
      _ft_bzip2_file_init in libfreetyped.a(ftbzip2.o)
      _ft_bzip2_file_reset in libfreetyped.a(ftbzip2.o)
  "_inflateReset", referenced from:
      _ft_gzip_file_reset in libfreetyped.a(ftgzip.o)
  "_inflate", referenced from:
      _FT_Gzip_Uncompress in libfreetyped.a(ftgzip.o)
      _ft_gzip_file_fill_output in libfreetyped.a(ftgzip.o)
  "_inflateEnd", referenced from:
      _ft_gzip_file_done in libfreetyped.a(ftgzip.o)
      _FT_Gzip_Uncompress in libfreetyped.a(ftgzip.o)
  "_BZ2_bzDecompressEnd", referenced from:
      _ft_bzip2_file_reset in libfreetyped.a(ftbzip2.o)
      _ft_bzip2_file_done in libfreetyped.a(ftbzip2.o)
  "_inflateInit2_", referenced from:
      _ft_gzip_file_init in libfreetyped.a(ftgzip.o)
      _FT_Gzip_Uncompress in libfreetyped.a(ftgzip.o)

Turns on find_package was finding zlib and bzip2, but incorrectly finding x86_64 libs and thinking they were for i386.  I suspect this is because CMake doesn't officially support iOS builds.

In order to run in the simulator, I need to use x86_64 anyway.  So I changed my CMake command to this:
cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=../ios.toolchain.cmake -DIOS_PLATFORM=SIMULATOR64 -DENABLE_BITCODE=FALSE ..

Where ios.toolchain.cmake is the toolchain from:
https://github.com/leetal/ios-cmake

This sets the architecture to x86_64.

This causes a CMake configuration error in freetype because it's expecting IOS_PLATFORM to be either OS or SIMULATOR, not SIMULATOR64.

I've attached the freetype CMakeLists.txt file with changes to support SIMULATOR64.  After this change, I'm able to build freetype for iOS simulator, link it to my program, and run the program in the simulator.

Steve Robinson <ssrobins>

 

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

Attached Files
file #44286:  CMakeLists.txt added by ssrobins (15KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by morksig (Posted a comment)
  • -email is unavailable- added by wl (Posted a comment)
  • -email is unavailable- added by ssrobins (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-06-10 morksig Open/ClosedOpen Closed
    2018-06-10 morksig StatusNone Fixed
    2018-06-03 wl Assigned toNone morksig
    2018-06-03 ssrobins Attached File- Added CMakeLists.txt, #44286

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code