VideoCore-Inactive icon indicating copy to clipboard operation
VideoCore-Inactive copied to clipboard

'type_half.inl' file not found?

Open carruis opened this issue 10 years ago • 42 comments

'type_half.inl' file not found?

carruis avatar Nov 20 '15 05:11 carruis

I am also facing the same issue. Please suggest

kvkvkvk avatar Nov 20 '15 06:11 kvkvkvk

+1 Same issue here, seems to be related to cocoa pods changes/updates though.

@kvkvkvk @carruis

The problem seems to be introduced and related to the cocoapods v0.39.0: See: https://github.com/jgh-/VideoCore/issues/209 and: https://github.com/CocoaPods/CocoaPods/pull/4057

A possible solution:

Downgrade to cocoapods v0.38.2 which i can confirm is working (20-11-2015):

gem install cocoapods -v 0.38.2
gem uninstall cocoapods -v 0.39.0

srmds avatar Nov 20 '15 09:11 srmds

Need more help now with errors below:

Undefined symbols for architecture x86_64: "videocore::Apple::H264Encode::H264Encode(int, int, int, int, bool, int)", referenced from: std::__1::shared_ptrvideocore::Apple::H264Encode std::__1::shared_ptrvideocore::Apple::H264Encode::make_shared<double, double, int, int, bool, int&>(double&&, double&&, int&&, int&&, bool&&, int&&&) in libVideoCore.a(VCSimpleSession.o) "videocore::Apple::H264Encode::~H264Encode()", referenced from: std::__1::__libcpp_compressed_pair_impstd::__1::allocator<videocore::Apple::H264Encode, videocore::Apple::H264Encode, 1u>::~__libcpp_compressed_pair_imp() in libVideoCore.a(VCSimpleSession.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

kvkvkvk avatar Nov 20 '15 11:11 kvkvkvk

The newest version of cocoapods introduced this issue. I was able to fix it by updating the glm podspec to include a library search path. Are you all using the pod as a framework? (use_frameworks!)

maxcampolo avatar Nov 23 '15 17:11 maxcampolo

@maxcampolo At the moment the issue is fixed for me. Actually, i'm not using the Videocore pod as a Framework but as a static lib. Will try to use it as a framework, thanks!

srmds avatar Nov 23 '15 18:11 srmds

:+1: same here

ppamorim avatar Dec 01 '15 15:12 ppamorim

@maxcampolo and @srmds can you guys explain how you got your working exactly:) I'm still having issues with this.

reedjsmith avatar Dec 01 '15 16:12 reedjsmith

@reedjsmith I use a little bit of a custom setup, I'll explain it and hope it helps.

tl;dr - I use a fork of glm where I add s.xcconfig = { 'LIBRARY_SEARCH_PATHS' => '$(PODS_ROOT)/glm' } to the podspec. Here's my full spec https://github.com/maxcampolo/glm/blob/master/glm.podspec.

Here's a longer version, maybe @jgh- can weigh in, I think it would be helpful to get some of these changes in the master repo. @ppamorim this answer may help you for your issue #230

I use Swift, Cocoapods frameworks (use_frameworks!), and the newest version of Cocoapods (0.39.0) so I had to make a couple changes to the VideoCore podspec as well as the glm podspec to support this.

The problem in Swift is that there can not be any exposed c++ code, even in objective-c++ headers. So I made a submodule in the podspec that just exposed the api files as public headers (VCPreviewView.h, VCSimpleSession.h), and added a module name so I can use import VideoCore in Swift files rather than using a bridging header. Then I import VideoCore in my project podfile as pod 'VideoCore/Swift'. I also updated my spec to use my new version of glm. Here's my full VideoCore podspec for reference https://github.com/maxcampolo/VideoCore/blob/update_headers/VideoCore.podspec.

Last problem and the reason I'm a little stuck in providing this as an update to master repo is that the .inl files have to be included in the public headers in the glm podspec however this causes a lint error in the podspec because .inl is not a valid header extension. Haven't yet figured out how I want to solve this.

maxcampolo avatar Dec 01 '15 19:12 maxcampolo

@maxcampolo thank you!

reedjsmith avatar Dec 01 '15 22:12 reedjsmith

Still not working. Anyone can help me?

ppamorim avatar Dec 02 '15 13:12 ppamorim

This solution was for dynamic frameworks and Swift. The other option is to use it as a static library and import it with a bridging header (this is what the swift sample project does). Just remove use_frameworks! from your podfile.

maxcampolo avatar Dec 02 '15 15:12 maxcampolo

I have another library that needs to use_frameworks!. Any idea?

ppamorim avatar Dec 02 '15 15:12 ppamorim

I use the same thing, that's the solution I posted above. I'll need more information on what's not working when you tried it to be able to help.

maxcampolo avatar Dec 02 '15 15:12 maxcampolo

@maxcampolo Another question: I've cloned your repository and opened the project in the branch update_headers. It works with pod 0.39.0?

ppamorim avatar Dec 02 '15 16:12 ppamorim

Yeah you also need glm, if you want to try out my branches your podfile should look like this. These are up to date with the master repo's but consider them works in progress.

pod 'VideoCore/Swift', :git => 'https://github.com/maxcampolo/VideoCore.git', :branch => 'update_headers' pod 'glm', :git => 'https://github.com/maxcampolo/glm.git'

Also remember you don't need a bridging header with this, just import the module in your file.

maxcampolo avatar Dec 02 '15 16:12 maxcampolo

@maxcampolo well, after the pod install... captura de tela 2015-12-02 as 14 13 36

ppamorim avatar Dec 02 '15 16:12 ppamorim

Okay I hadn't updated the SampleBroadcaster-Swift podfile to actually use this setup. I figured you were just including in your own project. I just pushed an update to the update_headers branch though which adds those changes to the sample project if you want to check it out.

maxcampolo avatar Dec 02 '15 16:12 maxcampolo

@maxcampolo Oh, thanks! I added the pod that you sent to me and works fine. Thanks again!

ppamorim avatar Dec 02 '15 16:12 ppamorim

@maxcampolo Thanks a lot, man! You are really cool!

pash3r avatar Feb 02 '16 09:02 pash3r

@maxcampolo Thank you very much!

gonghao avatar Mar 07 '16 08:03 gonghao

@maxcampolo save my day

peiweichen avatar Mar 09 '16 10:03 peiweichen

@gonghao now my project compiles however when I try to stream the video, I get this below logs

ClientState: 1 ClientState: 2 ClientState: 3 Want read:4096, read:3073 ClientState: 4 ClientState: 5 ClientState: 6 Tracking command(1, connect) Want read:4096, read:336 Steam in buffer size:336 First byte:0x2, header type:0 Handle message:5 Received server window size: 2500000 Steam in buffer size:320 First byte:0x2, header type:0 Handle message:6 Received peer bandwidth limit: 2500000 type: 2 Steam in buffer size:303 First byte:0x2, header type:0 Handle message:1 Request to change incoming chunk size from 128 -> 4096 Steam in buffer size:287 First byte:0x3, header type:0 Handle message:20 Received invoke Received invoke _result Find command: connect for ID:1 Tracking command(2, releaseStream) Tracking command(3, FCPublish) Tracking command(4, createStream) ClientState: 7 Steam in buffer size:33 First byte:0x3, header type:0 Handle message:20 Received invoke Received invoke onBWDone Want read:4096, read:0 Read from stream error:0 ClientState: 11 ~RTMPSession

satyamub avatar Mar 21 '16 04:03 satyamub

Hey thanks for solution. Not sure I understand this part:

The problem in Swift is that there can not be any exposed c++ code, even in objective-c++ headers. So I made a submodule in the podspec that just exposed the api files as public headers (VCPreviewView.h, VCSimpleSession.h), and added a module name so I can use import VideoCore in Swift files rather than using a bridging header. Then I import VideoCore in my project podfile as pod 'VideoCore/Swift'

Can you comment on it, how to submodule in a right way, thanks!

matrosovDev avatar Apr 11 '16 13:04 matrosovDev

Here's the podspec I use. https://github.com/maxcampolo/VideoCore/blob/update_headers/VideoCore.podspec.

The subspec is the section that starts s.subspec 'Swift' do |swift|. What I'm describing in the text you linked is this line swift.public_header_files = 'api/**/*.h'. This says only expose these headers as public to the project, the ones that don't have any c++ code. The rest of the necessary files are still included in sources.

You can check out my fork here https://github.com/maxcampolo/VideoCore and use the framework in your project if you want by adding this to your podfile pod 'VideoCore/Swift', :git => 'https://github.com/maxcampolo/VideoCore.git'

maxcampolo avatar Apr 11 '16 13:04 maxcampolo

@maxcampolo thanks for quick answer, you said that you forked glm, but I've checked your podspec of video core and seems there is a dependency still s.dependency 'glm', '~> 0.9.7.1'

maybe I did not understand how to use it. So I forked glm and added podspec as you suggested. But now how can I use my forked repo to download sources from there?

matrosovDev avatar Apr 11 '16 16:04 matrosovDev

pod 'glm', :git => 'https://github.com/maxcampolo/glm.git' replace the url with the path to your repo.

maxcampolo avatar Apr 11 '16 17:04 maxcampolo

@maxcampolo can you make this change public so that we can use this as a dependency in a pod spec!!!

satyamub avatar Apr 18 '16 11:04 satyamub

when I trying to make as "s.dependency 'glm', :git => 'https://github.com/maxcampolo/glm.git'".. it does not support!!!

satyamub avatar Apr 18 '16 11:04 satyamub

If I make the 0.3.2 version of vide core dependency it does not work!!!!

satyamub avatar Apr 18 '16 11:04 satyamub

@satyamub it is public. Put pod 'glm', :git => 'https://github.com/maxcampolo/glm.git' in your podfile, not in the podspec, leave the podspec dependency as is. The VideoCore pod will see you already have this installed and use it. Make sure you remove both VideoCore and GLM from your project and do a pod install to get the correct frameworks.

maxcampolo avatar Apr 18 '16 11:04 maxcampolo

Hi @maxcampolo I am making a cocoapod lib in which i want this as a dependency as I want my co worker to pod install in their system and then they get your features as well as my features (other video features, which i included in my lib). thats why I want this in "s.dependency 'glm', :git => 'https://github.com/maxcampolo/glm.git'" in pod spec file of my lib however I learnt that ":git" is not available in pod spec so asked you to changed this. any idea?

satyamub avatar Apr 18 '16 12:04 satyamub

@satyamub

 pod 'VideoCore/Swift', :git => 'https://github.com/peiweichen/VideoCore.git', :branch => 'update_headers'
pod 'glm', :git => 'https://github.com/peiweichen/glm'

peiweichen avatar Apr 26 '16 02:04 peiweichen

@peiweichen :git is not supported in dependency in Cocoapod.. Please refer...

satyamub avatar Apr 26 '16 08:04 satyamub

I got this working by settings the glm header search path to recursive on the VideoCore target in the Pods project. This took away the type_half.inl issue, but gave me a VCSimpleSession.h file not found error in MY project. I fixed this one by adding a "$(PODS_ROOT)/VideoCore" to the header search path in my project.

Below is where I changed the glm header search path, just for clarity. Hope this might help someone.

screenshot

MikeDonahue avatar Jul 05 '16 16:07 MikeDonahue

+1 to @MikeDonahue 's solution.

mutekinootoko avatar Jul 26 '16 16:07 mutekinootoko

👍 @MikeDonahue Donahue

srmds avatar Aug 14 '16 21:08 srmds

@MikeDonahue the recursive part worked, but it still shows error "VCSimpleSession.h" file not found, even I have added "$(PODS_ROOT)/VideoCore" to the header search path in my project.

loksurya avatar Aug 22 '16 09:08 loksurya

@MikeDonahue +1 it still shows error "VCSimpleSession.h" file not found,but I have added "$(PODS_ROOT)/VideoCore" to the header search path in my project.

silenCetestifY avatar Sep 12 '16 07:09 silenCetestifY

@silenCetestifY have you found any solution

bintu1234 avatar Nov 16 '16 06:11 bintu1234

@bintu1234 no,can you help me?

silenCetestifY avatar Nov 16 '16 08:11 silenCetestifY

@silenCetestifY & @loksurya sorry for such a late response. Did you guys set the $(PODS_ROOT)/VideoCore to recursive also in YOUR projects' header search paths?

MikeDonahue avatar Dec 06 '16 14:12 MikeDonahue

@MikeDonahue Thank's for solution

bhoomesh950 avatar Oct 26 '17 07:10 bhoomesh950