Reactivecocoa: metamacros.h not found with CocoaPods-Installation

Created on 6 Jun 2015  Â·  12Comments  Â·  Source: ReactiveCocoa/ReactiveCocoa

When ReactiveCocoa was installed with CocoaPods, some required files are missed:

metamacros.h, imported in RACTuple.h
EXTScope.h, imported in NSNotificationCenter+RACSupport.h

I tried out different Versions: 2.1.8, 2.4.7, 2.5.0 with XCode 6.3.2.

Steps to reproduce:

  • create a new Project with XCode, Single View Application, called "RCFail"
  • add a Podfile to the directory with following content:
    pod 'ReactiveCocoa', '~> 2.4.7'
    (or any other version or now explicit version to get 2.5.0 right now)
  • open the RCFail.xcworkspace with XCode
  • build the project (or at least, try to build)

RCError/Pods/ReactiveCocoa/ReactiveCocoa/RACTuple.h:10:9: 'metamacros.h' file not found
RCError/Pods/ReactiveCocoa/ReactiveCocoa/NSNotificationCenter+RACSupport.m:10:9: fatal error: 'EXTScope.h' file not found

import "EXTScope.h"

Is there any way to use ReactiveCocoa with CocoaPods right now?

$ xcodebuild -version
Xcode 6.3.2
Build version 6D2105

Most helpful comment

Maybe someone has custom podspec that could fix this for cocoapods 1.0.0?

All 12 comments

That seems to be a problem with the Podspec, I recommend that you report this to the maintainer in the Spec repository: https://github.com/CocoaPods/Specs.

I already did. The folks there wrote, that I should report this here:
https://github.com/CocoaPods/Specs/issues/13164

Seems that no one wants to be responsible for that issue ;)

We don’t really support CocoaPods as an installation method. All podspecs for ReactiveCocoa are contributed by third parties.

Maybe someone has custom podspec that could fix this for cocoapods 1.0.0?

Ok I found solution to install ReactiveCocoa without problems. So issue is related to new version of sed tool. All you need to do is uninstall sed probably installed through brew. So jus run command:

brew uninstall sed

Then perpare_command will use right version of sed. To make sure that you have old version of sed run command: $ sed --version

And the output should be like this:

sed: illegal option -- -
usage: sed script [-Ealn] [-i extension] [file ...]
   sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]

@rafalwojcik It seems that sed is osx tool. And I can't uninstall it. It wasn't installed via brew.
which sed command shows me that it laying down at the /usr/bin/sed.
I tried to install it via sudo gem install sed. I was hoping that it will update itself on top of existing version.
This is what I get in the Terminal:

➜  sudo gem install sed
Password:
Fetching: sed-0.0.1.gem (100%)
Successfully installed sed-0.0.1
Parsing documentation for sed-0.0.1
Installing ri documentation for sed-0.0.1
1 gem installed

Nothing changed. sed --version gives me the same illegal option -- - thing.
And metamacros.h is still missing

@zigdanis What which sed prints after install it by brew?

I use the sed from brew.
For that, just ensure that in $PATH the brew's bin-directory comes first:

export PATH="/usr/local/bin:$PATH"

Then you should get the following:

$ which sed
/usr/local/bin/sed

Also sed from gem is different than that one from brew :) Make sure that you install it with right tool.

Em... I can't find sed in brew. I've tried to install ssed though. I'm not familiar with this utility at all:) Isn't there some alias for that?

➜  brew search sed
gnu-sed             libxdg-basedir      minised             ssed ✔            
Caskroom/cask/focused                    Caskroom/cask/physicseditor            
Caskroom/cask/licensed                   Caskroom/cask/subclassed-mnemosyne     
Caskroom/cask/marsedit  

gnu-sed is right one

So I've installed gnu-sed and now sed --version gives me correct response.
I had to do

 brew install gnu-sed --with-default-names

But that didn't helped:)
I've tried

pod 'ReactiveCocoa', '~> 2.5.0'
and 
pod 'ReactiveCocoa', '~> 4.0.1'

But pod install fails with

[!] /bin/bash -c 
set -e
sed -i '' 's@<ReactiveCocoa/\(.*\)>@"\1"@g' ReactiveCocoa/ReactiveCocoa.h
sed: can't read s@<ReactiveCocoa/\(.*\)>@"\1"@g: No such file or directory

And when I try pod 'ReactiveCocoa', '~> 4.2.2'
I still see metamacros.h file not found

Was this page helpful?
0 / 5 - 0 ratings