facebookincubator / spectrum

A client-side image transcoding library.
https://libspectrum.io
MIT License
1.99k stars 165 forks source link

SpectrumKit in cocoapod use_modulars_headers! #26

Open scutletbutt opened 5 years ago

scutletbutt commented 5 years ago

i am using Cocoapods to use Spectrum pod 'SpectrumKit/Plugins/JPEG Using use_modular_headers!, pod installation completed Xcode compile error as below

on file: ‘LibJpegDctTransformer.h’

Warning appear on code: extern "C" {

include <mozjpeg/transupp.h> // doesn't play nice with C++

}

the warning message is: import of C++ module 'mozjpeg.mozjpeg.transupp' appears within extern "C" language linkage specification

cuva commented 5 years ago

Thanks for submitting an issue @scutletbutt - I believe this is linked to #25 but I will have a look into it shortly and report back!

scutletbutt commented 5 years ago

Hi Cuva, thanks for respond In cocoapod I tried option as below, switching back and forth many time, the conclusion is: Option 1) use_framework, Spectrum does not support framework yet Option 2) use_modular_headers, error come out from a Spectrum code ‘import of C++ module 'mozjpeg.mozjpeg.transupp' appears within extern "C" language linkage specification’ Option 3) without use_framwork and use_modular_headers, some modules does not recognize by Xcode one after another. Error mesage “no such modules X”, X = modules such as FBSDKLoginKit or FirebaseAuth

Now in my cocoapod I am using use_modular_header without pod Spectrum, others modules work well, so i temporary remove spectrum, would like to use it if possible

cuva commented 5 years ago

@scutletbutt I'm working on adding support for modular headers. In the meantime, feel free to exclude modular headers from this pod like so:

pod 'SpectrumKit', :modular_headers => false
scutletbutt commented 5 years ago

@cuva I tried that, the end result is same as only use_modular_header! Somehow cocoapod won’t recognize the code :modular_headers => false Search for cocopod github issues, seem like a bug Good to know u are working on support for modular headers, may I ask about roughly how long it will take

cuva commented 5 years ago

Hi @scutletbutt. I've got a fix locally which enables support for modular header - but I haven't had the time to push it yet (it requires pushing an update to the mozjpeg pod too).

I'm hopping to get it merged before the end of the week - I'll report back then!

scutletbutt commented 5 years ago

Thank for the work @cuva , appreciate it.

cuva commented 5 years ago

Hey @scutletbutt. Just a quick heads up - some changes to our internal build system has made this fix slightly more complicated than anticipated. I'm still working on it, I don't anticipate it taking much longer.

scutletbutt commented 5 years ago

Thanks for the heads up @cuva

tarekabdallah commented 5 years ago

Hey @cuva any updates concerning this issue?

cuva commented 5 years ago

@scutletbutt a fix for this will be released in the next few days - thanks for your patience!

diegosanchezr commented 5 years ago

Hey @scutletbutt, we've just pushed v1.1.0, which adds support for :modular_headers.

Can you update your Podfile to use v.1.1.0 and check whether it works for you?

rahulvyas commented 4 years ago

It still doesn't work