Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint failed on an Objective C++ framework #6410

Closed
wuwen1030 opened this issue Jan 16, 2017 · 8 comments
Closed

Lint failed on an Objective C++ framework #6410

wuwen1030 opened this issue Jan 16, 2017 · 8 comments

Comments

@wuwen1030
Copy link

wuwen1030 commented Jan 16, 2017

Report

What did you do?

pod trunk push

What did you expect to happen?

My spec was pushed successfully.

What happened instead?

I got a lint error.

 -> VZFlexLayout (0.1.0)
    - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - NOTE  | xcodebuild:  /Users/wuwen/Library/Developer/Xcode/DerivedData/App-felyndxqitlvmkdgxrksiowjebzi/Build/Products/Release-iphonesimulator/VZFlexLayout/VZFlexLayout.framework/Headers/VZFActionWrapper.h:11:9: fatal error: 'unordered_map' file not found
    - NOTE  | xcodebuild:  /var/folders/b8/dvbb00c152n7y98427hwclwm0000gn/T/CocoaPods/Lint/App/main.m:3:9: fatal error: could not build module 'VZFlexLayout'

However, I have successfully built my project with xcodebuild, and linting passed with version 0.39.0. I don't know why linting failed with 1.1.1.

CocoaPods Environment

Stack

   CocoaPods : 1.1.1
        Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
    RubyGems : 2.0.14.1
        Host : Mac OS X 10.12.2 (16C67)
       Xcode : 8.2 (8C38)
         Git : git version 2.6.4
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : alibaba-inc-alipods-specs-mirror - http://gitlab.alibaba-inc.com/alipods/specs-mirror.git @ ec2df03b2f8469184bc42f6626594b09dcdaaa17
               alibaba-inc-nebulasdk-specs - http://gitlab.alibaba-inc.com/NebulaSDK/Specs.git @ eb679917976b3fa5ca4e40b268beed2ebfb0d463
               alibaba-inc-specs - git@gitlab.alibaba-inc.com:alipods/specs.git @ 6a6caea44f87371be05bfee7840cb2647f7707af
               alibaba-inc-specs-mirror - git@gitlab.alibaba-inc.com:alipods/specs-mirror.git @ ec2df03b2f8469184bc42f6626594b09dcdaaa17
               alibaba-inc-taobao-coupon-ddspecs - http://gitlab.alibaba-inc.com/taobao-coupon/ddspecs.git @ e87deeefbd4f21900b7098557b7039436831f36a
               alipay - http://gitlab.alibaba-inc.com/alipay-ios-client/specsdev.git @ 658d863c49fd0a8d793de4986c51cf732d5c8d62
               master - https://github.com/CocoaPods/Specs.git @ c8302fb1d597828e444e37a8a7ff26fbc0aff2cc
               wuwen1030 - https://github.com/wuwen1030/XTSpecs.git @ 0a576c29d8c759a4a755fb12b9766aff987690f0

Installation Source

Executable Path: /usr/local/bin/pod

Plugins

cocoapods-deintegrate : 1.0.1
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.1.2
cocoapods-try         : 1.1.0

Project that demonstrates the issue

VZFlexLayout https://github.com/Vizzle/VZFlexLayout

@wuwen1030 wuwen1030 changed the title Failed to push my spec to trunk with an lint error Failed to push my spec to trunk with a lint error Jan 17, 2017
@wuwen1030 wuwen1030 changed the title Failed to push my spec to trunk with a lint error Lint failed on an Objective C++ framework Jan 17, 2017
@dnkoutso
Copy link
Contributor

dnkoutso commented Jan 17, 2017

@wuwen1030 this problem occurs because the generated main.m file from CocoaPods needs to be .mm instead.

This can be fixed if #5677 lands which will disable the link phase when linting and will allow you to publish.

An ugly hack is to use:

  s.xcconfig = {
    'EXCLUDED_SOURCE_FILE_NAMES' => 'main.m'
  }
  s.pod_target_xcconfig = {
    'CLANG_CXX_LANGUAGE_STANDARD' => 'gnu++11',
    'CLANG_CXX_LIBRARY' => 'libc++'
  }

In your podspec.

@wuwen1030
Copy link
Author

@dnkoutso Thanks a lot for your advice. I have tried that, but I still failed with the follow error.

    /usr/bin/codesign --force --sign - --timestamp=none /Users/wuwen/Library/Developer/Xcode/DerivedData/App-felyndxqitlvmkdgxrksiowjebzi/Build/Products/Release-iphonesimulator/App.app
/Users/wuwen/Library/Developer/Xcode/DerivedData/App-felyndxqitlvmkdgxrksiowjebzi/Build/Products/Release-iphonesimulator/App.app: bundle format unrecognized, invalid, or unsuitable
Command /usr/bin/codesign failed with exit code 1

@dnkoutso
Copy link
Contributor

@wuwen1030 this might be because the app target is empty now...my best guess is that #5677 lands. i'll try and land it for you this week.

@dnkoutso
Copy link
Contributor

dnkoutso commented Jan 18, 2017

@wuwen1030 confirmed the PR fixes your issue:

** BUILD SUCCEEDED **

 -> VZFlexLayout (0.1.0)

Pods workspace available at `/var/folders/40/mxlx0vqn29vcg5g3vl7n5w7000015m/T/CocoaPods/Lint/App.xcworkspace` for inspection.

VZFlexLayout passed validation.

Will try to land it for 1.2.0.rc.2

wuwen1030 pushed a commit to Vizzle/VZFlexLayout that referenced this issue Jan 19, 2017
@wuwen1030
Copy link
Author

@dnkoutso Cool, awesome. Thank you very much again.

@dnkoutso
Copy link
Contributor

@wuwen1030 looks like this will land in 1.2.1 instead.

@dnkoutso
Copy link
Contributor

@wuwen1030 merged. Should ship after 1.2.0 (most likely 1.2.1...) which includes --skip-import-validation option.

@dnkoutso
Copy link
Contributor

dnkoutso commented Feb 4, 2017

Closing for now.

@dnkoutso dnkoutso closed this as completed Feb 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants