Navigation Menu

Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

'type_half.inl' file not found? #224

Open
carruis opened this issue Nov 20, 2015 · 42 comments
Open

'type_half.inl' file not found? #224

carruis opened this issue Nov 20, 2015 · 42 comments

Comments

@carruis
Copy link

carruis commented Nov 20, 2015

'type_half.inl' file not found?

@kvkvkvk
Copy link

kvkvkvk commented Nov 20, 2015

I am also facing the same issue. Please suggest

@srmds
Copy link

srmds commented Nov 20, 2015

+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: CocoaPods/CocoaPods#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

@kvkvkvk
Copy link

kvkvkvk commented Nov 20, 2015

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)

@maxcampolo
Copy link

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!)

@srmds
Copy link

srmds commented Nov 23, 2015

@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!

@ppamorim
Copy link

ppamorim commented Dec 1, 2015

👍 same here

@reedjsmith
Copy link

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

@ppamorim ppamorim mentioned this issue Dec 1, 2015
@maxcampolo
Copy link

@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.

@reedjsmith
Copy link

@maxcampolo thank you!

@ppamorim
Copy link

ppamorim commented Dec 2, 2015

Still not working. Anyone can help me?

@maxcampolo
Copy link

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.

@ppamorim
Copy link

ppamorim commented Dec 2, 2015

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

@maxcampolo
Copy link

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.

@ppamorim
Copy link

ppamorim commented Dec 2, 2015

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

@maxcampolo
Copy link

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.

@ppamorim
Copy link

ppamorim commented Dec 2, 2015

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

@maxcampolo
Copy link

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.

@ppamorim
Copy link

ppamorim commented Dec 2, 2015

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

@pash3r
Copy link

pash3r commented Feb 2, 2016

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

@gonghao
Copy link

gonghao commented Mar 7, 2016

@maxcampolo Thank you very much!

@peiweichen
Copy link

@maxcampolo save my day

@satyamub
Copy link

@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

@matrosovDev
Copy link

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!

@maxcampolo
Copy link

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'

@matrosovDev
Copy link

@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?

@maxcampolo
Copy link

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

@satyamub
Copy link

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

@satyamub
Copy link

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

@satyamub
Copy link

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

@maxcampolo
Copy link

@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.

@satyamub
Copy link

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?

@peiweichen
Copy link

@satyamub

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

@satyamub
Copy link

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

@MikeDonahue
Copy link

MikeDonahue commented Jul 5, 2016

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

@mutekinootoko
Copy link

+1 to @MikeDonahue 's solution.

@srmds
Copy link

srmds commented Aug 14, 2016

👍 @MikeDonahue Donahue

@loksurya
Copy link

@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.

@silenCetestifY
Copy link

@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.

@bintu1234
Copy link

@silenCetestifY have you found any solution

@silenCetestifY
Copy link

silenCetestifY commented Nov 16, 2016

@bintu1234 no,can you help me?

@MikeDonahue
Copy link

@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?

@bhoomesh950
Copy link

@MikeDonahue Thank's for solution

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests